Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Installation – Uniswap SDK
Skip to content

Installation

Package Manager

npm
npm install @uniswap/v4-sdk-next

Requirements

  • Node.js: 18.x or later
  • TypeScript: 5.0 or later (recommended)

Peer Dependencies

The V4 SDK depends on SDK Core and V3 SDK:

npm install @uniswap/sdk-core-next @uniswap/v3-sdk-next

Usage

import {
  Pool,
  Position,
  Route,
  Trade,
  Hook,
  HookOptions,
  PositionManager,
  V4Planner,
} from '@uniswap/v4-sdk-next'
import { Token, Ether, CurrencyAmount } from '@uniswap/sdk-core-next'

TypeScript Configuration

{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "strict": true
  }
}