Wallet Methods

Async methods for working with XRPL wallets.

exception xrpl.asyncio.wallet.XRPLFaucetException

Bases: XRPLException

Faucet generation exception.

async xrpl.asyncio.wallet.generate_faucet_wallet(client: Client, wallet: Wallet | None = None, debug: bool = False, faucet_host: str | None = None, usage_context: str | None = None, user_agent: str | None = 'xrpl-py') 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.

  • faucet_host – A custom host to use for funding a wallet. In environments other than devnet and testnet, this parameter is required.

  • usage_context – The intended use case for the funding request (for example, testing). This information will be included in the json body of the HTTP request to the faucet.

  • user_agent – A string representing the user agent (software/ client used) for the HTTP request. Default is “xrpl-py”.

Returns:

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

Raises: