cryptowallet-cli
Crypto wallet generator CLI tool
Features
check the Options section for all supported commands
Install
$ npm i -g @yerofey/cryptowallet-cli
$ pnpm add -g @yerofey/cryptowallet-cli
$ yarn global add @yerofey/cryptowallet-cli
Usage
$ cw
$ cw -c btc
$ cw -m
$ cw -m 12
$ cw -m 15
$ cw -m 18
$ cw -m 21
$ cw -m 24
$ cw -m "radio bright pizza pluck family crawl palm flame forget focus stock stadium"
$ cw -n 10
$ cw -p aaa
$ cw -c BTC -p ABC
$ cw -c BTC -P abc
$ cw -c BTC -s ABC
$ cw -c BTC -S abc
$ cw -c BTC -f legacy
$ cw -c BTC -f segwit
$ cw -c BTC -f bech32 -m "radio bright pizza pluck family crawl palm flame forget focus stock stadium"
$ cw -c BTC -f bech32 -n 10 -m "radio bright pizza pluck family crawl palm flame forget focus stock stadium"
$ cw -c BTC -f taproot
$ cw -m "radio bright pizza pluck family crawl palm flame forget focus stock stadium"
$ cw -c BNB -f BEP2 -m "radio bright pizza pluck family crawl palm flame forget focus stock stadium"
$ cw -c BNB -f BEP20 -m "radio bright pizza pluck family crawl palm flame forget focus stock stadium"
$ cw -c btc --csv
$ cw -c btc -n 10 -D new
$ cw -l
don't use mnemonic from the examples, it's just an example, generate your own mnemonic string!
Blockchains & tickers supported
EVM
(Ethereum, Polygon, Arbitrum, Optimism, L2/L3, etc.)BTC
(Bitcoin) [legacy, segwit, bech32, taproot]ETH
(Ethereum)BNB
(Binance Coin) [BEP2, BEP20, ERC20]BSC
(Binance Smart Chain)ARB
(Arbitrum)OP
(Optimism)MATIC
(Polygon)SOL
(Solana)TON
(The Open Network)DOGE
(Dogecoin) [legacy, segwit, bech32]BCH
(Bitcoin Cash)LTC
(Litecoin) [legacy, segwit, bech32]POLYGON
(Polygon)TRX
(Tron)XTZ
(Tezos)DASH
(Dash)DCR
(Decred)ZEC
(Zcash)QTUM
(Qtum)BTG
(Bitcoin Gold)ONE
(Harmony)DGB
(DigiByte)RDD
(ReddCoin)VTC
(Vertcoin)MONA
(MonaCoin)NMC
(NameCoin)PPC
(PeerCoin)BLK
(BlackCoin)VIA
(Viacoin)NBT
(NIX Bridge Token)PLS
(PulseChain)
all other cryptos that are tokens in the ecosystems like Ethereum, Binance Smart Chain or Polygon and others chains are supported as well (L2/L3, etc.)
Options
-b
or -c
or --chain
: Specify the blockchain ticker to generate a wallet for-C
or --copy
: Copy the generated mnemonic to the clipboard-D
or --csv
: Save output into CSV file with custom or default name ("cw-output.csv
") - this is a shorthand for -o csv -F filename
-f
or --format
: Specify the blockchain wallet format (for BTC: legacy, segwit, bech32)-g
or --geek
: Display some additional "geeky" info-l
or --list
: List all supported blockchains-m
or --mnemonic [value]
: If used without a value or with 12
, 18
, or 24
, it generates a mnemonic string of that length. If a mnemonic string is provided, it generates a wallet from the given mnemonic. For example:
$ cw -m
: Generates a default 12-word mnemonic string.$ cw -m 12
: Generates a 12-word mnemonic string.$ cw -m 15
: Generates a 15-word mnemonic string.$ cw -m 18
: Generates an 18-word mnemonic string.$ cw -m 21
: Generates a 21-word mnemonic string.$ cw -m 24
: Generates a 24-word mnemonic string.$ cw -m "your mnemonic phrase here"
: Generates a wallet from the provided mnemonic string.
-n
or --number
: Specify number of wallets to display (works for HD wallets only, like BTC/LTC/DOGE)-p
or --prefix
: Specify desired prefix for the wallet address (case-insensitive)-P
or --prefix-sensitive
: Specify desired prefix of the wallet address (case-sensitive)-s
or --suffix
: Specify desired suffix for the wallet address (case-insensitive)-S
or --suffix-sensitive
: Specify desired suffix for the wallet address (case-sensitive)-v
or --version
: Display current version of CW tool
Currently not necessary options:
-F
or --filename
: Specify a filename (without extension) to output the data (works only with -o
argument)-o
or --output
: Specify a file format (currently only csv
supported) to output the generated data
Node.js supported versions
tested on Ubuntu 22.04 & Mac M1
TODO
Adding More Chains
We're always looking to support more blockchains! If you'd like to add support for a new chain, please follow these steps:
-
Create a Chain JSON File: Create a new .json
file in the src/chains
directory. The name of the file should be the ticker symbol of the blockchain (e.g., SOL.json
for Solana).
-
Define the Chain Properties: Fill the JSON file with the necessary properties of the blockchain. Here's the structure you should follow:
{
"title": "Readable Title of Blockchain",
"network": "Network Type (EVM, Bitcoin-like, etc.)",
"startsWith": "Starting Characters of Wallet Address",
"prefixTest": "Regex Pattern to Test Valid Characters in Prefix",
"apps": ["Array", "of", "Supported", "Wallet", "Apps"],
"flags": ["Array", "of", "Supported", "Features", "like", "m", "n", "p", "s"]
}
- Add Formats (if applicable): If the blockchain supports multiple wallet formats (like Bitcoin with Legacy, SegWit, Bech32), you can define them under the
formats
key:
"formats": {
"formatName": {
"format": "formatName",
"startsWith": "Starting Characters of Wallet Address",
"prefixTest": "Regex Pattern to Test Valid Characters in Prefix",
"rareSymbols": "Regex Pattern for Rarely Used Symbols",
"path": "Derivation Path (if applicable)",
"purpose": "BIP Purpose (if applicable)",
"apps": ["Array", "of", "Supported", "Wallet", "Apps"],
"flags": ["Array", "of", "Supported", "Features", "like", "m", "n", "p", "s"]
}
}
-
Submit a Pull Request: Once you've added the new chain file, please submit a pull request to the main repository. Make sure to provide a clear description of the blockchain and the properties you've set.
-
Wait for Review: The maintainers will review your submission. They might ask for changes or additional information. Once everything is set, your contribution will be merged, and the new chain will be supported!
Your contributions are greatly appreciated and help make this tool more versatile and useful for everyone!
Chain JSON File Structure Explained
Each chain JSON file is structured to provide essential information about the blockchain and how the wallet addresses are generated and formatted. Here's a detailed explanation of each field:
title
: The full, readable title of the blockchain.network
: The type of network or protocol the blockchain follows (e.g., EVM for Ethereum-compatible chains).startsWith
: The set of characters that the wallet address typically starts with.prefixTest
: A regular expression pattern that tests for valid characters that can appear in the prefix of a wallet address.apps
: An array of supported wallet applications that can be used with the generated addresses.flags
: An array of supported features for the wallet generation. Common flags include m
for mnemonic support, n
for generating multiple wallets, p
for prefix support, and s
for suffix support.formats
: (Optional) An object defining multiple wallet formats if the blockchain supports more than one format. Each format should specify its unique properties.
By following this structure, the cryptowallet-cli
tool can understand and support wallet generation for a wide array of blockchains.
Feel free to contribute by adding support for more chains, and help in making cryptowallet-cli
a more comprehensive tool for the crypto community!
Contributing
Contributions are welcome! If you would like to contribute to this project, please follow these guidelines:
- Fork the repository and create a new branch.
- Make your changes and ensure that the code is properly formatted.
- Write tests to cover any new functionality.
- Submit a pull request with a clear description of your changes.
By contributing to this project, you agree to abide by the Code of Conduct.
Thank you for your interest in contributing!
Support the Project
If you find this tool useful and would like to support its development, consider making a donation. Your support is greatly appreciated and helps me dedicate more time to maintain and improve this project.
Donate Crypto:
- Tether (USDT-TRC20):
TCW9eaRWjpivZvnZ5DwgbWxPRpoZNWbuPe
- Bitcoin (BTC):
bc1qcwamquntxshqsjcra6vryftrfd9z57j02g3ywq
- Ethereum (ETH):
0xe3e3ed78d9f8A935a9a0fCE2a7305F2f5DBabAD8
- BNB (BEP20):
0xe3e3ed78d9f8A935a9a0fCE2a7305F2f5DBabAD8
- BNB (BEP2):
bnb1gtxfz4kllltaeekw3edfd496gpa3ukpakvzncq
- SOL:
CWsbNQRxNzAasLd2zfwkEkbBZXKxfoxva14pe8wawUju
- TON:
UQCWDwqtvC_jml2hSf8laNQu4chYVCbHBpkbKbyDdxzM7Ma0
- DOGE (DOGE):
DMAkWQKx1H6ESG3beDBssn5mAAZcwkrYVh
Other Donate Options:
Thank you for your support!
Author
Yerofey S.
License
MIT