> ## 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.

# Send TON

> Transfer native Toncoin using sendTon

`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).
