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
- Returns
Promise
Get raw block info by hash
- Returns
Promise
Get block hash by height
- Returns
Promise
Get transaction by txid
- Returns
Promise
Get raw transaction by txid
- Returns
Promise
Validate address
- Returns
Promise
Get address
info
// Default options
{
noTxList: false,
noCache: false
}
- Pass an
Array
as first parameter to get info on multiple addresses - Returns
Promise
Get address
balance
- Returns a
Promise
Get address
received funds
- Returns a
Promise
Get address
sent funds
- Returns a
Promise
Get address
unconfirmed balance
- Returns a
Promise
Get address
unspent outputs
// Default options
{
noCache: false
}
- Pass an
Array
as first parameter to get info on multiple addresses - Returns a
Promise
Get transactions by hash
- Returns a
Promise
Get transactions by address
// Default options
{
from: '',
to: ''
}
- Pass an
Array
as first parameter to get info on multiple addresses - Returns a
Promise
Broadcast signed trasaction in hex format rawtx
- Returns a
Promise
Get blockchain info
- Returns a
Promise
Get block count
- Returns a
Promise
Get difficulty
- Returns a
Promise
Get best block hash
- Returns a
Promise
Get last block hash
- Returns a
Promise
Get historic blockchain data sync status
- Returns a
Promise
Get live network p2p data sync status
- Returns a
Promise
Get fee estimate
- Returns a
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