Unofficial Node.js client for blockexplorer.com API
MIT License
Unofficial Node.js client for blockexplorer.com API
npm i blockexplorer --save
// require the module
const be = require('blockexplorer')
// get the genesis block hash
be.blockIndex(0)
.then((result) => {
console.log(result)
})
.catch((err) => {
throw err
})
npm test
Get block info by hash
Promise
Get raw block info by hash
Promise
Get block hash by height
Promise
Get transaction by txid
Promise
Get raw transaction by txid
Promise
Validate address
Promise
Get address
info
// Default options
{
noTxList: false,
noCache: false
}
Array
as first parameter to get info on multiple addressesPromise
Get address
balance
Promise
Get address
received funds
Promise
Get address
sent funds
Promise
Get address
unconfirmed balance
Promise
Get address
unspent outputs
// Default options
{
noCache: false
}
Array
as first parameter to get info on multiple addressesPromise
Get transactions by hash
Promise
Get transactions by address
// Default options
{
from: '',
to: ''
}
Array
as first parameter to get info on multiple addressesPromise
Broadcast signed trasaction in hex format rawtx
Promise
Get blockchain info
Promise
Get block count
Promise
Get difficulty
Promise
Get best block hash
Promise
Get last block hash
Promise
Get historic blockchain data sync status
Promise
Get live network p2p data sync status
Promise
Get fee estimate
Promise
For additional information see blockexplorer.com API reference
Just send a PR
Licensed under MIT
The author is not affiliated in any way with blockexplorer.com