
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
hd-cli-wallet
Advanced tools
This JavaScript library is several things in one:
This app can be run from source to generate wallets, send, and receive BCH. It has hooks to interface with colab-coinjoin-api in order to preserve privacy by anonymizing your BCH using the Collaborative CoinJoin protocol.
This code is also compiled into a the hd-cli-wallet npm library. This library is included into the electron-bch-coinjoin-wallet desktop application, in order to provide a BCH wallet with a graphical user interface (GUI).
The npm library can be included in your own app to instantly give it the ability to send and receive BCH transactions, including SLP tokens. Here is an example of how to include it in your own app. This example will generate a new HD wallet.
// Instantiate the Create Wallet class from this library.
const CreateWallet = require('hd-cli-wallet')
const createWallet = new CreateWallet()
const walletFile = './wallet.json'
async function makeNewWallet() {
const wallet = await createWallet.createWallet(walletFile)
console.log(`wallet: ${JSON.stringify(wallet, null, 2)}`)
}
makeNewWallet()
This app is tested on the following versions for npm and node.js:
While this npm library can be used globally, the intended audience is developers
familiar with the usage of npm and git. Here is how to set up your own
developer environment:
git clone.npm install./bin/run helpRunning the wallet this way, you can edit the behavior of the wallet by making changes to the code in the src/commands directory.
$ npm install -g hd-cli-wallet
$ hd-cli-wallet COMMAND
running command...
$ hd-cli-wallet (-v|--version|version)
hd-cli-wallet/1.5.0 linux-x64 node-v16.14.2
$ hd-cli-wallet --help [COMMAND]
USAGE
$ hd-cli-wallet COMMAND
...
hd-cli-wallet coinjoin-singlehd-cli-wallet create-wallethd-cli-wallet get-addresshd-cli-wallet help [COMMAND]hd-cli-wallet list-walletshd-cli-wallet remove-wallethd-cli-wallet sendhd-cli-wallet send-allhd-cli-wallet split-utxohd-cli-wallet update-balanceshd-cli-wallet coinjoin-singlePariticipate in a single CoinJoin round
USAGE
$ hd-cli-wallet coinjoin-single
OPTIONS
-n, --name=name Name of wallet
DESCRIPTION
This command will initiate a CoinJoin round, and will exit after a single
successful round.
See code: src/commands/coinjoin-single.js
hd-cli-wallet create-walletGenerate a new HD Wallet.
USAGE
$ hd-cli-wallet create-wallet
OPTIONS
-d, --description=description Description of the wallet
-n, --name=name Name of wallet
-t, --testnet Create a testnet wallet
See code: src/commands/create-wallet.js
hd-cli-wallet get-addressGenerate a new address to recieve BCH.
USAGE
$ hd-cli-wallet get-address
OPTIONS
-n, --name=name Name of wallet
-s, --slp Generate a simpledger: token address
-t, --testnet Create a testnet wallet
See code: src/commands/get-address.js
hd-cli-wallet help [COMMAND]display help for hd-cli-wallet
USAGE
$ hd-cli-wallet help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
hd-cli-wallet list-walletsList existing wallets.
USAGE
$ hd-cli-wallet list-wallets
See code: src/commands/list-wallets.js
hd-cli-wallet remove-walletRemove an existing wallet.
USAGE
$ hd-cli-wallet remove-wallet
OPTIONS
-n, --name=name Name of wallet
See code: src/commands/remove-wallet.js
hd-cli-wallet sendSend an amount of BCH
USAGE
$ hd-cli-wallet send
OPTIONS
-a, --sendAddr=sendAddr Cash address to send to
-b, --bch=bch Quantity in BCH
-n, --name=name Name of wallet
See code: src/commands/send.js
hd-cli-wallet send-allSend all BCH in a wallet to another address. Degrades Privacy
USAGE
$ hd-cli-wallet send-all
OPTIONS
-a, --sendAddr=sendAddr Cash address to send to
-n, --name=name Name of wallet
DESCRIPTION
Send all BCH in a wallet to another address.
This method has a negative impact on privacy by linking all addresses in a
wallet. If privacy of a concern, CoinJoin should be used.
This is a good article describing the privacy concerns:
https://bit.ly/2TnhdVc
See code: src/commands/send-all.js
hd-cli-wallet split-utxoSend an amount of BCH
USAGE
$ hd-cli-wallet split-utxo
OPTIONS
-n, --name=name Name of wallet
See code: src/commands/split-utxo.js
hd-cli-wallet update-balancesPoll the network and update the balances of the wallet.
USAGE
$ hd-cli-wallet update-balances
OPTIONS
-i, --ignoreTokens Ignore and burn tokens
-n, --name=name Name of wallet
See code: src/commands/update-balances.js
FAQs
npm lib and CLI app for working with HD wallets
We found that hd-cli-wallet demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.