@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/signcall covers all four approval modes. - Wallet adapters — works with
viemWalletClientandethers.jsSigner. - 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.
Intents
Gasless
signGaslessDzapUserIntent.