XRPL Wallet Methods

Top-level exports for the wallet generation package.

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.

classic_address

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

classmethod create(crypto_algorithm: xrpl.constants.CryptoAlgorithm = <CryptoAlgorithm.ED25519: 'ed25519'>)xrpl.wallet.main.Wallet

Generates a new seed and Wallet.

Parameters

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

Returns

The wallet that is generated from the given seed.

private_key

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

public_key

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

seed

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

sequence

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.client.Client, 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.

Parameters
  • 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.

Returns

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

Raises