Usage
Parameters
| Parameter | Type | Description |
|---|---|---|
transaction.to | string | The recipient’s Tron address |
transaction.amount | number | The amount to send in TRX (will be converted to SUN internally) |
walletAccount | TronWalletAccount | The wallet account to send from |
client | DynamicClient (optional) | The Dynamic client instance. Only required when using multiple clients. |
Returns
Promise<TronBroadcastReturnSignedTransaction> - A promise that resolves to the broadcast result of the signed transaction.
Errors
| Error | Description |
|---|---|
NotTronProviderError | Thrown if the wallet account’s provider is not a Tron provider |
| Signing unavailable error | Thrown if the wallet account is not available for signing |
Notes
- The amount is specified in TRX and is automatically converted to SUN (Tron’s smallest unit) internally.
- The function verifies that the wallet account is available for signing before sending the transaction.
Related functions
- getTronWeb - Get the TronWeb instance for more advanced operations
- isTronWalletAccount - Check if a wallet account is a Tron account