UNPKG

@renec-foundation/redex-sdk

Version:

Typescript SDK to interact with Orca's Whirlpool program.

37 lines (36 loc) 1.62 kB
import { PublicKey } from "@solana/web3.js"; import { Program } from "@project-serum/anchor"; import { Whirlpool } from "../artifacts/whirlpool"; import { PDA } from "@orca-so/common-sdk"; import { Instruction } from "@orca-so/common-sdk"; /** * Parameters to initialize a FeeTier account. * * @category Instruction Types * @param whirlpoolsConfig - PublicKey for the whirlpool config space that the fee-tier will be initialized for. * @param feeTierPda - PDA for the fee-tier account that will be initialized * @param tickSpacing - The tick spacing this fee tier recommends its default fee rate for. * @param defaultFeeRate - The default fee rate for this fee-tier. Stored as a hundredths of a basis point. * @param feeAuthority - Authority authorized to initialize fee-tiers and set customs fees. * @param funder - The account that would fund the creation of this account */ export declare type InitFeeTierParams = { whirlpoolsConfig: PublicKey; feeTierPda: PDA; tickSpacing: number; defaultFeeRate: number; feeAuthority: PublicKey; funder: PublicKey; }; /** * Initializes a fee tier account usable by Whirlpools in this WhirlpoolsConfig space. * * Special Errors * `FeeRateMaxExceeded` - If the provided default_fee_rate exceeds MAX_FEE_RATE. * * @category Instructions * @param context - Context object containing services required to generate the instruction * @param params - InitFeeTierParams object * @returns - Instruction to perform the action. */ export declare function initializeFeeTierIx(program: Program<Whirlpool>, params: InitFeeTierParams): Instruction;