Skip to content
master
Go to file
Code

Latest commit

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c2b99e9

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Node.js CI

node-client

Node.js SDK for the BlockCypher Web services. See https://www.blockcypher.com/dev/bitcoin/ for detailed documentation.

To install, just use npm:

npm install blockcypher

Examples

bcypher = require('blockcypher');

var bcapi = new bcypher('btc','main',process.env.TOKEN);

function printResponse(err, data) {
  if (err !== null) {
    console.log(err);
  } else {
    console.log(data);
  }
}

//get chain info
bcapi.getChain(printResponse);
//get block height without any optional URL params
bcapi.getBlock(300000, printResponse);
//get block height with an optional "txstart" param, as outlined in docs here: http://dev.blockcypher.com/
bcapi.getBlock(300000, {txstart:2}, printResponse);

//let's try a post request, like making a new webhook
var webhook = {
	event: "unconfirmed-tx",
	address: "15qx9ug952GWGTNn7Uiv6vode4RcGrRemh",
	url: "https://my.domain.com/callbacks/new-tx"
};
bcapi.createHook(webhook, printResponse);

//Now let's list all of our webhooks
bcapi.listHooks(printResponse);

About

Node.js SDK for the BlockCypher Web services. See http://www.blockcypher.com

Resources

License

Releases

No releases published
You can’t perform that action at this time.