Avalanche SDK Client
    Preparing search index...

    Type Alias ProposervmAPIActions

    type ProposervmAPIActions = {
        getCurrentEpoch: () => Promise<GetCurrentEpochReturnType>;
        getProposedHeight: () => Promise<GetProposedHeightReturnType>;
    }
    Index

    Properties

    getCurrentEpoch: () => Promise<GetCurrentEpochReturnType>

    Returns the current epoch information for the requested chain (C-Chain, P-Chain, X-Chain).

    Type declaration

      • (): Promise<GetCurrentEpochReturnType>
      • Returns Promise<GetCurrentEpochReturnType>

        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()
    getProposedHeight: () => Promise<GetProposedHeightReturnType>

    Returns this node's current proposer VM height for the requested chain (C-Chain, P-Chain, X-Chain).

    Type declaration

      • (): Promise<GetProposedHeightReturnType>
      • Returns Promise<GetProposedHeightReturnType>

        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()