XRPL Account Methods¶
Public interface for XRPL account sugar methods.
-
xrpl.account.
does_account_exist
(address: str, client: xrpl.clients.client.Client) → bool¶ Query the ledger for whether the account exists.
- Parameters
address – the account to query.
client – the network client used to make network calls.
- Returns
Whether the account exists on the ledger.
- Raises
XRPLRequestFailureException – if the transaction fails.
-
xrpl.account.
get_account_info
(address: str, client: xrpl.clients.client.Client) → xrpl.models.response.Response¶ Query the ledger for account info of given address.
- Parameters
address – the account to query.
client – the network client used to make network calls.
- Returns
The account info for the address.
- Raises
XRPLRequestFailureException – if the rippled API call fails.
-
xrpl.account.
get_account_payment_transactions
(address: str, client: xrpl.clients.client.Client) → List[Dict[str, Any]]¶ Query the ledger for a list of payment transactions that involved a given account.
- Parameters
address – the account to query.
client – the network client used to make network calls.
- Returns
The payment transaction history for the address.
-
xrpl.account.
get_account_transactions
(address: str, client: xrpl.clients.client.Client) → List[Dict[str, Any]]¶ Query the ledger for a list of transactions that involved a given account.
- Parameters
address – the account to query.
client – the network client used to make network calls.
- Returns
The transaction history for the address.
- Raises
XRPLRequestFailureException – if the transaction fails.
-
xrpl.account.
get_balance
(address: str, client: xrpl.clients.client.Client) → int¶ Query the ledger for the balance of the given account.
- Parameters
address – the account to query.
client – the network client used to make network calls.
- Returns
The balance of the address.
-
xrpl.account.
get_latest_transaction
(account: str, client: xrpl.clients.client.Client) → xrpl.models.response.Response¶ Fetches the most recent transaction on the ledger associated with an account.
- Parameters
account – the classic address of the account.
client – the network client used to communicate with a rippled node.
- Returns
The Response object containing the transaction info.
- Raises
XRPLRequestFailureException – if the transaction fails.
-
xrpl.account.
get_next_valid_seq_number
(address: str, client: xrpl.clients.client.Client) → int¶ Query the ledger for the next available sequence number for an account.
- Parameters
address – the account to query.
client – the network client used to make network calls.
- Returns
The next valid sequence number for the address.