Skip to main content

XRPL Plugins

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xrpl-plugin-0.2.5.tar.gz (7.6 MB view details)

Uploaded Source

Built Distribution

xrpl_plugin-0.2.5-cp311-cp311-macosx_14_0_arm64.whl (17.7 MB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

File details

Details for the file xrpl-plugin-0.2.5.tar.gz.

File metadata

  • Download URL: xrpl-plugin-0.2.5.tar.gz
  • Upload date:
  • Size: 7.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.4

File hashes

Hashes for xrpl-plugin-0.2.5.tar.gz
Algorithm Hash digest
SHA256 1cbde4cdb52b64e8d76734a89c96eff467ec87176de4e8b2dd304184de01e691
MD5 4e46dcdf0fd67677bec335e4b0811967
BLAKE2b-256 4e699accfb7599b9ee6e0379eebbb3f61981c839cf9b9f48a593bd84b5d39fae

See more details on using hashes here.

File details

Details for the file xrpl_plugin-0.2.5-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for xrpl_plugin-0.2.5-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 0788ebca05033b040609dfc5581f8f2c10be7534298cfaaac2d9ec572dc202e2
MD5 b7defa5b101c2e981ddc0bf383c398d6
BLAKE2b-256 e4a6a625125a3e04fb6a2e440e80da9155853df1b28d47ce1d1225072a51ab3d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page