1.1.3 • Published 6 years ago

node-bitcoin-rpc v1.1.3

Weekly downloads
201
License
MIT
Repository
github
Last release
6 years ago

Circle CI Coverage Status

node-bitcoin-rpc

nodejs json-rpc for bitcoin

Instructions:

  1. require() it
  2. call .init() with host, port, username, password as args
  3. call .call() with the method, param and callback (the callback takes (err, result))
  • optional: call .setTimeout() with the number of milliseconds to wait if 500 isn't enough

Example:

var bitcoin_rpc = require('node-bitcoin-rpc')

bitcoin_rpc.init('host', port, 'rpc_username', rpc_pass)
bitcoin_rpc.call('getbalance', [], function (err, res) {
  if (err !== null) {
    console.log('I have an error :( ' + err + ' ' + res.error)
  } else {
    console.log('Yay! I need to do whatevere now with ' + res.result)
  }
})

Defaults:

  • host; localhost
  • port: 8332
  • rpc_username: bitcoinrpc
  • rpc_password: foo
  • connection timeout: 500 ms
1.1.3

6 years ago

1.1.2

8 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago