import { Avalanche } from "@avalanche-sdk/chainkit";
const avalancheSDK = new Avalanche({
apiKey: "<YOUR_API_KEY_HERE>",
chainId: "43114", // Sets chainId globally, will be used if not passed during method call.
network: "mainnet",
});
async function run() {
const result = await avalancheSDK.data.evm.blocks.get({
blockId:
"0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c",
chainId: "<YOUR_CHAIN_ID>", // Override the globally set chain id.
});
// Handle the result
console.log(result);
}
run();