Collect fees from this position
If positionWallet is provided, the wallet owners have to sign this transaction.
OptionalupdateFeesAndRewards: booleanif true, add instructions to refresh the accumulated fees and rewards data (default to true unless you know that the collect fees quote and on-chain data match for the "feeOwedA" and "feeOwedB" fields in the Position account)
OptionalownerTokenAccountMap: Partial<Record<string, Address>>A record that maps a given mint to the owner's token account for that mint (if an entry doesn't exist, it will be automatically resolved)
OptionaldestinationWallet: Addressthe wallet to deposit tokens into when withdrawing from the position. If null, the WhirlpoolContext wallet is used.
OptionalpositionWallet: Addressthe wallet to that houses the position token. If null, the WhirlpoolContext wallet is used.
OptionalataPayer: Addresswallet that will fund the creation of the new associated token accounts
Optionalopts: SimpleAccountFetchOptionsan options object to define fetch and cache options when accessing on-chain accounts
the transaction that will collect fees from the position
Collect rewards from this position
If positionWallet is provided, the wallet owners have to sign this transaction.
OptionalrewardsToCollect: Address[]reward mints to collect (omitting this parameter means all rewards will be collected)
OptionalupdateFeesAndRewards: booleanif true, add instructions to refresh the accumulated fees and rewards data (default to true unless you know that the collect fees quote and on-chain data match for the "feeOwedA" and "feeOwedB" fields in the Position account)
OptionalownerTokenAccountMap: Partial<Record<string, Address>>A record that maps a given mint to the owner's token account for that mint (if an entry doesn't exist, it will be automatically resolved)
OptionaldestinationWallet: Addressthe wallet to deposit tokens into when withdrawing from the position. If null, the WhirlpoolContext wallet is used.
OptionalpositionWallet: Addressthe wallet to that houses the position token. If null, the WhirlpoolContext wallet is used.
OptionalataPayer: Addresswallet that will fund the creation of the new associated token accounts
Optionalopts: SimpleAccountFetchOptionsan options object to define fetch and cache options when accessing on-chain accounts
the transactions that will collect rewards from the position. The transactions must be executed serially.
Withdraw liquidity from this position.
If positionWallet is provided, the wallet owners have to sign this transaction.
input that defines the desired liquidity amount and minimum tokens willing to be to withdrawn from the position.
OptionalresolveATA: booleanif true, add instructions to create associated token accounts for tokenA,B for the destinationWallet if necessary. (RPC call required)
OptionaldestinationWallet: Addressthe wallet to deposit tokens into when withdrawing from the position. If null, the WhirlpoolContext wallet is used.
OptionalpositionWallet: Addressthe wallet to that houses the position token. If null, the WhirlpoolContext wallet is used.
OptionalataPayer: Addresswallet that will fund the creation of the new associated token accounts
the transaction that will deposit the tokens into the position when executed.
Return the address for this Whirlpool instance.
the PublicKey for this Whirlpool instance.
Return the most recently fetched Position account data.
most recently fetched PositionData for this address.
Return LockConfig account data for this position if it is locked.
LockConfigData for this position if it is locked. Otherwise, return null.
Return the most recently fetched TickData account data for this position's lower tick.
Return the program address owning the position token.
the PublicKey for the program address owning the position token.
Return the most recently fetched TickData account data for this position's upper tick.
Return the most recently fetched Whirlpool account data for this position.
most recently fetched WhirlpoolData for this position.
Deposit additional tokens into this postiion.
The wallet must contain the position token and the necessary token A & B to complete the deposit.
If positionWallet and wallet is provided, the wallet owners have to sign this transaction.
input that defines the desired liquidity amount and maximum tokens willing to be to deposited.
OptionalresolveATA: booleanif true, add instructions to create associated token accounts for tokenA,B for the destinationWallet if necessary. (RPC call required)
Optionalwallet: Addressto withdraw tokens to deposit into the position. If null, the WhirlpoolContext wallet is used.
OptionalpositionWallet: Addressthe wallet to that houses the position token. If null, the WhirlpoolContext wallet is used.
OptionalataPayer: Addresswallet that will fund the creation of the new associated token accounts
the transaction that will deposit the tokens into the position when executed.
Lock this position.
Please note that this function is only available for TokenExtensions based positions. Also the range of the position must be FullRange.
Please be careful when using this function as it will lock the position and prevent any liquidity changes including withdrawals.
the type of lock to apply to the position.
OptionalpositionWallet: Addressthe wallet to that houses the position token. If null, the WhirlpoolContext wallet is used.
Optionalfunder: Addressthe wallet that will fund the cost needed to initialize LockConfig account. If null, the WhirlpoolContext wallet is used.
the transactions that will lock the position.
Fetch and return the most recently fetched Position account data.
the most up to date PositionData for this address.
Reset a position's range. Requires liquidity to be zero.
the tick index for the lower bound of this position
the tick index for the upper bound of this position
OptionalpositionWallet: Addressthe transactions that will reset the position's range. The transactions must be executed serially.
Helper class to interact with a Position account and build complex transactions.