Skip to main content
On Tron, unsignedTransaction is a JSON string of a TronGrid transaction object, the same shape tronWeb.trx.sign() expects. Parse it and pass it through unchanged.

Prerequisites

  • An action’s transactions[]; see Transaction signing for decoding by chain family and Enter and exit flows for the request and poll loop.
  • tronweb@^6. TronWeb is a named export in v6 (import { TronWeb } from "tronweb"); a default import throws TronWeb is not a constructor.
  • For native staking, tronResource (one of ENERGY or BANDWIDTH) and validatorAddresses (an array) in the enter or exit arguments, alongside amount. Confirm exact required fields via mechanics.arguments.enter.fields before building the request.

Parse, sign, and submit

Submit the signed transaction instead

To hand Yield.xyz the signed payload rather than broadcasting yourself, call POST /v1/transactions/{tx.id}/submit with { "signedTransaction": ... } instead of submit-hash. Use one path per transaction, never both. See Transaction signing for when each fits.
Tron staking uses BANDWIDTH and ENERGY resources instead of gas, and native staking’s unstaking period runs a fixed number of days on-chain; check the yield’s own mechanics.cooldownPeriod rather than assuming a duration.

Next steps

Transaction signing

The shared contract across chain families: decode, validate, sign, submit.

Enter and exit flows

Build the request, branch on executionPattern, and poll to a terminal status.