> ## 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.

# SDK Overview

> @dzapio/sdk — TypeScript wrapper for every DZap surface.

`@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

<Snippet file="install-sdk.mdx" />

## First call

```ts theme={null}
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

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/sdk/installation">
    Setup, wallet adapters, RPC config.
  </Card>

  <Card title="Client" icon="cube" href="/sdk/client">
    `DZapClient.getInstance()` and lifecycle.
  </Card>

  <Card title="Trade" icon="arrows-rotate" href="/sdk/trade">
    Same-chain and cross-chain swaps.
  </Card>

  <Card title="Zap" icon="bolt" href="/sdk/zap">
    Multi-step intent execution (Fuse).
  </Card>

  <Card title="Approvals" icon="check" href="/sdk/approvals">
    ERC20, Permit2, EIP-2612, AutoPermit.
  </Card>

  <Card title="Intents" icon="signature" href="/sdk/intents">
    Gasless `signGaslessDzapUserIntent`.
  </Card>
</CardGroup>
