Hierarchy (view full)

Constructors

Properties

Accessors

Methods

  • Returns void

  • Parameters

    • event: string
    • Rest...args: any[]

    Returns boolean

  • Parameters

    • event: string
    • Optionalhandler: HandlerFn

    Returns this

  • Parameters

    • event: string
    • handler: HandlerFn

    Returns Unsub

  • Parameters

    • event: string
    • handler: HandlerFn

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