Avalanche SDK Client
    Preparing search index...

    Function getValidatorsAt

    • Type Parameters

      • chain extends undefined | Chain

      Parameters

      Returns Promise<GetValidatorsAtReturnType>

      The validators at that height. GetValidatorsAtReturnType

      import { createAvalancheCoreClient } from '@avalanche-sdk/client'
      import { avalanche } from '@avalanche-sdk/client/chains'
      import { getValidatorsAt } from '@avalanche-sdk/client/methods/pChain'

      const client = createAvalancheCoreClient({
      chain: avalanche,
      transport: {
      type: "http",
      url: "<url>",
      },
      })

      const validators = await getValidatorsAt(client, {
      height: 1000001,
      subnetID: "11111111111111111111111111111111LpoYY"
      })