Tron address derivation, in-enclave transaction parsing,
tron.tx.* policy contexts, secp256k1 signing via SIGN_TRANSACTION_V2, and custodial tronSendTransaction (server-side build, broadcast, and status monitoring — TRX and TRC-20) are all available today. There is no fee sponsorship product for Tron yet — see Gasless Tron transactions for the DIY resource-delegation path.Address derivation
0xkey supports Tron address derivation withADDRESS_FORMAT_TRON. Tron addresses are derived from the same SECP256k1 curve used for Ethereum addresses, but with a different address encoding (base58check, T...).
0xkey’s SDK helper derives Tron accounts at the shortened path
m/44'/195'/i' (matching SLIP-44 coin type 195), not the fully-qualified m/44'/195'/0'/0/0. If you create a Tron wallet account through the Dashboard instead of the SDK, it uses the full path and will derive a different address for the same seed. Pick one convention per organization and keep it consistent.Custodial send
For server-side build → policy-checked sign → broadcast → status monitoring in a single call, usetronSendTransaction. It supports native TRX transfers and TRC-20 transfers (0xkey ABI-encodes transfer(address,uint256) and estimates fee_limit for you via triggerconstantcontract):
tron.tx.* policy engine before signing, then broadcast via TronGrid and track confirmation. Poll status with Get Send Transaction Status. tronSendTransaction is also available as a React hook in @0xkey-io/react-wallet-kit and @0xkey-io/react-native-wallet-kit.
Duplicate broadcasts of an already-known transaction are treated as an idempotent success.
TAPOS_ERROR / TRANSACTION_EXPIRATION_ERROR are safely retried by rebuilding against a fresh reference block — Tron has no nonce, so there is no replacement/cancellation semantics to reason about.sponsor: true) product for Tron custodial send yet — see Gasless Tron transactions for the current DIY resource-delegation path.
Client-side construction and signing
If you’d rather build and broadcast the transaction yourself (e.g. for contract callstronSendTransaction doesn’t model yet), use TronWeb (or any other Tron transaction builder) against a TronGrid-compatible RPC. You serialize the unsigned transaction client-side, then hand it to 0xkey for policy-checked signing.
signTransaction (ACTIVITY_TYPE_SIGN_TRANSACTION_V2) runs the raw raw_data_hex through 0xkey’s in-enclave Tron parser before signing, so tron.tx.* policy conditions can inspect the transaction’s contract fields. If you only need a bare signature over an arbitrary hash (no parsing, no tron.tx.* policy visibility), you can instead use signRawPayload with hashFunction: "HASH_FUNCTION_SHA256" over raw_data_hex — but policies that reference tron.tx.* will evaluate those conditions as not applicable for raw-payload signs.
Transaction parsing, policies, and signing
0xkey runs a Tron transaction parser inside the secure enclave to decode the unsignedraw_data protobuf and expose its fields to the policy engine under tron.tx.*. See the TronTransaction / TronContract structs in the policy language page for the full field list.
The parser currently decodes the following Tron contract types with full field fidelity:
TransferContract(TRX transfers)TransferAssetContract(TRC-10 transfers)TriggerSmartContract(smart contract calls, including TRC-20)FreezeBalanceV2Contract/UnfreezeBalanceV2Contract(Stake 2.0)WithdrawExpireUnfreezeContractDelegateResourceContract/UnDelegateResourceContract(resource delegation, used for gasless UX — see Gasless Tron transactions)AccountPermissionUpdateContract(multisig permission updates)
contract_type is populated — field-level policy conditions for those types are not yet available.
As with EVM and Solana, 0xkey binds the digest the policy engine evaluated to the exact bytes the enclave signer signs (signing_hash), so a ruling can never be replayed against a different transaction.
See the Tron policy examples for sample policies.
Import and export formats
0xkey offers wallet or private key imports and export functionality. Tron accounts use the same SECP256k1 key material as Ethereum, so imports/exports follow the same formats — see the import and export guides.Networks
The Tron parser and policy engine are chain-agnostic across Tron networks — they operate on the transaction bytes, not on network configuration. Point your transaction builder’s RPC at the network you want:- Tron mainnet
- Tron Nile testnet
- Tron Shasta testnet
Examples and demos
You can find a full walkthrough — wallet creation, raw payload signing, andtron.tx.* policy examples for TRX and TRC-20 transfers — in examples/with-tron.
Roadmap
Fee sponsorship for custodial Tron sends (a Tron-nativesponsor: true, backed by resource delegation rather than a fee-payer signer) is not yet productized — see Gasless Tron transactions for the DIY path today. Track status on the Roadmap.