The client to use. AvalancheCoreClient
The network name. GetNetworkNameReturnType
import { createAvalancheCoreClient } from '@avalanche-sdk/client'
import { avalanche } from '@avalanche-sdk/client/chains'
import { getNetworkName } from '@avalanche-sdk/client/methods/info'
const client = createAvalancheCoreClient({
chain: avalanche,
transport: {
type: "http",
url: "<url>",
},
})
const networkName = await getNetworkName(client)
Get the name of the network this node is participating in.