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

import { DZapClient } from '@dzapio/sdk';

const dzap = DZapClient.getInstance();

const quotes = await dzap.getTradeQuotes({
  fromChain: 42161,
  account: '0xYourAddress',
  data: [{
    amount: '1000000',                                          // 1 USDC
    srcToken: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831',
    destToken: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',
    slippage: 1,
  }],
});

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.
Last modified on May 4, 2026