A client library to connect to veild using RPC in JavaScript.
veild-rpc.js runs on node, and can be installed via npm:
npm install veild-rpc
const RpcClient = require('veild-rpc');
var run = function(){
// Veild Configuration Object
var RpcConfig = {
protocol: 'http',
user: 'veild',
pass: 'somerandompassword',
host: '127.0.0.1',
port: '58812'
};
var rpc = new RpcClient(RpcConfig);
// Get the total spendable balance of all coin derivitives.
rpc.getspendablebalance(function(err, ret){
if(err){
console.log(err);
}
console.log(ret);
});
}
run();