Skip to main content
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:
  • EVMevmTransaction and optional evmApproval for ERC-20 allowances.
  • Solana / SuiserializedTransaction.
  • Bitcoinpsbt.
  • TrontronTransaction.

High-level implementation

Add executeSwapTransaction to your WalletProvider:
Your wallet’s signing layer is responsible for:
  1. Parsing the signingPayload for the target chain.
  2. Ensuring the user is on the correct network (the SDK calls ensureCorrectActiveNetwork before executeSwapTransaction, but you can validate again).
  3. Signing and broadcasting the transaction.
  4. 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 August 5, 2026