Avalanche SDK Client
    Preparing search index...

    Type Alias HealthAPIActions

    type HealthAPIActions = {
        health: (args: HealthParameters) => Promise<HealthReturnType>;
        liveness: () => Promise<LivenessReturnType>;
        readiness: (args: ReadinessParameters) => Promise<ReadinessReturnType>;
    }
    Index

    Properties

    health: (args: HealthParameters) => Promise<HealthReturnType>

    Returns the last set of health check results for the node. This includes checks for all chains, network, database, and other components.

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const healthStatus = await client.health.health({
    tags: ["11111111111111111111111111111111LpoYY", "29uVeLPJB1eQJkzRemU8g8wZDw5uJRqpab5U2mX9euieVwiEbL"]
    })
    liveness: () => Promise<LivenessReturnType>

    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 declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })
    readiness: (args: ReadinessParameters) => Promise<ReadinessReturnType>

    Returns the last evaluation of the startup health check results. This indicates if the node has finished initializing and is ready to handle requests.

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const readinessStatus = await client.health.readiness({
    tags: ["11111111111111111111111111111111LpoYY"]
    })