Whirlpool's current tick index (aka price)
Position lower tick index
Position upper tick index
The desired amount of tokens to deposit/withdraw
An estimated amount of liquidity needed to deposit/withdraw the desired amount of tokens.
Given the current tick-index, returns the dervied PDA and fetched data for the tick-arrays that this swap may traverse across.
TODO: Handle the edge case where the first tick-array may be the previous array of expected start-index due to slippage.
The current tickIndex for the Whirlpool to swap on.
The tickSpacing for the Whirlpool.
The direction of the trade.
The Whirlpool programId which the Whirlpool lives on.
PublicKey of the whirlpool to swap on.
An array of PublicKey[] for the tickArray accounts that this swap may traverse across.
Generated using TypeDoc
Estimate the liquidity amount required to increase/decrease liquidity.
// TODO: At the top end of the price range, tick calcuation is off therefore the results can be off