The client to use. AvalancheCoreClient
The container ID and encoding. GetIndexParameters
The container index. GetIndexReturnType
import { createAvalancheCoreClient } from '@avalanche-sdk/client'
import { avalanche } from '@avalanche-sdk/client/chains'
import { getIndex } from '@avalanche-sdk/client/methods/index'
const client = createAvalancheCoreClient({
chain: avalanche,
transport: {
type: "http",
url: "<url>",
},
})
const index = await getIndex(client, {
id: "6fXf5hncR8LXvwtM8iezFQBpK5cubV6y1dWgpJCcNyzGB1EzY",
encoding: "hex"
})
Get the index of a container by its ID.