UNPKG

@renec-foundation/redex-sdk

Version:

Typescript SDK to interact with Orca's Whirlpool program.

38 lines (37 loc) 1.74 kB
import { Program } from "@project-serum/anchor"; import { Whirlpool } from "../artifacts/whirlpool"; import { PublicKey } from "@solana/web3.js"; import { Instruction } from "@orca-so/common-sdk"; /** * Parameters to collect fees from a position. * * @category Instruction Types * @param whirlpool - PublicKey for the whirlpool that the position will be opened for. * @param position - PublicKey for the position will be opened for. * @param positionTokenAccount - PublicKey for the position token's associated token address. * @param tokenOwnerAccountA - PublicKey for the token A account that will be withdrawed from. * @param tokenOwnerAccountB - PublicKey for the token B account that will be withdrawed from. * @param tokenVaultA - PublicKey for the tokenA vault for this whirlpool. * @param tokenVaultB - PublicKey for the tokenB vault for this whirlpool. * @param positionAuthority - authority that owns the token corresponding to this desired position. */ export declare type CollectFeesParams = { whirlpool: PublicKey; position: PublicKey; positionTokenAccount: PublicKey; tokenOwnerAccountA: PublicKey; tokenOwnerAccountB: PublicKey; tokenVaultA: PublicKey; tokenVaultB: PublicKey; positionAuthority: PublicKey; }; /** * Collect fees accrued for this position. * Call updateFeesAndRewards before this to update the position to the newest accrued values. * * @category Instructions * @param context - Context object containing services required to generate the instruction * @param params - CollectFeesParams object * @returns - Instruction to perform the action. */ export declare function collectFeesIx(program: Program<Whirlpool>, params: CollectFeesParams): Instruction;