Skip to main content

Wallet Expander CLI

About

Wallet Expander CLI allows you to easily derive addresses from your mnemonic


License

Licensed under the PolyForm Noncommercial License 1.0.0. Commercial use requires a separate written commercial license agreement from the licensor — contact alex@vir-tec.net.


Key features

  • Multiple Wallet Derivation Paths: Different wallets use different derivation paths to get their addresses. This tool supports quite a few of them.
  • Custom Address Range: You may choose from what index to start deriving and at which to stop.
  • Supported Networks: Ethereum, Optimism, Bsc, Polygon, Sonic, Base, Arbitrum, Avalanche, Tron, Ethereum-Classic, Ton, Bitcoin, Litecoin, Solana, Sui, Aptos, Dogecoin, Ripple, Cardano, Bch, Polkadot

How to run

This is the recommended way for most users.

Requirements

  • Node.js (v22)

Run

npx @extra-wallet/wallet-expander

This will:

  • download the CLI on demand,
  • start the interactive terminal UI

Option 2: Run locally from the repository (development)

Use this if you want to:

  • inspect the code,
  • modify the CLI,
  • contribute or debug.

Requirements

  • Node.js (v22)
  • pnpm

1. Install dependencies

From the repository root:

pnpm install

2. Build shared code

cd shared/sdk
pnpm build

3. Return to the root of the repository

cd ../..

4. Build the CLI

cd packages/wallet-expander-cli
pnpm build

5. Run locally

npx wallet-expander

How to use

The CLI can be run in two modes: interactive and non-interactive

To run the program in interactive mode you just have to follow the instructions of the previous step. In this mode you will be asked for needed inputs step by step.

To run the program in non-interactive mode you have to also specify arguments using flags like this:

npx wallet-expander --mnemonic="..." --from=5 --to=10

To get information about every argument, you can use help command:

npx wallet-expander help

Arguments

FlagRequiredDescriptionAliases
mnemonictrueMnemonic from which you want to derive addressesm
networktrueNetwork you want to get addresses ofn, net
outputfalseOutput file to put all the derived addresses to. If no output specified, the result will be printed to stdouto
walletfalseWallet you use with the provided mnemonic. Defaults to EXTRA WALLET (default derivation path)
fromfalseThe index from which to start deriving addresses. Defaults to 0
tofalseThe index at which to end deriving addresses. Defaults to 0

Output

The result will be the table with the following columns:

  • Index: index of the address used to derive it
  • Private Key: the private key that corresponds to the address
  • Reward Private Key and Enterprise Private Key: these columns will take place of Private Key column if Cardano network is used since it has multiple different private keys
  • Address: the actual derived public address

If output is specified, the table will be written there. If not, the table will be printed to stdout