blocktrail_node_sdk
Version:
A REST API client for blocktrail
31 lines (22 loc) • 889 B
Markdown
This is a super-slim version of the original Node.js sdk provided by [Blocktrail](https://github.com/blocktrail/blocktrail-sdk-nodejs). This by no means a replacment for their sdk, I just found their sdk to includ to much and have so many dependcies. And it did not wanna play well with Docker. And I did not need all of the functionallity they offerd.
To install, just use npm:
```bash
npm install blocktrail_node_sdk
```
This sdk is using [Promise](https://www.promisejs.org/)
Examples
--------
```javascript
const Blocktrail = require('blocktrail_node_sdk');
var key = 'your_api_key';
var secret = 'your_secret_key';
// tBTC for testnet
var blocktrail = new Blocktrail('BTC', key, secret);
var createAddress = blocktrail.createAddress('wallet_name')
createAddress.then((result) => {
console.log(result);
}, function(err) {
console.log(err);
})
```