Skip to content

A client library to connect to Bitcoin Core RPC in JavaScript.

License

Notifications You must be signed in to change notification settings

besttest/bitcoind-rpc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bitcoind-rpc.js

A client library to connect to Bitcoin Core RPC in JavaScript.

Get Started

bitcoind-rpc.js runs on node, and can be installed via npm:

npm install bitcoind-rpc

Examples

Some examples are provided at the examples path. Here are some snippets:

var run = function() {
  var RpcClient = require('bitcoind-rpc');
  var hash = '0000000000b6288775bbd326bedf324ca8717a15191da58391535408205aada4';

  var config = {
    protocol: 'http',
    user: 'user',
    pass: 'pass',
    host: '127.0.0.1',
    port: '18332',
  };

  var rpc = new RpcClient(config);

  rpc.getBlock(hash, function(err, ret) {
    if (err) {
      console.error('An error occured fetching block', hash);
      console.error(err);
      return;
    }
    console.log(ret);
  });
};

License

Code released under the MIT license.

Copyright 2013-2014 BitPay, Inc.

About

A client library to connect to Bitcoin Core RPC in JavaScript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%