The current epoch information for the requested chain. GetCurrentEpochReturnType
import { createAvalancheClient} from '@avalanche-sdk/client'
import { avalanche } from '@avalanche-sdk/client/chains'
const client = createAvalancheClient({
chain: avalanche,
transport: {
type: "http",
},
})
const cChainEpoch = await client.proposervm.cChain.getCurrentEpoch()
const pChainEpoch = await client.proposervm.pChain.getCurrentEpoch()
const xChainEpoch = await client.proposervm.xChain.getCurrentEpoch()
Returns this node's current proposer VM height for the requested chain (C-Chain, P-Chain, X-Chain).
This node's current proposer VM height for the requested chain. GetProposedHeightReturnType
import { createAvalancheClient} from '@avalanche-sdk/client'
import { avalanche } from '@avalanche-sdk/client/chains'
const client = createAvalancheClient({
chain: avalanche,
transport: {
type: "http",
},
})
const cChainHeight = await client.proposervm.cChain.getProposedHeight()
const pChainHeight = await client.proposervm.pChain.getProposedHeight()
const xChainHeight = await client.proposervm.xChain.getProposedHeight()
Returns the current epoch information for the requested chain (C-Chain, P-Chain, X-Chain).