Transaction
Signs an unsigned transaction and broadcasts it to chain.| Field | Description | Type - Optional |
|---|---|---|
kind | Transaction | String |
transaction | The unsigned hex encoded transaction as shown below. | String |
externalId | A unique ID from your system. It can be leveraged to be used as an idempotency key (read more here). | String (optional) |
Typescript Example with TronWeb
First install TronWeb. You can find the full documentation here. Tron requires the transaction to be serialized using the protobuf format before it can be broadcast. As it’s not trivial, you can use the functions exposed in Tronweb to generate the transaction in the right format (see below) and then broadcast via the Dfns TypeScript SDK:Complete examples
For complete working examples, see the SDK examples on GitHub:- Basic transaction - Simple TRX transfer
- Staking - TRX staking operations
