These are the methods that wallets should implement to handle Tron transactions and messages via WalletConnect.

Please note: The TRON RPC standard is still under review and specifications may change. Implementation details and method signatures are subject to updates.

tron_signTransaction

Sign a Tron transaction without executing it.

Parameters

  1. transaction (object) - The transaction to sign:
    • address (string) - The sender’s Tron address
    • transaction (object) - The transaction object to sign

Returns

object - The signed transaction:

  • txID (string) - The transaction ID (deterministically derived from raw transaction)
  • signature (array) - Array of signature strings
  • raw_data (object) - The raw transaction data
  • raw_data_hex (string) - The hex-encoded raw transaction data
  • visible (boolean) - Whether addresses are in visible format

Example

// Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tron_signTransaction",
  "params": {
    "address": "TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH",
    "transaction": {
      "raw_data": {
        "contract": [
          {
            "parameter": {
              "value": {
                "data": "095ea7b30000000000000000000000001cb0b7348eded93b8d0816bbeb819fc1d7a51f310000000000000000000000000000000000000000000000000000000000000000",
                "owner_address": "411cb0b7348eded93b8d0816bbeb819fc1d7a51f31",
                "contract_address": "41a614f803b6fd780986a42c78ec9c7f77e6ded13c"
              },
              "type_url": "type.googleapis.com/protocol.TriggerSmartContract"
            },
            "type": "TriggerSmartContract"
          }
        ],
        "ref_block_bytes": "885b",
        "ref_block_hash": "baa1c278fd0a309f",
        "expiration": 1745849082000,
        "fee_limit": 200000000,
        "timestamp": 1745849022978
      }
    }
  }
}

// Response
{
  "jsonrpc": "2.0",
  "result": {
    "txID": "66e79c6993f29b02725da54ab146ffb0453ee6a43b4083568ad9585da305374a",
    "signature": [
      "7e760cef94bc82a7533bc1e8d4ab88508c6e13224cd50cc8da62d3f4d4e19b99514f..."
    ],
    "raw_data": {
      "expiration": 1745849082000,
      "contract": [
        {
          "parameter": {
            "type_url": "type.googleapis.com/protocol.TriggerSmartContract",
            "value": {
              "data": "095ea7b30000000000000000000000001cb0b7348eded93b8d0816bbeb819fc1d7a51f310000000000000000000000000000000000000000000000000000000000000000",
              "contract_address": "41a614f803b6fd780986a42c78ec9c7f77e6ded13c",
              "owner_address": "411cb0b7348eded93b8d0816bbeb819fc1d7a51f31"
            }
          },
          "type": "TriggerSmartContract"
        }
      ],
      "ref_block_hash": "baa1c278fd0a309f",
      "fee_limit": 200000000,
      "timestamp": 1745849022978,
      "ref_block_bytes": "885b"
    },
    "visible": false,
    "raw_data_hex": "0a02885b2208baa1c278fd0a309f4090c1dbe5e7325aae01081f12a9010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412740a15411cb0b7348eded93b8d0816bbeb819fc1d7a51f31121541a614f803b6fd780986a42c78ec9c7f77e6ded13c2244095ea7b30000000000000000000000001cb0b7348eded93b8d0816bbeb819fc1d7a51f3100000000000000000000000000000000000000000000000000000000000000007082f4d7e5e73290018084af5f"
  },
  "id": 1
}

tron_signMessage

Sign a personal message.

Parameters

  1. message (object) - The message to sign:
    • message (string) - The message to sign (plain text)
    • address (string) - The account address to sign with

Returns

object - The signed message:

  • signature (string) - The signature string

Example

// Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tron_signMessage",
  "params": {
    "message": "This is a message to be signed for TRON",
    "address": "TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH"
  }
}

// Response
{
  "jsonrpc": "2.0",
  "result": {
    "signature": "7e760cef94bc82a7533bc1e8d4ab88508c6e13224cd50cc8da62d3f4d4e19b99514f..."
  },
  "id": 1
}

tron_sendTransaction

Broadcast a signed transaction to the Tron network.

Parameters

  1. signedTransaction (object) - The signed transaction object:
    • txID (string) - The transaction ID
    • signature (array) - Array of signature strings
    • raw_data (object) - The raw transaction data
    • raw_data_hex (string) - The hex-encoded raw transaction data

Returns

object - The transaction result:

  • result (boolean) - Whether the transaction was successfully broadcast
  • txid (string) - The transaction ID that can be used to look up the transaction

Example

// Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tron_sendTransaction",
  "params": {
    "signedTransaction": {
      "txID": "66e79c6993f29b02725da54ab146ffb0453ee6a43b4083568ad9585da305374a",
      "signature": [
        "7e760cef94bc82a7533bc1e8d4ab88508c6e13224cd50cc8da62d3f4d4e19b99514f..."
      ],
      "raw_data_hex": "0a02885b2208baa1c278fd0a309f4090c1dbe5e7325aae01081f12a9010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e747261637412740a15411cb0b7348eded93b8d0816bbeb819fc1d7a51f31121541a614f803b6fd780986a42c78ec9c7f77e6ded13c2244095ea7b30000000000000000000000001cb0b7348eded93b8d0816bbeb819fc1d7a51f3100000000000000000000000000000000000000000000000000000000000000007082f4d7e5e73290018084af5f"
    }
  }
}

// Response
{
  "jsonrpc": "2.0",
  "result": {
    "result": true,
    "txid": "66e79c6993f29b02725da54ab146ffb0453ee6a43b4083568ad9585da305374a"
  },
  "id": 1
}

tron_getBalance

Get the TRX balance of a Tron address.

Parameters

  1. address (string) - The Tron address to query

Returns

number - The balance in SUN (1 TRX = 1,000,000 SUN)

Example

// Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tron_getBalance",
  "params": {
    "address": "TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH"
  }
}

// Response
{
  "jsonrpc": "2.0",
  "result": 1000000000,
  "id": 1
}

Additional Resources

For more information about Tron RPC methods and implementation details, please refer to the official Tron documentation.