Skip to main content

Install

pnpm install @gauntlet-xyz/sdk
The SDK has a single runtime dependency: viem ^2.x.

Requirements

  • Node.js 18+ or any modern JavaScript runtime (Bun, Deno)
  • TypeScript 5+ recommended
  • An RPC URL for each chain you want to interact with (e.g. Alchemy, Infura, or your own node)
  • A Gauntlet API key from the sign-up process
  • A Gauntlet builder code for attribution — request this alongside your API key from the Gauntlet partnerships team. Without it, deposits go through but volume is not attributed to your integration.

Peer Dependencies

The SDK communicates directly on-chain using your RPC URLs. It reads allowances, share prices, and vault state, then returns transaction objects you sign and submit through your own wallet infrastructure. You need a viem PublicClient and WalletClient in your application.
import { createPublicClient, createWalletClient, http } from 'viem'
import { base } from 'viem/chains'

const publicClient = createPublicClient({
  chain: base,
  transport: http(process.env.RPC_URL_BASE!),
})

const walletClient = createWalletClient({
  chain: base,
  transport: http(process.env.RPC_URL_BASE!),
})

Next Steps

Setup

Initialize the SDK and make your first deposit.

Reference

Full constructor, methods, result shape, and errors.