
V4 Sdk Integration
If you're building a swap UI or liquidity manager on top of Uniswap v4, this walks you through the SDK layer: V4Planner for routing swaps through the Universal Router, StateView for reading pool state from the singleton PoolManager, and PositionManager for LP operations. The guide is opinionated about when to use v4 versus v3 (there's a decision table) and covers the Permit2 approval flow, which trips up newcomers. It's aimed at app developers, not Solidity hook authors. The code samples are TypeScript heavy and assume you know your way around viem or ethers. Useful if you need swap quotes, multi hop routing, or position management without reaching for the Trading API.
- skills.sh installs
- 758
- GitHub stars
- 236
- last updated
- Aug 21, 2026
Install
$ npx -y skills add uniswap/uniswap-ai --skill v4-sdk-integration --agent claude-codeInstalls into .claude/skills of the current project.
Files
Uniswap v4 SDK Integration
App-layer SDK for swaps, quotes, and liquidity. For Solidity hook contracts, use the
uniswap-hooksskill. For Trading API or v3-centric swaps, use theswap-integrationskill.
When to Use
- Token swap UI (single-hop or multi-hop)
- Quote/price display before executing a trade
- Liquidity position management (add/remove/collect)
- Pool state reads (price, tick, liquidity)
Packages
npm i @uniswap/v4-sdk @uniswap/sdk-core @uniswap/universal-router-sdk
v4 vs v3 Decision Table
Sponsors
Details
- Repository
- github.com/uniswap/uniswap-ai
- Categories
- Backend & APIs, Documentation, Finance & Trading
- First seen
- Jun 3, 2026