Nefariously Pushing Master
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

gridcoin-rpc

1.0.0 • Public • Published

gridcoin-rpc – Promise based Gridcoin RPC client

A JavaScript library for the interactions with gridcoin wallet

Installation

npm install gridcoin-rpc

Usage

const { GridcoinRPC } = require('gridcoin-rpc');
 
const rpc = new GridcoinRPC({
  port: 6553,
  host: '127.0.0.1',
  username: 'username',
  password: 'very-strong-password',
});
 
// Test connection
rpc.testConnection()
  .then(res => console.log(JSON.stringify(res, null, 2)))
  .catch(err => console.log('!', err.message));
 
// Get wallet info
rpc.getWalletInfo()
  .then(res => console.log(JSON.stringify(res, null, 2)))
  .catch(err => console.log(err.message));
 
// {
//   "walletversion": 60000,
//   "balance": 121.12304127,
//   "newmint": 0,
//   "stake": 0,
//   "keypoololdest": 1508531912,
//   "keypoolsize": 101,
//   "unlocked_until": 0
// }
 

Documentation

API documentation

External links

install

npm i gridcoin-rpc

Downloadsweekly downloads

4

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability