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.healthCheck({
retries: {
strategy: "backoff",
backoff: {
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
},
retryConnectionErrors: false,
},
});
// Handle the result
console.log(result);
}
run();