bch-cli-wallet
A command line wallet for Bitcoin Cash, built with BITBOX
Last updated 18 days ago by chris.troutner .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bch-cli-wallet 
SYNC missed versions from official npm registry.

bch-cli-wallet

This is an npm library and Bitcoin Cash (BCH) wallet that runs on the command line. Add this library to your app to instantly give it the ability to transact on the BCH network!

This project has the following goals:

  • Create a code base for a wallet that is easily forkable and extensible by JavaScript developers.
  • Explore the potential for bounty-tagged development

If you want a wallet with a graphical user interface, check out Badger Wallet. BCH functionality is implemented in both wallets with BITBOX, and the command line interface for this project is built with oclif.

Also, be sure to check out the design decisions and trade-offs that went into the creation of this project in the docs directory

Build Status Coverage Status semantic-release Greenkeeper badge

NPM Usage

The npm library can be included in your own app to instantly give it the ability to send and receive BCH transactions. 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('bch-cli-wallet/src/commands/create-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()

Command Line Usage

$ npm install -g bch-cli-wallet
$ bch-cli-wallet COMMAND
running command...
$ bch-cli-wallet (-v|--version|version)
bch-cli-wallet/1.4.5 linux-x64 node-v10.16.0
$ bch-cli-wallet --help [COMMAND]
USAGE
  $ bch-cli-wallet COMMAND
...

Commands

bch-cli-wallet create-wallet

Generate a new HD Wallet.

USAGE
  $ bch-cli-wallet create-wallet

OPTIONS
  -n, --name=name  Name of wallet
  -t, --testnet    Create a testnet wallet

See code: src/commands/create-wallet.js

bch-cli-wallet get-address

Generate a new address to recieve BCH.

USAGE
  $ bch-cli-wallet get-address

OPTIONS
  -n, --name=name  Name of wallet

See code: src/commands/get-address.js

bch-cli-wallet hello

Example command from oclif

USAGE
  $ bch-cli-wallet hello

OPTIONS
  -n, --name=name  name to print

DESCRIPTION
  ...
  Leaving it here for future reference in development.

See code: src/commands/hello.js

bch-cli-wallet help [COMMAND]

display help for bch-cli-wallet

USAGE
  $ bch-cli-wallet help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

bch-cli-wallet list-wallets

List existing wallets.

USAGE
  $ bch-cli-wallet list-wallets

See code: src/commands/list-wallets.js

bch-cli-wallet remove-wallet

Remove an existing wallet.

USAGE
  $ bch-cli-wallet remove-wallet

OPTIONS
  -n, --name=name  Name of wallet

See code: src/commands/remove-wallet.js

bch-cli-wallet send

Send an amount of BCH

USAGE
  $ bch-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

bch-cli-wallet send-all

Send all BCH in a wallet to another address. Degrades Privacy

USAGE
  $ bch-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. **Degrades Privacy**
  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

bch-cli-wallet update-balances

Poll the network and update the balances of the wallet.

USAGE
  $ bch-cli-wallet update-balances

OPTIONS
  -n, --name=name  Name of wallet

See code: src/commands/update-balances.js

Current Tags

  • 1.4.5                                ...           latest (18 days ago)

42 Versions

  • 1.4.5                                ...           18 days ago
  • 1.4.4                                ...           18 days ago
  • 1.4.3                                ...           18 days ago
  • 1.3.1                                ...           2 months ago
  • 1.4.2                                ...           3 months ago
  • 1.4.1                                ...           3 months ago
  • 1.4.0                                ...           3 months ago
  • 1.3.5                                ...           3 months ago
  • 1.3.4                                ...           4 months ago
  • 1.3.3                                ...           4 months ago
  • 1.3.2                                ...           4 months ago
  • 1.3.0                                ...           7 months ago
  • 1.2.2                                ...           7 months ago
  • 1.2.1                                ...           7 months ago
  • 1.2.0                                ...           7 months ago
  • 1.1.4                                ...           7 months ago
  • 1.1.3                                ...           7 months ago
  • 1.1.2                                ...           7 months ago
  • 1.1.1                                ...           7 months ago
  • 1.1.0                                ...           7 months ago
  • 1.0.21                                ...           7 months ago
  • 1.0.20                                ...           7 months ago
  • 1.0.19                                ...           7 months ago
  • 1.0.18                                ...           7 months ago
  • 1.0.17                                ...           7 months ago
  • 1.0.16                                ...           7 months ago
  • 1.0.15                                ...           7 months ago
  • 1.0.14                                ...           7 months ago
  • 1.0.13                                ...           7 months ago
  • 1.0.12                                ...           7 months ago
  • 1.0.11                                ...           7 months ago
  • 1.0.10                                ...           8 months ago
  • 1.0.9                                ...           8 months ago
  • 1.0.8                                ...           8 months ago
  • 1.0.7                                ...           8 months ago
  • 1.0.6                                ...           8 months ago
  • 1.0.5                                ...           8 months ago
  • 1.0.4                                ...           8 months ago
  • 1.0.3                                ...           8 months ago
  • 1.0.2                                ...           8 months ago
  • 1.0.1                                ...           8 months ago
  • 1.0.0                                ...           8 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 57
Last Day 0
Last Week 0
Last Month 104
Dependencies (11)
Dev Dependencies (13)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |