The client to use. AvalancheCoreClient
The validator node ID GetL1ValidatorParameters
The L1 validator information. GetL1ValidatorReturnType
import { createAvalancheCoreClient } from '@avalanche-sdk/client'
import { avalanche } from '@avalanche-sdk/client/chains'
import { getL1Validator } from '@avalanche-sdk/client/methods/pChain'
const client = createAvalancheCoreClient({
chain: avalanche,
transport: {
type: "http",
url: "<url>",
},
})
const validator = await getL1Validator(client, {
nodeID: "NodeID-111111111111111111111111111111111111111"
})
Get the L1 validator information.