TypeScript client for PecanRolls RPC interfaces. All API calls return promises.
npm install https://github.com/strandedathome/rolls-rpc-client.git
// test a full node with blockchain and display to console
// run with node index.js
import { FullNode } from 'rolls-rpc-client';
var fullNode = new FullNode_1.FullNode({
protocol: 'https',
hostname: 'localhost',
port: 9877
});
var blockchain = fullNode.getBlockchainState();
blockchain.then(function (fullNode) {
console.log(fullNode);
});
import { Wallet } from 'rolls-rpc-client';
const wallet = new Wallet({
protocol: 'https',
hostname: 'localhost',
port: 58765
});
const mnemonic = await wallet.generateMnemonic();
This client is provided by Rolls Blockchain Explorer.