unsignedTransaction is a hex-encoded protobuf SignDoc, built for direct (protobuf) signing, not amino. Decode it, sign it exactly as returned, and never rebuild it from chain state: the SignDoc already embeds the account’s sequence, the fee, and the gas, and resigning a rebuilt document produces a signature over different bytes that the chain rejects.
Prerequisites
- An action’s
transactions[]; see Transaction signing for decoding by chain family and Enter and exit flows for the request and poll loop. - A Cosmos wallet capable of direct signing, such as
DirectSecp256k1HdWalletfrom@cosmjs/proto-signing. - The
cosmosPubKeyargument: a bech32-encoded public key (cosmospub1...), required by most Cosmos yields’mechanics.arguments.enter.fieldsalongsideamountand, for native staking,validatorAddress. Confirm the exact required fields per yield before building the request; do not assume every Cosmos yield needs all three.
Decode, sign, and submit
Submit the signed transaction instead
To hand Yield.xyz the signed bytes rather than broadcasting yourself, callPOST /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.
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.

