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

# Installation

> Install, configure RPCs, plug in a wallet.

## Install

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

The SDK is published as `@dzapio/sdk`. Latest stable: `2.0.x`. Targets Node 18+ and modern browsers (with appropriate polyfills for crypto APIs).

## Wallet adapters

The SDK accepts both `viem` and `ethers.js` signers.

<CodeGroup>
  ```ts viem theme={null}
  import { createWalletClient, http } from 'viem';
  import { arbitrum } from 'viem/chains';

  const walletClient = createWalletClient({
    account: '0xYourAddress',
    chain: arbitrum,
    transport: http(),
  });
  ```

  ```ts ethers theme={null}
  import { ethers } from 'ethers';

  const provider = new ethers.JsonRpcProvider('https://arbitrum.llamarpc.com');
  const signer = new ethers.Wallet('0xPrivateKey', provider);
  ```
</CodeGroup>

Pass either as the `signer` field to `dzap.trade()`, `dzap.zap()`, etc.

<Warning>
  Never put private keys in client code or commit them. Use a wallet provider (RainbowKit, ConnectKit, etc.) on the frontend; use a secrets manager on the backend.
</Warning>

## Custom RPC URLs

The SDK ships with sensible defaults but you'll want your own RPCs for production.

```ts theme={null}
import { DZapClient } from '@dzapio/sdk';

const dzap = DZapClient.getInstance(undefined, {
  1: ['https://eth.llamarpc.com'],
  42161: ['https://arbitrum.llamarpc.com'],
  8453: ['https://base.llamarpc.com'],
});
```

The first URL in each array is primary; subsequent URLs are fallbacks for read-quorum.

## API key (optional)

```ts theme={null}
const dzap = DZapClient.getInstance('dzap_xxxxxxxxxxxxxx');
```

API keys raise rate limits and unlock per-route configuration. See [Authentication](/api/authentication).

## Next: [Client](/sdk/client)
