Entry-point for executing JSON-RPCs to blockchain node.
const client = new JsonRpcClient('wss://rpc.polkadot.io');
await client.connect();
// Subscribe to new heads
client.rpc.chain_subscribeNewHeads((header) => {
console.log(header);
});
// Execute arbitrary rpc method: `module_rpc_name`
const result = await client.rpc.module_rpc_name();
Protected
clearRest
...args: any[]Optional
handler: HandlerFnStatic
createFactory method to create a new JsonRpcClient instance
Static
newAlias for JsonRpcClient.create
A generic interface for JSON-RPC clients