Wallet Methods

Methods for working with XRPL wallets.

class xrpl.wallet.Wallet(seed: str, sequence: int)

Bases: object

The cryptographic keys needed to control an XRP Ledger account. See Cryptographic Keys for details.


The address that publicly identifies this wallet, as a base58 string.

classmethod create(crypto_algorithm: xrpl.constants.CryptoAlgorithm = CryptoAlgorithm.ED25519) xrpl.wallet.main.Wallet

Generates a new seed and Wallet.


crypto_algorithm – The key-generation algorithm to use when generating the seed. The default is Ed25519.


The wallet that is generated from the given seed.

get_xaddress(*, tag: Optional[int] = None, is_test: bool = False) str

Returns the X-Address of the Wallet’s account.

  • tag – the destination tag of the address. Defaults to None.

  • is_test – whether the address corresponds to an address on the test network.


The X-Address of the Wallet’s account.


The private key that is used to create signatures, as a hexadecimal string. MUST be kept secret!


The public key that is used to identify this wallet’s signatures, as a hexadecimal string.


The core value that is used to derive all other information about this wallet. MUST be kept secret!


The next available sequence number to use for transactions from this wallet. Must be updated by the user. Increments on the ledger with every successful transaction submission, and stays the same with every failed transaction submission.

exception xrpl.wallet.XRPLFaucetException

Bases: xrpl.constants.XRPLException

Faucet generation exception.

xrpl.wallet.generate_faucet_wallet(client: xrpl.clients.sync_client.SyncClient, wallet: Optional[xrpl.wallet.main.Wallet] = None, debug: bool = False) xrpl.wallet.main.Wallet

Generates a random wallet and funds it using the XRPL Testnet Faucet.

  • client – the network client used to make network calls.

  • wallet – the wallet to fund. If omitted or None, a new wallet is created.

  • debug – Whether to print debug information as it creates the wallet.


A Wallet on the testnet that contains some amount of XRP.