> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gauntlet.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK Overview

> Use the Gauntlet SDK for vault discovery, live vault data, deposits, withdrawals, user positions, activity, and attribution — all from one client.

The Gauntlet SDK is the entry point for building integrations with Gauntlet. It handles vault discovery, live vault metrics, deposit and withdrawal transaction building, user balance and activity queries, and attribution — so you don't need to write low-level contract calls or raw API requests.

Use it to:

* discover and filter vaults by chain and protocol
* read live vault metrics (TVL, APY, share price) and their history
* prepare deposits and withdrawals with automatic approval handling
* read live Aera sync/async token capabilities before showing an action
* quote Aera instant withdrawals and pin the quote bounds into the transaction
* query live user positions (pending, active, and queued withdrawals) and PnL
* track a wallet's deposit/withdrawal lifecycle and wait for async settlement
* carry attribution context on every transaction

## Three Paths, One Client

**Vault discovery** — the SDK reads from a bundled vault manifest to give you typed access to all supported vaults, their deployments, accepted tokens, and deposit modes. No network request required.

**Data path** — `client.api` is a typed client for the [Gauntlet REST API](/onboarding/credentials): live vault metrics and timeseries, user positions with PnL, the wallet activity log, aggregate TVL, and token prices. Response types are generated from the API's OpenAPI spec, so they cannot drift from the server. No RPC required.

**Transaction path** — the SDK communicates on-chain via your RPC URLs to read allowances and vault state, then returns pre-encoded transaction objects you sign and submit. Uses your viem `PublicClient` and `WalletClient`.

```typescript theme={null}
import { GauntletClient } from '@gauntlet-xyz/sdk'
import { createWalletClient, http, createPublicClient } from 'viem'
import { base } from 'viem/chains'

const client = new GauntletClient({
  evmClients: {
    [base.id]: createPublicClient({ chain: base, transport: http(process.env.RPC_URL_BASE!) }),
  },
  wallet: createWalletClient({
    account,
    chain: base,
    transport: http(process.env.RPC_URL_BASE!),
  }),
})
```

Signing stays entirely in your stack — the SDK never touches private keys. The `wallet` you provide is used to determine the sender account for allowance checks; you sign the resulting steps yourself.

For Aera instant withdrawals, call `getAeraTokenModeSupport` first. Its sync flags include the live V2 solving gate and are false while that gate pauses the provisioner/token pair. When `syncRedeem` is true, call `getSyncWithdrawQuote` with exactly one of `amount`, `shares`, or `entireAmount: true`, then pass that quote as `syncWithdrawQuote` to `getWithdrawTx`. The builder validates that the quote still belongs to the same vault, chain, token, account, slippage, and request. If transaction slippage is omitted, the builder uses the quote's value; an explicit value must match.

`entireAmount` quotes require an explicit `account` because quoting does not require a wallet. Transaction building always uses `wallet.account`; if you also pass `account`, it must match the wallet.

`shares` and `entireAmount` quotes with `slippageBps: 10000` are rejected because they would produce `minTokensOut: 0`.

Using an embedded wallet? `@gauntlet-xyz/sdk/privy` sets up a fully configured client from a Privy wallet in one call — see the [reference](/sdk/reference#privy).

If you only need data — no transactions — construct the client with just an API key and use `client.api`:

```typescript theme={null}
const client = new GauntletClient({ apiKey: process.env.GAUNTLET_API_KEY })
const { data: vaults } = await client.api.vaults()
```

## Go Deeper

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/sdk/installation">
    Install the SDK and configure your project.
  </Card>

  <Card title="Examples" icon="play" href="/sdk/examples">
    Deposits, withdrawals, balance queries, and error handling.
  </Card>

  <Card title="Reference" icon="code" href="/sdk/reference">
    Constructor, methods, result shapes, and errors.
  </Card>

  <Card title="Deposit Your First Dollar" icon="arrow-right-arrow-left" href="/guides/developer/earn/deposits-and-withdrawals">
    The full integration guide with SDK and API confirmation.
  </Card>
</CardGroup>
