import { L1XProvider, FTTokenGetAttributeArg } from "@l1x/l1x-wallet-sdk";
let l1xProvider = new L1XProvider({
clusterType: "mainnet",
endpoint: "https://v2-mainnet-rpc.l1x.foundation",
});
let params: FTTokenGetAttributeArg = {
contract_address: "2e15a979ebc2de6ebafb373dae52e0c1809096c9",
};
l1xProvider.tokens.FT.getAttribute(params)
.then((response) => console.log(response)) // log response
.catch((err) => console.error(err)); // log error
Token attribute query parameters.
{
"contract_address": "2e15a979ebc2de6ebafb373dae52e0c1809096c9"
}
A promise that resolves with token attribute response.
{
"name": "Exnox",
"symbol": "EXN",
"decimals": 18,
"total_supply": "1000"
}