Avalanche SDK Client
    Preparing search index...

    Function getLastAccepted

    • Type Parameters

      • chain extends undefined | Chain

      Parameters

      Returns Promise<GetLastAcceptedReturnType>

      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"
      })