1
2
3
4
5
6
7
8
9
10
11
import { HttpClient, ThorClient } from "npm:@vechain/sdk-network";
const thorClient = new ThorClient(new HttpClient("https://mainnet.vechain.org"));
const bestBlock = await thorClient.blocks.getBestBlockCompressed();
console.log("Best Block:", bestBlock.number);
const finalBlock = await thorClient.blocks.getFinalBlockCompressed();
console.log("Final Block:", finalBlock.number);
const genesisBlock = await thorClient.blocks.getBlockCompressed(0);
console.log("Genesis Block Id:", genesisBlock.id);