Avalanche SDK Client
    Preparing search index...

    Function liveness

    • Returns a simple health check indicating if the node is alive and can handle requests. This is a lightweight check that always returns healthy if the endpoint is available.

      Type Parameters

      • chain extends undefined | Chain

      Parameters

      • client: { extend: <const client extends { [key: string]: unknown }>(fn: (client: { extend: ... }) => client) => { [K in (...) | (...) | (...)]: (...)[(...)] } }

        The client to use. AvalancheCoreClient

      Returns Promise<LivenessReturnType>

      The liveness check results. LivenessReturnType

      import { createAvalancheCoreClient } from '@avalanche-sdk/client'
      import { avalanche } from '@avalanche-sdk/client/chains'
      import { liveness } from '@avalanche-sdk/client/methods/health'

      const client = createAvalancheCoreClient({
      chain: avalanche,
      transport: {
      type: "http",
      url: "<url>",
      },
      })

      const livenessStatus = await liveness(client)