The client to use. AvalancheCoreClient
The encoding. GetLastAcceptedParameters
The last accepted container. GetLastAcceptedReturnType
import { createAvalancheCoreClient } from '@avalanche-sdk/client'
import { avalanche } from '@avalanche-sdk/client/chains'
import { getLastAccepted } from '@avalanche-sdk/client/methods/index'
const client = createAvalancheCoreClient({
chain: avalanche,
transport: {
type: "http",
url: "<url>",
},
})
const lastAccepted = await getLastAccepted(client, {
encoding: "hex"
})
Get the last accepted container.