Recommended: JavaScript SDK for React Native
While this SDK is still supported, we recommend using newer JavaScript SDK, which is optimized for React Native, but also comes with a host of other benefits.
Overview
Tron uses the secp256k1 elliptic curve with keccak256 hashing — the same cryptographic scheme as Ethereum. Tron addresses are derived directly from the EVM address without key recovery: swap the0x prefix for 41 and base58check-encode.
Dependencies
Derive Address
Swap the EVM address prefix from0x to 41 and base58check-encode:
Sign a Message
Sign a Transaction
Build the unsigned transaction with TronWeb, then sign the transaction ID and broadcast:Tron signing is simpler than other chains because TronWeb handles transaction construction and serialization. You only need to sign the transaction ID (a SHA-256 hash) using the EVM wallet’s raw signing capability.