Initialize the AppKit before using examples on this page.
Balance
Blockchain state changes constantly as new blocks are produced. This has implications for when and how to check TON wallet contract balances:- Discrete one-off checks have almost no value on their own — the state might change immediately after the query completes, invalidating its results. Thus, such checks are only practical when making outgoing transfers.
- Continuous monitoring is useful for UI display, showing the most recent balance to users, but should not be used for transaction confirmations.
On-demand balance check
Toncoin balances are returned in nanoToncoin units, with 1 Toncoin equal to 109 nanoToncoin.Do not store the balance check results anywhere in the wallet service’s state, as they become outdated quickly. For UI purposes, do continuous balance monitoring.