> For the complete documentation index, see [llms.txt](https://docs-sdk.crypto-chief.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-sdk.crypto-chief.com/processing/kotlin/guides/ton.md).

# TON: Jetton, NFT & comments

Transfer TON Jettons, NFTs, and text comments in Kotlin with one call.

TON contract bodies are program-specific cells with no Solidity-style ABI, so the SDK encodes them for you behind high-level helpers.

## Jetton transfer (e.g. USDT on TON)

```kotlin
import com.cryptochief.processing.Amount
import com.cryptochief.processing.Chain

val amount = Amount.toBase("0.5", 6) // USDT Jetton has 6 decimals

val signed = client.transactions.jettonTransfer(
    network      = Chain.TON_MAINNET,
    fromAddress  = "EQYourWallet...",
    jettonMaster = "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs", // USDT
    recipient    = "EQRecipient...",
    amount       = amount,
    memo         = "Order #4242", // optional — shown to the receiver as a comment
)
```

The sender's Jetton wallet address and the gas budget are resolved automatically. If you've already pre-resolved them, pass `jettonWalletAddress` and `attachedTonNanos` to skip the lookup.

## NFT transfer

```kotlin
import java.math.BigInteger

client.transactions.nftTransfer(
    network          = Chain.TON_MAINNET,
    fromAddress      = "EQYourWallet...",
    nftItem          = "EQItemAddr...",
    newOwner         = "EQRecipient...",
    attachedTonNanos = BigInteger(Amount.nanoTon("0.05")),
)
```

## Text comment

```kotlin
client.transactions.sendTonComment(
    network        = Chain.TON_MAINNET,
    fromAddress    = "EQYourWallet...",
    recipient      = "EQRecipient...",
    text           = "Thanks for the coffee!",
    amountTonNanos = BigInteger(Amount.nanoTon("1")),
)
```

## Arbitrary TON contracts

Build the body cell yourself with the SDK's `CellBuilder` (or any TON library) and pass the BoC bytes to the lower-level `signTonCall`:

```kotlin
import com.cryptochief.processing.ton.CellBuilder

val body = CellBuilder()
    .storeUInt(0x12345678L, 32)
    // ... your custom payload
    .endCell()
    .toBoc()

client.transactions.signTonCall(
    network     = Chain.TON_MAINNET,
    fromAddress = "EQ...",
    contract    = "EQ...",
    bodyCell    = body,
    value       = "50000000", // nanoTON attached
)
```

{% hint style="info" %}
For TON amounts, `Amount.nanoTon("0.05")` returns the nanoTON decimal string the `attachedTonNanos` / `amountTonNanos` fields expect (wrap with `BigInteger(...)` to pass it).
{% endhint %}
