The client to use. AvalancheCoreClient
The index and encoding. GetContainerByIndexParameters
The container details. GetContainerByIndexReturnType
import { createAvalancheCoreClient } from '@avalanche-sdk/client'
import { avalanche } from '@avalanche-sdk/client/chains'
import { getContainerByIndex } from '@avalanche-sdk/client/methods/index'
const client = createAvalancheCoreClient({
chain: avalanche,
transport: {
type: "http",
url: "<url>",
},
})
const container = await getContainerByIndex(client, {
index: 1,
encoding: "hex"
})
Get container by index.