Crypto Wallet CLI is a command-line tool for generating and managing Binance Smart Chain (BSC), Ethereum, and Tron wallets. It allows you to create new wallets from a mnemonic phrase, retrieve the balance of a given address, and more.
- Generate a BSC, Ethereum, or Tron wallet from a mnemonic or create a new one
- Retrieve the balance of a given BSC, Ethereum, or Tron address
- Save wallet details (mnemonic, address, private key) to a JSON file with a timestamped filename
-
Clone the repository:
git clone https://github.com/penn201500/crypto_wallet_generator cd crypto-wallet-cli
-
Create a conda environment and install dependencies:
conda create -n cryptowallet-cli python=3.12 conda activate cryptowallet-cli pip install -e .
-
Create a .env file in the project root directory with the following content
INFURA_URL=your_infura_url
TRON_API_KEY=your_tron_api_key
To create a new BSC/Ethereum wallet, run:
cw c
To create a new Tron wallet, run:
cw c -c tron
To create a BSC/Ethereum wallet from an existing mnemonic, run:
cw c -m "your twelve word mnemonic here"
To create a Tron wallet from an existing mnemonic, run:
cw c -m "your twelve word mnemonic here" -c tron
To specify a custom filename prefix for saving the wallet details, run:
cw c -m "your twelve word mnemonic here" -p mywallet
To get the balance of a BSC address, run:
cw b -a 0xYourBSCAddress
To get the balance of a Tron address, run:
cw b -a 0xYourBSCAddress -c tron
To generate a new mnemonic phrase, run:
cw m
To generate 3 BSC/Ethereum wallets, run:
cw -c -n 3
To generate 3 Tron wallets, run:
cw -c -n 3 -c tron
-
c, --create-wallet: Create a new wallet from a mnemonic and save to a file.
-m, --mnemonic [value]
: The mnemonic to create a new wallet.-p, --prefix [value]
: The prefix for the JSON filename.-n, --number [value]
: The number of wallets to create.-c, --chain [value]
: The blockchain (ethereum, bsc, tron).
-
b, --balance: Get the balance of an address.
-a, --address [value]
: The address to get the balance of.-c, --chain [value]
: The blockchain (ethereum, bsc, tron).
-
m, --generate-mnemonic: Generate a new mnemonic phrase.
To run the tests for the utility functions, use the following command:
python -m unittest discover -s tests -v
This project is inspired by yerofey/cryptowallet-cli. If you need a JavaScript version, please check out their project.
This project is licensed under the MIT License. See the LICENSE file for details.