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

Link to this function

changeset(name, params \\ %{}, opts \\ [])

Builds a changeset from the schema and params.

Retrieve information about the public ledger.

Official documentation: https://xrpl.org/ledger.html

Link to this function

ledger!(params)

Link to this function

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

Link to this function

ledger_closed!()

Link to this function

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

Link to this function

ledger_current!()

Link to this function

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

Link to this function

ledger_data!(params)

Link to this function

validate(changeset)

@spec validate(changeset()) :: {:ok, params()} | {:error, changeset()}

Returns the validated parameters or an error changeset.

Link to this function

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.

Link to this function

xrpl(method, params)

Link to this function

xrpl(method, validator, params)