UNPKG
keychain.js
Version:
latest (0.0.6)
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
KeyChain JavaScript API wrapper repository
github.com/arrayio/keychain.js
arrayio/keychain.js
keychain.js
/
example
/
btcCheckBalance.js
7 lines
(6 loc)
•
294 B
JavaScript
View Raw
1
2
3
4
5
6
7
const
fetch =
require
(
'node-fetch'
);
const
API_URL
=
'https://test-insight.bitpay.com/api'
;
const
address =
'YOUR_ADDRESS'
;
// myLrbwvwJN59quivKSxCxgiqLdCw8m7aDf
fetch
(
`
${API_URL}
/addr/
${address}
`
) .
then
(
data
=>
data.
json
() ) .
then
(
(
{ balance }
) =>
console
.
log
(
'BTC Balance: '
, balance));