# Uniswap SDK > Documentation for Uniswap SDK Core, V2, V3, and V4 ## Docs - [Constants](/v4-sdk/constants): The V4 SDK exports various constants for use with V4 pools, positions, and router operations. - [encodeRouteToPath](/v4-sdk/encode-route-to-path): The `encodeRouteToPath` function encodes a V4 route into an array of `PathKey` structs for use in router calls. - [Hook Permissions](/v4-sdk/hook-permissions): Uniswap V4 hooks encode their permissions in the contract address. This page documents the `HookOptions` enum and all 14 hook permission types. - [Hook](/v4-sdk/hook): The `Hook` class provides utilities for working with V4 hook permissions. V4 hooks encode their permissions in the last 14 bits of the hook contract address. - [V4 SDK](/v4-sdk): The V4 SDK (`@uniswap/v4-sdk-next`) provides tools for building on Uniswap V4, the most powerful and flexible version of the protocol. V4 introduces hooks for custom pool logic and native ETH support. - [Installation](/v4-sdk/installation): **Node.js**: 18.x or later - [Multicall](/v4-sdk/multicall): The `Multicall` class provides utilities for batching multiple contract calls into a single transaction. - [Pool](/v4-sdk/pool): The `Pool` class represents a Uniswap V4 liquidity pool. V4 pools support hooks for custom logic and native currency (ETH without WETH wrapping). - [PositionManager](/v4-sdk/position-manager): The `V4PositionManager` class provides methods to encode calldata for the V4 PositionManager contract. It handles position minting, liquidity management, and fee collection. - [Position](/v4-sdk/position): The `Position` class represents a liquidity position on a Uniswap V4 pool. It provides methods to calculate token amounts, handle slippage, and generate permit data. - [Route](/v4-sdk/route): The `Route` class represents a list of V4 pools through which a swap can occur. It handles the path calculation including native ETH and wrapped token conversions. - [Trade](/v4-sdk/trade): The `Trade` class represents a trade executed against one or more V4 routes. It calculates execution price, price impact, and slippage-adjusted amounts. - [V4Planner](/v4-sdk/v4-planner): The `V4Planner` class builds encoded calldata for V4 Router operations. It maintains a list of actions and their encoded parameters for swap execution. - [V4PositionPlanner](/v4-sdk/v4-position-planner): The `V4PositionPlanner` class extends `V4Planner` with convenience methods for position management actions. It simplifies creating mint, increase, decrease, burn, settle, and take operations. - [computePoolAddress](/v3-sdk/compute-pool-address): The `computePoolAddress` utility computes the address of a Uniswap V3 pool given the factory, tokens, and fee tier. It uses CREATE2 address derivation. - [Constants](/v3-sdk/constants): The V3 SDK exports several constants used throughout the Uniswap V3 protocol. - [encodeRouteToPath](/v3-sdk/encode-route-to-path): The `encodeRouteToPath` utility converts a swap route into the hex-encoded path format used by the Uniswap V3 router contracts. - [encodeSqrtRatioX96](/v3-sdk/encode-sqrt-ratio-x96): The `encodeSqrtRatioX96` utility converts a price ratio into the Q64.96 sqrt price format used by Uniswap V3 pools. - [V3 SDK](/v3-sdk): The V3 SDK (`@uniswap/v3-sdk-next`) provides tools for building on Uniswap V3's concentrated liquidity protocol. It includes entities for pools, positions, and trades, along with comprehensive contract interfaces. - [Installation](/v3-sdk/installation): **Node.js**: 18.x or later - [maxLiquidityForAmounts](/v3-sdk/max-liquidity-for-amounts): The `maxLiquidityForAmounts` utility computes the maximum amount of liquidity that can be minted given token amounts and price bounds. - [Multicall](/v3-sdk/multicall): The `Multicall` module provides a utility for encoding multiple function calls into a single multicall transaction. This is useful for batching operations like minting positions with permits or combining swaps with other actions. - [NonfungiblePositionManager](/v3-sdk/nft-position-manager): The `NonfungiblePositionManager` module provides utilities for interacting with the Uniswap V3 NonfungiblePositionManager contract, which manages liquidity positions as NFTs. - [Payments](/v3-sdk/payments): The `Payments` module provides utilities for encoding calldata related to ETH/WETH handling and token sweeping in Uniswap V3 periphery contracts. - [Pool](/v3-sdk/pool): The `Pool` class represents a Uniswap V3 pool with its current state, including the tokens, fee tier, current price, and liquidity. - [Position](/v3-sdk/position): The `Position` class represents a liquidity position on a Uniswap V3 pool. It contains information about the pool, the tick range, and the liquidity amount. - [Price Tick Conversions](/v3-sdk/price-tick-conversions): The price tick conversion utilities provide functions for converting between `Price` objects and ticks in Uniswap V3. - [Quoter](/v3-sdk/quoter): The `Quoter` module provides utilities for generating calldata to get swap quotes from the Uniswap V3 Quoter contracts without executing the swap. - [Route](/v3-sdk/route): The `Route` class represents a route through one or more Uniswap V3 pools for a swap. - [SelfPermit](/v3-sdk/self-permit): The `SelfPermit` module provides utilities for encoding EIP-2612 permit calls, allowing users to approve token spending in the same transaction as the action that requires the approval. - [Sqrt Price Math](/v3-sdk/sqrt-price-math): The sqrt price math utilities provide functions for computing token amounts and price changes in Uniswap V3 pools. - [Staker](/v3-sdk/staker): The `Staker` module provides utilities for interacting with the Uniswap V3 Staker contract, which allows liquidity providers to earn additional rewards by staking their position NFTs. - [SwapRouter](/v3-sdk/swap-router): The `SwapRouter` module provides utilities for generating calldata to execute swaps on the Uniswap V3 SwapRouter contract. - [TickDataProvider](/v3-sdk/tick-data-provider): The `TickDataProvider` interface defines the contract for providing tick data to V3 pools. It allows pools to fetch tick information dynamically during swap calculations. - [Tick Math](/v3-sdk/tick-math): The tick math utilities provide functions for converting between ticks and sqrt prices in Uniswap V3. - [Tick](/v3-sdk/tick): The `Tick` class represents a tick in a Uniswap V3 pool. Ticks are discrete price points at which liquidity can be added or removed. - [Trade](/v3-sdk/trade): The `Trade` class represents a trade executed against a set of routes where some percentage of the input may be split across each route. - [Constants](/v2-sdk/constants): V2 SDK constants including factory addresses and init code hash. - [Errors](/v2-sdk/errors): Custom error types for V2 SDK operations. - [V2 SDK](/v2-sdk): The V2 SDK (`@uniswap/v2-sdk-next`) provides tools for building on Uniswap V2's constant-product automated market maker. It includes entities for pairs, routes, and trades, with full support for fee-on-transfer tokens. - [Installation](/v2-sdk/installation): **Node.js**: 18.x or later - [Pair](/v2-sdk/pair): The `Pair` class represents a Uniswap V2 liquidity pair. - [Route](/v2-sdk/route): The `Route` class represents a path through one or more V2 pairs for a trade. - [Router](/v2-sdk/router): The `Router` class provides static methods to generate calldata for V2 Router contract interactions. - [Trade](/v2-sdk/trade): The `Trade` class represents a V2 swap, including the route, amounts, and price impact. - [Addresses](/sdk-core/addresses): Contract address mappings for Uniswap deployments across supported chains. - [Chains](/sdk-core/chains): Chain IDs and native currency configurations for supported networks. - [computePriceImpact](/sdk-core/compute-price-impact): Computes the percent difference between the mid price and the execution price of a trade. - [Constants](/sdk-core/constants): Global constants and types used throughout the SDK. - [CurrencyAmount](/sdk-core/currency-amount): The `CurrencyAmount` class represents an amount of a specific currency with precise arithmetic. - [Currency](/sdk-core/currency): The `Currency` type is a union of `Token` and `NativeCurrency`. It represents any fungible asset that can be used in Uniswap. - [Ether](/sdk-core/ether): The `Ether` class represents the native ETH currency on Ethereum mainnet and testnets. - [Fraction](/sdk-core/fraction): The `Fraction` class provides precise fractional arithmetic using BigInt numerator and denominator. - [SDK Core](/sdk-core): The SDK Core (`@uniswap/sdk-core-next`) provides the foundational building blocks for all Uniswap SDKs. It includes core entities for representing tokens and currencies, precise arithmetic with fractions, and essential utilities. - [Installation](/sdk-core/installation): **Node.js**: 18.x or later (for native BigInt support) - [NativeCurrency](/sdk-core/native-currency): The `NativeCurrency` abstract class is the base for chain-native currencies like ETH, MATIC, or AVAX. - [Percent](/sdk-core/percent): The `Percent` class represents a percentage value as a fraction. - [Price](/sdk-core/price): The `Price` class represents an exchange rate between two currencies. - [sortedInsert](/sdk-core/sorted-insert): Inserts an item into a sorted array while maintaining sort order and size constraints. - [sqrt](/sdk-core/sqrt): Computes the floor of the square root of a BigInt value. - [Token](/sdk-core/token): The `Token` class represents an ERC20 token with a specific address on a chain. - [validateAndParseAddress](/sdk-core/validate-and-parse-address): Validates an Ethereum address and returns the checksummed version. - [WETH9](/sdk-core/weth9): The `WETH9` mapping provides the Wrapped Ether (WETH) token addresses for supported chains.