Overview
This guide shows you how to sign TRON transactions using Dynamic’s Node SDK. You build the unsigned transaction against a TRON full node, which returns a transaction object containing a raw_data_hex field. The SDK signs the SHA-256 digest of raw_data_hex, appends the signature to the transaction’s signature array, and returns the complete transaction as a JSON string ready to broadcast.
Prerequisites
Step 1: Build the Unsigned Transaction
TRON transactions are assembled by a full node. Use /wallet/createtransaction for a TRX transfer, or /wallet/triggersmartcontract for smart contract calls such as TRC-20 transfers:
Step 2: Sign the Transaction
The approach for signing transactions depends on how you created your wallet:
With Automatic Backup (Recommended)
If you created your wallet with backUpToDynamic: true, you can sign directly without retrieving key shares, as long as you pass the password used at creation so the SDK can decrypt the backed-up shares:
signTransaction() accepts either the transaction object or its JSON string form, as long as it contains a raw_data_hex field.
With Manual Backup
If you created your wallet with backUpToDynamic: false, you must retrieve and provide external key shares:
Password Handling Notes:
- If your wallet was created without a password, omit the
password parameter
- If your wallet was created with a password, you must provide it for all operations
- The password parameter is always optional in the API, but required if the wallet is password-protected
Step 3: Broadcast the Transaction
signTransaction() returns the full transaction as a JSON string, with the new signature appended to signature and txID recomputed. Pass it directly to /wallet/broadcasttransaction:
Multi-Signature Transactions
Because signTransaction() appends to any existing transaction.signature entries, you can pass a transaction that already carries signatures and the new MPC signature is added alongside them for multi-sig flows.
Next Steps
Last modified on October 15, 2026