Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dzap.io/llms.txt

Use this file to discover all available pages before exploring further.

Zap methods drive DZap Fuse — single-signature multi-step flows.
The methods are named Zap* but the public product is Fuse. They’re the same thing — code stays on the legacy name.

getZapQuote

const quote = await dzap.getZapQuote({
  srcChainId: 42161,
  destChainId: 8453,
  account: '0xUser',
  srcToken: '0xaf88...',
  destToken: '0x4200000000000000000000000000000000000006',  // Base WETH
  amount: '100000000',
  recipient: '0xUser',
  refundee: '0xUser',
  slippage: 1,
});
Returns the bundle plan + intent body (txId, hashes, deadline).

buildZapTxn

const tx = await dzap.buildZapTxn({
  /* same params as getZapQuote */
});
// tx => { to, data, value, gasLimit, txId, steps[] }

zap

Build + sign + send the bundle.
const result = await dzap.zap({
  request: {/* params */},
  signer: walletClient,
});
// result.txnHash + result.txId
Approval required. Same flow as Trade — getAllowance() then approve() or sign().

Bundles

For multi-step intents (bridge → LP-deposit, etc.) use the bundle methods:
const bundle = await dzap.getZapBundleQuote({
  account: '0xUser',
  steps: [
    { type: 'bridge', srcChainId: 42161, destChainId: 8453, srcToken: '0xaf88...', destToken: '0x8335...', amount: '100000000' },
    { type: 'zap', srcChainId: 8453, destChainId: 8453, srcToken: '0x8335...', destToken: '0xPool...', action: 'add-liquidity', pool: '0xPool...' },
  ],
});

const tx = await dzap.buildZapBundleTx({
  account: '0xUser',
  bundleId: bundle.bundleId,
});

getZapTxnStatus

const status = await dzap.getZapTxnStatus({ txId: tx.txId });
// status.steps[i] => per-leg progress
For UI: render status.steps with a per-step indicator. Cross-chain settlement can take seconds to minutes depending on the bridge. See Bundle and Execution Flow for the conceptual model.