|
| 1 | +--- |
| 2 | +namespace-identifier: tron-caip10 |
| 3 | +title: Tron Namespace - Account ID Specification |
| 4 | +author: Ignacio Rivera (@riveign), Daniel Rocha (@danroc) |
| 5 | +discussions-to: https://github.com/ChainAgnostic/namespaces/pull/170 |
| 6 | +status: Draft |
| 7 | +type: Standard |
| 8 | +created: 2026-01-27 |
| 9 | +requires: ["CAIP-2", "CAIP-10"] |
| 10 | +--- |
| 11 | + |
| 12 | +# CAIP-10 |
| 13 | + |
| 14 | +*For context, see the [CAIP-10][] specification.* |
| 15 | + |
| 16 | +## Rationale |
| 17 | + |
| 18 | +Tron addresses use Base58Check encoding and are derived from ECDSA public keys using the secp256k1 curve (same as Ethereum). |
| 19 | +All Tron addresses: |
| 20 | +- Start with the letter `T` (due to the `0x41` address prefix) |
| 21 | +- Are exactly 34 characters in length |
| 22 | +- Include a 4-byte checksum for error detection |
| 23 | +- Are case-sensitive |
| 24 | + |
| 25 | +The address format provides both human readability and built-in validation through the checksum mechanism. |
| 26 | + |
| 27 | +## Syntax |
| 28 | + |
| 29 | +The syntax of a Tron address follows Base58Check encoding with the following constraints: |
| 30 | + |
| 31 | +**Regular Expression**: `^T[1-9A-HJ-NP-Za-km-z]{33}$` |
| 32 | + |
| 33 | +Where: |
| 34 | +- First character is always `T` |
| 35 | +- Remaining 33 characters use Base58 alphabet (excluding 0, O, I, l) |
| 36 | +- Total length is exactly 34 characters |
| 37 | + |
| 38 | +### Address Generation |
| 39 | + |
| 40 | +Tron addresses are generated through the following process: |
| 41 | +1. Generate ECDSA key pair using secp256k1 curve |
| 42 | +2. Extract 64-byte public key |
| 43 | +3. Hash with Keccak256 (SHA3) |
| 44 | +4. Take last 20 bytes of hash |
| 45 | +5. Prepend address prefix byte `0x41` |
| 46 | +6. Double SHA256 hash and append first 4 bytes as checksum |
| 47 | +7. Base58 encode the result |
| 48 | + |
| 49 | +## Chain IDs |
| 50 | + |
| 51 | +*For context, see the [CAIP-2][] specification.* |
| 52 | + |
| 53 | +| Network | Chain ID | Chain ID (CAIP-2) | |
| 54 | +|----------------|--------------|-------------------| |
| 55 | +| Mainnet | `728126428` | `tron:728126428` | |
| 56 | +| Shasta Testnet | `2494104990` | `tron:2494104990` | |
| 57 | +| Nile Testnet | `3448148188` | `tron:3448148188` | |
| 58 | + |
| 59 | +## Test Cases |
| 60 | + |
| 61 | +This is a list of manually composed and validated examples: |
| 62 | + |
| 63 | +```bash |
| 64 | +# Tron Mainnet - Standard account address |
| 65 | +tron:728126428:TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL |
| 66 | + |
| 67 | +# Tron Mainnet - USDT TRC-20 contract address |
| 68 | +tron:728126428:TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t |
| 69 | + |
| 70 | +# Tron Shasta Testnet |
| 71 | +tron:2494104990:TQQg4EL8o1BSeKJY4MJ8TB8XK7xufxFBvK |
| 72 | + |
| 73 | +# Tron Nile Testnet |
| 74 | +tron:3448148188:TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH |
| 75 | +``` |
| 76 | + |
| 77 | +## Address Validation |
| 78 | + |
| 79 | +### Valid Address Examples |
| 80 | + |
| 81 | +``` |
| 82 | +TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL ✓ Valid mainnet address |
| 83 | +TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t ✓ Valid mainnet address (USDT contract) |
| 84 | +TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH ✓ Valid address |
| 85 | +``` |
| 86 | + |
| 87 | +### Invalid Address Examples |
| 88 | + |
| 89 | +``` |
| 90 | +tNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL ✗ Lowercase 't' (must be uppercase 'T') |
| 91 | +TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYq ✗ Too short (33 characters) |
| 92 | +TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeLL ✗ Too long (35 characters) |
| 93 | +0x742d35Cc6634C0532925a3b844Bc9e759 ✗ Hex format (not Base58Check) |
| 94 | +``` |
| 95 | + |
| 96 | +## Account Types |
| 97 | + |
| 98 | +Tron supports two types of accounts: |
| 99 | + |
| 100 | +1. **Externally Owned Account (EOA)**: |
| 101 | + - Controlled by private key |
| 102 | + - Can initiate transactions |
| 103 | + - Example: `TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL` |
| 104 | + |
| 105 | +2. **Contract Account**: |
| 106 | + - Smart contract address |
| 107 | + - No private key |
| 108 | + - Can only respond to transactions |
| 109 | + - Example: `TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t` (USDT TRC-20) |
| 110 | + |
| 111 | +Both account types use the same address format and are indistinguishable at the address level. |
| 112 | + |
| 113 | +## Backwards Compatibility |
| 114 | + |
| 115 | +Tron's address format has remained consistent since mainnet launch. |
| 116 | +All existing addresses are compatible with the CAIP-10 specification. |
| 117 | + |
| 118 | +## Additional Considerations |
| 119 | + |
| 120 | +### Checksum Validation |
| 121 | + |
| 122 | +The Base58Check encoding includes a 4-byte checksum that should be validated when accepting addresses. |
| 123 | +Invalid checksums indicate: |
| 124 | +- Typographical errors in address entry |
| 125 | +- Data corruption |
| 126 | +- Invalid address generation |
| 127 | + |
| 128 | +### Address Activation |
| 129 | + |
| 130 | +Tron addresses must be activated by receiving TRX or TRC-10 tokens before they appear on-chain. |
| 131 | +Unactivated addresses: |
| 132 | +- Are valid addresses (correct format and checksum) |
| 133 | +- Do not appear in blockchain state queries |
| 134 | +- Will be created upon receiving first transaction |
| 135 | + |
| 136 | +### Multi-signature Addresses |
| 137 | + |
| 138 | +Tron supports multi-signature accounts with the same address format. |
| 139 | +Multi-sig addresses cannot be distinguished from regular addresses without querying account permissions on-chain. |
| 140 | + |
| 141 | +## Resolution Method |
| 142 | + |
| 143 | +To verify an address exists on-chain, make a JSON-RPC request using Tron's native RPC methods: |
| 144 | + |
| 145 | +```jsonc |
| 146 | +// Request - Get account balance |
| 147 | +{ |
| 148 | + "jsonrpc": "2.0", |
| 149 | + "method": "tron_getBalance", |
| 150 | + "params": { |
| 151 | + "address": "TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL" |
| 152 | + }, |
| 153 | + "id": 1 |
| 154 | +} |
| 155 | + |
| 156 | +// Response |
| 157 | +{ |
| 158 | + "jsonrpc": "2.0", |
| 159 | + "result": { |
| 160 | + "balance": "1000000000" |
| 161 | + }, |
| 162 | + "id": 1 |
| 163 | +} |
| 164 | +``` |
| 165 | + |
| 166 | +Alternatively, using Tron's native HTTP API: |
| 167 | + |
| 168 | +```bash |
| 169 | +curl -X POST https://api.trongrid.io/wallet/getaccount \ |
| 170 | + -d '{"address":"TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL","visible":true}' |
| 171 | +``` |
| 172 | + |
| 173 | +## References |
| 174 | + |
| 175 | +- [CAIP-10][]: Account ID Specification |
| 176 | +- [CAIP-2][]: Chain ID Specification |
| 177 | +- [Tron Developer Hub - Accounts][]: Official account documentation |
| 178 | +- [Tron Address Format][]: Technical specification for address generation |
| 179 | +- [Base58Check Encoding][]: Bitcoin Base58Check encoding specification |
| 180 | + |
| 181 | +[CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md |
| 182 | +[CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md |
| 183 | +[Tron Developer Hub - Accounts]: https://developers.tron.network/docs/account |
| 184 | +[Tron Address Format]: https://tronprotocol.github.io/documentation-en/mechanism-algorithm/account/ |
| 185 | +[Base58Check Encoding]: https://en.bitcoin.it/wiki/Base58Check_encoding |
| 186 | + |
| 187 | +## Copyright |
| 188 | + |
| 189 | +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
0 commit comments