import { TransactionInstruction, PublicKey } from '@solana/web3.js'; import BN from 'bn.js'; export interface OpenPositionV2Args { tickLowerIndex: number; tickUpperIndex: number; tickArrayLowerStartIndex: number; tickArrayUpperStartIndex: number; liquidity: BN; amount0Max: BN; amount1Max: BN; withMatedata: boolean; baseFlag: boolean | null; } export interface OpenPositionV2Accounts { /** Pays to mint the position */ payer: PublicKey; positionNftOwner: PublicKey; /** Unique token mint address */ positionNftMint: PublicKey; /** Token account where position NFT will be minted */ positionNftAccount: PublicKey; /** To store metaplex metadata */ metadataAccount: PublicKey; /** Add liquidity for this pool */ poolState: PublicKey; /** Store the information of market marking in range */ protocolPosition: PublicKey; tickArrayLower: PublicKey; tickArrayUpper: PublicKey; /** personal position state */ personalPosition: PublicKey; /** The token_0 account deposit token to the pool */ tokenAccount0: PublicKey; /** The token_1 account deposit token to the pool */ tokenAccount1: PublicKey; /** The address that holds pool tokens for token_0 */ tokenVault0: PublicKey; /** The address that holds pool tokens for token_1 */ tokenVault1: PublicKey; /** Sysvar for token mint and ATA creation */ rent: PublicKey; /** Program to create the position manager state account */ systemProgram: PublicKey; /** Program to create mint account and mint tokens */ tokenProgram: PublicKey; /** Program to create an ATA for receiving position NFT */ associatedTokenProgram: PublicKey; /** Program to create NFT metadata */ metadataProgram: PublicKey; /** Program to create mint account and mint tokens */ tokenProgram2022: PublicKey; /** The mint of token vault 0 */ vault0Mint: PublicKey; /** The mint of token vault 1 */ vault1Mint: PublicKey; } export declare const layout: any; /** * Creates a new position wrapped in a NFT, support Token2022 * * # Arguments * * * `ctx` - The context of accounts * * `tick_lower_index` - The low boundary of market * * `tick_upper_index` - The upper boundary of market * * `tick_array_lower_start_index` - The start index of tick array which include tick low * * `tick_array_upper_start_index` - The start index of tick array which include tick upper * * `liquidity` - The liquidity to be added, if zero, calculate liquidity base amount_0_max or amount_1_max according base_flag * * `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check * * `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check * * `base_flag` - must be special if liquidity is zero, false: calculate liquidity base amount_0_max otherwise base amount_1_max * */ export declare function openPositionV2(args: OpenPositionV2Args, accounts: OpenPositionV2Accounts): TransactionInstruction;