Overview
Enumerations
Classes
Interfaces
- AllowanceTransferPermitBatch
- AllowanceTransferPermitSingle
- BatchPermitOptions
- BestTradeOptions
- CollectSpecificOptions
- CommonAddLiquidityOptions
- CommonOptions
- MethodParameters
- MintSpecificOptions
- ModifyPositionSpecificOptions
- NFTPermitData
- NFTPermitOptions
- NFTPermitValues
- PermitDetails
- RemoveLiquiditySpecificOptions
- TransferOptions
Type Aliases
AddLiquidityOptions
AddLiquidityOptions:
MintOptions|IncreaseLiquidityOptions
Defined in: PositionManager.ts:187
CollectOptions
CollectOptions:
CommonOptions&CollectSpecificOptions
Defined in: PositionManager.ts:191
HookPermissions
HookPermissions:
{ [key in HookOptions]: boolean }
Defined in: utils/hook.ts:4
IncreaseLiquidityOptions
IncreaseLiquidityOptions:
CommonOptions&CommonAddLiquidityOptions&ModifyPositionSpecificOptions
Defined in: PositionManager.ts:185
MintOptions
MintOptions:
CommonOptions&CommonAddLiquidityOptions&MintSpecificOptions
Defined in: PositionManager.ts:184
Param
Param:
object
Defined in: utils/v4BaseActionsParser.ts:6
Type declaration
name
readonlyname:string
value
readonlyvalue:any
ParamType
ParamType:
object
Defined in: utils/v4Planner.ts:60
Type declaration
name
readonlyname:string
subparser?
readonlyoptionalsubparser:Subparser
type
readonlytype:string
PathKey
PathKey:
object
Defined in: utils/encodeRouteToPath.ts:5
Type declaration
fee
fee:
number
hookData
hookData:
string
hooks
hooks:
string
intermediateCurrency
intermediateCurrency:
string
tickSpacing
tickSpacing:
number
PoolKey
PoolKey:
object
Defined in: entities/pool.ts:22
Type declaration
currency0
currency0:
string
currency1
currency1:
string
fee
fee:
number
hooks
hooks:
string
tickSpacing
tickSpacing:
number
RemoveLiquidityOptions
RemoveLiquidityOptions:
CommonOptions&RemoveLiquiditySpecificOptions&ModifyPositionSpecificOptions
Defined in: PositionManager.ts:189
SwapExactIn
SwapExactIn:
object
Defined in: utils/v4BaseActionsParser.ts:29
Type declaration
amountIn
readonlyamountIn:string
amountOutMinimum
readonlyamountOutMinimum:string
currencyIn
readonlycurrencyIn:string
path
readonlypath: readonlyPathKey[]
SwapExactInSingle
SwapExactInSingle:
object
Defined in: utils/v4BaseActionsParser.ts:21
Type declaration
amountIn
readonlyamountIn:string
amountOutMinimum
readonlyamountOutMinimum:string
hookData
readonlyhookData:string
poolKey
readonlypoolKey:PoolKey
zeroForOne
readonlyzeroForOne:boolean
SwapExactOut
SwapExactOut:
object
Defined in: utils/v4BaseActionsParser.ts:44
Type declaration
amountInMaximum
readonlyamountInMaximum:string
amountOut
readonlyamountOut:string
currencyOut
readonlycurrencyOut:string
path
readonlypath: readonlyPathKey[]
SwapExactOutSingle
SwapExactOutSingle:
object
Defined in: utils/v4BaseActionsParser.ts:36
Type declaration
amountInMaximum
readonlyamountInMaximum:string
amountOut
readonlyamountOut:string
hookData
readonlyhookData:string
poolKey
readonlypoolKey:PoolKey
zeroForOne
readonlyzeroForOne:boolean
V4RouterAction
V4RouterAction:
object
Defined in: utils/v4BaseActionsParser.ts:11
Type declaration
actionName
readonlyactionName:string
actionType
readonlyactionType:Actions
params
readonlyparams: readonlyParam[]
V4RouterCall
V4RouterCall:
object
Defined in: utils/v4BaseActionsParser.ts:17
Type declaration
actions
readonlyactions: readonlyV4RouterAction[]
Variables
DYNAMIC_FEE_FLAG
constDYNAMIC_FEE_FLAG:8388608=0x800000
Defined in: entities/pool.ts:19
hookFlagIndex
consthookFlagIndex:object
Defined in: utils/hook.ts:23
Type declaration
afterAddLiquidity
afterAddLiquidity:
number=10
afterAddLiquidityReturnsDelta
afterAddLiquidityReturnsDelta:
number=1
afterDonate
afterDonate:
number=4
afterInitialize
afterInitialize:
number=12
afterRemoveLiquidity
afterRemoveLiquidity:
number=8
afterRemoveLiquidityReturnsDelta
afterRemoveLiquidityReturnsDelta:
number=0
afterSwap
afterSwap:
number=6
afterSwapReturnsDelta
afterSwapReturnsDelta:
number=2
beforeAddLiquidity
beforeAddLiquidity:
number=11
beforeDonate
beforeDonate:
number=5
beforeInitialize
beforeInitialize:
number=13
beforeRemoveLiquidity
beforeRemoveLiquidity:
number=9
beforeSwap
beforeSwap:
number=7
beforeSwapReturnsDelta
beforeSwapReturnsDelta:
number=3
V4_BASE_ACTIONS_ABI_DEFINITION
constV4_BASE_ACTIONS_ABI_DEFINITION:{ [key in Actions]: readonly ParamType[] }
Defined in: utils/v4Planner.ts:82
Functions
amountWithPathCurrency()
amountWithPathCurrency(
amount,pool):CurrencyAmount<Currency>
Defined in: utils/pathCurrency.ts:4
Parameters
| Parameter | Type |
|---|---|
amount | CurrencyAmount<Currency> |
pool | Pool |
Returns
CurrencyAmount<Currency>
encodeRouteToPath()
encodeRouteToPath(
route,exactOutput?):PathKey[]
Defined in: utils/encodeRouteToPath.ts:13
Parameters
| Parameter | Type |
|---|---|
route | Route<Currency, Currency> |
exactOutput? | boolean |
Returns
PathKey[]
getPathCurrency()
getPathCurrency(
currency,pool):Currency
Defined in: utils/pathCurrency.ts:12
Parameters
| Parameter | Type |
|---|---|
currency | Currency |
pool | Pool |
Returns
Currency
priceToClosestTick()
priceToClosestTick(
price):number
Defined in: utils/priceTickConversions.ts:35
Returns the first tick for which the given price is greater than or equal to the tick price
Parameters
| Parameter | Type | Description |
|---|---|---|
price | Price<Currency, Currency> | for which to return the closest tick that represents a price less than or equal to the input price, i.e. the price of the returned tick is less than or equal to the input price |
Returns
number
sortsBefore()
sortsBefore(
currencyA,currencyB):boolean
Defined in: utils/sortsBefore.ts:3
Parameters
| Parameter | Type |
|---|---|
currencyA | Currency |
currencyB | Currency |
Returns
boolean
tickToPrice()
tickToPrice(
baseCurrency,quoteCurrency,tick):Price<Currency,Currency>
Defined in: utils/priceTickConversions.ts:20
Returns a price object corresponding to the input tick and the base/quote token Inputs must be tokens because the address order is used to interpret the price represented by the tick
Parameters
| Parameter | Type | Description |
|---|---|---|
baseCurrency | Currency | - |
quoteCurrency | Currency | - |
tick | number | the tick for which to return the price |
Returns
Price<Currency, Currency>
toAddress()
toAddress(
currency):string
Defined in: utils/currencyMap.ts:7
Parameters
| Parameter | Type |
|---|---|
currency | Currency |
Returns
string
toHex()
toHex(
bigintIsh):string
Defined in: utils/calldata.ts:23
Converts a big int to a hex string
Parameters
| Parameter | Type | Description |
|---|---|---|
bigintIsh | BigintIsh |
Returns
string
The hex encoded calldata
tradeComparator()
tradeComparator<
TInput,TOutput,TTradeType>(a,b):number
Defined in: entities/trade.ts:17
Trades comparator, an extension of the input output comparator that also considers other dimensions of the trade in ranking them
Type Parameters
| Type Parameter | Description |
|---|---|
TInput extends Currency | The input currency, either Ether or an ERC-20 |
TOutput extends Currency | The output currency, either Ether or an ERC-20 |
TTradeType extends TradeType | The trade type, either exact input or exact output |
Parameters
| Parameter | Type | Description |
|---|---|---|
a | Trade<TInput, TOutput, TTradeType> | The first trade to compare |
b | Trade<TInput, TOutput, TTradeType> | The second trade to compare |
Returns
number
A sorted ordering for two neighboring elements in a trade array