Bitcoin Cash JavaScript API
bch.js
is a lightweight wrapper around a Bitcoin Cash Node RPC. This allows you to easily create tooling around any Bitcoin Cash Node functionality. It uses an HttpProvider
API similar to the one used by Ethereum's web3.js
, so any developer familiar with Ethereum will feel right at home.
Installation
npm install bchjs
Usage
const BCH HttpProvider = ; const httpBlockchainProvider = 'http://localhost:48332' 'regtest' 'regtest';const httpWalletProvider = 'http://localhost:48332' 'regtest' 'regtest';const bch = httpBlockchainProvider httpWalletProvider; await bchrpc;
Pandacash and bchjs
bch.js
can be added to your application or tests. It can be configured to connect to any node. You can use pandacash-core
local blockchain for local development and testing.
const panda = ;const BCH HttpProvider = ; const server = await panda;const bch = 'http://localhost:48332' 'http://localhost:48333'; await bchrpc;
Supported RPC calls
All rpc methods have been added.