The client to use. AvalancheCoreClient
The height and subnet ID GetValidatorsAtParameters
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"
})
Get the validators at a specific height.