1.0.0 • Published 6 years ago

gincoin-api v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

A Simple to use Node.js wrapper for GIN Coin API.

const GinAPI = require('../ginApi');

const ginApi = new GinAPI({ address: /* masternode address here */ });

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