import { Avalanche } from "@avalanche-sdk/chainkit";
const avalancheSDK = new Avalanche({
apiKey: "<YOUR_API_KEY_HERE>",
chainId: "43114",
network: "mainnet",
});
async function run() {
const result = await avalancheSDK.metrics.chains.list({
network: "mainnet",
});
for await (const page of result) {
// Handle the page
console.log(page);
}
}
run();