mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2026-06-03 16:56:40 +00:00
Bumps [python-dotenv](https://github.com/theskumar/python-dotenv) from 1.2.1 to 1.2.2. - [Release notes](https://github.com/theskumar/python-dotenv/releases) - [Changelog](https://github.com/theskumar/python-dotenv/blob/main/CHANGELOG.md) - [Commits](https://github.com/theskumar/python-dotenv/compare/v1.2.1...v1.2.2) --- updated-dependencies: - dependency-name: python-dotenv dependency-version: 1.2.2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
Delete Account (Python)
Python sample code showing how to delete an account from the XRP Ledger.
Setup
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Usage
If you run the script by default, it gets an account from the faucet and outputs the details to the console. Example:
$ python delete-account.py
Got new account from faucet:
Address: rNqLzC9pVbphwwpTBNPjpx14QSauHH3kzv
Seed: sEdTNEJgK3cVshBEakfVic4MMtWCETY
Edit the .env file to add this seed, then wait until the account can be deleted.
Account is too new to be deleted.
Account sequence + 255: 15226905
Validated ledger index: 15226649
(Sequence + 255 must be less than or equal to the ledger index)
Estimate: 15 minutes until account can be deleted
OK: Account owner count (0) is low enough.
OK: Account balance (100000000 drops) is high enough.
A total of 1 problem(s) prevent the account from being deleted.
Edit the .env file to add the seed of the account to delete. For example:
# Replace the seed with the seed of the account to delete.
ACCOUNT_SEED=sEdTNEJgK3cVshBEakfVic4MMtWCETY
# Change to secp256k1 if you generated the seed with that algorithm
ACCOUNT_ALGORITHM=ed25519
Then run the script again:
python delete-account.py