Hierarchy (view full)

Constructors

Properties

Accessors

  • get prefix(): string
  • The prefix of the group

    Returns string

Methods

  • Returns Promise<PinnedBlock>

  • Returns Promise<`0x${string}`>

  • Returns Promise<ChainHeadRuntimeVersion>

  • chainHead_body

    Parameters

    • Optionalat: `0x${string}`

    Returns Promise<`0x${string}`[]>

  • chainHead_call

    Parameters

    • func: string
    • Optionalparams: `0x${string}`
    • Optionalat: `0x${string}`

    Returns Promise<`0x${string}`>

  • Returns void

  • Protected

    chainHead_continue

    Parameters

    • operationId: string

    Returns Promise<void>

  • Parameters

    Returns boolean

  • Returns Promise<PinnedBlock>

  • Returns Promise<`0x${string}`>

  • Parameters

    • hash: `0x${string}`

    Returns undefined | PinnedBlock

  • chainHead_follow

    Returns Promise<void>

  • chainHead_header

    Parameters

    • Optionalat: `0x${string}`

    Returns Promise<Option<`0x${string}`>>

  • Parameters

    • hash: `0x${string}`

    Returns boolean

  • Parameters

    Returns this

  • Parameters

    Returns Unsub

  • Parameters

    Returns Unsub

  • Returns Promise<ChainHeadRuntimeVersion>

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

    chainHead_stopOperation

    Parameters

    • operationId: string

    Returns Promise<void>

  • chainHead_storage

    Parameters

    • items: StorageQuery<string>[]
    • OptionalchildTrie: null | string
    • Optionalat: `0x${string}`

    Returns Promise<StorageResult[]>

  • Check if the group is supported by the connected JSON-RPC server.

    Returns Promise<boolean>

  • chainHead_unfollow

    Returns Promise<void>

  • Protected

    chainHead_unpin

    Parameters

    • hashes: `0x${string}` | `0x${string}`[]

    Returns Promise<void>