@renec-foundation/redex-sdk
Version:
Typescript SDK to interact with Orca's Whirlpool program.
33 lines (32 loc) • 1.4 kB
TypeScript
import { Program } from "@project-serum/anchor";
import { Whirlpool } from "../artifacts/whirlpool";
import { Instruction } from "@orca-so/common-sdk";
import { PublicKey } from "@solana/web3.js";
import { PDA } from "@orca-so/common-sdk";
/**
* Parameters to initialize a TickArray account.
*
* @category Instruction Types
* @param whirlpool - PublicKey for the whirlpool that the initialized tick-array will host ticks for.
* @param tickArrayPda - PDA for the tick array account that will be initialized
* @param startTick - The starting tick index for this tick-array. Has to be a multiple of TickArray size & the tick spacing of this pool.
* @param funder - The account that would fund the creation of this account
*/
export declare type InitTickArrayParams = {
whirlpool: PublicKey;
tickArrayPda: PDA;
startTick: number;
funder: PublicKey;
};
/**
* Initializes a TickArray account.
*
* #### Special Errors
* `InvalidStartTick` - if the provided start tick is out of bounds or is not a multiple of TICK_ARRAY_SIZE * tick spacing.
*
* @category Instructions
* @param context - Context object containing services required to generate the instruction
* @param params - InitTickArrayParams object
* @returns - Instruction to perform the action.
*/
export declare function initTickArrayIx(program: Program<Whirlpool>, params: InitTickArrayParams): Instruction;