XRPL.Ledger (xrpl v1.0.0)
XRPL.Ledger is a module to interact with ledgers on the XRP Ledger. A ledger version contains a header, a transaction tree, and a state tree, which contain account settings, trustlines, balances, transactions, and other data. Use these methods to retrieve ledger info.
Official RPC documentation: https://xrpl.org/ledger-methods.html
Summary
Functions
Builds a changeset from the schema and params.
Retrieve information about the public ledger.
The ledger_closed method returns the unique identifiers of the most recently closed ledger. (This ledger is not necessarily validated and immutable yet.)
The ledger_current method returns the unique identifiers of the current in-progress ledger.
The ledger_data method retrieves contents of the specified ledger. You can iterate through several calls to retrieve the entire contents of a single ledger version.
Returns the validated parameters or an error changeset.
Returns the validated parameters or an error changeset.
Expects a schema to be defined with defparams
.
Functions
changeset(name, params \\ %{}, opts \\ [])
Builds a changeset from the schema and params.
ledger(params)
Retrieve information about the public ledger.
Official documentation: https://xrpl.org/ledger.html
ledger!(params)
ledger_closed()
The ledger_closed method returns the unique identifiers of the most recently closed ledger. (This ledger is not necessarily validated and immutable yet.)
Official documentation: https://xrpl.org/ledger_closed.html
ledger_closed!()
ledger_current()
The ledger_current method returns the unique identifiers of the current in-progress ledger.
This command is mostly useful for testing, because the ledger returned is still in flux.
Official documentation: https://xrpl.org/ledger_current.html
ledger_current!()
ledger_data(params)
The ledger_data method retrieves contents of the specified ledger. You can iterate through several calls to retrieve the entire contents of a single ledger version.
Official documentation: https://xrpl.org/ledger_data.html
ledger_data!(params)
schema(binary)
validate(changeset)
@spec validate(changeset()) :: {:ok, params()} | {:error, changeset()}
Returns the validated parameters or an error changeset.
validate(name, params \\ %{}, opts \\ [])
@spec validate(name(), params(), opts()) :: {:ok, params()} | {:error, changeset()}
Returns the validated parameters or an error changeset.
Expects a schema to be defined with defparams
.