> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Send TON

> Transfer native Toncoin using sendTon

> [card] Recommended: JavaScript SDK for React Native
>
> While this SDK is still supported, we recommend using newer [JavaScript SDK](https://docs.dynamic.xyz/docs/javascript/reference/react-native-quickstart.md), 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

| 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

```ts theme={"system"}
{ boc: string; hash: string }
```

* `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

```ts React Native theme={"system"}
import { dynamicClient } from '<path to client file>';

const wallet = dynamicClient.wallets.userWallets.find((w) => w.chain === 'TON');
if (!wallet) {
  throw new Error('No TON wallet');
}

const { hash, boc } = await dynamicClient.ton.sendTon({
  walletId: wallet.id,
  to: 'EQ...recipient',
  amount: '500000000', // 0.5 TON
  comment: 'thanks!',
});

console.log('Broadcasted:', hash);
```

## Converting between TON and nanotons

`amount` is always a nanoton string. Convert from a user-supplied TON value before calling:

```ts theme={"system"}
const ton = '0.5';
const nano = (Number(ton) * 1e9).toString();
//=> '500000000'
```

For arbitrary-precision math, use `BigInt`:

```ts theme={"system"}
const nano = BigInt(Math.round(parseFloat(ton) * 1e9)).toString();
```

## Errors

`sendTon` rejects when:

* The wallet is not a TON wallet, or the `walletId` doesn'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).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.