explorer-api
v1.0.1
Published
A Simple to use Node.js wrapper for POS/Masternode Explorer API.
Downloads
3
Readme
A Simple to use Node.js wrapper for POS/Masternode Explorer API.
const ExplorerAPI = require('../explorerApi');
const ginApi = new ExplorerAPI({
host: /* MN/POS explorer host here Eg: https://explorer.gincoin.io */
address: /* MN/POS wallet address here Eg: a_hash_code */,
});
ginApi.getAddress()
.then(body => {
console.log(JSON.stringify(body, null, 3));
})
.catch(err => {
console.log(`Error code: ${err.code}`);
})
ginApi.getRawTransaction({ txid: /* a unique txid */, decrypt: true /* enable decrypt */})
.then(body => {
console.log(JSON.stringify(body, null, 3));
})
.catch(err => {
console.log(`Error code: ${err.code}`);
})