Python Plugins
This folder contains everything needed to build and run a Python plugin (other than the rippled code).
Build & Run
pip install xrpl-plugin
plugin-build path/to/plugin.py
# edit rippled.cfg to include the plugin.xrplugin in a [plugins] stanza
# run rippled with the `plugin` branch and submit plugin transactions to it
Concepts
Keylet
A Keylet identifies a key in the state map and its ledger entry type. Keylet is a portmanteau of the key and LET, an acronym for LedgerEntryType.
LedgerEntryType
Each ledger object requires a unique type identifier, which is stored within the object itself; this makes it possible to iterate the entire ledger, determine each object's type and verify that the object you retrieved from a given hash matches the expected type.
Notes
pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code. The plugin exposes the code in main.cpp as python bindings.
Then we can use in our plugin the following:
-
models (classes):
- Transactor
- SType (it has a parse_value method)
- TERCode
- LedgerObject
- InvariantCheck
- InnerObject
-
sfields (ST fields, serialized fields that can be included in transactions and ledger objects):
- SF_ACCOUNT
- SF_AMOUNT
- SF_UINT8
- ...
-
stypes (all STObjects, serialized types):
- STAmount
- STObject
- STArray
- ...
-
return_codes (Existing TER return codes):
- tesSUCCESS
- temMALFORMED
- ...
-
basic_types (basic/fundamental types):
- AccountID
- XRPAmount
- Seed
- IOUAmount
- ...
-
keylets (as per definition above):
- account_keylet
- escrow_keylet
- trustline_keylet
- offer_keylet
- ...
-
ledger_objects (for ledger object manipulation):
- LedgerEntryType
- LedgerSpecificFlags
-
transactors (contexts and other classes used in transaction processing):
- Rules
- Fees
- TimePoint
- LedgerInfo
-
build (for the build process)
-
nfts (utility methods for working with NFTs)
Metadata
Release files for xrpl-plugin 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xrpl-plugin-0.2.5.tar.gz | 7.6 MB | Without provenance | Details for xrpl-plugin-0.2.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xrpl_plugin-0.2.5-cp311-cp311-macosx_14_0_arm64.whl | CPython 3.11 | CPython 3.11 | macOS 14.0+ ARM64 | Details for xrpl_plugin-0.2.5-cp311-cp311-macosx_14_0_arm64.whl |
Total release size: 25.3 MB
Release files / xrpl-plugin-0.2.5.tar.gz
| Download URL | xrpl-plugin-0.2.5.tar.gz |
|---|---|
| Size | 7.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1cbde4cdb52b64e8d76734a89c96eff467ec87176de4e8b2dd304184de01e691
|
|
BLAKE2b-256 checksum How to use checksums |
4e699accfb7599b9ee6e0379eebbb3f61981c839cf9b9f48a593bd84b5d39fae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.4
|
Release files / xrpl_plugin-0.2.5-cp311-cp311-macosx_14_0_arm64.whl
| Download URL | xrpl_plugin-0.2.5-cp311-cp311-macosx_14_0_arm64.whl |
|---|---|
| Size | 17.7 MB |
| Tags | CPython 3.11 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0788ebca05033b040609dfc5581f8f2c10be7534298cfaaac2d9ec572dc202e2
|
|
BLAKE2b-256 checksum How to use checksums |
e4a6a625125a3e04fb6a2e440e80da9155853df1b28d47ce1d1225072a51ab3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.4
|
Security for xrpl-plugin 0.2.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.