Documentation Index
Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt
Use this file to discover all available pages before exploring further.
dynamicClient.ton.sendTon builds, signs, and broadcasts a Toncoin transfer in a single call.
Parameters
| Parameter | Type | Notes |
|---|---|---|
walletId | string | The id of a wallet whose chain === 'TON'. |
to | string | Destination TON address (raw or user-friendly base64url form, depending on the connector). |
amount | string | Amount in nanotons, encoded as a string to preserve precision. 1 TON = 1_000_000_000 nanoton. |
comment | string (optional) | Plain-text comment attached to the transfer (encoded into the payload). |
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).