Recommended: JavaScript SDK for React Native
While this SDK is still supported, we recommend using newer JavaScript SDK, which is optimized for React Native, but also comes with a host of other benefits.
dynamicClient.ton.sendTon builds, signs, and broadcasts a Toncoin transfer in a single call.
Parameters
Return value
hash— the transaction hash, useful for status lookups on a TON explorer.boc— the base64-encoded Bag-of-Cells of the broadcasted transaction, in case you want to display or persist it.
Example
React Native
Converting between TON and nanotons
amount is always a nanoton string. Convert from a user-supplied TON value before calling:
BigInt:
Errors
sendTon rejects when:
- The wallet is not a TON wallet, or the
walletIddoesn’t match a wallet in the current session. - The user cancels the signing prompt in the WebView.
- The connected external wallet refuses the request (insufficient balance, network mismatch, expired TonConnect session, etc.).
- The broadcast fails (the network rejects the message).