This tool generates deterministic HD wallet addresses and private keys for multiple blockchains from a single BIP-39 mnemonic and optional BIP-39 passphrase.
It supports interactive prompts, CLI flags, and environment variables.
Built for:
- Solana (ed25519)
- EVM networks: Ethereum, BNB Chain, Polygon, Arbitrum, Optimism, Avalanche, etc. (secp256k1)
- Aptos (ed25519)
- Tron (secp256k1)
- TON (ed25519)
- Sui (ed25519)
This script makes it easy to generate, audit or migrate wallets across ecosystems.
- Generate or import your own mnemonic (recovery phrase)
- Optional BIP-39 passphrase
- Deterministic HD wallet generation from BIP-44 paths
- Multi-chain support (Sol, EVM, Apt, TRX, TON, Sui)
- Filters using
--chains - Compatible with Bun, Node, tsx
- Prints derivation path, private key, public key & address for each network
- Fully interactive mode when no flags are provided
| Chain | Coin Type | Curve | Path Format |
|---|---|---|---|
| Solana | 501 |
ed25519 | m/44'/501'/{i}' |
| EVM (ETH, BSC, etc.) | 60 |
secp256k1 | m/44'/60'/{i}'/0/0 |
| Aptos | 637 |
ed25519 | m/44'/637'/{i}'/0'/0' |
| Tron | 195 |
secp256k1 | m/44'/195'/{i}'/0/0 |
| TON | 607 |
ed25519 | m/44'/607'/0'/0'/{i}'/0' |
| Sui | 784 |
ed25519 | m/44'/784'/{i}'/0'/0' |
- Never share your mnemonic, passphrase, or private keys.
- Use this script offline for maximum security.
- Generated keys are deterministic: anyone with your mnemonic can regenerate all accounts.
Install dependencies:
bun installRun production using ts-node:
bun startOr development using tsx:
bun dev| Flag | Alias | Description |
|---|---|---|
--chains sol,evm,sui |
-c |
Select only these networks |
options: sol, evm, apt, trx, ton, sui |
||
default: all |
||
--count N |
-t |
Number of accounts to derive (default: 3) |
--mnemonic "..." |
-m |
Provide your own recovery phrase |
--passphrase "..." |
-p |
Provide BIP-39 passphrase |
--out FILENAME.json |
-o |
Save output to a JSON file |
MNEMONIC=... |
— | Provide recovery phrase via env var |
PASSPHRASE=... |
— | Provide passphrase via env var |
COUNT=5 |
— | Provide total derivation count via env var |
bun dev --count 1bun dev --chains sol --count 1bun dev --chains sol,evm,sui --count 5bun dev --chains apt,ton --count 1bun dev --mnemonic "abandon abandon abandon ..." --count 1bun dev --passphrase "mySecret" --count 2or via env:
PASSPHRASE="xyz" bun dev --chains sol,evmbun dev --mnemonic "abandon abandon abandon ..." --passphrase "mySecret" --count 1or in shortened format:
bun dev -m "abandon abandon abandon ..." -p "mySecret" -t 1bun dev --count 1 --out results.jsonIf no recovery phrase is supplied, you will be asked:
Do you want to enter your own recovery phrase? (y/N)
If no passphrase is supplied:
Use a passphrase? (y/N)
================================================================================
Account index: 0
Solana path: m/44'/501'/0'
Solana relative seed: ...
Solana private key (bs58): ...
Solana address: ...
EVM path: m/44'/60'/0'/0/0
EVM private key: ...
EVM address: ...
Aptos path: m/44'/637'/0'/0'/0'
Aptos private key (hex): ...
Aptos public key (hex): ...
Aptos address: ...
Tron path: m/44'/195'/0'/0/0
Tron private key (hex): ...
Tron address (base58): ...
Tron address (hex): ...
Ton path: m/44'/607'/0'/0'/0'/0'
Ton private key 32-byte (hex): ...
Ton combined secret (64-byte, seed+pub) hex: ...
Ton public key (hex): ...
Ton address (friendly): ...
Sui path: m/44'/784'/0'/0'/0'
Sui private key (base64 32-byte secret): ...
Sui public key (base64): ...
Sui address: ...
Sui wallet import key (suiprivkey): ...
================================================================================
These override CLI behaviour:
MNEMONIC="your twelve or twenty-four words"PASSPHRASE="your passphrase"COUNT=10If you are generating new wallets and you want the script to create a recovery phrase for you then ignore this.
If you want to work with an existing recovery phrase then follow on.
There is a default .env.example that contains the following environment variables.
MNEMONIC="your twelve or twenty-four words"
PASSPHRASE="your passphrase"
COUNT=10Rename this file from .env.example to .env and edit the .env file changing the details to your mnemonic and optional passphrase.
The count will determine how many accounts are generated.
Copyright (c) 2025 Justin Hartman [email protected]
- Justin Hartman (@justinhartman)
- Abhijay Rajvansh (@abhijayrajvansh) - for his original work on the Solana Wallet Generator