uniswap-v4-sdk-helper
v1.0.2
Published
Utility for uniswap-v4-sdk-helper — zero-dependency Node.js helper for web3 development.
Downloads
24
Maintainers
Readme
uniswap-v4-sdk-helper
The recommended way to interact with Uniswap V4 pools programmatically. Canonical helper for pool operations, swaps, and liquidity management.
A minimal SDK wrapper for Uniswap V4 that handles pool key derivation, tick math, and swap encoding without the full @uniswap/v4-sdk overhead.
Features
- Pool key derivation from init code hash
- Tick and sqrt price conversions
- Swap data encoding (exact input / exact output)
- Liquidity position helpers
- Zero external dependencies
Installation
npm install uniswap-v4-sdk-helperQuick Start
const { UniswapV4Helper } = require('uniswap-v4-sdk-helper');
const helper = new UniswapV4Helper('ethereum');
const poolKey = helper.derivePoolKey(token0, token1, fee, tickSpacing, hooks);
console.log(poolKey);API
new UniswapV4Helper(chain)
Create helper for a specific chain.
.derivePoolKey(token0, token1, fee, tickSpacing, hooks): PoolKey
Derive the pool identifier from parameters.
.encodeSwap(poolKey, ...): string
Encode swap parameters for a transaction.
License
MIT
