Skip to main content
Version: 4.0.0

Get Native Currency Token

Returns the native currency token address

await api.query.getNativeCurrencyToken();
important

You can get the AVN_GATEWAY_URL here.

const { AvnApi, SetupMode, SigningMode } = require("avn-api");
const AVN_GATEWAY_URL = "gateway url of your chosen network";
const options = {
suri: "suri of your account",
setupMode: SetupMode.SingleUser,
signingMode: SigningMode.SuriBased,
};

const avnSdk = new AvnApi(AVN_GATEWAY_URL, options);

async function main() {
await avnSdk.init();
const api = await avnSdk.apis();

let native_currency = await api.query.getNativeCurrencyToken();
console.log(native_currency);
}

(async () => {
await main();
})();