Protected
clearRest
...args: any[]Optional
handler: HandlerFnSend a json-rpc request, note the method should not contain the prefix and version parts.
Rest
...params: any[]const client = await JsonRpcClient.new('wss://rpc.polkadot.io');
const achieve = new JsonRpcGroup(client, { prefix: 'archive', supportedVersions: ['unstable'] });
const finalizedHeight = await achieve.send<number>('finalizedHeight'); // sending archive_unstable_finalizedHeight
console.log(finalizedHeight);
Detect & return the version of the group. This will be used to construct the json-rpc method name.
Name
JsonRpcGroup A group of json-rpc methods with a common prefix.
JSON-RPC V2: https://paritytech.github.io/json-rpc-interface-spec/grouping-functions-and-node-capabilities.html#grouping-functions-and-node-capabilities