explorer-api

1.0.1 • Public • Published

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}`);
    })

Package Sidebar

Install

npm i explorer-api

Weekly Downloads

5

Version

1.0.1

License

ISC

Unpacked Size

3.04 kB

Total Files

6

Last publish

Collaborators

  • thomann061