Hierarchy (view full)

Constructors

Properties

Accessors

Methods

  • Returns void

  • Parameters

    Returns boolean

  • Parameters

    Returns this

  • Parameters

    Returns Unsub

  • Parameters

    Returns Unsub

  • Send a json-rpc request, note the method should not contain the prefix and version parts.

    Type Parameters

    • T = any

    Parameters

    • method: string
    • Rest...params: any[]

    Returns Promise<T>

    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);