1.3.3 • Published 7 months ago

bitcoin-json-rpc v1.3.3

Weekly downloads
151
License
MIT
Repository
github
Last release
7 months ago

bitcoin-json-rpc

Bitcoin JSON RPC for TypeScript with Response Type Enforcement

Installing

npm install bitcoin-json-rpc

Example usage

import BitcoinJsonRpc from 'bitcoin-json-rpc';

const rpc = new BitcoinJsonRpc('http://localhost:8332');

const balance = await rpc.getBalance();
console.log(balance);

Non-standard methods

Methods not exposed by Bitcoin Core, such as omni_getwalletaddressbalances or Liquid's getbalance are prefixed i.e. getLiquidBalanceForAsset.

Motivation

There are plenty of Bitcoin forks, including Omni, Zcash, and Blockstream Liquid. These forks often introduce breaking changes to the JSON RPC responses that are not reflected in their documentation.

This library provides TypeScript types for RPC commands and validates the responses using io-ts. If the response does not match the schema, an error is thrown.

Author

Andreas Brekken

License

MIT

1.3.3

7 months ago

1.2.8

11 months ago

1.3.2

11 months ago

1.3.1

11 months ago

1.3.0

11 months ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago