executeSwapTransaction is the method the Dynamic SDK calls when it needs your wallet to sign and broadcast a transaction. It is used by both the swaps flow (executeSwapTransaction) and Fireblocks Flow (submitFlowTransaction). If your WalletProvider does not implement it, the user can connect and sign messages, but cannot execute a swap or Flow transaction.
What executeSwapTransaction receives
The method receives a signingPayload and a walletAccount, and must return { transactionHash }.
signingPayload — chain-specific transaction data prepared by the SDK.
walletAccount — the connected account that should sign.
The exact fields on signingPayload depend on the chain:
- EVM —
evmTransaction and optional evmApproval for ERC-20 allowances.
- Solana / Sui —
serializedTransaction.
- Bitcoin —
psbt.
- Tron —
tronTransaction.
High-level implementation
Implement executeSwapTransaction and spread it into your WalletProvider:
Your wallet’s signing layer is responsible for:
- Parsing the
signingPayload for the target chain.
- Ensuring the user is on the correct network (the SDK calls
ensureCorrectActiveNetwork before executeSwapTransaction, but you can validate again).
- Signing and broadcasting the transaction.
- Returning the on-chain transaction hash.
Use the wallet as a Flow source
With executeSwapTransaction implemented, a consumer can use the wallet to pay a Fireblocks Flow:
submitFlowTransaction internally calls prepareFlowSigning, then delegates signing to your provider’s executeSwapTransaction, then calls broadcastFlow with the resulting hash. The only wallet-specific work is inside executeSwapTransaction; everything else is handled by the Dynamic SDK.
Use the wallet for Swaps
The same executeSwapTransaction method is used for generic swaps. The consumer calls executeSwapTransaction directly after fetching a swap quote:
Last modified on September 21, 2026