Methods for working with XRPL wallets.
- class xrpl.wallet.Wallet(seed: str, sequence: int, *, algorithm: Optional[CryptoAlgorithm] = None)¶
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: CryptoAlgorithm = CryptoAlgorithm.ED25519) 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.
- xrpl.wallet.generate_faucet_wallet(client: SyncClient, wallet: Optional[Wallet] = None, debug: bool = False, faucet_host: Optional[str] = None) 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.
faucet_host – A custom host to use for funding a wallet. In environments other than devnet and testnet, this parameter is required.
A Wallet on the testnet that contains some amount of XRP.