Skip to content
This repository was archived by the owner on Feb 20, 2021. It is now read-only.

Repository files navigation

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');varbcapi=newbcypher('btc','main',process.env.TOKEN);functionprintResponse(err,data){if(err!==null){console.log(err);}else{console.log(data);}}//get chain infobcapi.getChain(printResponse);//get block height without any optional URL paramsbcapi.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 webhookvarwebhook={event: "unconfirmed-tx",address: "15qx9ug952GWGTNn7Uiv6vode4RcGrRemh",url: "https://my.domain.com/callbacks/new-tx"};bcapi.createHook(webhook,printResponse);//Now let's list all of our webhooksbcapi.listHooks(printResponse);

About

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

Resources

Stars

94 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages