Skip to main content
Gasless execution is available for Trade (swap/bridge) only — the SDK has no gasless flow for Zap. Instead of sending a transaction, the user signs an EIP-712 permit; DZap’s relay submits it and pays gas on their behalf.
The underlying signing utility (signGaslessDzapUserIntent) is internal and not exported from @dzapio/sdk. Use the high-level tradeGasless() method below — it handles building, signing, and submission for you.

tradeGasless()

Set gasless: true on the request. tradeGasless() will:
  1. Build the transaction via POST /v1/buildTx (unless you pass pre-built txnData) — this returns a GaslessTradeBuildTxnResponse with a typed-data payload to sign.
  2. Prompt the signer for an EIP-712 signature over that payload (EIP-2612 permit, or a batch Permit2 signature if request.hasPermit2ApprovalForAllTokens is set).
  3. Submit the signed permit to POST /v1/gasless/executeTx for the relay to execute.
  4. Optionally call txnStatusCallback with TxnStatus.waitingForExecution once the signature is submitted.

Why the hashes matter

The build response’s typed-data payload commits to executorFeesHash and (for swaps) swapDataHash — the relay can’t inflate fees or substitute a worse route after you sign, because those values are hashed into the signed message. If either is tampered with, on-chain verification reverts.

Deadline

The signed permit carries a deadline; past it, the relay can no longer submit it and you’ll need to rebuild and re-sign. For the non-gasless flow, see Execute Trade. For Zap execution (always requires gas from the user — there is no zap gasless mode), see Execute Zap.
Last modified on July 14, 2026