The client to use. AvalancheCoreClient
The node's uptime statistics. UptimeReturnType
import { createAvalancheCoreClient } from '@avalanche-sdk/client'
import { avalanche } from '@avalanche-sdk/client/chains'
import { uptime } from '@avalanche-sdk/client/methods/info'
const client = createAvalancheCoreClient({
chain: avalanche,
transport: {
type: "http",
url: "<url>",
},
})
const uptime = await uptime(client)
Returns the network's observed uptime of this node. This is the only reliable source of data for your node's uptime.