How to use the bitcoind-rpc.prototype function in bitcoind-rpc

To help you get started, we’ve selected a few bitcoind-rpc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Casa / Casa-Node-API / test / unit / lightning.js View on Github external
before(async() => {
    reset();

    bitcoindHelp = sinon.stub(require('bitcoind-rpc').prototype, 'help').callsFake(callback => callback(undefined, {}));

    // TODO: expires Dec 1st, 2019
    jwt = 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InRlc3QtdXNlciIsImlhdCI6MTU3NTIyNjQxMn0.N06esl2dhN1mFqn-0o4KQmmAaDW9OsHA39calpp_N9B3Ig3aXWgl064XAR9YVK0qwX7zMOnK9UrJ48KUZ-Sb4A';
  });
github Casa / Casa-Node-API / test / endpoints / v1 / bitcoind / info.js View on Github external
it('should respond with a valid version', done => {
      bitcoindRPCGetNetworkInfo = sinon.stub(require('bitcoind-rpc').prototype, 'getNetworkInfo').callsFake(callback => callback(undefined, {
        result:
          {
            subversion: '/Satoshi:0.17.0/'
          }
      }));
      requester
        .get('/v1/bitcoind/info/version')
        .set('authorization', `JWT ${token}`)
        .end((err, res) => {
          if (err) {
            done(err);
          }
          res.should.have.status(200);
          res.should.be.json;
          res.body.should.have.property('version');
          res.body.version.should.equal('0.17.0');

bitcoind-rpc

Bitcoin Client Library to connect to Bitcoin Core via RPC

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis

Popular bitcoind-rpc functions