Wallet CLI is a powerful command-line tool for managing multi-blockchain wallets. It allows you to generate public keys, manage balances, transfer funds, and estimate transaction fees with ease. The tool supports a wide range of blockchains and tokens, making it an essential utility for developers and blockchain enthusiasts.
Install the @codegame.dev/wallet-cli
globally using npm:
npm install -g @codegame.dev/wallet-cli
This makes the wallet-cli
command accessible from anywhere on your system.
- Generate public keys for multiple blockchains from an existing or new mnemonic.
- View wallet balances in real-time.
- Perform secure and efficient transfers.
- Estimate transaction fees for supported networks.
- Wallet creation is supported for most major blockchains, but other features are currently supported for these blockchains: Ethereum, Binance Smart Chain, Polygon, Tron, Ton. In the future, other chains will be added.
-
-V, --version
: Display the version number. -
-h, --help
: Show help for any command.
Display a list of all supported coins.
Options:
-
-s <text>
: Search for a specific coin. -
--json
: Output results in JSON format.
Example:
wallet-cli coin-list -s bitcoin
Retrieve the public address for a specific coin.
Options:
-
--mnemonic <mnemonic>
: Specify an existing mnemonic. -
--coin <coin>
: Name of the coin (based on Trust Wallet Core). -
--coingecko-platform <platform>
: Platform name (based on CoinGecko API). -
--json
: Output results in JSON format.
Example:
wallet-cli get-address --mnemonic "your mnemonic" --coin ethereum
Generate a new mnemonic and wallet.
Options:
-
--coin <coin>
: Name of the coin (based on Trust Wallet Core). -
--coingecko-platform <platform>
: Platform name (based on CoinGecko API). -
--json
: Output results in JSON format.
Example:
wallet-cli create-wallet --coin bitcoin
Check the balance of a wallet for a coin or token.
Options:
-
--coin <coin>
: Name of the coin (based on Trust Wallet Core). -
--coingecko-platform <platform>
: Platform name (based on CoinGecko API). -
--address <address>
: Wallet address. -
--token-address <token-address>
: Contract address of the token. -
--json-rpc-provider <url>
: URL of the JSON-RPC provider. -
--http-provider <url>
: URL of the HTTP provider. -
--json
: Output results in JSON format. -
--testnet
: Use the testnet provider.
Example:
wallet-cli get-balance --coin ethereum --address 0xYourAddress
Send coins or tokens to another wallet.
Options:
-
--mnemonic <mnemonic>
: Specify an existing mnemonic. -
--coin <coin>
: Name of the coin (based on Trust Wallet Core). -
--coingecko-platform <platform>
: Platform name (based on CoinGecko API). -
--address <address>
: Recipient wallet address. -
--amount <amount>
: Amount to transfer. -
--token-address <token-address>
: Contract address of the token. -
--json-rpc-provider <url>
: URL of the JSON-RPC provider. -
--json
: Output results in JSON format. -
--testnet
: Use the testnet provider.
Example:
wallet-cli transfer --mnemonic "your mnemonic" --coin ethereum --address 0xReceiverAddress --amount 0.1
Estimate the fees for a coin or token transfer.
Options:
-
--mnemonic <mnemonic>
: Specify an existing mnemonic. -
--coin <coin>
: Name of the coin (based on Trust Wallet Core). -
--coingecko-platform <platform>
: Platform name (based on CoinGecko API). -
--address <address>
: Recipient wallet address. -
--amount <amount>
: Amount to transfer. -
--token-address <token-address>
: Contract address of the token. -
--json-rpc-provider <url>
: URL of the JSON-RPC provider. -
--json
: Output results in JSON format. -
--testnet
: Use the testnet provider.
Example:
wallet-cli estimate-fee --mnemonic "your mnemonic" --coin ethereum --address 0xReceiverAddress --amount 0.1
The following networks are supported for get-balance
, transfer
, and estimate-fee
commands:
- Ethereum (ETH)
- Binance Smart Chain (BSC)
- Polygon POS (POL)
- Tron (TRX)
- Ton (TON) - static estimate-fee
Wallet CLI leverages the following libraries:
- @trustwallet/wallet-core for blockchain wallet operations.
- ethers.js for Ethereum-related operations.
- tronweb for interacting with the Tron network.
Special thanks to these projects for their contributions to the blockchain ecosystem.
This project is licensed under the MIT License. See the LICENSE file for details.