Overview
TonModule provides native TON blockchain operations including message signing, TON and Jetton transfers, balance queries, and network details. Access it via DynamicSDK.instance().ton.
Prerequisites
- Dynamic SDK initialized (see Quickstart)
- User authenticated (see Authentication)
- TON enabled in the Dynamic dashboard
Get a TON Wallet
If TON is enabled in the dashboard, the user gets a TON wallet on signup. Find it viauserWallets, or create one explicitly with EmbeddedWalletChain.ton:
Get Balance
Query the TON balance for a wallet. Returned as a string (nanotons) to preserve precision.Sign a Message
Sign a message using the connected TON wallet:Send TON
Send TON tokens to a recipient address. Returns aTonTransactionResult containing the BOC and transaction hash.
Send Jettons
Send Jetton tokens (TON’s fungible token standard, similar to ERC-20):Get Network Details
Query the chain ID and network name for the connected wallet:chainId—-239for mainnet,-3for testnetname—"mainnet"or"testnet"
API Reference
Next Steps
- Bitcoin Operations — Bitcoin operations
- SUI Operations — SUI operations
- Token Balances — Multi-chain balance queries