import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
chainId: "43114",
});
async function run() {
const result = await avalanche.metrics.chains.get({});
console.log(result);
}
run();{
"evmChainId": 123,
"chainName": "<string>",
"blockchainId": "<string>",
"subnetId": "<string>",
"network": "mainnet"
}Get chain information for Metrics API supported blockchain.
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
chainId: "43114",
});
async function run() {
const result = await avalanche.metrics.chains.get({});
console.log(result);
}
run();{
"evmChainId": 123,
"chainName": "<string>",
"blockchainId": "<string>",
"subnetId": "<string>",
"network": "mainnet"
}A supported evm chain id. Use the /chains endpoint to get a list of supported chain ids.
Successful response
EVM ChainID for the blockchain.
43114
Blockchain alias for easy identification of blockchains.
"c_chain"
Unique blockchain ID for this blockchain.
"2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5"
Subnet ID this blockchain belongs to.
"11111111111111111111111111111111LpoYY"
Network on which this blockchain or subnet is created on.
mainnet, testnet "mainnet"
Was this page helpful?