blockr-unofficial

1.2.5 • Public • Published

blockr-unofficial

Version

A Blockr adapter built to standardize requests to follow the common-blockchain convention. Aliases are introduced in the return of functions to account for differences in convention between the two standards. It is our hope that the Bitcoin community will come to an agreement on proper style and convention for requests on addresses, transactions, and blocks.

Information on common-blockchain for convention

Installation

Install as you normally install an npm module:

  npm install blockr-unofficial

Usage

Blockr only supports Bitcoin Mainnet. There is no Testnet support in this package.

To use the Blockr API, simply require the module.

  var blockrAPI = require('blockr-unofficial');
  var commonBlockchain = blockrAPI();

Known Issues

Blockr currently only returns the confirmed balance of an address when requested. Therefore, our parameters for balance, confirmedBalance, and unconfirmedBalance are specified as such:

  {
    balance: null,
    confirmedBalance: 0.0,
    unconfirmedBalance: null
  }

Tests

Run npm test to have abstract-common-blockchain run a suite of tests on Addresses, Blocks, and Transactions. The tests are comprehensive with complete code coverage - see documentation in abstract-common-blockchain for further details.

API Examples

See abstract-common-blockchain for API

There are examples for using Addresses, Blocks, and Transactions, provided in the /examples folder. Each function includes a Mainnet and, where possible, an invalid example is provided to show error handling. Expect all returns to be of the form (error, response).

Convention

Standard convention is described fully by common-blockchain in the types.json file: https://github.com/blockai/common-blockchain/blob/master/types.json

Maintainers

/blockr-unofficial/

    Package Sidebar

    Install

    npm i blockr-unofficial

    Weekly Downloads

    2

    Version

    1.2.5

    License

    BSD

    Last publish

    Collaborators

    • williamcotton
    • howard.wu