The client to use. AvalancheCoreClient
The transaction ID ValidatedByParameters
The validators that validated the transaction. ValidatedByReturnType
import { createAvalancheCoreClient } from '@avalanche-sdk/client'
import { avalanche } from '@avalanche-sdk/client/chains'
import { validatedBy } from '@avalanche-sdk/client/methods/pChain'
const client = createAvalancheCoreClient({
chain: avalanche,
transport: {
type: "http",
url: "<url>",
},
})
const validators = await validatedBy(client, {
txID: "11111111111111111111111111111111LpoYY"
})
Get the validators that validated a transaction.