JavaScript
import { Avalanche } from "@avalanche-sdk/chainkit"; const avalanche = new Avalanche({ network: "mainnet", }); async function run() { const result = await avalanche.data.primaryNetwork.getNetworkDetails({}); console.log(result); } run();
{ "validatorDetails": { "validatorCount": 123, "totalAmountStaked": "<string>", "estimatedAnnualStakingReward": "<string>", "stakingDistributionByVersion": [ { "version": "<string>", "amountStaked": "<string>", "validatorCount": 123 } ], "stakingRatio": "<string>" }, "delegatorDetails": { "delegatorCount": 123, "totalAmountStaked": "<string>" } }
Gets network details such as validator and delegator stats.
Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.
Either mainnet or testnet/fuji.
mainnet
fuji
testnet
Successful response
Show child attributes
Was this page helpful?