Get Total AVT on the AVN
To get the total amount of AVT on the Aventus network:
await api.query.getTotalAvt();
Example
const AvnApi = require("avn-api");
const GATEWAY = "<node_url>"; //Replace the node_url with the url received from Aventus.
const api = new AvnApi(GATEWAY);
async function main() {
await api.init();
const totalAvt = await api.query.getTotalAvt();
console.log("The total amount of AVT on the AVN is: ", totalAvt);
// "5100000000000000000000"
}
(async () => {
await main();
})();
Expected Output
5100000000000000000000