import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche();
async function run() {
const result = await avalanche.metrics.chains.list({
network: "mainnet",
});
for await (const page of result) {
console.log(page);
}
}
run();{
"chains": [
{
"evmChainId": 123,
"chainName": "<string>",
"blockchainId": "<string>",
"subnetId": "<string>",
"network": "mainnet"
}
],
"nextPageToken": "<string>"
}Get a list of Metrics API supported blockchains. This endpoint is paginated and supports a maximum page size of 10000.
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche();
async function run() {
const result = await avalanche.metrics.chains.list({
network: "mainnet",
});
for await (const page of result) {
console.log(page);
}
}
run();{
"chains": [
{
"evmChainId": 123,
"chainName": "<string>",
"blockchainId": "<string>",
"subnetId": "<string>",
"network": "mainnet"
}
],
"nextPageToken": "<string>"
}A page token, received from a previous list call. Provide this to retrieve the subsequent page.
Either mainnet or testnet/fuji.
mainnet, fuji, testnet Was this page helpful?