XRPL.Ledger (xrpl v0.1.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

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.

Types

Link to this type

currency_without_amount()

@type currency_without_amount() ::
  %{currency: String.t()} | %{currency: String.t(), issuer: String.t()}

Functions

Link to this function

ledger(opts \\ [])

@spec ledger(Keyword.t()) :: Tesla.Env.result()

Retrieve information about the public ledger.

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

Link to this function

ledger!(opts \\ [])

Link to this function

ledger_closed()

@spec ledger_closed() :: Tesla.Env.result()

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()

@spec ledger_current() :: Tesla.Env.result()

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(opts \\ [])

@spec ledger_data(Keyword.t()) :: Tesla.Env.result()

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!(opts \\ [])