Skip to main content
@dzapio/sdk is the official TypeScript/JavaScript SDK. It wraps the Trade and Fuse APIs, handles approvals across modes (Permit2, EIP-2612, AutoPermit), and gives you typed quote/build/execute helpers for swap, bridge, and zap.

Why use the SDK?

  • Type safety — full TypeScript for every request/response.
  • Approval automation — one getAllowance + approve/sign call covers all four approval modes.
  • Wallet adapters — works with viem WalletClient and ethers.js Signer.
  • Sane defaults — RPC fallbacks, retry logic, slippage defaults.

Install

First call

Where to next

Installation

Setup, wallet adapters, RPC config.

Client

DZapClient.getInstance() and lifecycle.

Trade

Same-chain and cross-chain swaps.

Zap

Multi-step intent execution (Fuse).

Approvals

ERC20, Permit2, EIP-2612, AutoPermit.

Gasless Trading

Sign-only execution via tradeGasless() (Trade only).
Last modified on July 14, 2026