UNPKG

@renec-foundation/redex-sdk

Version:

Typescript SDK to interact with Orca's Whirlpool program.

33 lines (32 loc) 1.41 kB
import { Instruction } from "@orca-so/common-sdk"; import { PublicKey } from "@solana/web3.js"; import { Program } from "@project-serum/anchor"; import { Whirlpool } from "../artifacts/whirlpool"; /** * Parameters to close a position in a Whirlpool. * * @category Instruction Types * @param whirlpool - PublicKey for the whirlpool that the position will be closed for. * @param receiver - PublicKey for the wallet that will receive the rented lamports. * @param position - PublicKey for the position. * @param positionMint - PublicKey for the mint token for the Position token. * @param positionTokenAccount - The associated token address for the position token in the owners wallet. * @param positionAuthority - Authority that owns the position token. */ export declare type ClosePositionParams = { whirlpool: PublicKey; receiver: PublicKey; position: PublicKey; positionMint: PublicKey; positionTokenAccount: PublicKey; positionAuthority: PublicKey; }; /** * Close a position in a Whirlpool. Burns the position token in the owner's wallet. * * @category Instructions * @param context - Context object containing services required to generate the instruction * @param params - ClosePositionParams object * @returns - Instruction to perform the action. */ export declare function closePositionIx(program: Program<Whirlpool>, params: ClosePositionParams): Instruction;