Total Complexity | 4 |
Complexity/F | 1 |
Lines of Code | 30 |
Function Count | 4 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | var blocktrail = require('../../main'); |
||
2 | |||
3 | var btccom = !!JSON.parse(process.env.BTCCOM); |
||
4 | var sdk = blocktrail.BlocktrailSDK({ |
||
5 | apiKey : process.env.BLOCKTRAIL_SDK_APIKEY || "EXAMPLE_BLOCKTRAIL_SDK_NODEJS_APIKEY", |
||
6 | apiSecret : process.env.BLOCKTRAIL_SDK_APISECRET || "EXAMPLE_BLOCKTRAIL_SDK_NODEJS_APISECRET", |
||
7 | btccom: btccom |
||
8 | }); |
||
9 | |||
10 | /* |
||
11 | For positive case |
||
12 | */ |
||
13 | sdk |
||
14 | .addressUnspentOutputs("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa") |
||
15 | .then(function(tx) { |
||
16 | console.log(tx); |
||
|
|||
17 | }, function(error) { |
||
18 | console.log(error); |
||
19 | }); |
||
20 | |||
21 | /* |
||
22 | For negative case |
||
23 | */ |
||
24 | sdk |
||
25 | .addressUnspentOutputs("dbaf14e1c476e76ea05a8b71921a46d6b06f0a950f1sdssd7c5f9f1a03b8fae467f10") |
||
26 | .then(function(tx) { |
||
27 | console.log(tx); |
||
28 | }, function(error) { |
||
29 | console.log(error); |
||
30 | }); |
||
31 | |||
34 |