# @uniswap/v4-sdk

> ⚒️ An SDK for building applications on top of Uniswap V4

Latest version **2.4.1** (published 2026-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @uniswap/v4-sdk
pnpm add @uniswap/v4-sdk
yarn add @uniswap/v4-sdk
bun add @uniswap/v4-sdk
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.4.1 |
| Published | 2026-09-24 |
| First published | 2024-07-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 11 |
| Unpacked size | 563.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Maintainers | uniswap-labs-service-account, uniswap-labs-owner-account |
| Keywords | uniswap, ethereum |

## Links

- npm: https://www.npmjs.com/package/@uniswap/v4-sdk
- Repository: https://github.com/Uniswap/sdks
- Homepage: https://github.com/Uniswap/sdks#readme
- Issues: https://github.com/Uniswap/sdks/issues
- npm.io page: https://npm.io/package/@uniswap/v4-sdk

## Dependencies (11)

- [jsbi](https://npm.io/package/jsbi.md) ^3.1.4
- [tslib](https://npm.io/package/tslib.md) ^2.3.0
- [ethers](https://npm.io/package/ethers.md) ^5.7.0
- [tiny-warning](https://npm.io/package/tiny-warning.md) ^1.0.3
- [tiny-invariant](https://npm.io/package/tiny-invariant.md) ^1.1.0
- [@uniswap/v3-sdk](https://npm.io/package/@uniswap/v3-sdk.md) ^3.31.5
- [@uniswap/sdk-core](https://npm.io/package/@uniswap/sdk-core.md) ^7.19.4
- [@ethersproject/abi](https://npm.io/package/@ethersproject/abi.md) ^5.5.0
- [@uniswap/v3-periphery](https://npm.io/package/@uniswap/v3-periphery.md) ^1.1.1
- [@ethersproject/solidity](https://npm.io/package/@ethersproject/solidity.md) ^5.0.9
- [@ethersproject/abstract-signer](https://npm.io/package/@ethersproject/abstract-signer.md) ^5.7.0

## Recent versions

- 2.4.1 (latest) — 2026-09-24
- 1.10.2-beta.1 (beta) — 2024-10-10
- 2.4.0 — 2026-09-18
- 2.3.3 — 2026-09-01
- 2.3.2 — 2026-08-13
- 2.3.1 — 2026-07-24
- 2.3.0 — 2026-06-26
- 2.2.3 — 2026-06-18
- 2.2.2 — 2026-06-05
- 2.2.1 — 2026-05-28
- 2.2.0 — 2026-05-26
- 2.1.1 — 2026-05-20
- 2.1.0 — 2026-05-11
- 2.0.0 — 2026-03-23
- 1.30.0 — 2026-03-23
- … 63 more at https://npm.io/package/@uniswap/v4-sdk/versions

## README

# Uniswap SDK's.

A repository for many Uniswap SDK's. All SDK's can be found in `sdk/` and have more information in their individual README's.

## Development Commands

```markdown
# Clone

git clone --recurse-submodules https://github.com/Uniswap/sdks.git

# Install

bun install

# Build

bun run g:build

# Typecheck

bun run g:typecheck

# Lint

bun run g:lint

# Test

bun run g:test

# Run a specific package.json command for an individual SDK

bun run sdk @uniswap/{sdk-name} {command}
```

## Making Changes & Publishing

This repo uses [Changesets](https://github.com/changesets/changesets) for versioning and publishing, with the `workspace:` protocol for internal dependencies.

### 1. Make your code changes on a branch

Internal dependencies (e.g., `v4-sdk` depending on `sdk-core`) use the `workspace:` protocol, so they resolve to the local workspace during development. This means you can change multiple packages in a single PR — no need for sequential publish-wait-bump cycles.

### 2. Add a changeset

After making your changes, run:

```
bun run changeset
```

This interactive CLI will ask you:

- **Which packages should be bumped?** Select the packages you directly changed (e.g., `@uniswap/sdk-core`).
- **What type of bump?** `patch`, `minor`, or `major`.
- **Summary** A short description of the change (this becomes the changelog entry).

This creates a markdown file in `.changeset/` that looks like:

```md
---
"@uniswap/sdk-core": minor
---

Add support for Soneium chain
```

You **only need to list the packages you directly changed**. Changesets automatically bumps dependents (e.g., bumping `sdk-core` will also bump `v2-sdk`, `v3-sdk`, `v4-sdk`, `router-sdk`, `universal-router-sdk`, etc.).

### 3. Open your PR

Commit the changeset file alongside your code changes. Reviewers can see exactly what version bumps are planned.

### 4. What happens on merge to `main`

The CI workflow (`changesets/action`) runs automatically and does one of two things:

- **If there are pending changeset files:** It opens (or updates) a **"Version Packages" PR** that bumps versions in every affected `package.json`, updates changelogs, and removes the consumed changeset files.
- **If the "Version Packages" PR is merged:** It publishes all packages with new versions to npm.

### Example: Adding a new chain

Previously this required 4 sequential PRs with publish-wait-bump cycles. Now it's a single PR:

```
1. Edit sdk-core (add chain) + universal-router-sdk (use chain)
2. Run `bun run changeset` and select both packages
3. Open PR, merge
4. Merge the auto-generated "Version Packages" PR
5. All affected packages publish to npm
```

### Quick reference

| Command                    | What it does                                             |
| -------------------------- | -------------------------------------------------------- |
| `bun run changeset`        | Create a changeset file (run before opening your PR)     |
| `bun run version-packages` | Apply pending changesets to bump versions (CI does this) |
| `bun run g:release`        | Publish all bumped packages to npm (CI does this)        |

---
_Source: https://npm.io/package/@uniswap/v4-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
