2.0.0 • Published 2 years ago

gridcoin-rpc v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

gridcoin-rpc – Promise based Gridcoin RPC client

A JavaScript library for the interactions with gridcoin wallet

NPM Version CI build SNYK report

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

Donate

GRC: SJVaQcJriv7N8Py8eWjNUtWPTPBtDZashD BTC: 12sUqF4mBiocqRPPPCyUsrTL6gf3AG2oTz XLM: GDGOYINLUKGWDKRGZDDWE3UZLXBDN23KVCPCOAHXO4RB2DR3V7PQ7ENP

Follow me

keybase steemit

External links

2.0.0

2 years ago

1.0.0

2 years ago