StaticcompareStaticgetThe Whirlpool to evaluate
A WhirlpoolExtensionSegmentPrimary object
StaticgetReturn the secondary extension segment for a Whirlpool. This is reserved for future use and currently returns an empty object.
An empty WhirlpoolExtensionSegmentSecondary object.
StaticgetStaticgetReturn the fee tier index for the given whirlpool.
The Whirlpool to get the fee tier index
The fee tier index of the whirlpool.
StaticgetStaticgetReturn the reward authority for a Whirlpool. This is the authority that can manage the rewards for the Whirlpool.
The Whirlpool to evaluate
The PublicKey of the reward authority
StaticgetReturn the corresponding token type (TokenA/B) for this mint key for a Whirlpool.
The 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.
StaticisStaticisStaticisStaticorderStaticestimateEstimate 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.
StaticestimateEstimate 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.
StaticgetStatictoGiven 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 primary extension segment for a Whirlpool. This segment contains control flags that can be used to modify the behavior of the Whirlpool.