Now that you received your free Tokens, let's learn how to check your account balance.
Get the account balance.
The Sacco library, our own open source tool to sign and send transactions to any Cosmos SDK based blockchain, including Commercio.network.
The Commercio SDK, our own open source tool to format transactions to Commercio.network
- Network queryChain.
- Generate the wallet;
- Execute the Network queryChain function to get the account balance.
Here's an example of the implementation in all the available languages.
final wallet = Wallet.derive(mnemonic, networkInfo);
final balanceURL = '${wallet.networkInfo.lcdUrl}/bank/balances/${wallet.bech32Address}';
final balance = await Network.queryChain(balanceURL);
val wallet = Wallet.derive(mnemonic = mnemonic, networkInfo = networkInfo)
val balanceURL = "${wallet.networkInfo.lcdUrl}/bank/balances/${wallet.bech32Address}"
val balance = Network.queryChain<List<QueryResult<StdCoin>>>(url = balanceURL)
var wallet = commercio.sacco.lib.Wallet.derive(mnemonic, networkInfo);
String balanceURL = $"{wallet.networkInfo.lcdUrl}/bank/balances/{wallet.bech32Address}";
var balance = commercio.sdk.Network.queryChain(balanceURL);