Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 732 Bytes

File metadata and controls

36 lines (22 loc) · 732 Bytes

6.4 Check an account CCC balance

Use cases

Get the account CCC balance.

Tools

The Commercio SDK, our own open source tool to format transactions to Commercio.network

Functions and APIs

  • Network queryChain.

Step by step sequence

  1. Execute the Network queryChain function to get the account balance.

Code Examples

Here's an example of the implementation in all the available languages.

Dart

final balanceURL =
  '${wallet.networkInfo.lcdUrl}/bank/balances/${wallet.bech32Address}';
final balance = await Network.queryChain(balanceURL);

Kotlin

val balanceURL = "$lcdUrl/bank/balances/${wallet.bech32Address}"
val balance = network.queryChain<Any>(balanceURL)