bitcoin-client-rpc

1.0.2 • Public • Published

bitcoinclientrpc

Bitcoin-client-rpc

What is it?

It is a library that allows you to interact with the json-rpc part of a bitcoin client (regardless of the coin) A simple initialization with the client's rpc identifier and you will be able to recover all the information from bitcoin-cli

Installation

npm i bitcoin-client-rpc

Usage

const bitcoinRpc = require('bitcoin-client-rpc');
const bitCoin = new bitcoinRpc('localhost', '9888', 'rpcUsername', 'rpcPass');

bitCoin.call('getinfo', [], function (err, resB) {
	if (err !== null) {
		console.log('Bitcoin RPC error: ' + err )
	} else {
		console.log(resB.result)		
	}
})

Readme

Keywords

none

Package Sidebar

Install

npm i bitcoin-client-rpc

Weekly Downloads

3

Version

1.0.2

License

ISC

Unpacked Size

2.47 kB

Total Files

3

Last publish

Collaborators

  • atmoner