Avalanche SDK Client
    Preparing search index...

    Function getNodeID

    • Get the ID, the BLS key, and the proof of possession of this node. Note: This endpoint is only available on specific nodes, not on public servers.

      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<GetNodeIDReturnType>

      The node ID and BLS key information. GetNodeIDReturnType

      import { createAvalancheCoreClient } from '@avalanche-sdk/client'
      import { avalanche } from '@avalanche-sdk/client/chains'
      import { getNodeID } from '@avalanche-sdk/client/methods/info'

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

      const nodeInfo = await getNodeID(client)