bbcoin
v0.9.3
Published
Wallet cli for btc/eth
Readme
bbcoin
CLI wallet for BTC / ETH / ERC20 and Uniswap (swap, liquidity). Works as a global npm package.
Install
npm install -g bbcoin
# first-time RPC setup (saved locally, not in the package):
bbcoin configConfig is stored at ~/.bbcoin/config.json (mode 600). You only need to enter your Infura API key once per machine.
Priority for Infura key: INFURA_API_KEY env → ~/.bbcoin/config.json → interactive prompt on first EVM command.
Signing (optional)
PRIVATE_KEY/BTC_WIFenvironment variables, or- mysecret alias when a command asks for it (raw keys are not accepted at the prompt)
For local development you can still use a project .env (see .env.example).
Commands
| Command | Description |
|---------|-------------|
| bbcoin config | Set or update Infura API key (saved under ~/.bbcoin/) |
| bbcoin genBtc | New Bitcoin wallet |
| bbcoin btcBalance | BTC balance |
| bbcoin sendBtc | Send BTC |
| bbcoin genEth | New Ethereum wallet |
| bbcoin ethBalance | ETH balance (mainnet | base) |
| bbcoin sendEth | Send ETH |
| bbcoin ethPhrase | Derive address from mnemonic |
| bbcoin ethPrivate | Address from private key |
| bbcoin tokenBalance | ERC20 balance |
| bbcoin sendToken | Transfer ERC20 |
| bbcoin swap | Swap via Uniswap |
| bbcoin buy / sell | Buy / sell tokens |
| bbcoin addLiquidity / removeLiquidity | Uniswap V3 liquidity |
Develop from source
npm install
npm link
bbcoin config
npm testSecurity
- Never commit API keys or private keys.
- Rotate any Infura key that was previously in source control.
~/.bbcoin/config.jsonis only on your machine; it is not published with the npm package.
Libraries
- BTC: bitcoinjs-lib
- ETH: ethers.js v5
