Static
compareStatic
getStatic
getStatic
getThe Whirlpool to evaluate the mint against
The token mint PublicKey
The match result in the form of TokenType enum. undefined if the token mint is not part of the trade pair of the pool.
Static
isStatic
isStatic
orderStatic
estimateEstimate 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
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.
Please use estimateMaxLiquidityFromTokenAmounts instead.
Static
estimateEstimate the liquidity amount required to increase/decrease liquidity.
Whirlpool's current sqrt 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.
Static
getStatic
toGiven an arbitrary pair of token mints, this function returns an ordering of the token mints in the format [base, quote]. USD based stable coins are prioritized as the quote currency followed by variants of SOL.
The mint of token A in the token pair.
The mint of token B in the token pair.
A two-element array with the tokens sorted in the order of [baseToken, quoteToken].
Return the corresponding token type (TokenA/B) for this mint key for a Whirlpool.