> For the complete documentation index, see [llms.txt](https://docs.ston.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ston.fi/developer-section/omniston/sdk/tron.md).

# TRON wallet integration

TRON-specific Omniston SDK notes for cross-chain order settlement.

Use this page when your Omniston SDK integration needs to identify TRON assets or addresses.

TRON is supported as a separate Omniston chain, not as an EVM chain. Do not reuse EVM address validation, wallet detection, or allowance assumptions for TRON accounts.

## Chain and Asset Shape

TRON uses the `tron` SDK chain discriminator.

For TRC-20 assets, use `kind.$case: "trc20"`:

```ts
import type { AssetId, ChainAddress } from "@ston-fi/omniston-sdk";

const tronUsdt: AssetId = {
  chain: {
    $case: "tron",
    value: {
      kind: {
        $case: "trc20",
        value: "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
      },
    },
  },
};

const tronTraderAddress: ChainAddress = {
  chain: {
    $case: "tron",
    value: "T...",
  },
};
```

Keep the same chain on each side of the trade:

* the source-side `AssetId` and source-side `ChainAddress` must both use `tron` when the trader sends funds from TRON
* the destination-side `AssetId` and destination-side `ChainAddress` must both use `tron` when the trader receives funds on TRON
* cross-chain swaps use different source and destination chains

See [Supported chains and assets](/developer-section/omniston/chains.md) for networks and token addresses.

## Settlement Notes

For TRON cross-chain routes, use order settlement. TRON swap settlement is not currently the expected integration path.

Follow the same high-level order lifecycle used by other cross-chain routes:

1. request quotes with order settlement enabled
2. select an order quote
3. build and sign the required order payload
4. register the signed order with Omniston
5. track the order with `orderTrack()`

The exact wallet connection, signing, allowance, and transaction broadcast steps are integration-specific. If the selected route uses a TRC-20 input asset, check token allowance for the source-side protocol contract before registering the signed order.

## Payload Builder

Current SDK examples for order settlement use the EVM order payload builder:

```ts
const orderPayload = await omniston.evmBuildOrderPayload({
  quoteId: quote.quoteId,
  ownerSrcAddress: tronTraderAddress,
  traderDstAddress,
  traderDstDiscloseAddress: traderDstAddress,
});
```

This reflects the current SDK API surface for signed order payloads. Treat the wallet-specific signing and broadcast logic as application code, and validate it against the wallet stack used by your product.

## Reference Implementation

The public React demo app includes chain-family, wallet, and TRON transaction helpers that can be used as implementation references:

| Area                      | Demo app file                                                                                                                                                                                                            |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| TRON quote action         | [`components/QuoteActionTron.tsx`](https://github.com/ston-fi/omniston-sdk/blob/main/examples/react-app/components/QuoteActionTron.tsx)                                                                                  |
| TRON transaction flow     | [`hooks/useTronTransaction.ts`](https://github.com/ston-fi/omniston-sdk/blob/main/examples/react-app/hooks/useTronTransaction.ts)                                                                                        |
| TRON wallet connection    | [`hooks/useTronWalletConnection.ts`](https://github.com/ston-fi/omniston-sdk/blob/main/examples/react-app/hooks/useTronWalletConnection.ts)                                                                              |
| TRON RPC client           | [`hooks/useTronWebClient.ts`](https://github.com/ston-fi/omniston-sdk/blob/main/examples/react-app/hooks/useTronWebClient.ts)                                                                                            |
| Wallet family UI          | [`components/WalletManager.tsx`](https://github.com/ston-fi/omniston-sdk/blob/main/examples/react-app/components/WalletManager.tsx)                                                                                      |
| Chain family mapping      | [`models/chain-family.ts`](https://github.com/ston-fi/omniston-sdk/blob/main/examples/react-app/models/chain-family.ts)                                                                                                  |
| Chain and address helpers | [`models/chain.ts`](https://github.com/ston-fi/omniston-sdk/blob/main/examples/react-app/models/chain.ts), [`models/address.ts`](https://github.com/ston-fi/omniston-sdk/blob/main/examples/react-app/models/address.ts) |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ston.fi/developer-section/omniston/sdk/tron.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
