import * as _coral_xyz_anchor from '@coral-xyz/anchor'; import { BN, Program, IdlAccounts, ProgramAccount, IdlTypes, EventParser } from '@coral-xyz/anchor'; import { PublicKey, Connection, AccountMeta, Keypair, TransactionInstruction, AccountInfo, Cluster, GetProgramAccountsFilter, Transaction } from '@solana/web3.js'; import Decimal from 'decimal.js'; import { IdlDiscriminator } from '@coral-xyz/anchor/dist/cjs/idl'; import { Mint } from '@solana/spl-token'; import { AllAccountsMap } from '@coral-xyz/anchor/dist/cjs/program/namespace/types'; import BN$1 from 'bn.js'; declare const LBCLMM_PROGRAM_IDS: { devnet: string; localhost: string; "mainnet-beta": string; }; declare const ALT_ADDRESS: { "mainnet-beta": string; devnet: string; }; declare const ADMIN: { devnet: string; localhost: string; }; declare enum Network { MAINNET = "mainnet-beta", TESTNET = "testnet", DEVNET = "devnet", LOCAL = "localhost" } declare const BASIS_POINT_MAX = 10000; declare const SCALE_OFFSET = 64; declare const SCALE: BN; declare const FEE_PRECISION: BN; declare const MAX_FEE_RATE: BN; declare const BIN_ARRAY_DEFAULT_VERSION = 3; declare const BIN_ARRAY_FEE = 0.07143744; declare const POSITION_FEE = 0.05740608; declare const TOKEN_ACCOUNT_FEE = 0.00203928; declare const POOL_FEE = 0.00718272; declare const BIN_ARRAY_BITMAP_FEE = 0.01180416; declare const BIN_ARRAY_FEE_BN: BN; declare const POSITION_FEE_BN: BN; declare const TOKEN_ACCOUNT_FEE_BN: BN; declare const POOL_FEE_BN: BN; declare const BIN_ARRAY_BITMAP_FEE_BN: BN; declare const MAX_BIN_ARRAY_SIZE: BN; declare const DEFAULT_BIN_PER_POSITION: BN; declare const BIN_ARRAY_BITMAP_SIZE: BN; declare const EXTENSION_BINARRAY_BITMAP_SIZE: BN; declare const POSITION_MAX_LENGTH: BN; declare const MAX_RESIZE_LENGTH: BN; declare const SIMULATION_USER: PublicKey; declare const PRECISION: Decimal; declare const MAX_CLAIM_ALL_ALLOWED = 2; declare const MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX = 26; declare const MAX_ACTIVE_BIN_SLIPPAGE = 3; declare const ILM_BASE: PublicKey; declare const MAX_EXTRA_BIN_ARRAYS = 3; declare const U64_MAX: BN; declare const MAX_BINS_PER_POSITION: BN; declare const MAX_BIN_PER_LIMIT_ORDER: BN; declare const LIMIT_ORDER_FEE_SHARE: BN; declare enum FunctionType { Undetermined = 0, LiquidityMining = 1, LimitOrder = 2 } declare enum ConcreteFunctionType { LimitOrder = 0, LiquidityMining = 1 } declare enum CollectFeeMode { InputOnly = 0, OnlyY = 1 } /** * Program IDL in camelCase format in order to be used in JS/TS. * * Note that this is only a type helper and is not the actual IDL. The original * IDL can be found at `target/idl/lb_clmm.json`. */ type LbClmm = { "address": "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo"; "metadata": { "name": "lbClmm"; "version": "0.12.0"; "spec": "0.1.0"; "description": "Created with Anchor"; }; "instructions": [ { "name": "addLiquidity"; "discriminator": [ 181, 157, 89, 67, 143, 182, 52, 72 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension", "binArrayLower", "binArrayUpper" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userTokenX"; "writable": true; }, { "name": "userTokenY"; "writable": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "binArrayLower"; "writable": true; }, { "name": "binArrayUpper"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "tokenXProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "tokenYProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "liquidityParameter"; "type": { "defined": { "name": "liquidityParameter"; }; }; } ]; }, { "name": "addLiquidity2"; "discriminator": [ 228, 162, 78, 28, 70, 219, 116, 115 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userTokenX"; "writable": true; }, { "name": "userTokenY"; "writable": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "sender"; "signer": true; }, { "name": "tokenXProgram"; }, { "name": "tokenYProgram"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "liquidityParameter"; "type": { "defined": { "name": "liquidityParameter"; }; }; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "addLiquidityByStrategy"; "discriminator": [ 7, 3, 150, 127, 148, 40, 61, 200 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension", "binArrayLower", "binArrayUpper" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userTokenX"; "writable": true; }, { "name": "userTokenY"; "writable": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "binArrayLower"; "writable": true; }, { "name": "binArrayUpper"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "tokenXProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "tokenYProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "liquidityParameter"; "type": { "defined": { "name": "liquidityParameterByStrategy"; }; }; } ]; }, { "name": "addLiquidityByStrategy2"; "discriminator": [ 3, 221, 149, 218, 111, 141, 118, 213 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userTokenX"; "writable": true; }, { "name": "userTokenY"; "writable": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "sender"; "signer": true; }, { "name": "tokenXProgram"; }, { "name": "tokenYProgram"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "liquidityParameter"; "type": { "defined": { "name": "liquidityParameterByStrategy"; }; }; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "addLiquidityByStrategyOneSide"; "discriminator": [ 41, 5, 238, 175, 100, 225, 6, 205 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension", "binArrayLower", "binArrayUpper" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userToken"; "writable": true; }, { "name": "reserve"; "writable": true; }, { "name": "tokenMint"; }, { "name": "binArrayLower"; "writable": true; }, { "name": "binArrayUpper"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "tokenProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "liquidityParameter"; "type": { "defined": { "name": "liquidityParameterByStrategyOneSide"; }; }; } ]; }, { "name": "addLiquidityByWeight"; "discriminator": [ 28, 140, 238, 99, 231, 162, 21, 149 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension", "binArrayLower", "binArrayUpper" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userTokenX"; "writable": true; }, { "name": "userTokenY"; "writable": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "binArrayLower"; "writable": true; }, { "name": "binArrayUpper"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "tokenXProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "tokenYProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "liquidityParameter"; "type": { "defined": { "name": "liquidityParameterByWeight"; }; }; } ]; }, { "name": "addLiquidityByWeight2"; "discriminator": [ 209, 59, 63, 91, 111, 200, 153, 228 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userTokenX"; "writable": true; }, { "name": "userTokenY"; "writable": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "sender"; "signer": true; }, { "name": "tokenXProgram"; }, { "name": "tokenYProgram"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "liquidityParameter"; "type": { "defined": { "name": "liquidityParameterByWeight"; }; }; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "addLiquidityOneSide"; "discriminator": [ 94, 155, 103, 151, 70, 95, 220, 165 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension", "binArrayLower", "binArrayUpper" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userToken"; "writable": true; }, { "name": "reserve"; "writable": true; }, { "name": "tokenMint"; }, { "name": "binArrayLower"; "writable": true; }, { "name": "binArrayUpper"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "tokenProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "liquidityParameter"; "type": { "defined": { "name": "liquidityOneSideParameter"; }; }; } ]; }, { "name": "addLiquidityOneSidePrecise"; "discriminator": [ 161, 194, 103, 84, 171, 71, 250, 154 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension", "binArrayLower", "binArrayUpper" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userToken"; "writable": true; }, { "name": "reserve"; "writable": true; }, { "name": "tokenMint"; }, { "name": "binArrayLower"; "writable": true; }, { "name": "binArrayUpper"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "tokenProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "parameter"; "type": { "defined": { "name": "addLiquiditySingleSidePreciseParameter"; }; }; } ]; }, { "name": "addLiquidityOneSidePrecise2"; "discriminator": [ 33, 51, 163, 201, 117, 98, 125, 231 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userToken"; "writable": true; }, { "name": "reserve"; "writable": true; }, { "name": "tokenMint"; }, { "name": "sender"; "signer": true; }, { "name": "tokenProgram"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "liquidityParameter"; "type": { "defined": { "name": "addLiquiditySingleSidePreciseParameter2"; }; }; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "cancelLimitOrder"; "discriminator": [ 132, 156, 132, 31, 67, 40, 232, 97 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "binArrayBitmapExtension", "limitOrder" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "limitOrder"; "writable": true; }, { "name": "ownerTokenX"; "docs": [ "When dont set it tokenAccount to prevent unnecessary create token account (rent fee) when user only withdraw token y" ]; "writable": true; }, { "name": "ownerTokenY"; "writable": true; }, { "name": "owner"; "signer": true; }, { "name": "tokenXProgram"; }, { "name": "tokenYProgram"; }, { "name": "memoProgram"; "address": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "bins"; "type": { "vec": "i32"; }; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "claimFee"; "discriminator": [ 169, 32, 79, 137, 136, 232, 70, 137 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayLower", "binArrayUpper" ]; }, { "name": "position"; "writable": true; }, { "name": "binArrayLower"; "writable": true; }, { "name": "binArrayUpper"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "userTokenX"; "writable": true; }, { "name": "userTokenY"; "writable": true; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "tokenProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": []; }, { "name": "claimFee2"; "discriminator": [ 112, 191, 101, 171, 28, 144, 127, 187 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "position" ]; }, { "name": "position"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "userTokenX"; "writable": true; }, { "name": "userTokenY"; "writable": true; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "tokenProgramX"; }, { "name": "tokenProgramY"; }, { "name": "memoProgram"; "address": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "minBinId"; "type": "i32"; }, { "name": "maxBinId"; "type": "i32"; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "claimReward"; "discriminator": [ 149, 95, 181, 242, 94, 90, 158, 162 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayLower", "binArrayUpper" ]; }, { "name": "position"; "writable": true; }, { "name": "binArrayLower"; "writable": true; }, { "name": "binArrayUpper"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "rewardVault"; "writable": true; }, { "name": "rewardMint"; }, { "name": "userTokenAccount"; "writable": true; }, { "name": "tokenProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "rewardIndex"; "type": "u64"; } ]; }, { "name": "claimReward2"; "discriminator": [ 190, 3, 127, 119, 178, 87, 157, 183 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "position" ]; }, { "name": "position"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "rewardVault"; "writable": true; }, { "name": "rewardMint"; }, { "name": "userTokenAccount"; "writable": true; }, { "name": "tokenProgram"; }, { "name": "memoProgram"; "address": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "rewardIndex"; "type": "u64"; }, { "name": "minBinId"; "type": "i32"; }, { "name": "maxBinId"; "type": "i32"; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "closeBinArray"; "discriminator": [ 68, 174, 88, 80, 181, 204, 19, 224 ]; "accounts": [ { "name": "lbPair"; "relations": [ "binArray" ]; }, { "name": "binArray"; "writable": true; }, { "name": "rentReceiver"; "writable": true; "signer": true; }, { "name": "signer"; "signer": true; } ]; "args": []; }, { "name": "closeClaimFeeOperatorAccount"; "discriminator": [ 184, 213, 88, 31, 179, 101, 130, 36 ]; "accounts": [ { "name": "claimFeeOperator"; "writable": true; }, { "name": "rentReceiver"; "writable": true; }, { "name": "signer"; "signer": true; } ]; "args": []; }, { "name": "closeLimitOrderIfEmpty"; "discriminator": [ 57, 124, 36, 155, 126, 249, 93, 171 ]; "accounts": [ { "name": "limitOrder"; "writable": true; }, { "name": "owner"; "signer": true; }, { "name": "rentReceiver"; "writable": true; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": []; }, { "name": "closeOperatorAccount"; "discriminator": [ 171, 9, 213, 74, 120, 23, 3, 29 ]; "accounts": [ { "name": "operator"; "writable": true; }, { "name": "signer"; "signer": true; }, { "name": "rentReceiver"; "writable": true; } ]; "args": []; }, { "name": "closePosition"; "discriminator": [ 123, 134, 81, 0, 49, 68, 98, 98 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; }, { "name": "binArrayLower"; "writable": true; }, { "name": "binArrayUpper"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "rentReceiver"; "writable": true; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": []; }, { "name": "closePosition2"; "discriminator": [ 174, 90, 35, 115, 186, 40, 147, 226 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "rentReceiver"; "writable": true; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": []; }, { "name": "closePositionIfEmpty"; "discriminator": [ 59, 124, 212, 118, 91, 152, 110, 157 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "rentReceiver"; "writable": true; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": []; }, { "name": "closePresetParameter"; "discriminator": [ 4, 148, 145, 100, 134, 26, 181, 61 ]; "accounts": [ { "name": "presetParameter"; "writable": true; }, { "name": "operator"; }, { "name": "signer"; "signer": true; }, { "name": "rentReceiver"; "writable": true; } ]; "args": []; }, { "name": "closePresetParameter2"; "discriminator": [ 39, 25, 95, 107, 116, 17, 115, 28 ]; "accounts": [ { "name": "presetParameter"; "writable": true; }, { "name": "operator"; }, { "name": "signer"; "signer": true; }, { "name": "rentReceiver"; "writable": true; } ]; "args": []; }, { "name": "closeTokenBadge"; "discriminator": [ 108, 146, 86, 110, 179, 254, 10, 104 ]; "accounts": [ { "name": "tokenBadge"; "writable": true; }, { "name": "rentReceiver"; "writable": true; }, { "name": "operator"; }, { "name": "signer"; "signer": true; } ]; "args": []; }, { "name": "createOperatorAccount"; "discriminator": [ 221, 64, 246, 149, 240, 153, 229, 163 ]; "accounts": [ { "name": "operator"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 111, 112, 101, 114, 97, 116, 111, 114 ]; }, { "kind": "account"; "path": "whitelistedSigner"; } ]; }; }, { "name": "whitelistedSigner"; }, { "name": "signer"; "signer": true; }, { "name": "payer"; "writable": true; "signer": true; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; } ]; "args": [ { "name": "permission"; "type": "u128"; } ]; }, { "name": "decreasePositionLength"; "discriminator": [ 194, 219, 136, 32, 25, 96, 105, 37 ]; "accounts": [ { "name": "rentReceiver"; "writable": true; }, { "name": "position"; "writable": true; }, { "name": "owner"; "signer": true; "relations": [ "position" ]; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "lengthToRemove"; "type": "u16"; }, { "name": "side"; "type": "u8"; } ]; }, { "name": "forIdlTypeGenerationDoNotCall"; "discriminator": [ 180, 105, 69, 80, 95, 50, 73, 108 ]; "accounts": [ { "name": "dummyZcAccount"; } ]; "args": [ { "name": "ix"; "type": { "defined": { "name": "dummyIx"; }; }; } ]; }, { "name": "fundReward"; "discriminator": [ 188, 50, 249, 165, 93, 151, 38, 63 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "binArray" ]; }, { "name": "rewardVault"; "writable": true; }, { "name": "rewardMint"; }, { "name": "funderTokenAccount"; "writable": true; }, { "name": "funder"; "signer": true; }, { "name": "binArray"; "writable": true; }, { "name": "tokenProgram"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "rewardIndex"; "type": "u64"; }, { "name": "amount"; "type": "u64"; }, { "name": "carryForward"; "type": "bool"; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "goToABin"; "discriminator": [ 146, 72, 174, 224, 40, 253, 84, 174 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "binArrayBitmapExtension", "fromBinArray", "toBinArray" ]; }, { "name": "binArrayBitmapExtension"; "optional": true; }, { "name": "fromBinArray"; "optional": true; }, { "name": "toBinArray"; "optional": true; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "binId"; "type": "i32"; } ]; }, { "name": "increaseOracleLength"; "discriminator": [ 190, 61, 125, 87, 103, 79, 158, 173 ]; "accounts": [ { "name": "oracle"; "writable": true; }, { "name": "funder"; "writable": true; "signer": true; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "lengthToAdd"; "type": "u64"; } ]; }, { "name": "increasePositionLength"; "discriminator": [ 80, 83, 117, 211, 66, 13, 33, 149 ]; "accounts": [ { "name": "funder"; "writable": true; "signer": true; }, { "name": "lbPair"; "relations": [ "position" ]; }, { "name": "position"; "writable": true; }, { "name": "owner"; "signer": true; "relations": [ "position" ]; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "lengthToAdd"; "type": "u16"; }, { "name": "side"; "type": "u8"; } ]; }, { "name": "increasePositionLength2"; "discriminator": [ 255, 210, 204, 71, 115, 137, 225, 113 ]; "accounts": [ { "name": "funder"; "writable": true; "signer": true; }, { "name": "lbPair"; "relations": [ "position" ]; }, { "name": "position"; "writable": true; }, { "name": "owner"; "signer": true; "relations": [ "position" ]; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "minimumUpperBinId"; "type": "i32"; } ]; }, { "name": "initializeBinArray"; "discriminator": [ 35, 86, 19, 185, 78, 212, 75, 211 ]; "accounts": [ { "name": "lbPair"; }, { "name": "binArray"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 98, 105, 110, 95, 97, 114, 114, 97, 121 ]; }, { "kind": "account"; "path": "lbPair"; }, { "kind": "arg"; "path": "index"; } ]; }; }, { "name": "funder"; "writable": true; "signer": true; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; } ]; "args": [ { "name": "index"; "type": "i64"; } ]; }, { "name": "initializeBinArrayBitmapExtension"; "discriminator": [ 47, 157, 226, 180, 12, 240, 33, 71 ]; "accounts": [ { "name": "lbPair"; }, { "name": "binArrayBitmapExtension"; "docs": [ "Initialize an account to store if a bin array is initialized." ]; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 98, 105, 116, 109, 97, 112 ]; }, { "kind": "account"; "path": "lbPair"; } ]; }; }, { "name": "funder"; "writable": true; "signer": true; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "rent"; } ]; "args": []; }, { "name": "initializeCustomizablePermissionlessLbPair"; "discriminator": [ 46, 39, 41, 135, 111, 183, 200, 64 ]; "accounts": [ { "name": "lbPair"; "writable": true; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 98, 105, 116, 109, 97, 112 ]; }, { "kind": "account"; "path": "lbPair"; } ]; }; }, { "name": "tokenMintX"; }, { "name": "tokenMintY"; }, { "name": "reserveX"; "writable": true; "pda": { "seeds": [ { "kind": "account"; "path": "lbPair"; }, { "kind": "account"; "path": "tokenMintX"; } ]; }; }, { "name": "reserveY"; "writable": true; "pda": { "seeds": [ { "kind": "account"; "path": "lbPair"; }, { "kind": "account"; "path": "tokenMintY"; } ]; }; }, { "name": "oracle"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 111, 114, 97, 99, 108, 101 ]; }, { "kind": "account"; "path": "lbPair"; } ]; }; }, { "name": "userTokenX"; }, { "name": "funder"; "writable": true; "signer": true; }, { "name": "tokenProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "userTokenY"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "params"; "type": { "defined": { "name": "customizableParams"; }; }; } ]; }, { "name": "initializeCustomizablePermissionlessLbPair2"; "discriminator": [ 243, 73, 129, 126, 51, 19, 241, 107 ]; "accounts": [ { "name": "lbPair"; "writable": true; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 98, 105, 116, 109, 97, 112 ]; }, { "kind": "account"; "path": "lbPair"; } ]; }; }, { "name": "tokenMintX"; }, { "name": "tokenMintY"; }, { "name": "reserveX"; "writable": true; "pda": { "seeds": [ { "kind": "account"; "path": "lbPair"; }, { "kind": "account"; "path": "tokenMintX"; } ]; }; }, { "name": "reserveY"; "writable": true; "pda": { "seeds": [ { "kind": "account"; "path": "lbPair"; }, { "kind": "account"; "path": "tokenMintY"; } ]; }; }, { "name": "oracle"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 111, 114, 97, 99, 108, 101 ]; }, { "kind": "account"; "path": "lbPair"; } ]; }; }, { "name": "userTokenX"; }, { "name": "funder"; "writable": true; "signer": true; }, { "name": "tokenBadgeX"; "optional": true; }, { "name": "tokenBadgeY"; "optional": true; }, { "name": "tokenProgramX"; }, { "name": "tokenProgramY"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "userTokenY"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "params"; "type": { "defined": { "name": "customizableParams"; }; }; } ]; }, { "name": "initializeLbPair"; "discriminator": [ 45, 154, 237, 210, 221, 15, 166, 92 ]; "accounts": [ { "name": "lbPair"; "writable": true; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 98, 105, 116, 109, 97, 112 ]; }, { "kind": "account"; "path": "lbPair"; } ]; }; }, { "name": "tokenMintX"; }, { "name": "tokenMintY"; }, { "name": "reserveX"; "writable": true; "pda": { "seeds": [ { "kind": "account"; "path": "lbPair"; }, { "kind": "account"; "path": "tokenMintX"; } ]; }; }, { "name": "reserveY"; "writable": true; "pda": { "seeds": [ { "kind": "account"; "path": "lbPair"; }, { "kind": "account"; "path": "tokenMintY"; } ]; }; }, { "name": "oracle"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 111, 114, 97, 99, 108, 101 ]; }, { "kind": "account"; "path": "lbPair"; } ]; }; }, { "name": "presetParameter"; }, { "name": "funder"; "writable": true; "signer": true; }, { "name": "tokenProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "rent"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "activeId"; "type": "i32"; }, { "name": "binStep"; "type": "u16"; } ]; }, { "name": "initializeLbPair2"; "discriminator": [ 73, 59, 36, 120, 237, 83, 108, 198 ]; "accounts": [ { "name": "lbPair"; "writable": true; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 98, 105, 116, 109, 97, 112 ]; }, { "kind": "account"; "path": "lbPair"; } ]; }; }, { "name": "tokenMintX"; }, { "name": "tokenMintY"; }, { "name": "reserveX"; "writable": true; "pda": { "seeds": [ { "kind": "account"; "path": "lbPair"; }, { "kind": "account"; "path": "tokenMintX"; } ]; }; }, { "name": "reserveY"; "writable": true; "pda": { "seeds": [ { "kind": "account"; "path": "lbPair"; }, { "kind": "account"; "path": "tokenMintY"; } ]; }; }, { "name": "oracle"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 111, 114, 97, 99, 108, 101 ]; }, { "kind": "account"; "path": "lbPair"; } ]; }; }, { "name": "presetParameter"; }, { "name": "funder"; "writable": true; "signer": true; }, { "name": "tokenBadgeX"; "optional": true; }, { "name": "tokenBadgeY"; "optional": true; }, { "name": "tokenProgramX"; }, { "name": "tokenProgramY"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "params"; "type": { "defined": { "name": "initializeLbPair2Params"; }; }; } ]; }, { "name": "initializePermissionLbPair"; "discriminator": [ 108, 102, 213, 85, 251, 3, 53, 21 ]; "accounts": [ { "name": "base"; "signer": true; }, { "name": "lbPair"; "writable": true; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 98, 105, 116, 109, 97, 112 ]; }, { "kind": "account"; "path": "lbPair"; } ]; }; }, { "name": "tokenMintX"; }, { "name": "tokenMintY"; }, { "name": "reserveX"; "writable": true; "pda": { "seeds": [ { "kind": "account"; "path": "lbPair"; }, { "kind": "account"; "path": "tokenMintX"; } ]; }; }, { "name": "reserveY"; "writable": true; "pda": { "seeds": [ { "kind": "account"; "path": "lbPair"; }, { "kind": "account"; "path": "tokenMintY"; } ]; }; }, { "name": "oracle"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 111, 114, 97, 99, 108, 101 ]; }, { "kind": "account"; "path": "lbPair"; } ]; }; }, { "name": "payer"; "writable": true; "signer": true; }, { "name": "operator"; }, { "name": "signer"; "signer": true; }, { "name": "tokenBadgeX"; "optional": true; }, { "name": "tokenBadgeY"; "optional": true; }, { "name": "tokenProgramX"; }, { "name": "tokenProgramY"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "ixData"; "type": { "defined": { "name": "initPermissionPairIx"; }; }; } ]; }, { "name": "initializePosition"; "discriminator": [ 219, 192, 234, 71, 190, 191, 102, 80 ]; "accounts": [ { "name": "payer"; "writable": true; "signer": true; }, { "name": "position"; "writable": true; "signer": true; }, { "name": "lbPair"; }, { "name": "owner"; "signer": true; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "rent"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "lowerBinId"; "type": "i32"; }, { "name": "width"; "type": "i32"; } ]; }, { "name": "initializePosition2"; "discriminator": [ 143, 19, 242, 145, 213, 15, 104, 115 ]; "accounts": [ { "name": "payer"; "writable": true; "signer": true; }, { "name": "position"; "writable": true; "signer": true; }, { "name": "lbPair"; }, { "name": "owner"; "signer": true; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "lowerBinId"; "type": "i32"; }, { "name": "width"; "type": "i32"; } ]; }, { "name": "initializePositionByOperator"; "discriminator": [ 251, 189, 190, 244, 117, 254, 35, 148 ]; "accounts": [ { "name": "payer"; "writable": true; "signer": true; }, { "name": "base"; "signer": true; }, { "name": "position"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 112, 111, 115, 105, 116, 105, 111, 110 ]; }, { "kind": "account"; "path": "lbPair"; }, { "kind": "account"; "path": "base"; }, { "kind": "arg"; "path": "lowerBinId"; }, { "kind": "arg"; "path": "width"; } ]; }; }, { "name": "lbPair"; }, { "name": "owner"; }, { "name": "operator"; "docs": [ "operator" ]; "signer": true; }, { "name": "operatorTokenX"; }, { "name": "ownerTokenX"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "lowerBinId"; "type": "i32"; }, { "name": "width"; "type": "i32"; }, { "name": "feeOwner"; "type": "pubkey"; }, { "name": "lockReleasePoint"; "type": "u64"; } ]; }, { "name": "initializePositionPda"; "discriminator": [ 46, 82, 125, 146, 85, 141, 228, 153 ]; "accounts": [ { "name": "payer"; "writable": true; "signer": true; }, { "name": "base"; "signer": true; }, { "name": "position"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 112, 111, 115, 105, 116, 105, 111, 110 ]; }, { "kind": "account"; "path": "lbPair"; }, { "kind": "account"; "path": "base"; }, { "kind": "arg"; "path": "lowerBinId"; }, { "kind": "arg"; "path": "width"; } ]; }; }, { "name": "lbPair"; }, { "name": "owner"; "docs": [ "owner" ]; "signer": true; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "rent"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "lowerBinId"; "type": "i32"; }, { "name": "width"; "type": "i32"; } ]; }, { "name": "initializePresetParameter"; "discriminator": [ 66, 188, 71, 211, 98, 109, 14, 186 ]; "accounts": [ { "name": "presetParameter"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 112, 114, 101, 115, 101, 116, 95, 112, 97, 114, 97, 109, 101, 116, 101, 114, 50 ]; }, { "kind": "arg"; "path": "ix.index"; } ]; }; }, { "name": "operator"; }, { "name": "signer"; "signer": true; }, { "name": "payer"; "writable": true; "signer": true; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; } ]; "args": [ { "name": "ix"; "type": { "defined": { "name": "initPresetParametersIx"; }; }; } ]; }, { "name": "initializeReward"; "discriminator": [ 95, 135, 192, 196, 242, 129, 230, 68 ]; "accounts": [ { "name": "lbPair"; "writable": true; }, { "name": "rewardVault"; "writable": true; "pda": { "seeds": [ { "kind": "account"; "path": "lbPair"; }, { "kind": "arg"; "path": "rewardIndex"; } ]; }; }, { "name": "rewardMint"; }, { "name": "tokenBadge"; "optional": true; }, { "name": "operator"; }, { "name": "signer"; "signer": true; }, { "name": "payer"; "writable": true; "signer": true; }, { "name": "tokenProgram"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "rewardIndex"; "type": "u64"; }, { "name": "rewardDuration"; "type": "u64"; }, { "name": "funder"; "type": "pubkey"; } ]; }, { "name": "initializeTokenBadge"; "discriminator": [ 253, 77, 205, 95, 27, 224, 89, 223 ]; "accounts": [ { "name": "tokenMint"; }, { "name": "tokenBadge"; "writable": true; "pda": { "seeds": [ { "kind": "const"; "value": [ 116, 111, 107, 101, 110, 95, 98, 97, 100, 103, 101 ]; }, { "kind": "account"; "path": "tokenMint"; } ]; }; }, { "name": "operator"; }, { "name": "signer"; "signer": true; }, { "name": "payer"; "writable": true; "signer": true; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; } ]; "args": []; }, { "name": "placeLimitOrder"; "discriminator": [ 108, 176, 33, 186, 146, 229, 1, 197 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "binArrayBitmapExtension" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "reserve"; "writable": true; }, { "name": "tokenMint"; }, { "name": "limitOrder"; "writable": true; "signer": true; }, { "name": "payer"; "writable": true; "signer": true; }, { "name": "owner"; }, { "name": "userToken"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "tokenProgram"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "params"; "type": { "defined": { "name": "placeLimitOrderParams"; }; }; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "rebalanceLiquidity"; "discriminator": [ 92, 4, 176, 193, 119, 185, 83, 9 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userTokenX"; "writable": true; }, { "name": "userTokenY"; "writable": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "owner"; "signer": true; "relations": [ "position" ]; }, { "name": "rentPayer"; "writable": true; "signer": true; }, { "name": "tokenXProgram"; }, { "name": "tokenYProgram"; }, { "name": "memoProgram"; "address": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"; }, { "name": "systemProgram"; "address": "11111111111111111111111111111111"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "params"; "type": { "defined": { "name": "rebalanceLiquidityParams"; }; }; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "removeAllLiquidity"; "discriminator": [ 10, 51, 61, 35, 112, 105, 24, 85 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension", "binArrayLower", "binArrayUpper" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userTokenX"; "writable": true; }, { "name": "userTokenY"; "writable": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "binArrayLower"; "writable": true; }, { "name": "binArrayUpper"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "tokenXProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "tokenYProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": []; }, { "name": "removeLiquidity"; "discriminator": [ 80, 85, 209, 72, 24, 206, 177, 108 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension", "binArrayLower", "binArrayUpper" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userTokenX"; "writable": true; }, { "name": "userTokenY"; "writable": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "binArrayLower"; "writable": true; }, { "name": "binArrayUpper"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "tokenXProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "tokenYProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "binLiquidityRemoval"; "type": { "vec": { "defined": { "name": "binLiquidityReduction"; }; }; }; } ]; }, { "name": "removeLiquidity2"; "discriminator": [ 230, 215, 82, 127, 241, 101, 227, 146 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userTokenX"; "writable": true; }, { "name": "userTokenY"; "writable": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "sender"; "signer": true; }, { "name": "tokenXProgram"; }, { "name": "tokenYProgram"; }, { "name": "memoProgram"; "address": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "binLiquidityRemoval"; "type": { "vec": { "defined": { "name": "binLiquidityReduction"; }; }; }; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "removeLiquidityByRange"; "discriminator": [ 26, 82, 102, 152, 240, 74, 105, 26 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension", "binArrayLower", "binArrayUpper" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userTokenX"; "writable": true; }, { "name": "userTokenY"; "writable": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "binArrayLower"; "writable": true; }, { "name": "binArrayUpper"; "writable": true; }, { "name": "sender"; "signer": true; }, { "name": "tokenXProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "tokenYProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "fromBinId"; "type": "i32"; }, { "name": "toBinId"; "type": "i32"; }, { "name": "bpsToRemove"; "type": "u16"; } ]; }, { "name": "removeLiquidityByRange2"; "discriminator": [ 204, 2, 195, 145, 53, 145, 145, 205 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayBitmapExtension" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "userTokenX"; "writable": true; }, { "name": "userTokenY"; "writable": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "sender"; "signer": true; }, { "name": "tokenXProgram"; }, { "name": "tokenYProgram"; }, { "name": "memoProgram"; "address": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "fromBinId"; "type": "i32"; }, { "name": "toBinId"; "type": "i32"; }, { "name": "bpsToRemove"; "type": "u16"; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "setActivationPoint"; "discriminator": [ 91, 249, 15, 165, 26, 129, 254, 125 ]; "accounts": [ { "name": "lbPair"; "writable": true; }, { "name": "signer"; "signer": true; } ]; "args": [ { "name": "activationPoint"; "type": "u64"; } ]; }, { "name": "setPairStatus"; "discriminator": [ 67, 248, 231, 137, 154, 149, 217, 174 ]; "accounts": [ { "name": "lbPair"; "writable": true; }, { "name": "operator"; }, { "name": "signer"; "signer": true; } ]; "args": [ { "name": "status"; "type": "u8"; } ]; }, { "name": "setPairStatusPermissionless"; "discriminator": [ 78, 59, 152, 211, 70, 183, 46, 208 ]; "accounts": [ { "name": "lbPair"; "writable": true; }, { "name": "signer"; "signer": true; } ]; "args": [ { "name": "status"; "type": "u8"; } ]; }, { "name": "setPermissionlessOperationBits"; "discriminator": [ 84, 58, 203, 139, 163, 81, 190, 186 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "owner"; "signer": true; "relations": [ "position" ]; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "bits"; "type": "u8"; } ]; }, { "name": "setPreActivationDuration"; "discriminator": [ 165, 61, 201, 244, 130, 159, 22, 100 ]; "accounts": [ { "name": "lbPair"; "writable": true; }, { "name": "signer"; "signer": true; } ]; "args": [ { "name": "preActivationDuration"; "type": "u64"; } ]; }, { "name": "setPreActivationSwapAddress"; "discriminator": [ 57, 139, 47, 123, 216, 80, 223, 10 ]; "accounts": [ { "name": "lbPair"; "writable": true; }, { "name": "signer"; "signer": true; } ]; "args": [ { "name": "preActivationSwapAddress"; "type": "pubkey"; } ]; }, { "name": "swap"; "discriminator": [ 248, 198, 158, 145, 225, 117, 135, 200 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "binArrayBitmapExtension" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "userTokenIn"; "writable": true; }, { "name": "userTokenOut"; "writable": true; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "oracle"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "hostFeeIn"; "writable": true; "optional": true; }, { "name": "user"; "signer": true; }, { "name": "tokenXProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "tokenYProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "amountIn"; "type": "u64"; }, { "name": "minAmountOut"; "type": "u64"; } ]; }, { "name": "swap2"; "discriminator": [ 65, 75, 63, 76, 235, 91, 91, 136 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "binArrayBitmapExtension" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "userTokenIn"; "writable": true; }, { "name": "userTokenOut"; "writable": true; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "oracle"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "hostFeeIn"; "writable": true; "optional": true; }, { "name": "user"; "signer": true; }, { "name": "tokenXProgram"; }, { "name": "tokenYProgram"; }, { "name": "memoProgram"; "address": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "amountIn"; "type": "u64"; }, { "name": "minAmountOut"; "type": "u64"; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "swapExactOut"; "discriminator": [ 250, 73, 101, 33, 38, 207, 75, 184 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "binArrayBitmapExtension" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "userTokenIn"; "writable": true; }, { "name": "userTokenOut"; "writable": true; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "oracle"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "hostFeeIn"; "writable": true; "optional": true; }, { "name": "user"; "signer": true; }, { "name": "tokenXProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "tokenYProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "maxInAmount"; "type": "u64"; }, { "name": "outAmount"; "type": "u64"; } ]; }, { "name": "swapExactOut2"; "discriminator": [ 43, 215, 247, 132, 137, 60, 243, 81 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "binArrayBitmapExtension" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "userTokenIn"; "writable": true; }, { "name": "userTokenOut"; "writable": true; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "oracle"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "hostFeeIn"; "writable": true; "optional": true; }, { "name": "user"; "signer": true; }, { "name": "tokenXProgram"; }, { "name": "tokenYProgram"; }, { "name": "memoProgram"; "address": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "maxInAmount"; "type": "u64"; }, { "name": "outAmount"; "type": "u64"; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "swapWithPriceImpact"; "discriminator": [ 56, 173, 230, 208, 173, 228, 156, 205 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "binArrayBitmapExtension" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "userTokenIn"; "writable": true; }, { "name": "userTokenOut"; "writable": true; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "oracle"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "hostFeeIn"; "writable": true; "optional": true; }, { "name": "user"; "signer": true; }, { "name": "tokenXProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "tokenYProgram"; "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "amountIn"; "type": "u64"; }, { "name": "activeId"; "type": { "option": "i32"; }; }, { "name": "maxPriceImpactBps"; "type": "u16"; } ]; }, { "name": "swapWithPriceImpact2"; "discriminator": [ 74, 98, 192, 214, 177, 51, 75, 51 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "binArrayBitmapExtension" ]; }, { "name": "binArrayBitmapExtension"; "writable": true; "optional": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "userTokenIn"; "writable": true; }, { "name": "userTokenOut"; "writable": true; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "oracle"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "hostFeeIn"; "writable": true; "optional": true; }, { "name": "user"; "signer": true; }, { "name": "tokenXProgram"; }, { "name": "tokenYProgram"; }, { "name": "memoProgram"; "address": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "amountIn"; "type": "u64"; }, { "name": "activeId"; "type": { "option": "i32"; }; }, { "name": "maxPriceImpactBps"; "type": "u16"; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "updateBaseFeeParameters"; "discriminator": [ 75, 168, 223, 161, 16, 195, 3, 47 ]; "accounts": [ { "name": "lbPair"; "writable": true; }, { "name": "operator"; }, { "name": "signer"; "signer": true; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "feeParameter"; "type": { "defined": { "name": "baseFeeParameter"; }; }; } ]; }, { "name": "updateDynamicFeeParameters"; "discriminator": [ 92, 161, 46, 246, 255, 189, 22, 22 ]; "accounts": [ { "name": "lbPair"; "writable": true; }, { "name": "operator"; }, { "name": "signer"; "signer": true; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "feeParameter"; "type": { "defined": { "name": "dynamicFeeParameter"; }; }; } ]; }, { "name": "updateFeesAndReward2"; "discriminator": [ 32, 142, 184, 154, 103, 65, 184, 88 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position" ]; }, { "name": "owner"; "signer": true; } ]; "args": [ { "name": "minBinId"; "type": "i32"; }, { "name": "maxBinId"; "type": "i32"; } ]; }, { "name": "updateFeesAndRewards"; "discriminator": [ 154, 230, 250, 13, 236, 209, 75, 223 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "lbPair"; "writable": true; "relations": [ "position", "binArrayLower", "binArrayUpper" ]; }, { "name": "binArrayLower"; "writable": true; }, { "name": "binArrayUpper"; "writable": true; }, { "name": "owner"; "signer": true; } ]; "args": []; }, { "name": "updatePositionOperator"; "discriminator": [ 202, 184, 103, 143, 180, 191, 116, 217 ]; "accounts": [ { "name": "position"; "writable": true; }, { "name": "owner"; "signer": true; "relations": [ "position" ]; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "operator"; "type": "pubkey"; } ]; }, { "name": "updateRewardDuration"; "discriminator": [ 138, 174, 196, 169, 213, 235, 254, 107 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "binArray" ]; }, { "name": "operator"; }, { "name": "signer"; "signer": true; }, { "name": "binArray"; "writable": true; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "rewardIndex"; "type": "u64"; }, { "name": "newDuration"; "type": "u64"; } ]; }, { "name": "updateRewardFunder"; "discriminator": [ 211, 28, 48, 32, 215, 160, 35, 23 ]; "accounts": [ { "name": "lbPair"; "writable": true; }, { "name": "operator"; }, { "name": "signer"; "signer": true; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "rewardIndex"; "type": "u64"; }, { "name": "newFunder"; "type": "pubkey"; } ]; }, { "name": "withdrawIneligibleReward"; "discriminator": [ 148, 206, 42, 195, 247, 49, 103, 8 ]; "accounts": [ { "name": "lbPair"; "writable": true; "relations": [ "binArray" ]; }, { "name": "rewardVault"; "writable": true; }, { "name": "rewardMint"; }, { "name": "funderTokenAccount"; "writable": true; }, { "name": "funder"; "signer": true; }, { "name": "binArray"; "writable": true; }, { "name": "tokenProgram"; }, { "name": "memoProgram"; "address": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"; }, { "name": "eventAuthority"; "pda": { "seeds": [ { "kind": "const"; "value": [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ]; } ]; }; }, { "name": "program"; } ]; "args": [ { "name": "rewardIndex"; "type": "u64"; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "withdrawProtocolFee"; "discriminator": [ 158, 201, 158, 189, 33, 93, 162, 103 ]; "accounts": [ { "name": "lbPair"; "writable": true; }, { "name": "reserveX"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "reserveY"; "writable": true; "relations": [ "lbPair" ]; }, { "name": "tokenXMint"; "relations": [ "lbPair" ]; }, { "name": "tokenYMint"; "relations": [ "lbPair" ]; }, { "name": "receiverTokenX"; "writable": true; }, { "name": "receiverTokenY"; "writable": true; }, { "name": "operator"; }, { "name": "signer"; "docs": [ "operator" ]; "signer": true; }, { "name": "tokenXProgram"; }, { "name": "tokenYProgram"; } ]; "args": [ { "name": "maxAmountX"; "type": "u64"; }, { "name": "maxAmountY"; "type": "u64"; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; }, { "name": "zapProtocolFee"; "discriminator": [ 213, 155, 187, 34, 56, 182, 91, 240 ]; "accounts": [ { "name": "lbPair"; "writable": true; }, { "name": "reserve"; "writable": true; }, { "name": "tokenMint"; }, { "name": "receiverToken"; "writable": true; }, { "name": "operator"; }, { "name": "signer"; "docs": [ "operator" ]; "signer": true; }, { "name": "tokenProgram"; }, { "name": "sysvarInstructions"; "address": "Sysvar1nstructions1111111111111111111111111"; } ]; "args": [ { "name": "maxAmount"; "type": "u64"; }, { "name": "remainingAccountsInfo"; "type": { "defined": { "name": "remainingAccountsInfo"; }; }; } ]; } ]; "accounts": [ { "name": "binArray"; "discriminator": [ 92, 142, 92, 220, 5, 148, 70, 181 ]; }, { "name": "binArrayBitmapExtension"; "discriminator": [ 80, 111, 124, 113, 55, 237, 18, 5 ]; }, { "name": "claimFeeOperator"; "discriminator": [ 166, 48, 134, 86, 34, 200, 188, 150 ]; }, { "name": "dummyZcAccount"; "discriminator": [ 94, 107, 238, 80, 208, 48, 180, 8 ]; }, { "name": "lbPair"; "discriminator": [ 33, 11, 49, 98, 181, 101, 177, 13 ]; }, { "name": "limitOrder"; "discriminator": [ 137, 183, 212, 91, 115, 29, 141, 227 ]; }, { "name": "operator"; "discriminator": [ 219, 31, 188, 145, 69, 139, 204, 117 ]; }, { "name": "oracle"; "discriminator": [ 139, 194, 131, 179, 140, 179, 229, 244 ]; }, { "name": "positionV2"; "discriminator": [ 117, 176, 212, 199, 245, 180, 133, 182 ]; }, { "name": "presetParameter"; "discriminator": [ 242, 62, 244, 34, 181, 112, 58, 170 ]; }, { "name": "presetParameter2"; "discriminator": [ 171, 236, 148, 115, 162, 113, 222, 174 ]; }, { "name": "tokenBadge"; "discriminator": [ 116, 219, 204, 229, 249, 116, 255, 150 ]; } ]; "events": [ { "name": "addLiquidity"; "discriminator": [ 31, 94, 125, 90, 227, 52, 61, 186 ]; }, { "name": "cancelLimitOrderEvt"; "discriminator": [ 131, 234, 194, 133, 9, 14, 189, 209 ]; }, { "name": "claimFee"; "discriminator": [ 75, 122, 154, 48, 140, 74, 123, 163 ]; }, { "name": "claimFee2"; "discriminator": [ 232, 171, 242, 97, 58, 77, 35, 45 ]; }, { "name": "claimReward"; "discriminator": [ 148, 116, 134, 204, 22, 171, 85, 95 ]; }, { "name": "claimReward2"; "discriminator": [ 27, 143, 244, 33, 80, 43, 110, 146 ]; }, { "name": "closeLimitOrderEvt"; "discriminator": [ 142, 135, 8, 76, 92, 63, 118, 83 ]; }, { "name": "compositionFee"; "discriminator": [ 128, 151, 123, 106, 17, 102, 113, 142 ]; }, { "name": "decreasePositionLength"; "discriminator": [ 52, 118, 235, 85, 172, 169, 15, 128 ]; }, { "name": "dynamicFeeParameterUpdate"; "discriminator": [ 88, 88, 178, 135, 194, 146, 91, 243 ]; }, { "name": "feeParameterUpdate"; "discriminator": [ 48, 76, 241, 117, 144, 215, 242, 44 ]; }, { "name": "fundReward"; "discriminator": [ 246, 228, 58, 130, 145, 170, 79, 204 ]; }, { "name": "goToABin"; "discriminator": [ 59, 138, 76, 68, 138, 131, 176, 67 ]; }, { "name": "increaseObservation"; "discriminator": [ 99, 249, 17, 121, 166, 156, 207, 215 ]; }, { "name": "increasePositionLength"; "discriminator": [ 157, 239, 42, 204, 30, 56, 223, 46 ]; }, { "name": "initializeReward"; "discriminator": [ 211, 153, 88, 62, 149, 60, 177, 70 ]; }, { "name": "lbPairCreate"; "discriminator": [ 185, 74, 252, 125, 27, 215, 188, 111 ]; }, { "name": "placeLimitOrderEvt"; "discriminator": [ 43, 79, 27, 169, 244, 28, 225, 63 ]; }, { "name": "positionClose"; "discriminator": [ 255, 196, 16, 107, 28, 202, 53, 128 ]; }, { "name": "positionCreate"; "discriminator": [ 144, 142, 252, 84, 157, 53, 37, 121 ]; }, { "name": "rebalancing"; "discriminator": [ 0, 109, 117, 179, 61, 91, 199, 200 ]; }, { "name": "removeLiquidity"; "discriminator": [ 116, 244, 97, 232, 103, 31, 152, 58 ]; }, { "name": "setPositionPermissionlessOperationBitsEvt"; "discriminator": [ 195, 229, 147, 245, 29, 125, 48, 168 ]; }, { "name": "swap"; "discriminator": [ 81, 108, 227, 190, 205, 208, 10, 196 ]; }, { "name": "swap2Evt"; "discriminator": [ 46, 116, 82, 215, 148, 27, 84, 77 ]; }, { "name": "updatePositionLockReleasePoint"; "discriminator": [ 133, 214, 66, 224, 64, 12, 7, 191 ]; }, { "name": "updatePositionOperator"; "discriminator": [ 39, 115, 48, 204, 246, 47, 66, 57 ]; }, { "name": "updateRewardDuration"; "discriminator": [ 223, 245, 224, 153, 49, 29, 163, 172 ]; }, { "name": "updateRewardFunder"; "discriminator": [ 224, 178, 174, 74, 252, 165, 85, 180 ]; }, { "name": "withdrawIneligibleReward"; "discriminator": [ 231, 189, 65, 149, 102, 215, 154, 244 ]; } ]; "errors": [ { "code": 6000; "name": "invalidStartBinIndex"; "msg": "Invalid start bin index"; }, { "code": 6001; "name": "invalidBinId"; "msg": "Invalid bin id"; }, { "code": 6002; "name": "invalidInput"; "msg": "Invalid input data"; }, { "code": 6003; "name": "exceededAmountSlippageTolerance"; "msg": "Exceeded amount slippage tolerance"; }, { "code": 6004; "name": "exceededBinSlippageTolerance"; "msg": "Exceeded bin slippage tolerance"; }, { "code": 6005; "name": "compositionFactorFlawed"; "msg": "Composition factor flawed"; }, { "code": 6006; "name": "nonPresetBinStep"; "msg": "Non preset bin step"; }, { "code": 6007; "name": "zeroLiquidity"; "msg": "Zero liquidity"; }, { "code": 6008; "name": "invalidPosition"; "msg": "Invalid position"; }, { "code": 6009; "name": "binArrayNotFound"; "msg": "Bin array not found"; }, { "code": 6010; "name": "invalidTokenMint"; "msg": "Invalid token mint"; }, { "code": 6011; "name": "invalidAccountForSingleDeposit"; "msg": "Invalid account for single deposit"; }, { "code": 6012; "name": "pairInsufficientLiquidity"; "msg": "Pair insufficient liquidity"; }, { "code": 6013; "name": "invalidFeeOwner"; "msg": "Invalid fee owner"; }, { "code": 6014; "name": "invalidFeeWithdrawAmount"; "msg": "Invalid fee withdraw amount"; }, { "code": 6015; "name": "invalidAdmin"; "msg": "Invalid admin"; }, { "code": 6016; "name": "identicalFeeOwner"; "msg": "Identical fee owner"; }, { "code": 6017; "name": "invalidBps"; "msg": "Invalid basis point"; }, { "code": 6018; "name": "mathOverflow"; "msg": "Math operation overflow"; }, { "code": 6019; "name": "typeCastFailed"; "msg": "Type cast error"; }, { "code": 6020; "name": "invalidRewardIndex"; "msg": "Invalid reward index"; }, { "code": 6021; "name": "invalidRewardDuration"; "msg": "Invalid reward duration"; }, { "code": 6022; "name": "rewardInitialized"; "msg": "Reward already initialized"; }, { "code": 6023; "name": "rewardUninitialized"; "msg": "Reward not initialized"; }, { "code": 6024; "name": "identicalFunder"; "msg": "Identical funder"; }, { "code": 6025; "name": "rewardCampaignInProgress"; "msg": "Reward campaign in progress"; }, { "code": 6026; "name": "identicalRewardDuration"; "msg": "Reward duration is the same"; }, { "code": 6027; "name": "invalidBinArray"; "msg": "Invalid bin array"; }, { "code": 6028; "name": "nonContinuousBinArrays"; "msg": "Bin arrays must be continuous"; }, { "code": 6029; "name": "invalidRewardVault"; "msg": "Invalid reward vault"; }, { "code": 6030; "name": "nonEmptyPosition"; "msg": "Position is not empty"; }, { "code": 6031; "name": "unauthorizedAccess"; "msg": "Unauthorized access"; }, { "code": 6032; "name": "invalidFeeParameter"; "msg": "Invalid fee parameter"; }, { "code": 6033; "name": "missingOracle"; "msg": "Missing oracle account"; }, { "code": 6034; "name": "insufficientSample"; "msg": "Insufficient observation sample"; }, { "code": 6035; "name": "invalidLookupTimestamp"; "msg": "Invalid lookup timestamp"; }, { "code": 6036; "name": "bitmapExtensionAccountIsNotProvided"; "msg": "Bitmap extension account is not provided"; }, { "code": 6037; "name": "cannotFindNonZeroLiquidityBinArrayId"; "msg": "Cannot find non-zero liquidity binArrayId"; }, { "code": 6038; "name": "binIdOutOfBound"; "msg": "Bin id out of bound"; }, { "code": 6039; "name": "insufficientOutAmount"; "msg": "Insufficient amount in for minimum out"; }, { "code": 6040; "name": "invalidPositionWidth"; "msg": "Invalid position width"; }, { "code": 6041; "name": "excessiveFeeUpdate"; "msg": "Excessive fee update"; }, { "code": 6042; "name": "poolDisabled"; "msg": "Pool disabled"; }, { "code": 6043; "name": "invalidPoolType"; "msg": "Invalid pool type"; }, { "code": 6044; "name": "exceedMaxWhitelist"; "msg": "Whitelist for wallet is full"; }, { "code": 6045; "name": "invalidIndex"; "msg": "Invalid index"; }, { "code": 6046; "name": "rewardNotEnded"; "msg": "Reward not ended"; }, { "code": 6047; "name": "mustWithdrawnIneligibleReward"; "msg": "Must withdraw ineligible reward"; }, { "code": 6048; "name": "unauthorizedAddress"; "msg": "Unauthorized address"; }, { "code": 6049; "name": "operatorsAreTheSame"; "msg": "Cannot update because operators are the same"; }, { "code": 6050; "name": "withdrawToWrongTokenAccount"; "msg": "Withdraw to wrong token account"; }, { "code": 6051; "name": "wrongRentReceiver"; "msg": "Wrong rent receiver"; }, { "code": 6052; "name": "alreadyPassActivationPoint"; "msg": "Already activated"; }, { "code": 6053; "name": "exceedMaxSwappedAmount"; "msg": "Swapped amount is exceeded max swapped amount"; }, { "code": 6054; "name": "invalidStrategyParameters"; "msg": "Invalid strategy parameters"; }, { "code": 6055; "name": "liquidityLocked"; "msg": "Liquidity locked"; }, { "code": 6056; "name": "binRangeIsNotEmpty"; "msg": "Bin range is not empty"; }, { "code": 6057; "name": "notExactAmountOut"; "msg": "Amount out is not matched with exact amount out"; }, { "code": 6058; "name": "invalidActivationType"; "msg": "Invalid activation type"; }, { "code": 6059; "name": "invalidActivationDuration"; "msg": "Invalid activation duration"; }, { "code": 6060; "name": "missingTokenAmountAsTokenLaunchProof"; "msg": "Missing token amount as token launch owner proof"; }, { "code": 6061; "name": "invalidQuoteToken"; "msg": "Quote token must be SOL or USDC"; }, { "code": 6062; "name": "invalidBinStep"; "msg": "Invalid bin step"; }, { "code": 6063; "name": "invalidBaseFee"; "msg": "Invalid base fee"; }, { "code": 6064; "name": "invalidPreActivationDuration"; "msg": "Invalid pre-activation duration"; }, { "code": 6065; "name": "alreadyPassPreActivationSwapPoint"; "msg": "Already pass pre-activation swap point"; }, { "code": 6066; "name": "invalidStatus"; "msg": "Invalid status"; }, { "code": 6067; "name": "exceededMaxOracleLength"; "msg": "Exceed max oracle length"; }, { "code": 6068; "name": "invalidMinimumLiquidity"; "msg": "Invalid minimum liquidity"; }, { "code": 6069; "name": "notSupportMint"; "msg": "Not support token_2022 mint extension"; }, { "code": 6070; "name": "unsupportedMintExtension"; "msg": "Unsupported mint extension"; }, { "code": 6071; "name": "unsupportNativeMintToken2022"; "msg": "Unsupported native mint token2022"; }, { "code": 6072; "name": "unmatchTokenMint"; "msg": "Unmatch token mint"; }, { "code": 6073; "name": "unsupportedTokenMint"; "msg": "Unsupported token mint"; }, { "code": 6074; "name": "insufficientRemainingAccounts"; "msg": "Insufficient remaining accounts"; }, { "code": 6075; "name": "invalidRemainingAccountSlice"; "msg": "Invalid remaining account slice"; }, { "code": 6076; "name": "duplicatedRemainingAccountTypes"; "msg": "Duplicated remaining account types"; }, { "code": 6077; "name": "missingRemainingAccountForTransferHook"; "msg": "Missing remaining account for transfer hook"; }, { "code": 6078; "name": "noTransferHookProgram"; "msg": "Remaining account was passed for transfer hook but there's no hook program"; }, { "code": 6079; "name": "zeroFundedAmount"; "msg": "Zero funded amount"; }, { "code": 6080; "name": "invalidSide"; "msg": "Invalid side"; }, { "code": 6081; "name": "invalidResizeLength"; "msg": "Invalid resize length"; }, { "code": 6082; "name": "notSupportAtTheMoment"; "msg": "Not support at the moment"; }, { "code": 6083; "name": "invalidRebalanceParameters"; "msg": "Invalid rebalance parameters"; }, { "code": 6084; "name": "invalidRewardAccounts"; "msg": "Invalid reward accounts"; }, { "code": 6085; "name": "undeterminedError"; "msg": "Undetermined error"; }, { "code": 6086; "name": "reallocExceedMaxLengthPerInstruction"; "msg": "Realloc exceed max length per instruction"; }, { "code": 6087; "name": "invalidBaseFeeMantissa"; "msg": "Mantissa cannot more than two significant digits"; }, { "code": 6088; "name": "invalidPositionOwner"; "msg": "Invalid position owner"; }, { "code": 6089; "name": "invalidPoolAddress"; "msg": "Invalid pool address"; }, { "code": 6090; "name": "invalidTokenBadgeType"; "msg": "Invalid token badge type"; }, { "code": 6091; "name": "invalidTransferHookAuthority"; "msg": "Invalid transfer hook authority"; }, { "code": 6092; "name": "amountXIsNegative"; "msg": "Amount x is negative"; }, { "code": 6093; "name": "amountYIsNegative"; "msg": "Amount y is negative"; }, { "code": 6094; "name": "invalidPoolCreator"; "msg": "Invalid pool creator"; }, { "code": 6095; "name": "invalidFunctionType"; "msg": "Invalid function type"; }, { "code": 6096; "name": "invalidPermission"; "msg": "Invalid permission"; }, { "code": 6097; "name": "incorrectAta"; "msg": "Incorrect ATA"; }, { "code": 6098; "name": "invalidWithdrawProtocolFeeZapAccounts"; "msg": "Invalid withdraw protocol fee zap accounts"; }, { "code": 6099; "name": "mintRestrictedFromZap"; "msg": "SOL,USDC protocol fee cannot be withdrawn via zap"; }, { "code": 6100; "name": "cpiDisabled"; "msg": "CPI disabled"; }, { "code": 6101; "name": "missingZapOutInstruction"; "msg": "Missing zap out instruction"; }, { "code": 6102; "name": "invalidZapAccounts"; "msg": "Invalid zap accounts"; }, { "code": 6103; "name": "invalidZapOutParameters"; "msg": "Invalid zap out parameters"; }, { "code": 6104; "name": "insufficientInAmount"; "msg": "Insufficient in amount"; }, { "code": 6105; "name": "invalidPlaceLimitOrderParameters"; "msg": "Invalid place limit order parameters"; }, { "code": 6106; "name": "invalidLimitOrderOwner"; "msg": "Invalid limit order owner"; }, { "code": 6107; "name": "invalidCancelLimitOrderParameters"; "msg": "Invalid cancel limit order parameters"; }, { "code": 6108; "name": "cannotFindLimitOrderByBinId"; "msg": "Cannot find limit order by bin id"; }, { "code": 6109; "name": "cancelNonEmptyLimitOrder"; "msg": "Cannot cancel non-empty limit order"; }, { "code": 6110; "name": "invalidCollectFeeMode"; "msg": "Invalid collect fee mode"; } ]; "types": [ { "name": "accountsType"; "type": { "kind": "enum"; "variants": [ { "name": "transferHookX"; }, { "name": "transferHookY"; }, { "name": "transferHookReward"; }, { "name": "transferHookMultiReward"; "fields": [ "u8" ]; }, { "name": "transferHookReferral"; } ]; }; }, { "name": "activationType"; "docs": [ "Type of the activation" ]; "repr": { "kind": "rust"; }; "type": { "kind": "enum"; "variants": [ { "name": "slot"; }, { "name": "timestamp"; } ]; }; }, { "name": "addLiquidity"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "from"; "type": "pubkey"; }, { "name": "position"; "type": "pubkey"; }, { "name": "amounts"; "type": { "array": [ "u64", 2 ]; }; }, { "name": "activeBinId"; "type": "i32"; } ]; }; }, { "name": "addLiquidityParams"; "type": { "kind": "struct"; "fields": [ { "name": "minDeltaId"; "type": "i32"; }, { "name": "maxDeltaId"; "type": "i32"; }, { "name": "x0"; "type": "u64"; }, { "name": "y0"; "type": "u64"; }, { "name": "deltaX"; "type": "u64"; }, { "name": "deltaY"; "type": "u64"; }, { "name": "bitFlag"; "type": "u8"; }, { "name": "favorXInActiveId"; "type": "bool"; }, { "name": "padding"; "type": { "array": [ "u8", 16 ]; }; } ]; }; }, { "name": "addLiquiditySingleSidePreciseParameter"; "type": { "kind": "struct"; "fields": [ { "name": "bins"; "type": { "vec": { "defined": { "name": "compressedBinDepositAmount"; }; }; }; }, { "name": "decompressMultiplier"; "type": "u64"; } ]; }; }, { "name": "addLiquiditySingleSidePreciseParameter2"; "type": { "kind": "struct"; "fields": [ { "name": "bins"; "type": { "vec": { "defined": { "name": "compressedBinDepositAmount"; }; }; }; }, { "name": "decompressMultiplier"; "type": "u64"; }, { "name": "maxAmount"; "type": "u64"; } ]; }; }, { "name": "baseFeeParameter"; "type": { "kind": "struct"; "fields": [ { "name": "protocolShare"; "docs": [ "Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee" ]; "type": "u16"; }, { "name": "baseFactor"; "docs": [ "Base factor for base fee rate" ]; "type": "u16"; }, { "name": "baseFeePowerFactor"; "docs": [ "Base fee power factor" ]; "type": "u8"; } ]; }; }, { "name": "bin"; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "amountX"; "docs": [ "Amount of token X in the bin for market making. This already excluded protocol fees." ]; "type": "u64"; }, { "name": "amountY"; "docs": [ "Amount of token Y in the bin for market making. This already excluded protocol fees." ]; "type": "u64"; }, { "name": "price"; "docs": [ "Bin price" ]; "type": "u128"; }, { "name": "liquiditySupply"; "docs": [ "Bin MM liquidity supply." ]; "type": "u128"; }, { "name": "fulfilledOrderAmountX"; "docs": [ "Total fulfilled order amount x" ]; "type": "u64"; }, { "name": "fulfilledOrderAmountY"; "docs": [ "Total fulfilled order amount y" ]; "type": "u64"; }, { "name": "limitOrderFeeAskSide"; "docs": [ "Limit order fee collected by ask side orders" ]; "type": "u64"; }, { "name": "limitOrderFeeBidSide"; "docs": [ "Limit order fee collected by bid side orders" ]; "type": "u64"; }, { "name": "feeAmountXPerTokenStored"; "docs": [ "Swap fee amount of token X per liquidity deposited." ]; "type": "u128"; }, { "name": "feeAmountYPerTokenStored"; "docs": [ "Swap fee amount of token Y per liquidity deposited." ]; "type": "u128"; }, { "name": "openOrderAmount"; "docs": [ "Pending open limit orders amount in the bin." ]; "type": "u64"; }, { "name": "totalProcessingOrderAmount"; "docs": [ "Total processing order amount" ]; "type": "u64"; }, { "name": "processedOrderRemainingAmount"; "docs": [ "Remaining in processing open limit orders amount in the bin." ]; "type": "u64"; }, { "name": "orderAge"; "docs": [ "Age" ]; "type": "u32"; }, { "name": "limitOrderAskSide"; "docs": [ "limit order flag" ]; "type": "u8"; }, { "name": "padding1"; "docs": [ "padding" ]; "type": { "array": [ "u8", 3 ]; }; } ]; }; }, { "name": "binArray"; "docs": [ "An account to contain a range of bin. For example: Bin 100 <-> 200.", "For example:", "BinArray index: 0 contains bin 0 <-> 599", "index: 2 contains bin 600 <-> 1199, ..." ]; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "index"; "type": "i64"; }, { "name": "version"; "type": "u8"; }, { "name": "padding1"; "type": { "array": [ "u8", 7 ]; }; }, { "name": "lbPair"; "type": "pubkey"; }, { "name": "bins"; "type": { "array": [ { "defined": { "name": "bin"; }; }, 70 ]; }; } ]; }; }, { "name": "binArrayBitmapExtension"; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "positiveBinArrayBitmap"; "docs": [ "Packed initialized bin array state for start_bin_index is positive" ]; "type": { "array": [ { "array": [ "u64", 8 ]; }, 12 ]; }; }, { "name": "negativeBinArrayBitmap"; "docs": [ "Packed initialized bin array state for start_bin_index is negative" ]; "type": { "array": [ { "array": [ "u64", 8 ]; }, 12 ]; }; } ]; }; }, { "name": "binLimitOrderAmount"; "type": { "kind": "struct"; "fields": [ { "name": "id"; "type": "i32"; }, { "name": "amount"; "type": "u64"; } ]; }; }, { "name": "binLiquidityDistribution"; "type": { "kind": "struct"; "fields": [ { "name": "binId"; "docs": [ "Define the bin ID wish to deposit to." ]; "type": "i32"; }, { "name": "distributionX"; "docs": [ "DistributionX (or distributionY) is the percentages of amountX (or amountY) you want to add to each bin." ]; "type": "u16"; }, { "name": "distributionY"; "docs": [ "DistributionX (or distributionY) is the percentages of amountX (or amountY) you want to add to each bin." ]; "type": "u16"; } ]; }; }, { "name": "binLiquidityDistributionByWeight"; "type": { "kind": "struct"; "fields": [ { "name": "binId"; "docs": [ "Define the bin ID wish to deposit to." ]; "type": "i32"; }, { "name": "weight"; "docs": [ "weight of liquidity distributed for this bin id" ]; "type": "u16"; } ]; }; }, { "name": "binLiquidityReduction"; "type": { "kind": "struct"; "fields": [ { "name": "binId"; "type": "i32"; }, { "name": "bpsToRemove"; "type": "u16"; } ]; }; }, { "name": "cancelLimitOrderEvt"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "from"; "type": "pubkey"; }, { "name": "limitOrder"; "type": "pubkey"; }, { "name": "amounts"; "type": { "array": [ "u64", 2 ]; }; }, { "name": "activeId"; "type": "i32"; }, { "name": "bins"; "type": { "vec": "i32"; }; } ]; }; }, { "name": "claimFee"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "position"; "type": "pubkey"; }, { "name": "owner"; "type": "pubkey"; }, { "name": "feeX"; "type": "u64"; }, { "name": "feeY"; "type": "u64"; } ]; }; }, { "name": "claimFee2"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "position"; "type": "pubkey"; }, { "name": "owner"; "type": "pubkey"; }, { "name": "feeX"; "type": "u64"; }, { "name": "feeY"; "type": "u64"; }, { "name": "activeBinId"; "type": "i32"; } ]; }; }, { "name": "claimFeeOperator"; "docs": [ "Parameter that set by the protocol" ]; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "operator"; "docs": [ "operator" ]; "type": "pubkey"; }, { "name": "padding"; "docs": [ "Reserve" ]; "type": { "array": [ "u8", 128 ]; }; } ]; }; }, { "name": "claimReward"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "position"; "type": "pubkey"; }, { "name": "owner"; "type": "pubkey"; }, { "name": "rewardIndex"; "type": "u64"; }, { "name": "totalReward"; "type": "u64"; } ]; }; }, { "name": "claimReward2"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "position"; "type": "pubkey"; }, { "name": "owner"; "type": "pubkey"; }, { "name": "rewardIndex"; "type": "u64"; }, { "name": "totalReward"; "type": "u64"; }, { "name": "activeBinId"; "type": "i32"; } ]; }; }, { "name": "closeLimitOrderEvt"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "owner"; "type": "pubkey"; }, { "name": "limitOrder"; "type": "pubkey"; } ]; }; }, { "name": "compositionFee"; "type": { "kind": "struct"; "fields": [ { "name": "from"; "type": "pubkey"; }, { "name": "binId"; "type": "i16"; }, { "name": "tokenXFeeAmount"; "type": "u64"; }, { "name": "tokenYFeeAmount"; "type": "u64"; }, { "name": "protocolTokenXFeeAmount"; "type": "u64"; }, { "name": "protocolTokenYFeeAmount"; "type": "u64"; } ]; }; }, { "name": "compressedBinDepositAmount"; "type": { "kind": "struct"; "fields": [ { "name": "binId"; "type": "i32"; }, { "name": "amount"; "type": "u32"; } ]; }; }, { "name": "customizableParams"; "type": { "kind": "struct"; "fields": [ { "name": "activeId"; "docs": [ "Pool price" ]; "type": "i32"; }, { "name": "binStep"; "docs": [ "Bin step" ]; "type": "u16"; }, { "name": "baseFactor"; "docs": [ "Base factor" ]; "type": "u16"; }, { "name": "activationType"; "docs": [ "Activation type. 0 = Slot, 1 = Time. Check ActivationType enum" ]; "type": "u8"; }, { "name": "hasAlphaVault"; "docs": [ "Whether the pool has an alpha vault" ]; "type": "bool"; }, { "name": "activationPoint"; "docs": [ "Decide when does the pool start trade. None = Now" ]; "type": { "option": "u64"; }; }, { "name": "creatorPoolOnOffControl"; "docs": [ "Pool creator have permission to enable/disable pool with restricted program validation. Only applicable for customizable permissionless pool." ]; "type": "bool"; }, { "name": "baseFeePowerFactor"; "docs": [ "Base fee power factor" ]; "type": "u8"; }, { "name": "concreteFunctionType"; "docs": [ "Concrete function type" ]; "type": "u8"; }, { "name": "collectFeeMode"; "docs": [ "Collect fee mode" ]; "type": "u8"; }, { "name": "padding"; "docs": [ "Padding, for future use" ]; "type": { "array": [ "u8", 60 ]; }; } ]; }; }, { "name": "decreasePositionLength"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "position"; "type": "pubkey"; }, { "name": "owner"; "type": "pubkey"; }, { "name": "lengthToRemove"; "type": "u16"; }, { "name": "side"; "type": "u8"; } ]; }; }, { "name": "dummyIx"; "type": { "kind": "struct"; "fields": [ { "name": "pairStatus"; "type": { "defined": { "name": "pairStatus"; }; }; }, { "name": "pairType"; "type": { "defined": { "name": "pairType"; }; }; }, { "name": "activationType"; "type": { "defined": { "name": "activationType"; }; }; }, { "name": "tokenProgramFlag"; "type": { "defined": { "name": "tokenProgramFlags"; }; }; }, { "name": "resizeSide"; "type": { "defined": { "name": "resizeSide"; }; }; }, { "name": "rounding"; "type": { "defined": { "name": "rounding"; }; }; } ]; }; }, { "name": "dummyZcAccount"; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "positionBinData"; "type": { "defined": { "name": "positionBinData"; }; }; }, { "name": "limitOrderBinData"; "type": { "defined": { "name": "limitOrderBinData"; }; }; } ]; }; }, { "name": "dynamicFeeParameter"; "type": { "kind": "struct"; "fields": [ { "name": "filterPeriod"; "docs": [ "Filter period determine high frequency trading time window." ]; "type": "u16"; }, { "name": "decayPeriod"; "docs": [ "Decay period determine when the volatile fee start decay / decrease." ]; "type": "u16"; }, { "name": "reductionFactor"; "docs": [ "Reduction factor controls the volatile fee rate decrement rate." ]; "type": "u16"; }, { "name": "variableFeeControl"; "docs": [ "Used to scale the variable fee component depending on the dynamic of the market" ]; "type": "u32"; }, { "name": "maxVolatilityAccumulator"; "docs": [ "Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate." ]; "type": "u32"; } ]; }; }, { "name": "dynamicFeeParameterUpdate"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "filterPeriod"; "docs": [ "Filter period determine high frequency trading time window." ]; "type": "u16"; }, { "name": "decayPeriod"; "docs": [ "Decay period determine when the volatile fee start decay / decrease." ]; "type": "u16"; }, { "name": "reductionFactor"; "docs": [ "Reduction factor controls the volatile fee rate decrement rate." ]; "type": "u16"; }, { "name": "variableFeeControl"; "docs": [ "Used to scale the variable fee component depending on the dynamic of the market" ]; "type": "u32"; }, { "name": "maxVolatilityAccumulator"; "docs": [ "Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate." ]; "type": "u32"; } ]; }; }, { "name": "feeInfo"; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "feeXPerTokenComplete"; "type": "u128"; }, { "name": "feeYPerTokenComplete"; "type": "u128"; }, { "name": "feeXPending"; "type": "u64"; }, { "name": "feeYPending"; "type": "u64"; } ]; }; }, { "name": "feeParameterUpdate"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "protocolShare"; "type": "u16"; }, { "name": "baseFactor"; "type": "u16"; }, { "name": "baseFeePowerFactor"; "type": "u8"; } ]; }; }, { "name": "fundReward"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "funder"; "type": "pubkey"; }, { "name": "rewardIndex"; "type": "u64"; }, { "name": "amount"; "type": "u64"; } ]; }; }, { "name": "goToABin"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "fromBinId"; "type": "i32"; }, { "name": "toBinId"; "type": "i32"; } ]; }; }, { "name": "increaseObservation"; "type": { "kind": "struct"; "fields": [ { "name": "oracle"; "type": "pubkey"; }, { "name": "newObservationLength"; "type": "u64"; } ]; }; }, { "name": "increasePositionLength"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "position"; "type": "pubkey"; }, { "name": "owner"; "type": "pubkey"; }, { "name": "lengthToAdd"; "type": "u16"; }, { "name": "side"; "type": "u8"; } ]; }; }, { "name": "initPermissionPairIx"; "type": { "kind": "struct"; "fields": [ { "name": "activeId"; "type": "i32"; }, { "name": "binStep"; "type": "u16"; }, { "name": "baseFactor"; "type": "u16"; }, { "name": "baseFeePowerFactor"; "type": "u8"; }, { "name": "activationType"; "type": "u8"; }, { "name": "padding0"; "type": "u16"; }, { "name": "concreteFunctionType"; "type": "u8"; }, { "name": "collectFeeMode"; "type": "u8"; } ]; }; }, { "name": "initPresetParametersIx"; "type": { "kind": "struct"; "fields": [ { "name": "index"; "type": "u16"; }, { "name": "binStep"; "docs": [ "Bin step. Represent the price increment / decrement." ]; "type": "u16"; }, { "name": "baseFactor"; "docs": [ "Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor" ]; "type": "u16"; }, { "name": "filterPeriod"; "docs": [ "Filter period determine high frequency trading time window." ]; "type": "u16"; }, { "name": "decayPeriod"; "docs": [ "Decay period determine when the volatile fee start decay / decrease." ]; "type": "u16"; }, { "name": "reductionFactor"; "docs": [ "Reduction factor controls the volatile fee rate decrement rate." ]; "type": "u16"; }, { "name": "variableFeeControl"; "docs": [ "Used to scale the variable fee component depending on the dynamic of the market" ]; "type": "u32"; }, { "name": "maxVolatilityAccumulator"; "docs": [ "Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate." ]; "type": "u32"; }, { "name": "protocolShare"; "docs": [ "Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee" ]; "type": "u16"; }, { "name": "baseFeePowerFactor"; "docs": [ "Base fee power factor" ]; "type": "u8"; }, { "name": "concreteFunctionType"; "docs": [ "function type" ]; "type": "u8"; }, { "name": "collectFeeMode"; "docs": [ "collect fee mode" ]; "type": "u8"; } ]; }; }, { "name": "initializeLbPair2Params"; "type": { "kind": "struct"; "fields": [ { "name": "activeId"; "docs": [ "Pool price" ]; "type": "i32"; }, { "name": "padding"; "docs": [ "Padding, for future use" ]; "type": { "array": [ "u8", 96 ]; }; } ]; }; }, { "name": "initializeReward"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "rewardMint"; "type": "pubkey"; }, { "name": "funder"; "type": "pubkey"; }, { "name": "rewardIndex"; "type": "u64"; }, { "name": "rewardDuration"; "type": "u64"; } ]; }; }, { "name": "lbPair"; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "parameters"; "type": { "defined": { "name": "staticParameters"; }; }; }, { "name": "vParameters"; "type": { "defined": { "name": "variableParameters"; }; }; }, { "name": "bumpSeed"; "type": { "array": [ "u8", 1 ]; }; }, { "name": "binStepSeed"; "docs": [ "Bin step signer seed" ]; "type": { "array": [ "u8", 2 ]; }; }, { "name": "pairType"; "docs": [ "Type of the pair" ]; "type": "u8"; }, { "name": "activeId"; "docs": [ "Active bin id" ]; "type": "i32"; }, { "name": "binStep"; "docs": [ "Bin step. Represent the price increment / decrement." ]; "type": "u16"; }, { "name": "status"; "docs": [ "Status of the pair. Check PairStatus enum." ]; "type": "u8"; }, { "name": "requireBaseFactorSeed"; "docs": [ "Require base factor seed" ]; "type": "u8"; }, { "name": "baseFactorSeed"; "docs": [ "Base factor seed" ]; "type": { "array": [ "u8", 2 ]; }; }, { "name": "activationType"; "docs": [ "Activation type" ]; "type": "u8"; }, { "name": "creatorPoolOnOffControl"; "docs": [ "Allow pool creator to enable/disable pool with restricted validation. Only applicable for customizable permissionless pair type." ]; "type": "u8"; }, { "name": "tokenXMint"; "docs": [ "Token X mint" ]; "type": "pubkey"; }, { "name": "tokenYMint"; "docs": [ "Token Y mint" ]; "type": "pubkey"; }, { "name": "reserveX"; "docs": [ "LB token X vault" ]; "type": "pubkey"; }, { "name": "reserveY"; "docs": [ "LB token Y vault" ]; "type": "pubkey"; }, { "name": "protocolFee"; "docs": [ "Uncollected protocol fee" ]; "type": { "defined": { "name": "protocolFee"; }; }; }, { "name": "padding1"; "docs": [ "padding 1" ]; "type": { "array": [ "u8", 32 ]; }; }, { "name": "rewardInfos"; "docs": [ "Farming reward information" ]; "type": { "array": [ { "defined": { "name": "rewardInfo"; }; }, 2 ]; }; }, { "name": "oracle"; "docs": [ "Oracle pubkey" ]; "type": "pubkey"; }, { "name": "binArrayBitmap"; "docs": [ "Packed initialized bin array state" ]; "type": { "array": [ "u64", 16 ]; }; }, { "name": "lastUpdatedAt"; "docs": [ "Last time the pool fee parameter was updated" ]; "type": "i64"; }, { "name": "padding2"; "docs": [ "padding2" ]; "type": { "array": [ "u8", 32 ]; }; }, { "name": "preActivationSwapAddress"; "docs": [ "Address allowed to swap when the current point is greater than or equal to the pre-activation point. The pre-activation point is calculated as `activation_point - pre_activation_duration`." ]; "type": "pubkey"; }, { "name": "baseKey"; "docs": [ "Base keypair. Only required for permission pair" ]; "type": "pubkey"; }, { "name": "activationPoint"; "docs": [ "Time point to enable the pair. Only applicable for permission pair." ]; "type": "u64"; }, { "name": "preActivationDuration"; "docs": [ "Duration before activation activation_point. Used to calculate pre-activation time point for pre_activation_swap_address" ]; "type": "u64"; }, { "name": "padding3"; "docs": [ "_padding 3" ]; "type": { "array": [ "u8", 8 ]; }; }, { "name": "padding4"; "docs": [ "padding4" ]; "type": "u64"; }, { "name": "creator"; "docs": [ "Pool creator" ]; "type": "pubkey"; }, { "name": "tokenMintXProgramFlag"; "docs": [ "tokenMintXProgramFlag" ]; "type": "u8"; }, { "name": "tokenMintYProgramFlag"; "docs": [ "tokenMintYProgramFlag" ]; "type": "u8"; }, { "name": "version"; "docs": [ "version to know whether we have reset tombstone fields" ]; "type": "u8"; }, { "name": "reserved"; "docs": [ "Reserved space for future use" ]; "type": { "array": [ "u8", 21 ]; }; } ]; }; }, { "name": "lbPairCreate"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "binStep"; "type": "u16"; }, { "name": "tokenX"; "type": "pubkey"; }, { "name": "tokenY"; "type": "pubkey"; } ]; }; }, { "name": "limitOrder"; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "docs": [ "The LB pair of this LO" ]; "type": "pubkey"; }, { "name": "owner"; "docs": [ "Owner of the LO. Client rely on this to to fetch their LOs." ]; "type": "pubkey"; }, { "name": "binCount"; "docs": [ "Bin count" ]; "type": "u16"; }, { "name": "padding0"; "docs": [ "Padding" ]; "type": { "array": [ "u8", 14 ]; }; }, { "name": "padding1"; "docs": [ "Reserved space for future use" ]; "type": { "array": [ "u64", 4 ]; }; } ]; }; }, { "name": "limitOrderBinData"; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "amount"; "type": "u64"; }, { "name": "age"; "type": "u32"; }, { "name": "padding0"; "type": { "array": [ "u8", 4 ]; }; }, { "name": "binId"; "type": "i32"; }, { "name": "isAsk"; "type": "u8"; }, { "name": "padding1"; "type": { "array": [ "u8", 11 ]; }; } ]; }; }, { "name": "liquidityOneSideParameter"; "type": { "kind": "struct"; "fields": [ { "name": "amount"; "docs": [ "Amount of X token or Y token to deposit" ]; "type": "u64"; }, { "name": "activeId"; "docs": [ "Active bin that integrator observe off-chain" ]; "type": "i32"; }, { "name": "maxActiveBinSlippage"; "docs": [ "max active bin slippage allowed" ]; "type": "i32"; }, { "name": "binLiquidityDist"; "docs": [ "Liquidity distribution to each bins" ]; "type": { "vec": { "defined": { "name": "binLiquidityDistributionByWeight"; }; }; }; } ]; }; }, { "name": "liquidityParameter"; "type": { "kind": "struct"; "fields": [ { "name": "amountX"; "docs": [ "Amount of X token to deposit" ]; "type": "u64"; }, { "name": "amountY"; "docs": [ "Amount of Y token to deposit" ]; "type": "u64"; }, { "name": "binLiquidityDist"; "docs": [ "Liquidity distribution to each bins" ]; "type": { "vec": { "defined": { "name": "binLiquidityDistribution"; }; }; }; } ]; }; }, { "name": "liquidityParameterByStrategy"; "type": { "kind": "struct"; "fields": [ { "name": "amountX"; "docs": [ "Amount of X token to deposit" ]; "type": "u64"; }, { "name": "amountY"; "docs": [ "Amount of Y token to deposit" ]; "type": "u64"; }, { "name": "activeId"; "docs": [ "Active bin that integrator observe off-chain" ]; "type": "i32"; }, { "name": "maxActiveBinSlippage"; "docs": [ "max active bin slippage allowed" ]; "type": "i32"; }, { "name": "strategyParameters"; "docs": [ "strategy parameters" ]; "type": { "defined": { "name": "strategyParameters"; }; }; } ]; }; }, { "name": "liquidityParameterByStrategyOneSide"; "type": { "kind": "struct"; "fields": [ { "name": "amount"; "docs": [ "Amount of X token or Y token to deposit" ]; "type": "u64"; }, { "name": "activeId"; "docs": [ "Active bin that integrator observe off-chain" ]; "type": "i32"; }, { "name": "maxActiveBinSlippage"; "docs": [ "max active bin slippage allowed" ]; "type": "i32"; }, { "name": "strategyParameters"; "docs": [ "strategy parameters" ]; "type": { "defined": { "name": "strategyParameters"; }; }; } ]; }; }, { "name": "liquidityParameterByWeight"; "type": { "kind": "struct"; "fields": [ { "name": "amountX"; "docs": [ "Amount of X token to deposit" ]; "type": "u64"; }, { "name": "amountY"; "docs": [ "Amount of Y token to deposit" ]; "type": "u64"; }, { "name": "activeId"; "docs": [ "Active bin that integrator observe off-chain" ]; "type": "i32"; }, { "name": "maxActiveBinSlippage"; "docs": [ "max active bin slippage allowed" ]; "type": "i32"; }, { "name": "binLiquidityDist"; "docs": [ "Liquidity distribution to each bins" ]; "type": { "vec": { "defined": { "name": "binLiquidityDistributionByWeight"; }; }; }; } ]; }; }, { "name": "operator"; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "signer"; "type": "pubkey"; }, { "name": "permission"; "type": "u128"; }, { "name": "padding"; "type": { "array": [ "u64", 2 ]; }; } ]; }; }, { "name": "oracle"; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "idx"; "docs": [ "Index of latest observation" ]; "type": "u64"; }, { "name": "activeSize"; "docs": [ "Size of active sample. Active sample is initialized observation." ]; "type": "u64"; }, { "name": "length"; "docs": [ "Number of observations" ]; "type": "u64"; } ]; }; }, { "name": "pairStatus"; "docs": [ "Pair status. 0 = Enabled, 1 = Disabled. Putting 0 as enabled for backward compatibility." ]; "repr": { "kind": "rust"; }; "type": { "kind": "enum"; "variants": [ { "name": "enabled"; }, { "name": "disabled"; } ]; }; }, { "name": "pairType"; "docs": [ "Type of the Pair. 0 = Permissionless, 1 = Permission, 2 = CustomizablePermissionless. Putting 0 as permissionless for backward compatibility." ]; "repr": { "kind": "rust"; }; "type": { "kind": "enum"; "variants": [ { "name": "permissionless"; }, { "name": "permission"; }, { "name": "customizablePermissionless"; }, { "name": "permissionlessV2"; } ]; }; }, { "name": "placeLimitOrderEvt"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "sender"; "type": "pubkey"; }, { "name": "owner"; "type": "pubkey"; }, { "name": "limitOrder"; "type": "pubkey"; }, { "name": "activeId"; "type": "i32"; }, { "name": "params"; "type": { "defined": { "name": "placeLimitOrderParams"; }; }; } ]; }; }, { "name": "placeLimitOrderParams"; "type": { "kind": "struct"; "fields": [ { "name": "isAskSide"; "type": "bool"; }, { "name": "padding"; "type": { "array": [ "u8", 16 ]; }; }, { "name": "relativeBin"; "type": { "option": { "defined": { "name": "relativeBin"; }; }; }; }, { "name": "bins"; "type": { "vec": { "defined": { "name": "binLimitOrderAmount"; }; }; }; } ]; }; }, { "name": "positionBinData"; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "liquidityShare"; "type": "u128"; }, { "name": "rewardInfo"; "type": { "defined": { "name": "userRewardInfo"; }; }; }, { "name": "feeInfo"; "type": { "defined": { "name": "feeInfo"; }; }; } ]; }; }, { "name": "positionClose"; "type": { "kind": "struct"; "fields": [ { "name": "position"; "type": "pubkey"; }, { "name": "owner"; "type": "pubkey"; } ]; }; }, { "name": "positionCreate"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "position"; "type": "pubkey"; }, { "name": "owner"; "type": "pubkey"; } ]; }; }, { "name": "positionV2"; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "docs": [ "The LB pair of this position" ]; "type": "pubkey"; }, { "name": "owner"; "docs": [ "Owner of the position. Client rely on this to to fetch their positions." ]; "type": "pubkey"; }, { "name": "liquidityShares"; "docs": [ "Liquidity shares of this position in bins (lower_bin_id <-> upper_bin_id). This is the same as LP concept." ]; "type": { "array": [ "u128", 70 ]; }; }, { "name": "rewardInfos"; "docs": [ "Farming reward information" ]; "type": { "array": [ { "defined": { "name": "userRewardInfo"; }; }, 70 ]; }; }, { "name": "feeInfos"; "docs": [ "Swap fee to claim information" ]; "type": { "array": [ { "defined": { "name": "feeInfo"; }; }, 70 ]; }; }, { "name": "lowerBinId"; "docs": [ "Lower bin ID" ]; "type": "i32"; }, { "name": "upperBinId"; "docs": [ "Upper bin ID" ]; "type": "i32"; }, { "name": "lastUpdatedAt"; "docs": [ "Last updated timestamp" ]; "type": "i64"; }, { "name": "totalClaimedFeeXAmount"; "docs": [ "Total claimed token fee X" ]; "type": "u64"; }, { "name": "totalClaimedFeeYAmount"; "docs": [ "Total claimed token fee Y" ]; "type": "u64"; }, { "name": "totalClaimedRewards"; "docs": [ "Total claimed rewards" ]; "type": { "array": [ "u64", 2 ]; }; }, { "name": "operator"; "docs": [ "Operator of position" ]; "type": "pubkey"; }, { "name": "lockReleasePoint"; "docs": [ "Time point which the locked liquidity can be withdraw" ]; "type": "u64"; }, { "name": "padding0"; "docs": [ "_padding_0, previous subjected_to_bootstrap_liquidity_locking, BE CAREFUL FOR TOMBSTONE WHEN REUSE !!" ]; "type": "u8"; }, { "name": "feeOwner"; "docs": [ "Address is able to claim fee in this position, only valid for bootstrap_liquidity_position" ]; "type": "pubkey"; }, { "name": "version"; "docs": [ "version to know whether we have reset tombstone fields" ]; "type": "u8"; }, { "name": "permissionlessOperationBits"; "type": "u8"; }, { "name": "reserved"; "docs": [ "Reserved space for future use" ]; "type": { "array": [ "u8", 85 ]; }; } ]; }; }, { "name": "presetParameter"; "type": { "kind": "struct"; "fields": [ { "name": "binStep"; "docs": [ "Bin step. Represent the price increment / decrement." ]; "type": "u16"; }, { "name": "baseFactor"; "docs": [ "Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor" ]; "type": "u16"; }, { "name": "filterPeriod"; "docs": [ "Filter period determine high frequency trading time window." ]; "type": "u16"; }, { "name": "decayPeriod"; "docs": [ "Decay period determine when the volatile fee start decay / decrease." ]; "type": "u16"; }, { "name": "reductionFactor"; "docs": [ "Reduction factor controls the volatile fee rate decrement rate." ]; "type": "u16"; }, { "name": "variableFeeControl"; "docs": [ "Used to scale the variable fee component depending on the dynamic of the market" ]; "type": "u32"; }, { "name": "maxVolatilityAccumulator"; "docs": [ "Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate." ]; "type": "u32"; }, { "name": "minBinId"; "docs": [ "Min bin id supported by the pool based on the configured bin step." ]; "type": "i32"; }, { "name": "maxBinId"; "docs": [ "Max bin id supported by the pool based on the configured bin step." ]; "type": "i32"; }, { "name": "protocolShare"; "docs": [ "Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee" ]; "type": "u16"; } ]; }; }, { "name": "presetParameter2"; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "binStep"; "docs": [ "Bin step. Represent the price increment / decrement." ]; "type": "u16"; }, { "name": "baseFactor"; "docs": [ "Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor" ]; "type": "u16"; }, { "name": "filterPeriod"; "docs": [ "Filter period determine high frequency trading time window." ]; "type": "u16"; }, { "name": "decayPeriod"; "docs": [ "Decay period determine when the volatile fee start decay / decrease." ]; "type": "u16"; }, { "name": "variableFeeControl"; "docs": [ "Used to scale the variable fee component depending on the dynamic of the market" ]; "type": "u32"; }, { "name": "maxVolatilityAccumulator"; "docs": [ "Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate." ]; "type": "u32"; }, { "name": "reductionFactor"; "docs": [ "Reduction factor controls the volatile fee rate decrement rate." ]; "type": "u16"; }, { "name": "protocolShare"; "docs": [ "Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee" ]; "type": "u16"; }, { "name": "index"; "docs": [ "index" ]; "type": "u16"; }, { "name": "baseFeePowerFactor"; "docs": [ "Base fee power factor" ]; "type": "u8"; }, { "name": "concreteFunctionType"; "docs": [ "function type, to check whether the pool should have LM farming or other functions in the future, refer ConcreteFunctionType" ]; "type": "u8"; }, { "name": "collectFeeMode"; "docs": [ "collect fee mode" ]; "type": "u8"; }, { "name": "padding0"; "type": { "array": [ "u8", 7 ]; }; }, { "name": "padding1"; "docs": [ "Padding 1 for future use" ]; "type": { "array": [ "u64", 19 ]; }; } ]; }; }, { "name": "protocolFee"; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "amountX"; "type": "u64"; }, { "name": "amountY"; "type": "u64"; } ]; }; }, { "name": "rebalanceLiquidityParams"; "type": { "kind": "struct"; "fields": [ { "name": "activeId"; "docs": [ "active id" ]; "type": "i32"; }, { "name": "maxActiveBinSlippage"; "docs": [ "max active bin slippage allowed" ]; "type": "u16"; }, { "name": "shouldClaimFee"; "docs": [ "a flag to indicate that whether fee should be harvested" ]; "type": "bool"; }, { "name": "shouldClaimReward"; "docs": [ "a flag to indicate that whether rewards should be harvested" ]; "type": "bool"; }, { "name": "minWithdrawXAmount"; "docs": [ "threshold for withdraw token x" ]; "type": "u64"; }, { "name": "maxDepositXAmount"; "docs": [ "threshold for deposit token x" ]; "type": "u64"; }, { "name": "minWithdrawYAmount"; "docs": [ "threshold for withdraw token y" ]; "type": "u64"; }, { "name": "maxDepositYAmount"; "docs": [ "threshold for deposit token y" ]; "type": "u64"; }, { "name": "shrinkMode"; "docs": [ "shrink mode" ]; "type": "u8"; }, { "name": "padding"; "docs": [ "padding 32 bytes for future usage" ]; "type": { "array": [ "u8", 31 ]; }; }, { "name": "removes"; "docs": [ "removes" ]; "type": { "vec": { "defined": { "name": "removeLiquidityParams"; }; }; }; }, { "name": "adds"; "docs": [ "adds" ]; "type": { "vec": { "defined": { "name": "addLiquidityParams"; }; }; }; } ]; }; }, { "name": "rebalancing"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "position"; "type": "pubkey"; }, { "name": "owner"; "type": "pubkey"; }, { "name": "activeBinId"; "type": "i32"; }, { "name": "xWithdrawnAmount"; "type": "u64"; }, { "name": "xAddedAmount"; "type": "u64"; }, { "name": "yWithdrawnAmount"; "type": "u64"; }, { "name": "yAddedAmount"; "type": "u64"; }, { "name": "xFeeAmount"; "type": "u64"; }, { "name": "yFeeAmount"; "type": "u64"; }, { "name": "oldMinId"; "type": "i32"; }, { "name": "oldMaxId"; "type": "i32"; }, { "name": "newMinId"; "type": "i32"; }, { "name": "newMaxId"; "type": "i32"; }, { "name": "rewards"; "type": { "array": [ "u64", 2 ]; }; } ]; }; }, { "name": "relativeBin"; "type": { "kind": "struct"; "fields": [ { "name": "activeId"; "docs": [ "Active bin that integrator observe off-chain" ]; "type": "i32"; }, { "name": "maxActiveBinSlippage"; "docs": [ "max active bin slippage allowed" ]; "type": "i32"; } ]; }; }, { "name": "remainingAccountsInfo"; "type": { "kind": "struct"; "fields": [ { "name": "slices"; "type": { "vec": { "defined": { "name": "remainingAccountsSlice"; }; }; }; } ]; }; }, { "name": "remainingAccountsSlice"; "type": { "kind": "struct"; "fields": [ { "name": "accountsType"; "type": { "defined": { "name": "accountsType"; }; }; }, { "name": "length"; "type": "u8"; } ]; }; }, { "name": "removeLiquidity"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "from"; "type": "pubkey"; }, { "name": "position"; "type": "pubkey"; }, { "name": "amounts"; "type": { "array": [ "u64", 2 ]; }; }, { "name": "activeBinId"; "type": "i32"; } ]; }; }, { "name": "removeLiquidityParams"; "type": { "kind": "struct"; "fields": [ { "name": "minBinId"; "type": { "option": "i32"; }; }, { "name": "maxBinId"; "type": { "option": "i32"; }; }, { "name": "bps"; "type": "u16"; }, { "name": "padding"; "type": { "array": [ "u8", 16 ]; }; } ]; }; }, { "name": "resizeSide"; "docs": [ "Side of resize, 0 for lower and 1 for upper" ]; "repr": { "kind": "rust"; }; "type": { "kind": "enum"; "variants": [ { "name": "lower"; }, { "name": "upper"; } ]; }; }, { "name": "rewardInfo"; "docs": [ "Stores the state relevant for tracking liquidity mining rewards" ]; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "mint"; "docs": [ "Reward token mint." ]; "type": "pubkey"; }, { "name": "vault"; "docs": [ "Reward vault token account." ]; "type": "pubkey"; }, { "name": "funder"; "docs": [ "Authority account that allows to fund rewards" ]; "type": "pubkey"; }, { "name": "rewardDuration"; "docs": [ "LM reward duration in seconds." ]; "type": "u64"; }, { "name": "rewardDurationEnd"; "docs": [ "LM reward duration end time." ]; "type": "u64"; }, { "name": "rewardRate"; "docs": [ "LM reward rate" ]; "type": "u128"; }, { "name": "lastUpdateTime"; "docs": [ "The last time reward states were updated." ]; "type": "u64"; }, { "name": "cumulativeSecondsWithEmptyLiquidityReward"; "docs": [ "Accumulated seconds where when farm distribute rewards, but the bin is empty. The reward will be accumulated for next reward time window." ]; "type": "u64"; } ]; }; }, { "name": "rounding"; "type": { "kind": "enum"; "variants": [ { "name": "up"; }, { "name": "down"; } ]; }; }, { "name": "setPositionPermissionlessOperationBitsEvt"; "type": { "kind": "struct"; "fields": [ { "name": "position"; "type": "pubkey"; }, { "name": "owner"; "type": "pubkey"; }, { "name": "oldBits"; "type": "u8"; }, { "name": "newBits"; "type": "u8"; } ]; }; }, { "name": "staticParameters"; "docs": [ "Parameter that set by the protocol" ]; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "baseFactor"; "docs": [ "Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor" ]; "type": "u16"; }, { "name": "filterPeriod"; "docs": [ "Filter period determine high frequency trading time window." ]; "type": "u16"; }, { "name": "decayPeriod"; "docs": [ "Decay period determine when the volatile fee start decay / decrease." ]; "type": "u16"; }, { "name": "reductionFactor"; "docs": [ "Reduction factor controls the volatile fee rate decrement rate." ]; "type": "u16"; }, { "name": "variableFeeControl"; "docs": [ "Used to scale the variable fee component depending on the dynamic of the market" ]; "type": "u32"; }, { "name": "maxVolatilityAccumulator"; "docs": [ "Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate." ]; "type": "u32"; }, { "name": "minBinId"; "docs": [ "Min bin id supported by the pool based on the configured bin step." ]; "type": "i32"; }, { "name": "maxBinId"; "docs": [ "Max bin id supported by the pool based on the configured bin step." ]; "type": "i32"; }, { "name": "protocolShare"; "docs": [ "Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee" ]; "type": "u16"; }, { "name": "baseFeePowerFactor"; "docs": [ "Base fee power factor" ]; "type": "u8"; }, { "name": "functionType"; "docs": [ "function type" ]; "type": "u8"; }, { "name": "collectFeeMode"; "docs": [ "Collect fee mode" ]; "type": "u8"; }, { "name": "padding"; "docs": [ "Padding for bytemuck safe alignment" ]; "type": { "array": [ "u8", 3 ]; }; } ]; }; }, { "name": "strategyParameters"; "type": { "kind": "struct"; "fields": [ { "name": "minBinId"; "docs": [ "min bin id" ]; "type": "i32"; }, { "name": "maxBinId"; "docs": [ "max bin id" ]; "type": "i32"; }, { "name": "strategyType"; "docs": [ "strategy type" ]; "type": { "defined": { "name": "strategyType"; }; }; }, { "name": "parameteres"; "docs": [ "parameters" ]; "type": { "array": [ "u8", 64 ]; }; } ]; }; }, { "name": "strategyType"; "type": { "kind": "enum"; "variants": [ { "name": "spotOneSide"; }, { "name": "curveOneSide"; }, { "name": "bidAskOneSide"; }, { "name": "spotBalanced"; }, { "name": "curveBalanced"; }, { "name": "bidAskBalanced"; }, { "name": "spotImBalanced"; }, { "name": "curveImBalanced"; }, { "name": "bidAskImBalanced"; } ]; }; }, { "name": "swap"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "from"; "type": "pubkey"; }, { "name": "startBinId"; "type": "i32"; }, { "name": "endBinId"; "type": "i32"; }, { "name": "amountIn"; "type": "u64"; }, { "name": "amountOut"; "type": "u64"; }, { "name": "swapForY"; "type": "bool"; }, { "name": "fee"; "type": "u64"; }, { "name": "protocolFee"; "type": "u64"; }, { "name": "feeBps"; "type": "u128"; }, { "name": "hostFee"; "type": "u64"; } ]; }; }, { "name": "swap2Evt"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "from"; "type": "pubkey"; }, { "name": "startBinId"; "type": "i32"; }, { "name": "endBinId"; "type": "i32"; }, { "name": "swapForY"; "type": "bool"; }, { "name": "feeBps"; "type": "u128"; }, { "name": "amountIn"; "docs": [ "Total amount, user transfer out" ]; "type": "u64"; }, { "name": "amountLeft"; "docs": [ "Leftover amount" ]; "type": "u64"; }, { "name": "amountOut"; "docs": [ "Total amount transfer to user, including transfer fee" ]; "type": "u64"; }, { "name": "mmFee"; "docs": [ "Market maker fee" ]; "type": "u64"; }, { "name": "protocolFee"; "docs": [ "Total protocol fee" ]; "type": "u64"; }, { "name": "limitOrderFee"; "docs": [ "Total limit order fee" ]; "type": "u64"; }, { "name": "hostFee"; "docs": [ "Total host fee" ]; "type": "u64"; }, { "name": "feesOnInput"; "docs": [ "check if fees on input" ]; "type": "bool"; }, { "name": "feesOnTokenX"; "docs": [ "check if fees is on token x" ]; "type": "bool"; } ]; }; }, { "name": "tokenBadge"; "docs": [ "Parameter that set by the protocol" ]; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "tokenMint"; "docs": [ "token mint" ]; "type": "pubkey"; }, { "name": "padding"; "docs": [ "Reserve" ]; "type": { "array": [ "u8", 128 ]; }; } ]; }; }, { "name": "tokenProgramFlags"; "repr": { "kind": "rust"; }; "type": { "kind": "enum"; "variants": [ { "name": "tokenProgram"; }, { "name": "tokenProgram2022"; } ]; }; }, { "name": "updatePositionLockReleasePoint"; "type": { "kind": "struct"; "fields": [ { "name": "position"; "type": "pubkey"; }, { "name": "currentPoint"; "type": "u64"; }, { "name": "newLockReleasePoint"; "type": "u64"; }, { "name": "oldLockReleasePoint"; "type": "u64"; }, { "name": "sender"; "type": "pubkey"; } ]; }; }, { "name": "updatePositionOperator"; "type": { "kind": "struct"; "fields": [ { "name": "position"; "type": "pubkey"; }, { "name": "oldOperator"; "type": "pubkey"; }, { "name": "newOperator"; "type": "pubkey"; } ]; }; }, { "name": "updateRewardDuration"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "rewardIndex"; "type": "u64"; }, { "name": "oldRewardDuration"; "type": "u64"; }, { "name": "newRewardDuration"; "type": "u64"; } ]; }; }, { "name": "updateRewardFunder"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "rewardIndex"; "type": "u64"; }, { "name": "oldFunder"; "type": "pubkey"; }, { "name": "newFunder"; "type": "pubkey"; } ]; }; }, { "name": "userRewardInfo"; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "rewardPerTokenCompletes"; "type": { "array": [ "u128", 2 ]; }; }, { "name": "rewardPendings"; "type": { "array": [ "u64", 2 ]; }; } ]; }; }, { "name": "variableParameters"; "docs": [ "Parameters that changes based on dynamic of the market" ]; "serialization": "bytemuck"; "repr": { "kind": "c"; }; "type": { "kind": "struct"; "fields": [ { "name": "volatilityAccumulator"; "docs": [ "Volatility accumulator measure the number of bin crossed since reference bin ID. Normally (without filter period taken into consideration), reference bin ID is the active bin of last swap.", "It affects the variable fee rate" ]; "type": "u32"; }, { "name": "volatilityReference"; "docs": [ "Volatility reference is decayed volatility accumulator. It is always <= volatility_accumulator" ]; "type": "u32"; }, { "name": "indexReference"; "docs": [ "Active bin id of last swap." ]; "type": "i32"; }, { "name": "padding"; "docs": [ "Padding for bytemuck safe alignment" ]; "type": { "array": [ "u8", 4 ]; }; }, { "name": "lastUpdateTimestamp"; "docs": [ "Last timestamp the variable parameters was updated" ]; "type": "i64"; }, { "name": "padding1"; "docs": [ "Padding for bytemuck safe alignment" ]; "type": { "array": [ "u8", 8 ]; }; } ]; }; }, { "name": "withdrawIneligibleReward"; "type": { "kind": "struct"; "fields": [ { "name": "lbPair"; "type": "pubkey"; }, { "name": "rewardMint"; "type": "pubkey"; }, { "name": "amount"; "type": "u64"; } ]; }; } ]; "constants": [ { "name": "basisPointMax"; "type": "u16"; "value": "10000"; }, { "name": "binArray"; "type": "bytes"; "value": "[98, 105, 110, 95, 97, 114, 114, 97, 121]"; }, { "name": "binArrayBitmapSeed"; "type": "bytes"; "value": "[98, 105, 116, 109, 97, 112]"; }, { "name": "binArrayBitmapSize"; "type": "i32"; "value": "512"; }, { "name": "claimProtocolFeeOperator"; "type": "bytes"; "value": "[99, 102, 95, 111, 112, 101, 114, 97, 116, 111, 114]"; }, { "name": "defaultBinPerPosition"; "type": "u64"; "value": "70"; }, { "name": "extensionBinarrayBitmapSize"; "type": "u64"; "value": "12"; }, { "name": "feeDenominator"; "type": "u64"; "value": "1000000000"; }, { "name": "hostFeeBps"; "docs": [ "Host fee. 20%" ]; "type": "u16"; "value": "2000"; }, { "name": "ilmProtocolShare"; "type": "u16"; "value": "2000"; }, { "name": "limitOrderFeeShare"; "type": "u16"; "value": "5000"; }, { "name": "maxBaseFee"; "docs": [ "Maximum base fee, base_fee / 10^9 = fee_in_percentage" ]; "type": "u128"; "value": "100000000"; }, { "name": "maxBinIdPerBinStep"; "docs": [ "Maximum bin ID per bin step. Computed based on 1 bps. Used for bin id bound estimation." ]; "type": "i32"; "value": "351639"; }, { "name": "maxBinPerArray"; "type": "u64"; "value": "70"; }, { "name": "maxBinPerLimitOrder"; "type": "u64"; "value": "50"; }, { "name": "maxBinStep"; "docs": [ "Maximum bin step" ]; "type": "u16"; "value": "400"; }, { "name": "maxFeeRate"; "docs": [ "Maximum fee rate. 10%" ]; "type": "u64"; "value": "100000000"; }, { "name": "maxProtocolShare"; "docs": [ "Maximum protocol share of the fee. 25%" ]; "type": "u16"; "value": "2500"; }, { "name": "maxResizeLength"; "type": "u64"; "value": "91"; }, { "name": "maxRewardBinSplit"; "type": "u64"; "value": "15"; }, { "name": "maxRewardDuration"; "type": "u64"; "value": "31536000"; }, { "name": "minimumLiquidity"; "type": "u128"; "value": "1000000"; }, { "name": "minBaseFee"; "docs": [ "Minimum base fee" ]; "type": "u128"; "value": "100000"; }, { "name": "minRewardDuration"; "type": "u64"; "value": "1"; }, { "name": "numRewards"; "type": "u64"; "value": "2"; }, { "name": "operatorPrefix"; "type": "bytes"; "value": "[111, 112, 101, 114, 97, 116, 111, 114]"; }, { "name": "oracle"; "type": "bytes"; "value": "[111, 114, 97, 99, 108, 101]"; }, { "name": "position"; "type": "bytes"; "value": "[112, 111, 115, 105, 116, 105, 111, 110]"; }, { "name": "positionMaxLength"; "type": "u64"; "value": "1400"; }, { "name": "presetParameter"; "type": "bytes"; "value": "[112, 114, 101, 115, 101, 116, 95, 112, 97, 114, 97, 109, 101, 116, 101, 114]"; }, { "name": "presetParameter2"; "type": "bytes"; "value": "[112, 114, 101, 115, 101, 116, 95, 112, 97, 114, 97, 109, 101, 116, 101, 114, 50]"; }, { "name": "protocolShare"; "type": "u16"; "value": "500"; } ]; }; declare function buildBitFlagAndNegateStrategyParameters(x0: BN$1, y0: BN$1, deltaX: BN$1, deltaY: BN$1): { bitFlag: number; x0: BN$1; y0: BN$1; deltaX: BN$1; deltaY: BN$1; }; interface AmountIntoBin { binId: BN$1; amountX: BN$1; amountY: BN$1; } declare function getAmountInBinsBidSide(activeId: BN$1, minDeltaId: BN$1, maxDeltaId: BN$1, deltaY: BN$1, y0: BN$1): AmountIntoBin[]; declare function getAmountInBinsAskSide(activeId: BN$1, binStep: BN$1, minDeltaId: BN$1, maxDeltaId: BN$1, deltaX: BN$1, x0: BN$1): AmountIntoBin[]; declare function toAmountIntoBins(activeId: BN$1, minDeltaId: BN$1, maxDeltaId: BN$1, deltaX: BN$1, deltaY: BN$1, x0: BN$1, y0: BN$1, binStep: BN$1, favorXInActiveBin: boolean): AmountIntoBin[]; interface SimulateWithdrawResult { liquidityAndFeeXWithdrawn: BN$1; liquidityAndFeeYWithdrawn: BN$1; rewardsAmountClaimed: BN$1[]; } interface SimulateDepositResult { totalAmountXDeposited: BN$1; totalAmountYDeposited: BN$1; actualTotalAmountXDeposited: BN$1; actualTotalAmountYDeposited: BN$1; actualLiquidityAndFeeXWithdrawn: BN$1; actualLiquidityAndFeeYWithdrawn: BN$1; } interface CreateRebalancePositionParams { program: Program; pairAddress: PublicKey; positionAddress: PublicKey; positionData: PositionData; shouldClaimFee: boolean; shouldClaimReward: boolean; } declare class RebalancePosition { address: PublicKey; lowerBinId: BN$1; upperBinId: BN$1; lbPair: LbPair; owner: PublicKey; shouldClaimFee: boolean; shouldClaimReward: boolean; rebalancePositionBinData: RebalancePositionBinData[]; activeBin: Bin | null; currentTimestamp: BN$1; constructor(positionAddress: PublicKey, positionData: PositionData, lbPair: LbPair, activeBin: Bin | null, shouldClaimFee: boolean, shouldClaimReward: boolean, currentTimestamp: BN$1); static create(params: CreateRebalancePositionParams): Promise; _simulateDeposit(binStep: BN$1, tokenXDecimal: BN$1, tokenYDecimal: BN$1, deposits: RebalanceWithDeposit[], simulatedWithdrawResult: SimulateWithdrawResult): { result: SimulateDepositResult; depositParams: RebalanceAddLiquidityParam[]; }; _simulateResize(depositMinBinId: BN$1, depositMaxBinId: BN$1, binStep: BN$1, tokenXDecimal: BN$1, tokenYDecimal: BN$1): void; _simulateWithdraw(withdraws: RebalanceWithWithdraw[]): { result: SimulateWithdrawResult; withdrawParams: RebalanceRemoveLiquidityParam[]; }; simulateRebalance(connection: Connection, binStep: BN$1, tokenXDecimal: BN$1, tokenYDecimal: BN$1, withdraws: RebalanceWithWithdraw[], deposits: RebalanceWithDeposit[]): Promise; totalAmounts(): BN$1[]; totalFeeAmounts(): BN$1[]; totalRewardAmounts(): BN$1[]; } interface RebalancePositionBinData { binId: number; price: string; pricePerToken: string; amountX: BN$1; amountY: BN$1; claimableRewardAmount: BN$1[]; claimableFeeXAmount: BN$1; claimableFeeYAmount: BN$1; } interface RebalanceWithDeposit { minDeltaId: BN$1; maxDeltaId: BN$1; x0: BN$1; y0: BN$1; deltaX: BN$1; deltaY: BN$1; favorXInActiveBin: boolean; } interface RebalanceWithWithdraw { minBinId: BN$1 | null; maxBinId: BN$1 | null; bps: BN$1; } interface SimulateRebalanceResp { amountXDeposited: BN$1; amountYDeposited: BN$1; actualAmountXDeposited: BN$1; actualAmountYDeposited: BN$1; actualAmountXWithdrawn: BN$1; actualAmountYWithdrawn: BN$1; rewardAmountsClaimed: BN$1[]; depositParams: RebalanceAddLiquidityParam[]; withdrawParams: RebalanceRemoveLiquidityParam[]; rentalCostLamports: BN$1; } declare function getRebalanceBinArrayIndexesAndBitmapCoverage(adds: RebalanceAddLiquidityParam[], removes: RebalanceRemoveLiquidityParam[], activeId: number, pairAddress: PublicKey, programId: PublicKey): { binArrayIndexes: BN$1[]; binArrayBitmap: PublicKey; }; interface LiquidityStrategyParameters { x0: BN$1; y0: BN$1; deltaX: BN$1; deltaY: BN$1; } interface BidAskParameters { base: BN$1; delta: BN$1; } interface LiquidityStrategyParameterBuilder { findXParameters(amountX: BN$1, minDeltaId: BN$1, maxDeltaId: BN$1, binStep: BN$1, activeId: BN$1): BidAskParameters; findYParameters(amountY: BN$1, minDeltaId: BN$1, maxDeltaId: BN$1, activeId: BN$1): BidAskParameters; suggestBalancedXParametersFromY(activeId: BN$1, binStep: BN$1, favorXInActiveBin: boolean, minDeltaId: BN$1, maxDeltaId: BN$1, amountY: BN$1): BidAskParameters & { amountX: BN$1; }; suggestBalancedYParametersFromX(activeId: BN$1, binStep: BN$1, favorXInActiveBin: boolean, minDeltaId: BN$1, maxDeltaId: BN$1, amountXInQuoteValue: BN$1): BidAskParameters & { amountY: BN$1; }; } declare function getLiquidityStrategyParameterBuilder(strategyType: StrategyType): LiquidityStrategyParameterBuilder; declare function suggestBalancedXParametersFromY(y0: BN$1, deltaY: BN$1, minDeltaId: BN$1, maxDeltaId: BN$1, activeId: BN$1, binStep: BN$1, favorXInActiveBin: boolean, builder: LiquidityStrategyParameterBuilder): BidAskParameters & { amountX: BN$1; }; declare function getAutoFillAmountByRebalancedPosition(rebalancePosition: RebalancePosition, strategyType: StrategyType): { amount: BN$1; isBidSide: boolean; }; declare function suggestBalancedYParametersFromX(x0: BN$1, deltaX: BN$1, minDeltaId: BN$1, maxDeltaId: BN$1, activeId: BN$1, binStep: BN$1, favorXInActiveBin: boolean, builder: LiquidityStrategyParameterBuilder): BidAskParameters & { amountY: BN$1; }; declare function buildLiquidityStrategyParameters(amountX: BN$1, amountY: BN$1, minDeltaId: BN$1, maxDeltaId: BN$1, binStep: BN$1, favorXInActiveId: boolean, activeId: BN$1, strategyParameterBuilder: LiquidityStrategyParameterBuilder): LiquidityStrategyParameters; interface ParsedLimitOrderBinData { binId: number; empty: boolean; depositAmountX: string; depositAmountY: string; unfilledAmountX: string; unfilledAmountY: string; swappedAmountX: string; swappedAmountY: string; isAskSide: boolean; filledAmountX: string; filledAmountY: string; feeAmountX: string; feeAmountY: string; status: LimitOrderStatus; } interface ParsedLimitOrder { totalDepositAmountX: string; totalDepositAmountY: string; limitOrderBinData: ParsedLimitOrderBinData[]; totalUnfilledAmountX: string; totalUnfilledAmountY: string; totalFilledAmountX: string; totalFilledAmountY: string; totalSwappedAmountX: string; totalSwappedAmountY: string; totalFeeAmountX: string; totalFeeAmountY: string; transferFeeExcludedWithdrawableAmountX: string; transferFeeExcludedWithdrawableAmountY: string; } interface BinAndAmount { binId: number; xAmountBpsOfTotal: BN; yAmountBpsOfTotal: BN; } interface TokenReserve { publicKey: PublicKey; reserve: PublicKey; mint: Mint; amount: bigint; owner: PublicKey; transferHookAccountMetas: AccountMeta[]; } type ClmmProgram = Program; type LbPair = IdlAccounts["lbPair"]; type LbPairAccount = ProgramAccount["lbPair"]>; type AccountName = keyof AllAccountsMap; type Bin = IdlTypes["bin"]; type BinArray = IdlAccounts["binArray"]; type BinArrayAccount = ProgramAccount["binArray"]>; type PositionV2 = IdlAccounts["positionV2"]; type LimitOrder = IdlAccounts["limitOrder"]; type PresetParameter = IdlAccounts["presetParameter"]; type PresetParameter2 = IdlAccounts["presetParameter2"]; type vParameters = IdlAccounts["lbPair"]["vParameters"]; type sParameters = IdlAccounts["lbPair"]["parameters"]; type RewardInfos = IdlAccounts["lbPair"]["rewardInfos"]; type RewardInfo = IdlTypes["rewardInfo"]; type UserRewardInfo = IdlTypes["userRewardInfo"]; type UserFeeInfo = IdlTypes["feeInfo"]; type RebalanceAddLiquidityParam = IdlTypes["addLiquidityParams"]; type RebalanceRemoveLiquidityParam = IdlTypes["removeLiquidityParams"]; type InitPermissionPairIx = IdlTypes["initPermissionPairIx"]; type InitCustomizablePermissionlessPairIx = IdlTypes["customizableParams"]; type BinLiquidityDistribution = IdlTypes["binLiquidityDistribution"]; type BinLiquidityReduction = IdlTypes["binLiquidityReduction"]; type BinArrayBitmapExtensionAccount = ProgramAccount["binArrayBitmapExtension"]>; type BinArrayBitmapExtension = IdlAccounts["binArrayBitmapExtension"]; type LiquidityParameterByWeight = IdlTypes["liquidityParameterByWeight"]; type LiquidityOneSideParameter = IdlTypes["liquidityOneSideParameter"]; type LiquidityParameterByStrategy = IdlTypes["liquidityParameterByStrategy"]; type LiquidityParameterByStrategyOneSide = IdlTypes["liquidityParameterByStrategyOneSide"]; type LiquidityParameter = IdlTypes["liquidityParameter"]; type ProgramStrategyParameter = IdlTypes["strategyParameters"]; type ProgramStrategyType = IdlTypes["strategyType"]; type RemainingAccountInfo = IdlTypes["remainingAccountsInfo"]; type RemainingAccountsInfoSlice = IdlTypes["remainingAccountsSlice"]; type CompressedBinDepositAmount = IdlTypes["compressedBinDepositAmount"]; type CompressedBinDepositAmounts = CompressedBinDepositAmount[]; type ResizeSideEnum = IdlTypes["resizeSide"]; type ExtendedPositionBinData = IdlTypes["positionBinData"]; type LimitOrderBinData = IdlTypes["limitOrderBinData"]; type PlaceLimitOrderParams = IdlTypes["placeLimitOrderParams"]; interface ParsedLimitOrderWithPubkey { publicKey: PublicKey; limitOrderData: ParsedLimitOrder; } type Oracle = IdlTypes["oracle"]; interface LbPosition { publicKey: PublicKey; positionData: PositionData; version: PositionVersion; } interface PositionInfo { publicKey: PublicKey; lbPair: LbPair; tokenX: TokenReserve; tokenY: TokenReserve; lbPairPositionsData: Array; } interface FeeInfo { baseFeeRatePercentage: Decimal; maxFeeRatePercentage: Decimal; protocolFeePercentage: Decimal; } interface FeeInfo { baseFeeRatePercentage: Decimal; maxFeeRatePercentage: Decimal; protocolFeePercentage: Decimal; } interface EmissionRate { rewardOne: Decimal | undefined; rewardTwo: Decimal | undefined; } interface SwapFee { feeX: BN; feeY: BN; } interface LMRewards { rewardOne: BN; rewardTwo: BN; } declare enum PositionVersion { V1 = 0, V2 = 1 } declare enum PairType { Permissionless = 0, Permissioned = 1, CustomizablePermissionless = 2, PermissionlessV2 = 3 } declare enum ShrinkMode { ShrinkBoth = 0, NoShrinkLeft = 1, NoShrinkRight = 2, NoShrinkBoth = 3 } declare const Strategy: { SpotBalanced: { spotBalanced: {}; }; CurveBalanced: { curveBalanced: {}; }; BidAskBalanced: { bidAskBalanced: {}; }; SpotImBalanced: { spotImBalanced: {}; }; CurveImBalanced: { curveImBalanced: {}; }; BidAskImBalanced: { bidAskImBalanced: {}; }; }; declare enum StrategyType { Spot = 0, Curve = 1, BidAsk = 2 } declare enum ActivationType { Slot = 0, Timestamp = 1 } declare const POSITION_MIN_SIZE = 8112; declare const POSITION_BIN_DATA_SIZE = 112; declare const LIMIT_ORDER_MIN_SIZE = 112; declare const LIMIT_ORDER_BIN_DATA_SIZE = 32; interface StrategyParameters { maxBinId: number; minBinId: number; strategyType: StrategyType; singleSidedX?: boolean; } interface TQuoteCreatePositionParams { strategy: StrategyParameters; } interface TInitializePositionAndAddLiquidityParams { positionPubKey: PublicKey; totalXAmount: BN; totalYAmount: BN; xYAmountDistribution: BinAndAmount[]; user: PublicKey; slippage?: number; } interface TInitializePositionAndAddLiquidityParamsByStrategy { positionPubKey: PublicKey; totalXAmount: BN; totalYAmount: BN; strategy: StrategyParameters; user: PublicKey; slippage?: number; } interface InitializeMultiplePositionAndAddLiquidityByStrategyResponse { instructionsByPositions: { positionKeypair: Keypair; initializePositionIx: TransactionInstruction; initializeAtaIxs: TransactionInstruction[]; addLiquidityIxs: TransactionInstruction[][]; }[]; } interface InitializeMultiplePositionAndAddLiquidityByStrategyResponse2 { instructionsByPositions: { positionKeypair: Keypair; transactionInstructions: TransactionInstruction[][]; }[]; lookupTableAddress?: PublicKey; } interface TInitializeMultiplePositionAndAddLiquidityParamsByStrategy { totalXAmount: BN; totalYAmount: BN; strategy: StrategyParameters; user: PublicKey; slippage?: number; customKeyPairGenerator?: () => Promise; } interface BinLiquidity { binId: number; xAmount: BN; yAmount: BN; supply: BN; version: number; price: string; pricePerToken: string; feeAmountXPerTokenStored: BN; feeAmountYPerTokenStored: BN; /** * These fields only applicable to limit order based pool */ fulfilledOrderAmountX: BN; fulfilledOrderAmountY: BN; limitOrderFeeAskSide: BN; limitOrderFeeBidSide: BN; openOrderAmount: BN; totalProcessingOrderAmount: BN; processedOrderRemainingAmount: BN; orderAge: number; limitOrderAskSide: boolean; /** * These fields only applicable to liquidity mining based pool */ rewardPerTokenStored: BN[]; } declare namespace BinLiquidity { function fromBin(bin: Bin, binId: number, binStep: number, baseTokenDecimal: number, quoteTokenDecimal: number, version: number, lbPair: LbPair): BinLiquidity; function empty(binId: number, binStep: number, baseTokenDecimal: number, quoteTokenDecimal: number, version: number): BinLiquidity; } interface SwapQuote { consumedInAmount: BN; outAmount: BN; fee: BN; protocolFee: BN; minOutAmount: BN; priceImpact: Decimal; binArraysPubkey: any[]; endPrice: Decimal; feeOnInput: boolean; } interface SwapQuoteExactOut { inAmount: BN; outAmount: BN; fee: BN; priceImpact: Decimal; protocolFee: BN; maxInAmount: BN; binArraysPubkey: any[]; } interface IAccountsCache { binArrays: Map; lbPair: LbPair; } interface PositionBinData { binId: number; price: string; pricePerToken: string; binXAmount: string; binYAmount: string; binLiquidity: string; positionLiquidity: string; positionXAmount: string; positionYAmount: string; positionFeeXAmount: string; positionFeeYAmount: string; positionRewardAmount: string[]; } interface PositionData { totalXAmount: string; totalYAmount: string; positionBinData: PositionBinData[]; lastUpdatedAt: BN; upperBinId: number; lowerBinId: number; feeX: BN; feeY: BN; rewardOne: BN; rewardTwo: BN; feeOwner: PublicKey; totalClaimedFeeXAmount: BN; totalClaimedFeeYAmount: BN; feeXExcludeTransferFee: BN; feeYExcludeTransferFee: BN; rewardOneExcludeTransferFee: BN; rewardTwoExcludeTransferFee: BN; totalXAmountExcludeTransferFee: BN; totalYAmountExcludeTransferFee: BN; owner: PublicKey; } interface SwapWithPriceImpactParams { /** * mint of in token */ inToken: PublicKey; /** * mint of out token */ outToken: PublicKey; /** * in token amount */ inAmount: BN; /** * price impact in bps */ priceImpact: BN; /** * desired lbPair to swap against */ lbPair: PublicKey; /** * user */ user: PublicKey; binArraysPubkey: PublicKey[]; } interface SwapParams { /** * mint of in token */ inToken: PublicKey; /** * mint of out token */ outToken: PublicKey; /** * in token amount */ inAmount: BN; /** * minimum out with slippage */ minOutAmount: BN; /** * desired lbPair to swap against */ lbPair: PublicKey; /** * user */ user: PublicKey; binArraysPubkey: PublicKey[]; } interface SwapExactOutParams { /** * mint of in token */ inToken: PublicKey; /** * mint of out token */ outToken: PublicKey; /** * out token amount */ outAmount: BN; /** * maximum in amount, also known as slippage */ maxInAmount: BN; /** * desired lbPair to swap against */ lbPair: PublicKey; /** * user */ user: PublicKey; binArraysPubkey: PublicKey[]; } interface GetOrCreateATAResponse { ataPubKey: PublicKey; ix?: TransactionInstruction; } declare enum BitmapType { U1024 = 0, U512 = 1 } interface SeedLiquidityResponse { sendPositionOwnerTokenProveIxs: TransactionInstruction[]; initializeBinArraysAndPositionIxs: TransactionInstruction[][]; addLiquidityIxs: TransactionInstruction[][]; costBreakdown: SeedLiquidityCostBreakdown; } interface SeedLiquiditySingleBinResponse { instructions: TransactionInstruction[]; costBreakdown: SeedLiquidityCostBreakdown; } interface SeedLiquidityCostBreakdown { tokenOwnerProveAssociatedTokenAccountLamports: BN; totalPositionLamports: BN; totalBinArraysLamports: BN; totalPositionCount: BN; totalBinArraysCount: BN; binArrayBitmapLamports: BN; } interface Clock { slot: BN; epochStartTimestamp: BN; epoch: BN; leaderScheduleEpoch: BN; unixTimestamp: BN; } declare const ClockLayout: any; declare enum PairStatus { Enabled = 0, Disabled = 1 } interface PairLockInfo { positions: Array; } interface PositionLockInfo { positionAddress: PublicKey; owner: PublicKey; tokenXAmount: string; tokenYAmount: string; lockReleasePoint: number; } declare enum ActionType { Liquidity = 0, Reward = 1 } declare enum ResizeSide { Lower = 0, Upper = 1 } declare const MEMO_PROGRAM_ID: PublicKey; interface RebalancePositionResponse { rebalancePosition: RebalancePosition; simulationResult: SimulateRebalanceResp; } interface RebalancePositionBinArrayRentalCostQuote { binArrayExistence: Set; binArrayCount: number; binArrayCost: number; bitmapExtensionCost: number; } declare const REBALANCE_POSITION_PADDING: any[]; interface ChunkCallbackInfo { chunksLoaded: number; totalChunks: number; accountsLoaded: number; totalAccounts: number; } type ChunkCallback = (accounts: { pubkey: PublicKey; account: AccountInfo; }[], progress: ChunkCallbackInfo) => void; /** * Options for fetching positions with chunked RPC calls. */ interface GetPositionsOpt { /** * Number of accounts to fetch per RPC call when retrieving position data. * Default: 100 */ chunkSize?: number; /** * Optional callback called as each chunk of positions is fetched. * Note: When isParallelExecution is false (default), callbacks fire sequentially in order. * When isParallelExecution is true, callbacks fire in parallel (order not guaranteed). */ onChunkFetched?: ChunkCallback; /** * Controls whether chunks are fetched in parallel or sequentially. * Default: false (sequential execution) * When false, chunks are fetched sequentially and callbacks fire in order. * When true, callback progress is approximate due to parallel execution. */ isParallelExecution?: boolean; } declare enum PositionPermission { ClaimFee = 0 } declare enum LimitOrderStatus { NotFilled = 0, PartialFilled = 1, Fulfilled = 2 } /** private */ declare function isOverflowDefaultBinArrayBitmap(binArrayIndex: BN): boolean; declare function deriveBinArrayBitmapExtension(lbPair: PublicKey, programId: PublicKey): [PublicKey, number]; declare function binIdToBinArrayIndex(binId: BN): BN; declare function getBinArrayLowerUpperBinId(binArrayIndex: BN): BN[]; declare function isBinIdWithinBinArray(activeId: BN, binArrayIndex: BN): boolean; declare function getBinFromBinArray(binId: number, binArray: BinArray): Bin; declare function findNextBinArrayIndexWithLiquidity(swapForY: boolean, activeId: BN, lbPairState: LbPair, binArrayBitmapExtension: BinArrayBitmapExtension | null): BN | null; declare function findNextBinArrayWithLiquidity(swapForY: boolean, activeBinId: BN, lbPairState: LbPair, binArrayBitmapExtension: BinArrayBitmapExtension | null, binArrays: BinArrayAccount[]): BinArrayAccount | null; /** * Retrieves the bin arrays required to initialize multiple positions in continuous range. * * @param {PublicKey} pair - The public key of the pair. * @param {BN} fromBinId - The starting bin ID. * @param {BN} toBinId - The ending bin ID. * @return {[{key: PublicKey, index: BN }]} An array of bin arrays required for the given position range. */ declare function getBinArraysRequiredByPositionRange(pair: PublicKey, fromBinId: BN, toBinId: BN, programId: PublicKey): { key: PublicKey; index: BN; }[]; declare function enumerateBins(binsById: Map, lowerBinId: number, upperBinId: number, binStep: number, baseTokenDecimal: number, quoteTokenDecimal: number, version: number, lbPair: LbPair): Generator; declare function getBinIdIndexInBinArray(binId: BN, lowerBinId: BN, upperBinId: BN): BN; declare function binDeltaToMinMaxBinId(binDelta: number, activeBinId: number): { minBinId: number; maxBinId: number; }; declare function decodeRewardPerTokenStored(bin: Bin): BN[]; declare function getBinArrayInfoForNonContiguousBinIds(binIds: number[], programId: PublicKey, lbPair: PublicKey): { binArrayAccountMetas: AccountMeta[]; binArrayBitmapExtension: PublicKey; binArrayIndexes: BN[]; }; /** private */ declare function derivePresetParameterWithIndex(index: BN, programId: PublicKey): [PublicKey, number]; declare function deriveLbPairWithPresetParamWithIndexKey(presetParameterKey: PublicKey, tokenX: PublicKey, tokenY: PublicKey, programId: PublicKey): [PublicKey, number]; /** * * @deprecated Use derivePresetParameter2 */ declare function derivePresetParameter(binStep: BN, programId: PublicKey): [PublicKey, number]; declare function derivePresetParameter2(binStep: BN, baseFactor: BN, programId: PublicKey): [PublicKey, number]; declare function deriveLbPair2(tokenX: PublicKey, tokenY: PublicKey, binStep: BN, baseFactor: BN, programId: PublicKey): [PublicKey, number]; /** * * @deprecated Use deriveLbPair2 */ declare function deriveLbPair(tokenX: PublicKey, tokenY: PublicKey, binStep: BN, programId: PublicKey): [PublicKey, number]; declare function deriveCustomizablePermissionlessLbPair(tokenX: PublicKey, tokenY: PublicKey, programId: PublicKey): [PublicKey, number]; declare function derivePermissionLbPair(baseKey: PublicKey, tokenX: PublicKey, tokenY: PublicKey, binStep: BN, programId: PublicKey): [PublicKey, number]; declare function deriveOracle(lbPair: PublicKey, programId: PublicKey): [PublicKey, number]; declare function derivePosition(lbPair: PublicKey, base: PublicKey, lowerBinId: BN, width: BN, programId: PublicKey): [PublicKey, number]; declare function deriveBinArray(lbPair: PublicKey, index: BN, programId: PublicKey): [PublicKey, number]; declare function deriveReserve(token: PublicKey, lbPair: PublicKey, programId: PublicKey): [PublicKey, number]; declare function deriveTokenBadge(mint: PublicKey, programId: PublicKey): [PublicKey, number]; declare function deriveEventAuthority(programId: PublicKey): [PublicKey, number]; declare function deriveRewardVault(lbPair: PublicKey, rewardIndex: BN, programId: PublicKey): [PublicKey, number]; declare function derivePlaceHolderAccountMeta(programId: PublicKey): AccountMeta; declare function deriveOperator(whitelistedSigner: PublicKey, programId: PublicKey): PublicKey; declare function getBaseFee(binStep: number, sParameter: sParameters): BN; declare function getVariableFee(binStep: number, sParameter: sParameters, vParameter: vParameters): BN; declare function getTotalFee(binStep: number, sParameter: sParameters, vParameter: vParameters): BN; declare function computeFee(binStep: number, sParameter: sParameters, vParameter: vParameters, inAmount: BN): BN; declare function computeFeeFromAmount(binStep: number, sParameter: sParameters, vParameter: vParameters, inAmountWithFees: BN): BN; declare function computeProtocolFee(feeAmount: BN, sParameter: sParameters): BN; declare function getExcludedFeeAmount(includedFeeAmount: BN, tradeFeeNumerator: BN): { excludedFeeAmount: BN; fee: BN; }; declare function getIncludedFeeAmount(excludedFeeAmount: BN, tradeFeeNumerator: BN): { includedFeeAmount: BN; fee: BN; }; declare function splitFee(tradingFee: BN, protocolShare: BN, mmAmountIn: BN, totalAmountIn: BN): { fee: BN; protocolFee: BN; }; /** * It fetches the pool account from the AMM program, and returns the mint addresses for the two tokens * @param {Connection} connection - Connection - The connection to the Solana cluster * @param {string} poolAddress - The address of the pool account. * @returns The tokenAMint and tokenBMint addresses for the pool. */ declare function getTokensMintFromPoolAddress(connection: Connection, poolAddress: string, opt?: { cluster?: Cluster; programId?: PublicKey; }): Promise<{ tokenXMint: PublicKey; tokenYMint: PublicKey; }>; declare function getTokenProgramId(lbPairState: LbPair): { tokenXProgram: PublicKey; tokenYProgram: PublicKey; }; declare function isSupportLimitOrder(lbPairState: LbPair): boolean; interface FeeMode { feeOnInput: boolean; feeOnTokenX: boolean; } declare function getFeeMode(lbPairState: LbPair, swapForY: boolean): FeeMode; declare enum Rounding { Up = 0, Down = 1 } declare function mulShr(x: BN, y: BN, offset: number, rounding: Rounding): BN; declare function shlDiv(x: BN, y: BN, offset: number, rounding: Rounding): BN; declare function mulDiv(x: BN, y: BN, denominator: BN, rounding: Rounding): BN; declare function computeBaseFactorFromFeeBps(binStep: BN, feeBps: BN): BN[]; declare function getQPriceFromId(binId: BN, binStep: BN): BN; declare function getQPriceBaseFactor(binStep: BN): BN; declare function getC(amount: BN, binStep: number, binId: BN, baseTokenDecimal: number, quoteTokenDecimal: number, minPrice: Decimal, maxPrice: Decimal, k: number): Decimal; declare function distributeAmountToCompressedBinsByRatio(compressedBinAmount: Map, uncompressedAmount: BN, multiplier: BN, binCapAmount: BN): { newCompressedBinAmount: Map; loss: BN; }; declare function getPositionCount(minBinId: BN, maxBinId: BN): BN; declare function findOptimumDecompressMultiplier(binAmount: Map, tokenDecimal: BN): BN; declare function compressBinAmount(binAmount: Map, multiplier: BN): { compressedBinAmount: Map; compressionLoss: BN; }; declare function generateAmountForBinRange(amount: BN, binStep: number, tokenXDecimal: number, tokenYDecimal: number, minBinId: BN, maxBinId: BN, k: number): Map; declare function generateBinAmount(amount: BN, binStep: number, binId: BN, tokenXDecimal: number, tokenYDecimal: number, minPrice: Decimal, maxPrice: Decimal, k: number): BN; interface IPosition { address(): PublicKey; lowerBinId(): BN$1; upperBinId(): BN$1; liquidityShares(): BN$1[]; rewardInfos(): UserRewardInfo[]; feeInfos(): UserFeeInfo[]; lastUpdatedAt(): BN$1; lbPair(): PublicKey; totalClaimedFeeXAmount(): BN$1; totalClaimedFeeYAmount(): BN$1; totalClaimedRewards(): BN$1[]; operator(): PublicKey; lockReleasePoint(): BN$1; feeOwner(): PublicKey; owner(): PublicKey; getBinArrayIndexesCoverage(): BN$1[]; getBinArrayKeysCoverage(programId: PublicKey): PublicKey[]; version(): PositionVersion; width(): BN$1; } interface CombinedPositionBinData { liquidityShares: BN$1[]; rewardInfos: UserRewardInfo[]; feeInfos: UserFeeInfo[]; } declare function wrapPosition(program: Program, key: PublicKey, account: AccountInfo): IPosition; declare class PositionV2Wrapper implements IPosition { positionAddress: PublicKey; inner: PositionV2; extended: ExtendedPositionBinData[]; combinedPositionBinData: CombinedPositionBinData; constructor(positionAddress: PublicKey, inner: PositionV2, extended: ExtendedPositionBinData[], combinedPositionBinData: CombinedPositionBinData); address(): PublicKey; totalClaimedRewards(): BN$1[]; feeOwner(): PublicKey; lockReleasePoint(): BN$1; operator(): PublicKey; totalClaimedFeeYAmount(): BN$1; totalClaimedFeeXAmount(): BN$1; lbPair(): PublicKey; lowerBinId(): BN$1; upperBinId(): BN$1; liquidityShares(): BN$1[]; rewardInfos(): UserRewardInfo[]; feeInfos(): UserFeeInfo[]; lastUpdatedAt(): BN$1; getBinArrayIndexesCoverage(): BN$1[]; getBinArrayKeysCoverage(programId: PublicKey): PublicKey[]; version(): PositionVersion; owner(): PublicKey; width(): BN$1; } declare function getBinArrayIndexesCoverage(lowerBinId: BN$1, upperBinId: BN$1): BN$1[]; declare function getBinArrayKeysCoverage(lowerBinId: BN$1, upperBinId: BN$1, lbPair: PublicKey, programId: PublicKey): PublicKey[]; declare function getBinArrayAccountMetasCoverage(lowerBinId: BN$1, upperBinId: BN$1, lbPair: PublicKey, programId: PublicKey): AccountMeta[]; declare function getPositionLowerUpperBinIdWithLiquidity(position: PositionData): { lowerBinId: BN$1; upperBinId: BN$1; } | null; declare function isPositionNoFee(position: PositionData): boolean; declare function isPositionNoReward(position: PositionData): boolean; /** * Divides a range of bin IDs into chunks, each with a maximum length defined by POSITION_MAX_LENGTH, * and returns an array of objects representing the lower and upper bin IDs for each chunk. * * @param {number} minBinId - The starting bin ID of the range. * @param {number} maxBinId - The ending bin ID of the range. * @returns {{ lowerBinId: number; upperBinId: number }[]} An array of objects, each containing a * 'lowerBinId' and 'upperBinId', representing the range of bin IDs in each chunk. */ declare function chunkBinRangeIntoExtendedPositions(minBinId: number, maxBinId: number): { lowerBinId: number; upperBinId: number; }[]; /** * Divides a range of bin IDs into chunks, each with a length defined by DEFAULT_BIN_PER_POSITION, * and returns an array of objects representing the lower and upper bin IDs for each chunk. * Mainly used for chunking bin range to execute multiple add/remove liquidity, claim fee/reward * * @param {number} minBinId - The starting bin ID of the range. * @param {number} maxBinId - The ending bin ID of the range. * @returns {{ lowerBinId: number; upperBinId: number }[]} An array of objects, each containing a * 'lowerBinId' and 'upperBinId', representing the range of bin IDs in each chunk. */ declare function chunkBinRange(minBinId: number, maxBinId: number, binPerChunk?: number): { lowerBinId: number; upperBinId: number; }[]; declare function chunkPositionBinRange(position: LbPosition, minBinId: number, maxBinId: number): { minBinId: number; maxBinId: number; amountX: BN$1; amountY: BN$1; feeXAmount: BN$1; feeYAmount: BN$1; rewardAmounts: BN$1[]; }[]; declare function calculatePositionSize(binCount: BN$1): BN$1; /** * Get the minimum balance required to pay for the rent exemption of a * position with the given bin count. * * @param connection The connection to the Solana RPC node. * @param binCount The number of bins in the position. * @returns The minimum balance required to pay for the rent exemption. */ declare function getPositionRentExemption(connection: Connection, binCount: BN$1): Promise; /** * Calculate the minimum lamports required to expand a position to a given * width. * * The function takes into account the current width of the position and the * width to expand to. If the expanded width is less than or equal to the * default bin count per position, the function returns 0. * * @param currentMinBinId The current minimum bin ID of the position. * @param currentMaxBinId The current maximum bin ID of the position. * @param connection The connection to the Solana RPC node. * @param binCountToExpand The number of bins to expand the position by. * @returns The minimum lamports required to expand the position to the given * width. */ declare function getPositionExpandRentExemption(currentMinBinId: BN$1, currentMaxBinId: BN$1, connection: Connection, binCountToExpand: BN$1): Promise; /** * Calculate the number of extended bins in a position. * * @param minBinId The minimum bin ID of the position. * @param maxBinId The maximum bin ID of the position. * @returns The number of extended bins in the position. If the position width is * less than or equal to the default bin count per position, returns 0. */ declare function getExtendedPositionBinCount(minBinId: BN$1, maxBinId: BN$1): BN$1; /** * Decode the extended position data. * * @param base The base position with the base data. * @param program The program that the position is associated with. * @param bytes The buffer of bytes to decode. * @returns The decoded extended position data. */ declare function decodeExtendedPosition(base: PositionV2, program: Program, bytes: Buffer): ExtendedPositionBinData[]; /** * Given a strategy type and amounts of X and Y, returns the distribution of liquidity. * @param activeId The bin id of the active bin. * @param binStep The step size of each bin. * @param minBinId The min bin id. * @param maxBinId The max bin id. * @param amountX The amount of X token to deposit. * @param amountY The amount of Y token to deposit. * @param amountXInActiveBin The amount of X token in the active bin. * @param amountYInActiveBin The amount of Y token in the active bin. * @param strategyType The strategy type. * @param mintX The mint info of X token. Get from DLMM instance. * @param mintY The mint info of Y token. Get from DLMM instance. * @param clock The clock info. Get from DLMM instance. * @returns The distribution of liquidity. */ declare function toAmountsBothSideByStrategy(activeId: number, binStep: number, minBinId: number, maxBinId: number, amountX: BN, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, strategyType: StrategyType, mintX: Mint, mintY: Mint, clock: Clock): { binId: number; amountX: BN; amountY: BN; }[]; declare function autoFillYByStrategy(activeId: number, binStep: number, amountX: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, minBinId: number, maxBinId: number, strategyType: StrategyType): BN; declare function autoFillXByStrategy(activeId: number, binStep: number, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, minBinId: number, maxBinId: number, strategyType: StrategyType): BN; declare function toStrategyParameters({ maxBinId, minBinId, strategyType, singleSidedX, }: StrategyParameters): ProgramStrategyParameter; declare function getMultipleMintsExtraAccountMetasForTransferHook(connection: Connection, mintAddressesWithAccountInfo: { mintAddress: PublicKey; mintAccountInfo: AccountInfo; }[]): Promise>; declare function getExtraAccountMetasForTransferHook(connection: Connection, mintAddress: PublicKey, mintAccountInfo: AccountInfo): Promise; interface TransferFeeIncludedAmount { amount: BN$1; transferFee: BN$1; } declare function calculateTransferFeeIncludedAmount(transferFeeExcludedAmount: BN$1, mint: Mint, currentEpoch: number): TransferFeeIncludedAmount; interface TransferFeeExcludedAmount { amount: BN$1; transferFee: BN$1; } declare function calculateTransferFeeExcludedAmount(transferFeeIncludedAmount: BN$1, mint: Mint, currentEpoch: number): TransferFeeExcludedAmount; declare function getPriceOfBinByBinId(binId: number, binStep: number): Decimal; /** private */ declare function toWeightDistribution(amountX: BN, amountY: BN, distributions: { binId: number; xAmountBpsOfTotal: BN; yAmountBpsOfTotal: BN; }[], binStep: number): { binId: number; weight: number; }[]; declare function calculateSpotDistribution(activeBin: number, binIds: number[]): { binId: number; xAmountBpsOfTotal: BN; yAmountBpsOfTotal: BN; }[]; declare function calculateBidAskDistribution(activeBin: number, binIds: number[]): { binId: number; xAmountBpsOfTotal: BN; yAmountBpsOfTotal: BN; }[]; declare function calculateNormalDistribution(activeBin: number, binIds: number[]): { binId: number; xAmountBpsOfTotal: BN; yAmountBpsOfTotal: BN; }[]; /** * Converts a weight distribution into token amounts for one side (either bid or ask). * * @param amount - The total amount of liquidity to distribute. * @param distributions - The array of weight distributions for each bin. * @param binStep - The step interval between bin ids. * @param activeId - The id of the active bin. * @param depositForY - Flag indicating if the deposit is for token Y (bid side). * @param mint - Mint information for the token. Mint Y if depositForY is true, else Mint X. Get from DLMM instance. * @param clock - Clock instance for the current epoch. Get from DLMM instance. * @returns An array of objects containing binId and amount for each bin. */ declare function fromWeightDistributionToAmountOneSide(amount: BN, distributions: { binId: number; weight: number; }[], binStep: number, activeId: number, depositForY: boolean, mint: Mint, clock: Clock): { binId: number; amount: BN; }[]; /** * Converts a weight distribution into token amounts for both bid and ask sides. * * @param amountX - The total amount of token X to distribute. * @param amountY - The total amount of token Y to distribute. * @param distributions - The array of weight distributions for each bin. * @param binStep - The step interval between bin ids. * @param activeId - The id of the active bin. * @param amountXInActiveBin - The amount of token X in the active bin. * @param amountYInActiveBin - The amount of token Y in the active bin. * @param mintX - Mint information for token X. Get from DLMM instance. * @param mintY - Mint information for token Y. Get from DLMM instance. * @param clock - Clock instance for the current epoch. Get from DLMM instance. * @returns An array of objects containing binId, amountX, and amountY for each bin. */ declare function fromWeightDistributionToAmount(amountX: BN, amountY: BN, distributions: { binId: number; weight: number; }[], binStep: number, activeId: number, amountXInActiveBin: BN, amountYInActiveBin: BN, mintX: Mint, mintY: Mint, clock: Clock): { binId: number; amountX: BN; amountY: BN; }[]; /** * Distribute totalAmount to all bid side bins according to given distributions. * @param activeId active bin id * @param totalAmount total amount of token Y to be distributed * @param distributions weight distribution of each bin * @param mintY mint of token Y, get from DLMM instance * @param clock clock of the program, for calculating transfer fee, get from DLMM instance * @returns array of {binId, amount} where amount is the amount of token Y in each bin */ declare function toAmountBidSide(activeId: number, totalAmount: BN, distributions: { binId: number; weight: number; }[], mintY: Mint, clock: Clock): { binId: number; amount: BN; }[]; /** * Distribute totalAmount to all ask side bins according to given distributions. * @param activeId active bin id * @param totalAmount total amount of token Y to be distributed * @param distributions weight distribution of each bin * @param mintX mint of token X, get from DLMM instance * @param clock clock of the program, for calculating transfer fee, get from DLMM instance * @returns array of {binId, amount} where amount is the amount of token X in each bin */ declare function toAmountAskSide(activeId: number, binStep: number, totalAmount: BN, distributions: { binId: number; weight: number; }[], mintX: Mint, clock: Clock): { binId: number; amount: BN; }[]; /** * Distributes the given amounts of tokens X and Y to both bid and ask side bins * based on the provided weight distributions. * * @param activeId - The id of the active bin. * @param binStep - The step interval between bin ids. * @param amountX - Total amount of token X to distribute. * @param amountY - Total amount of token Y to distribute. * @param amountXInActiveBin - Amount of token X already in the active bin. * @param amountYInActiveBin - Amount of token Y already in the active bin. * @param distributions - Array of bins with their respective weight distributions. * @param mintX - Mint information for token X. Get from DLMM instance. * @param mintY - Mint information for token Y. Get from DLMM instance. * @param clock - Clock instance. Get from DLMM instance. * @returns An array of objects containing binId, amountX, and amountY for each bin. */ declare function toAmountBothSide(activeId: number, binStep: number, amountX: BN, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, distributions: { binId: number; weight: number; }[], mintX: Mint, mintY: Mint, clock: Clock): { binId: number; amountX: BN; amountY: BN; }[]; declare function autoFillYByWeight(activeId: number, binStep: number, amountX: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, distributions: { binId: number; weight: number; }[]): BN; declare function autoFillXByWeight(activeId: number, binStep: number, amountY: BN, amountXInActiveBin: BN, amountYInActiveBin: BN, distributions: { binId: number; weight: number; }[]): BN; declare function getAmountIn(amountOut: BN$1, price: BN$1, swapForY: Boolean, rounding: Rounding): BN$1; declare function getAmountOut(bin: Bin, inAmount: BN$1, swapForY: boolean): BN$1; declare function swapExactOutQuoteAtBin(bin: Bin, binStep: number, sParameter: sParameters, vParameter: vParameters, outAmount: BN$1, swapForY: boolean, supportLimitOrder: boolean, feeOnInput: boolean): { amountIn: BN$1; amountOut: BN$1; fee: BN$1; protocolFee: BN$1; }; declare function swapExactInQuoteAtBin(bin: Bin, binStep: number, sParameter: sParameters, vParameter: vParameters, inAmount: BN$1, swapForY: boolean, supportLimitOrder: boolean, feeOnInput: boolean): { amountIn: BN$1; amountOut: BN$1; fee: BN$1; protocolFee: BN$1; }; declare function getLimitOrderLiquidity(bin: Bin, supportLimitOrder: boolean): { orderAmountX: BN$1; orderAmountY: BN$1; }; declare function getBinMaxAmountOut(bin: Bin, swapForY: boolean, supportLimitOrder: boolean): BN$1; /** Result of a TWAP (Time-Weighted Average Price) computation over a time range. */ interface TwapResult { /** The computed TWAP value (active bin ID or price depending on the query). */ value: T; /** Duration in seconds over which the TWAP was computed. */ duration: BN$1; } /** * Interface for querying time-weighted average data from an on-chain DLMM oracle. * Provides methods to retrieve TWAP active bin IDs and prices over arbitrary time ranges. */ interface IDynamicOracle { /** The public key of the oracle account. */ readonly oracleAddress: PublicKey; /** The on-chain oracle metadata (idx, activeSize, length). */ readonly metadata: Oracle; /** The decoded observation entries. */ readonly observations: Observation[]; /** Returns the maximum observable duration from the earliest sample to the given timestamp. */ getMaxDuration(currentTimestamp: BN$1): BN$1; /** * Computes the TWAP active bin ID between two arbitrary time points. * @param timePoint0 - First time boundary (order does not matter). * @param timePoint1 - Second time boundary (order does not matter). * @returns The TWAP active bin ID and duration, or null if the range is not covered by oracle data. */ getActiveIdByTime(timePoint0: BN$1, timePoint1: BN$1): TwapResult | null; /** * Computes the TWAP active bin ID from the earliest available observation to the current timestamp. * @param currentTimestamp - The current on-chain timestamp. * @returns The TWAP active bin ID and duration, or null if no data is available. */ getActiveId(currentTimestamp: BN$1): TwapResult | null; /** * Computes the TWAP price (as a raw Decimal) between two time points. * @param timePoint0 - First time boundary. * @param timePoint1 - Second time boundary. * @returns The TWAP price and duration, or null if the range is not covered. */ getPriceByTime(timePoint0: BN$1, timePoint1: BN$1): TwapResult | null; /** * Computes the TWAP price adjusted for token decimals (human-readable) between two time points. * @param timePoint0 - First time boundary. * @param timePoint1 - Second time boundary. * @returns The UI-friendly TWAP price and duration, or null if the range is not covered. */ getUiPriceByTime(timePoint0: BN$1, timePoint1: BN$1): TwapResult | null; } declare class Observation { cumulativeActiveBinId: BN$1; createdAt: BN$1; lastUpdatedAt: BN$1; constructor(cumulativeActiveBinId: BN$1, createdAt: BN$1, lastUpdatedAt: BN$1); isInitialized(): boolean; } declare function wrapOracle(oracleAddress: PublicKey, data: Buffer, binStep: number, currentActiveBinId: BN$1, baseTokenDecimals: number, quoteTokenDecimals: number, program: Program): DynamicOracle; declare class DynamicOracle implements IDynamicOracle { readonly oracleAddress: PublicKey; readonly metadata: Oracle; readonly observations: Observation[]; private binStep; private currentActiveBinId; private baseTokenDecimals; private quoteTokenDecimals; constructor(oracleAddress: PublicKey, metadata: Oracle, observations: Observation[], binStep: number, currentActiveBinId: BN$1, baseTokenDecimals: number, quoteTokenDecimals: number); nextIndex(): number; getEarliestSample(): Observation; getLatestSample(): Observation; findCumulativeActiveIdByTimestamp(activeId: BN$1, timestamp: BN$1): BN$1 | null; getActiveIdByTime(timePoint0: BN$1, timePoint1: BN$1): TwapResult | null; getActiveId(currentTimestamp: BN$1): TwapResult | null; getEarliestTimestamp(): BN$1 | null; getPriceByTime(timePoint0: BN$1, timePoint1: BN$1): TwapResult | null; getUiPriceByTime(timePoint0: BN$1, timePoint1: BN$1): TwapResult | null; getMaxDuration(currentTimestamp: BN$1): BN$1; } declare function chunks(array: T[], size: number): T[][]; declare function range(min: number, max: number, mapfn: (i: number) => T): T[]; declare function chunkedFetchMultiplePoolAccount(program: ClmmProgram, pks: PublicKey[], chunkSize?: number): Promise<{ parameters: { baseFactor: number; filterPeriod: number; decayPeriod: number; reductionFactor: number; variableFeeControl: number; maxVolatilityAccumulator: number; minBinId: number; maxBinId: number; protocolShare: number; baseFeePowerFactor: number; functionType: number; collectFeeMode: number; padding: number[]; }; vParameters: { volatilityAccumulator: number; volatilityReference: number; indexReference: number; padding: number[]; lastUpdateTimestamp: BN; padding1: number[]; }; bumpSeed: number[]; binStepSeed: number[]; pairType: number; activeId: number; binStep: number; status: number; requireBaseFactorSeed: number; baseFactorSeed: number[]; activationType: number; creatorPoolOnOffControl: number; tokenXMint: PublicKey; tokenYMint: PublicKey; reserveX: PublicKey; reserveY: PublicKey; protocolFee: { amountX: BN; amountY: BN; }; padding1: number[]; rewardInfos: { mint: PublicKey; vault: PublicKey; funder: PublicKey; rewardDuration: BN; rewardDurationEnd: BN; rewardRate: BN; lastUpdateTime: BN; cumulativeSecondsWithEmptyLiquidityReward: BN; }[]; oracle: PublicKey; binArrayBitmap: BN[]; lastUpdatedAt: BN; padding2: number[]; preActivationSwapAddress: PublicKey; baseKey: PublicKey; activationPoint: BN; preActivationDuration: BN; padding3: number[]; padding4: BN; creator: PublicKey; tokenMintXProgramFlag: number; tokenMintYProgramFlag: number; version: number; reserved: number[]; }[]>; declare function chunkedFetchMultipleBinArrayBitmapExtensionAccount(program: ClmmProgram, pks: PublicKey[], chunkSize?: number): Promise<{ lbPair: PublicKey; positiveBinArrayBitmap: BN[][]; negativeBinArrayBitmap: BN[][]; }[]>; declare function getTokenDecimals(conn: Connection, mint: PublicKey): Promise; declare const getOrCreateATAInstruction: (connection: Connection, tokenMint: PublicKey, owner: PublicKey, programId?: PublicKey, payer?: PublicKey, allowOwnerOffCurve?: boolean) => Promise; declare function getTokenBalance(conn: Connection, tokenAccount: PublicKey): Promise; declare const parseLogs: (eventParser: EventParser, logs: string[]) => T; declare const wrapSOLInstruction: (from: PublicKey, to: PublicKey, amount: bigint) => TransactionInstruction[]; declare const unwrapSOLInstruction: (owner: PublicKey, allowOwnerOffCurve?: boolean) => TransactionInstruction; declare function chunkedGetMultipleAccountInfos(connection: Connection, pks: PublicKey[], chunkSize?: number): Promise[]>; /** * Fetches program accounts in a chunked manner to handle large result sets. * * This function uses a two-phase approach to avoid RPC timeouts and response size limits: * 1. First fetches only account pubkeys using dataSlice with zero length * 2. Then fetches full account data in chunks using getMultipleAccountsInfo * * This is particularly useful when fetching many accounts (e.g., 1000+ positions) * where a single getProgramAccounts call might timeout or exceed the 50MB response limit. * * @param connection - The Solana connection object * @param programId - The program ID to fetch accounts from * @param filters - Array of filters to apply (e.g., account discriminator, owner filter) * @param chunkSize - Optional number of accounts to fetch per chunk (default: 100) * @param onChunkFetched - Optional callback called as each chunk completes (in parallel mode, order not guaranteed) * @param isParallelExecution - Optional flag to control execution mode. When true, chunks are fetched in parallel. When false (default), chunks are fetched sequentially. * @returns Array of objects containing pubkey and account info */ declare function chunkedGetProgramAccounts(connection: Connection, programId: PublicKey, filters: GetProgramAccountsFilter[], chunkSize?: number, onChunkFetched?: ChunkCallback, isParallelExecution?: boolean): Promise<{ pubkey: PublicKey; account: AccountInfo; }[]>; /** * Gets the estimated compute unit usage with a buffer. * @param connection A Solana connection object. * @param instructions The instructions of the transaction to simulate. * @param feePayer The public key of the fee payer. * @param buffer The buffer to add to the estimated compute unit usage. Max value is 1. Default value is 0.1 if not provided, and will be capped between 50k - 200k. * @returns The estimated compute unit usage with the buffer. */ declare const getEstimatedComputeUnitUsageWithBuffer: (connection: Connection, instructions: TransactionInstruction[], feePayer: PublicKey, buffer?: number, altAddress?: PublicKey) => Promise; /** * Gets the estimated compute unit usage with a buffer and converts it to a SetComputeUnitLimit instruction. * If the estimated compute unit usage cannot be retrieved, returns a SetComputeUnitLimit instruction with the fallback unit. * @param connection A Solana connection object. * @param instructions The instructions of the transaction to simulate. * @param feePayer The public key of the fee payer. * @param buffer The buffer to add to the estimated compute unit usage. Max value is 1. Default value is 0.1 if not provided, and will be capped between 50k - 200k. * @returns A SetComputeUnitLimit instruction with the estimated compute unit usage. */ declare const getEstimatedComputeUnitIxWithBuffer: (connection: Connection, instructions: TransactionInstruction[], feePayer: PublicKey, buffer?: number, altAddress?: PublicKey) => Promise; type Opt = { cluster?: Cluster | "localhost"; programId?: PublicKey; skipSolWrappingOperation?: boolean; }; declare function createProgram(connection: Connection, opt?: Opt): Program; declare function decodeAccount(program: Program, accountName: AccountName, buffer: Buffer): T; declare function getAccountDiscriminator(accountName: AccountName): IdlDiscriminator; /** * Caps a slippage percentage to be between 0 and 100. * @param slippage The slippage percentage to be capped. * @returns The capped slippage percentage. */ declare function capSlippagePercentage(slippage: number): number; /** * Given a slippage percentage and a bin step, calculate the maximum number of bins * that the user is willing to allow the active bin to drift from the target price. * If the slippage percentage is 0 or null, return the maxActiveBinSlippage instead. * * @param slippagePercentage The slippage percentage in basis points. * @param binStep The bin step of the pair. * @param maxActiveBinSlippage The maximum number of bins that the active bin can drift. * @returns The maximum number of bins that the user is willing to allow the active bin to drift. */ declare function getAndCapMaxActiveBinSlippage(slippagePercentage: number, binStep: number, maxActiveBinSlippage: number): number; /** * Calculates the number of bins in a given range. * * @param minBinId The minimum bin id of the range. * @param maxBinId The maximum bin id of the range. * @returns The number of bins in the range. */ declare function getBinCount(minBinId: number, maxBinId: number): number; /** * Calculates the maximum amount of tokens after applying slippage to the given amount. * * @param amount The amount of tokens before slippage. * @param slippage The percentage of slippage to apply. * @returns The maximum amount of tokens after applying slippage. If the slippage is 100%, the maximum amount is U64_MAX. * **/ declare function getSlippageMaxAmount(amount: BN, slippage: number): BN; /** * Calculates the minimum amount of tokens after applying slippage to the given amount. * * @param amount The amount of tokens before slippage. * @param slippage The percentage of slippage to apply. * @returns The minimum amount of tokens after applying slippage. */ declare function getSlippageMinAmount(amount: BN, slippage: number): BN; /** * Calculates the number of positions required to cover a range of bins. * * @param binCount The number of bins in the range. * @returns The number of positions required to cover the range of bins. */ declare function getPositionCountByBinCount(binCount: number): number; /** * Adjusts the liquidity parameters to reset uninvolved liquidity based on delta IDs. * * This function modifies the provided liquidity strategy parameters by resetting * the x0, y0, deltaX, and deltaY values when certain conditions regarding the * minDeltaId and maxDeltaId are met. If the maxDeltaId is less than or equal * to the end of the bid side delta ID, x0 and deltaX are set to zero. If the * minDeltaId is greater than or equal to the start of the ask side delta ID, * y0 and deltaY are set to zero. * * @param minDeltaId - The minimum delta ID. * @param maxDeltaId - The maximum delta ID. * @param favorXInActiveId - A boolean indicating if X is favored in the active bin. * @param params - The liquidity strategy parameters containing x0, y0, deltaX, and deltaY. * @returns An object containing the adjusted x0, y0, deltaX, and deltaY values. */ declare function resetUninvolvedLiquidityParams(minDeltaId: BN, maxDeltaId: BN, favorXInActiveId: boolean, params: LiquidityStrategyParameters): { x0: BN; y0: BN; deltaX: BN; deltaY: BN; }; declare function chunkDepositWithRebalanceEndpoint(dlmm: DLMM, strategy: StrategyParameters, slippagePercentage: number, maxActiveBinSlippage: number, position: PublicKey, positionMinBinId: number, positionMaxBinId: number, liquidityStrategyParameters: LiquidityStrategyParameters, owner: PublicKey, payer: PublicKey, isParallel: boolean, skipSolWrappingOperation?: boolean): Promise; declare function encodePositionPermissions(permissions: PositionPermission[]): number; declare class DLMM { pubkey: PublicKey; program: ClmmProgram; lbPair: LbPair; binArrayBitmapExtension: BinArrayBitmapExtensionAccount | null; tokenX: TokenReserve; tokenY: TokenReserve; rewards: Array; clock: Clock; private opt?; constructor(pubkey: PublicKey, program: ClmmProgram, lbPair: LbPair, binArrayBitmapExtension: BinArrayBitmapExtensionAccount | null, tokenX: TokenReserve, tokenY: TokenReserve, rewards: Array, clock: Clock, opt?: Opt); /** Static public method */ /** * The function `getLbPairs` retrieves a list of LB pair accounts using a connection and optional * parameters. * @param {Connection} connection - The `connection` parameter is an instance of the `Connection` * class, which represents the connection to the Solana blockchain network. * @param {Opt} [opt] - The `opt` parameter is an optional object that contains additional options * for the function. It can have the following properties: * @returns The function `getLbPairs` returns a Promise that resolves to an array of * `LbPairAccount` objects. */ static getLbPairs(connection: Connection, opt?: Opt): Promise; /** * Retrieves the public key of a LB pair if it exists. This function expect the RPC have getProgramAccounts RPC method enabled. * @param connection The connection to the Solana cluster. * @param tokenX The mint address of token X. * @param tokenY The mint address of token Y. * @param binStep The bin step of the LB pair. * @param baseFactor The base factor of the LB pair. * @param baseFeePowerFactor The base fee power factor of the LB pair. It allow small bin step to have bigger fee rate. * @param opt Optional parameters. * @returns The public key of the LB pair if it exists, or null. */ static getPairPubkeyIfExists(connection: Connection, tokenX: PublicKey, tokenY: PublicKey, binStep: BN, baseFactor: BN, baseFeePowerFactor: BN, concreteFunctionType?: ConcreteFunctionType, collectFeeMode?: CollectFeeMode, opt?: Opt): Promise; static getCustomizablePermissionlessLbPairIfExists(connection: Connection, tokenX: PublicKey, tokenY: PublicKey, opt?: Opt): Promise; /** * The `create` function is a static method that creates a new instance of the `DLMM` class * @param {Connection} connection - The `connection` parameter is an instance of the `Connection` * class, which represents the connection to the Solana blockchain network. * @param {PublicKey} dlmm - The PublicKey of LB Pair. * @param {Opt} [opt] - The `opt` parameter is an optional object that can contain additional options * for the `create` function. It has the following properties: * @returns The `create` function returns a `Promise` that resolves to a `DLMM` object. */ static create(connection: Connection, dlmm: PublicKey, opt?: Opt): Promise; /** * Similar to `create` function, but it accept multiple lbPairs to be initialized. * @param {Connection} connection - The `connection` parameter is an instance of the `Connection` * class, which represents the connection to the Solana blockchain network. * @param dlmmList - An Array of PublicKey of LB Pairs. * @param {Opt} [opt] - An optional parameter of type `Opt`. * @returns The function `createMultiple` returns a Promise that resolves to an array of `DLMM` * objects. */ static createMultiple(connection: Connection, dlmmList: Array, opt?: Opt): Promise; /** * The `getAllPresetParameters` function retrieves all preset parameter accounts * for the given DLMM program. * * @param {Connection} connection - The connection to the Solana cluster. * @param {Opt} [opt] - The optional parameters for the function. * * @returns A promise that resolves to an object containing the preset parameter * accounts, with the following properties: * - `presetParameter`: The preset parameter accounts for the original `PresetParameter` struct. * - `presetParameter2`: The preset parameter accounts for the `PresetParameter2` struct. */ static getAllPresetParameters(connection: Connection, opt?: Opt): Promise<{ presetParameter: _coral_xyz_anchor.ProgramAccount<{ binStep: number; baseFactor: number; filterPeriod: number; decayPeriod: number; reductionFactor: number; variableFeeControl: number; maxVolatilityAccumulator: number; minBinId: number; maxBinId: number; protocolShare: number; }>[]; presetParameter2: _coral_xyz_anchor.ProgramAccount<{ binStep: number; baseFactor: number; filterPeriod: number; decayPeriod: number; variableFeeControl: number; maxVolatilityAccumulator: number; reductionFactor: number; protocolShare: number; index: number; baseFeePowerFactor: number; concreteFunctionType: number; collectFeeMode: number; padding0: number[]; padding1: BN[]; }>[]; }>; /** * The function `getAllLbPairPositionsByUser` retrieves all liquidity pool pair positions for a given * user. * @param {Connection} connection - The `connection` parameter is an instance of the `Connection` * class, which represents the connection to the Solana blockchain. * @param {PublicKey} userPubKey - The user's wallet public key. * @param {Opt} [opt] - An optional object that contains additional options for the function. * @param {GetPositionsOpt} [getPositionsOpt] - Optional settings for chunked position fetching * @returns The function `getAllLbPairPositionsByUser` returns a `Promise` that resolves to a `Map` * object. The `Map` object contains key-value pairs, where the key is a string representing the LB * Pair account, and the value is an object of PositionInfo */ static getAllLbPairPositionsByUser(connection: Connection, userPubKey: PublicKey, opt?: Opt, getPositionsOpt?: GetPositionsOpt): Promise>; static getPricePerLamport(tokenXDecimal: number, tokenYDecimal: number, price: number): string; static getBinIdFromPrice(price: string | number | Decimal, binStep: number, min: boolean): number; /** * The function `getLbPairLockInfo` retrieves all pair positions that has locked liquidity. * @param {number} [lockDurationOpt] - An optional value indicating the minimum position lock duration that the function should return. * Depending on the lbPair activationType, the param should be a number of seconds or a number of slots. * @param {GetPositionsOpt} [getPositionsOpt] - Optional settings for chunked position fetching * @returns The function `getLbPairLockInfo` returns a `Promise` that resolves to a `PairLockInfo` * object. The `PairLockInfo` object contains an array of `PositionLockInfo` objects. */ getLbPairLockInfo(lockDurationOpt?: number, getPositionsOpt?: GetPositionsOpt): Promise; /** Public methods */ /** * Create a new customizable permissionless pair. Support both token and token 2022. * @param connection A connection to the Solana cluster. * @param binStep The bin step for the pair. * @param tokenX The mint of the first token. * @param tokenY The mint of the second token. * @param activeId The ID of the initial active bin. Represent the starting price. * @param feeBps The fee rate for swaps in the pair, in basis points. * @param activationType The type of activation for the pair. * @param hasAlphaVault Whether the pair has an alpha vault. * @param creatorKey The public key of the creator of the pair. * @param activationPoint The timestamp at which the pair will be activated. * @param creatorPoolOnOffControl Whether the creator has control over enable or disable the pool. * @params concreteFunctionType The concrete function type of the pair, limit order or liquidity mining. Default to limit order if not provided. * @params collectFeeMode The collect fee mode of the pair, input only or only token Y. Default to input only if not provided. * @param opt An options object. * @returns A transaction that creates the pair. */ static createCustomizablePermissionlessLbPair2(connection: Connection, binStep: BN, tokenX: PublicKey, tokenY: PublicKey, activeId: BN, feeBps: BN, activationType: ActivationType, hasAlphaVault: boolean, creatorKey: PublicKey, activationPoint?: BN, creatorPoolOnOffControl?: boolean, concreteFunctionType?: ConcreteFunctionType, collectFeeMode?: CollectFeeMode, opt?: Opt): Promise; /** * Create a new customizable permissionless pair. Support only token program. * @param connection A connection to the Solana cluster. * @param binStep The bin step for the pair. * @param tokenX The mint of the first token. * @param tokenY The mint of the second token. * @param activeId The ID of the initial active bin. Represent the starting price. * @param feeBps The fee rate for swaps in the pair, in basis points. * @param activationType The type of activation for the pair. * @param hasAlphaVault Whether the pair has an alpha vault. * @param creatorKey The public key of the creator of the pair. * @param activationPoint The timestamp at which the pair will be activated. * @param creatorPoolOnOffControl Whether the creator has control over enable or disable the pool. * @params concreteFunctionType The concrete function type of the pair, limit order or liquidity mining. Default to limit order if not provided. * @params collectFeeMode The collect fee * @param opt An options object. * @returns A transaction that creates the pair. */ static createCustomizablePermissionlessLbPair(connection: Connection, binStep: BN, tokenX: PublicKey, tokenY: PublicKey, activeId: BN, feeBps: BN, activationType: ActivationType, hasAlphaVault: boolean, creatorKey: PublicKey, activationPoint?: BN, creatorPoolOnOffControl?: boolean, concreteFunctionType?: ConcreteFunctionType, collectFeeMode?: CollectFeeMode, opt?: Opt): Promise; /** * Create a new liquidity pair. Support only token program. * @param connection A connection to the Solana cluster. * @param funder The public key of the funder of the pair. * @param tokenX The mint of the first token. * @param tokenY The mint of the second token. * @param binStep The bin step for the pair. * @param baseFactor The base factor for the pair. * @param presetParameter The public key of the preset parameter account. * @param activeId The ID of the initial active bin. Represent the starting price. * @param opt An options object. * @returns A transaction that creates the pair. * @throws If the pair already exists. */ static createLbPair(connection: Connection, funder: PublicKey, tokenX: PublicKey, tokenY: PublicKey, binStep: BN, baseFactor: BN, presetParameter: PublicKey, activeId: BN, opt?: Opt): Promise; /** * Create a new liquidity pair. Support both token and token2022 program. * @param connection A connection to the Solana cluster. * @param funder The public key of the funder of the pair. * @param tokenX The mint of the first token. * @param tokenY The mint of the second token. * @param presetParameter The public key of the preset parameter account. * @param activeId The ID of the initial active bin. Represent the starting price. * @param opt An options object. * @returns A transaction that creates the pair. * @throws If the pair already exists. */ static createLbPair2(connection: Connection, funder: PublicKey, tokenX: PublicKey, tokenY: PublicKey, presetParameter: PublicKey, activeId: BN, opt?: Opt): Promise; /** * The function `refetchStates` retrieves and updates various states and data related to bin arrays * and lb pairs. */ refetchStates(): Promise; /** * Set the status of a permissionless LB pair to either enabled or disabled. This require pool field `creator_pool_on_off_control` to be true and type `CustomizablePermissionless`. * Pool creator can enable/disable the pair anytime before the pool is opened / activated. Once the pool activation time is passed, the pool creator can only enable the pair. * Useful for token launches which do not have fixed activation time. * @param enable If true, the pair will be enabled. If false, the pair will be disabled. * @param creator The public key of the pool creator. * @returns a Promise that resolves to the transaction. */ setPairStatusPermissionless(enable: boolean, creator: PublicKey): Promise; /** * The function `getBinArrays` returns an array of `BinArrayAccount` objects * @returns a Promise that resolves to an array of BinArrayAccount objects. */ getBinArrays(): Promise; /** * The function `getBinArrayAroundActiveBin` retrieves a specified number of `BinArrayAccount` * objects from the blockchain, based on the active bin and its surrounding bin arrays. * @param * swapForY - The `swapForY` parameter is a boolean value that indicates whether the swap is using quote token as input. * [count=4] - The `count` parameter is the number of bin arrays to retrieve on left and right respectively. By default, it is set to 4. * @returns an array of `BinArrayAccount` objects. */ getBinArrayForSwap(swapForY: boolean, count?: number): Promise; /** * The function `calculateFeeInfo` calculates the base fee rate percentage and maximum fee rate percentage * given the base factor, bin step, and optional base fee power factor. * @param baseFactor - The base factor of the pair. * @param binStep - The bin step of the pair. * @param baseFeePowerFactor - Optional parameter to allow small bin step to have bigger fee rate. Default to 0. * @returns an object of type `Omit` with the following properties: baseFeeRatePercentage and maxFeeRatePercentage. */ static calculateFeeInfo(baseFactor: number | string, binStep: number | string, baseFeePowerFactor?: number | string): Omit; /** * The function `getFeeInfo` calculates and returns the base fee rate percentage, maximum fee rate * percentage, and protocol fee percentage. * @returns an object of type `FeeInfo` with the following properties: baseFeeRatePercentage, maxFeeRatePercentage, and protocolFeePercentage. */ getFeeInfo(): FeeInfo; /** * The function calculates and returns a dynamic fee * @returns a Decimal value representing the dynamic fee. */ getDynamicFee(): Decimal; /** * The function `getEmissionRate` returns the emission rates for two rewards. * @returns an object of type `EmissionRate`. The object has two properties: `rewardOne` and * `rewardTwo`, both of which are of type `Decimal`. */ getEmissionRate(): EmissionRate; /** * The function `getBinsAroundActiveBin` retrieves a specified number of bins to the left and right * of the active bin and returns them along with the active bin ID. * @param {number} numberOfBinsToTheLeft - The parameter `numberOfBinsToTheLeft` represents the * number of bins to the left of the active bin that you want to retrieve. It determines how many * bins you want to include in the result that are positioned to the left of the active bin. * @param {number} numberOfBinsToTheRight - The parameter `numberOfBinsToTheRight` represents the * number of bins to the right of the active bin that you want to retrieve. * @returns an object with two properties: "activeBin" and "bins". The value of "activeBin" is the * value of "this.lbPair.activeId", and the value of "bins" is the result of calling the "getBins" * function with the specified parameters. */ getBinsAroundActiveBin(numberOfBinsToTheLeft: number, numberOfBinsToTheRight: number): Promise<{ activeBin: number; bins: BinLiquidity[]; }>; /** * The function `getBinsBetweenMinAndMaxPrice` retrieves a list of bins within a specified price * range. * @param {number} minPrice - The minimum price value for filtering the bins. * @param {number} maxPrice - The `maxPrice` parameter is the maximum price value that you want to * use for filtering the bins. * @returns an object with two properties: "activeBin" and "bins". The value of "activeBin" is the * active bin ID of the lbPair, and the value of "bins" is an array of BinLiquidity objects. */ getBinsBetweenMinAndMaxPrice(minPrice: number, maxPrice: number): Promise<{ activeBin: number; bins: BinLiquidity[]; }>; /** * The function `getBinsBetweenLowerAndUpperBound` retrieves a list of bins between a lower and upper * bin ID and returns the active bin ID and the list of bins. * @param {number} lowerBinId - The lowerBinId parameter is a number that represents the ID of the * lowest bin. * @param {number} upperBinId - The upperBinID parameter is a number that represents the ID of the * highest bin. * @param {BinArray} [lowerBinArrays] - The `lowerBinArrays` parameter is an optional parameter of * type `BinArray`. It represents an array of bins that are below the lower bin ID. * @param {BinArray} [upperBinArrays] - The parameter `upperBinArrays` is an optional parameter of * type `BinArray`. It represents an array of bins that are above the upper bin ID. * @returns an object with two properties: "activeBin" and "bins". The value of "activeBin" is the * active bin ID of the lbPair, and the value of "bins" is an array of BinLiquidity objects. */ getBinsBetweenLowerAndUpperBound(lowerBinId: number, upperBinId: number, lowerBinArray?: BinArray, upperBinArray?: BinArray): Promise<{ activeBin: number; bins: BinLiquidity[]; }>; /** * The function converts a real price of bin to a lamport value * @param {number} price - The `price` parameter is a number representing the price of a token. * @returns {string} price per Lamport of bin */ toPricePerLamport(price: number): string; /** * The function converts a price per lamport value to a real price of bin * @param {number} pricePerLamport - The parameter `pricePerLamport` is a number representing the * price per lamport. * @returns {string} real price of bin */ fromPricePerLamport(pricePerLamport: number): string; /** * The function retrieves the active bin ID and its corresponding price. * @returns an object with two properties: "binId" which is a number, and "price" which is a string. */ getActiveBin(): Promise; /** * The function get bin ID based on a given price and a boolean flag indicating whether to * round down or up. * @param {number} price - The price parameter is a number that represents the price value. * @param {boolean} min - The "min" parameter is a boolean value that determines whether to round * down or round up the calculated binId. If "min" is true, the binId will be rounded down (floor), * otherwise it will be rounded up (ceil). * @returns {number} which is the binId calculated based on the given price and whether the minimum * value should be used. */ getBinIdFromPrice(price: number, min: boolean): number; /** * The function `getLimitOrderByUserAndLbPair` retrieves all limit orders for a user in the current LB pair * and parses them with on-chain bin array and clock state. * @param {PublicKey} userPubKey - The public key of the user who owns the limit orders. * @returns A Promise that resolves to an array of parsed limit orders with their public keys. */ getLimitOrderByUserAndLbPair(userPubKey: PublicKey): Promise; /** * Fetches and parses a single limit order by address for the current LB pair. * * This method loads the limit order account, the LB pair state, clock sysvar, * and all required bin arrays to produce a parsed limit order view. * @param {PublicKey} limitOrder - The public key of the limit order account. * @returns A Promise that resolves to the parsed limit order with its public key. */ getLimitOrder(limitOrder: PublicKey): Promise; /** * The function `getPositionsByUserAndLbPair` retrieves positions by user and LB pair, including * active bin and user positions. * @param {PublicKey} [userPubKey] - The `userPubKey` parameter is an optional parameter of type * `PublicKey`. It represents the public key of a user. If no `userPubKey` is provided, the function * will return an object with an empty `userPositions` array and the active bin information obtained * from the `getActive * @param {GetPositionsOpt} [getPositionsOpt] - Optional settings for chunked position fetching * @returns The function `getPositionsByUserAndLbPair` returns a Promise that resolves to an object * with two properties: * - "activeBin" which is an object with two properties: "binId" and "price". The value of "binId" * is the active bin ID of the lbPair, and the value of "price" is the price of the active bin. * - "userPositions" which is an array of Position objects. */ getPositionsByUserAndLbPair(userPubKey?: PublicKey, getPositionsOpt?: GetPositionsOpt): Promise<{ activeBin: BinLiquidity; userPositions: Array; }>; /** * Estimates the cost to extend a position by a specified number of bins. Max position length is 1400 * * The function calculates the rent cost required to expand a position and the cost * to create necessary bin arrays for the new position range. * * @param currentMinBinId - The current minimum bin ID of the position. * @param currentMaxBinId - The current maximum bin ID of the position. * @param binCountToExpand - The number of bins to expand the position by. * @returns An object containing: * - positionExtendCost: The estimated rent cost in lamports for extending the position. * - binArrayCost: The estimated cost for creating necessary bin arrays. */ quoteExtendPosition(currentMinBinId: BN, currentMaxBinId: BN, binCountToExpand: BN): Promise<{ positionExtendCost: Decimal; binArrayCost: Decimal; }>; quoteCreatePosition({ strategy }: TQuoteCreatePositionParams): Promise<{ positionCount: number; positionCost: number; positionReallocCost: number; bitmapExtensionCost: number; binArraysCount: number; binArrayCost: number; transactionCount: number; }>; /** * Quote the cost to create a limit order * @param bins - Array of bin IDs (absolute, or relative offsets from active bin if relativeBin is set) to place limit orders in. * @param relativeBin - When set, the `bin.id` in `params.bins` will be treated as relative to the current active bin, which mean bin.id = bin.id + activeId. Otherwise, it will be absolute bin id. */ quoteCreateLimitOrder({ bins, relativeBin, }: { bins: { id: number; }[]; relativeBin?: { activeId: number; }; }): Promise<{ limitOrderCost: number; binArraysCount: number; binArrayCost: number; bitmapExtensionCost: number; }>; /** * Creates an empty position and initializes the corresponding bin arrays if needed. * @param param0 The settings of the requested new position. * @returns A promise that resolves into a transaction for creating the requested position. */ createEmptyPosition({ positionPubKey, minBinId, maxBinId, user, }: { positionPubKey: PublicKey; minBinId: number; maxBinId: number; user: PublicKey; }): Promise; /** * The function `getPosition` retrieves position information for a given public key and processes it * using various data to return a `LbPosition` object. * @param {PublicKey} positionPubKey - The `getPosition` function you provided is an asynchronous * function that fetches position information based on a given public key. Here's a breakdown of the * parameters used in the function: * @returns The `getPosition` function returns a Promise that resolves to an object of type * `LbPosition`. The object contains the following properties: * - `publicKey`: The public key of the position account * - `positionData`: Position Object * - `version`: The version of the position (in this case, `Position.V2`) */ getPosition(positionPubKey: PublicKey): Promise; /** * Creates multiple positions and adds liquidity by strategy. It allow parallel execution of transactions. * @param positionKeypairGenerator A function that generates a specified number of keypairs. * @param totalXAmount The total amount of token X to be added. * @param totalYAmount The total amount of token Y to be added. * @param strategy The strategy for adding liquidity. * @param owner The owner of the position. * @param payer The payer of the transaction. * @param slippagePercentage The slippage percentage for adding liquidity. * @returns An object with two properties: `initPositionIxs` and `addLiquidityIxs`. */ initializeMultiplePositionAndAddLiquidityByStrategy2(positionKeypairGenerator: (count: number) => Promise, totalXAmount: BN, totalYAmount: BN, strategy: StrategyParameters, owner: PublicKey, payer: PublicKey, slippagePercentage: number, altAddress?: PublicKey): Promise; /** * Creates multiple positions and adds liquidity by strategy without chainsaw issues. * @param positionKeypairGenerator A function that generates a specified number of keypairs. * @param totalXAmount The total amount of token X to be added. * @param totalYAmount The total amount of token Y to be added. * @param strategy The strategy for adding liquidity. * @param owner The owner of the position. * @param payer The payer of the transaction. * @param slippagePercentage The slippage percentage for adding liquidity. * @returns An object with two properties: `initPositionIxs` and `addLiquidityIxs`. */ initializeMultiplePositionAndAddLiquidityByStrategy(positionKeypairGenerator: (count: number) => Promise, totalXAmount: BN, totalYAmount: BN, strategy: StrategyParameters, owner: PublicKey, payer: PublicKey, slippagePercentage: number): Promise; /** * Adds liquidity to an existing position using a specified strategy, allowing for chunkable transactions. * If adding liquidity to bin out of position range, it will automatically expand. The limitation is 70 bins. * * @param {TInitializePositionAndAddLiquidityParamsByStrategy} params - The parameters required for adding liquidity. * @param {PublicKey} params.positionPubKey - The public key of the position to which liquidity is being added. * @param {BN} params.totalXAmount - The total amount of token X to be added as liquidity. * @param {BN} params.totalYAmount - The total amount of token Y to be added as liquidity. * @param {StrategyParameters} params.strategy - The strategy parameters for adding liquidity. * @param {PublicKey} params.user - The public key of the user adding liquidity. * @param {number} params.slippage - The slippage percentage allowed for the transaction. * * @returns {Promise} A promise that resolves to an array of transactions for adding liquidity. */ addLiquidityByStrategyChunkable({ positionPubKey, totalXAmount, totalYAmount, strategy, user, slippage, }: TInitializePositionAndAddLiquidityParamsByStrategy): Promise; /** * The function `initializePositionAndAddLiquidityByStrategy` function is used to initializes a position and adds liquidity * @param {TInitializePositionAndAddLiquidityParamsByStrategy} * - `positionPubKey`: The public key of the position account. (usually use `new Keypair()`) * - `totalXAmount`: The total amount of token X to be added to the liquidity pool. * - `totalYAmount`: The total amount of token Y to be added to the liquidity pool. * - `strategy`: The strategy parameters to be used for the liquidity pool (Can use `calculateStrategyParameter` to calculate). * - `user`: The public key of the user account. * - `slippage`: The slippage percentage to be used for the liquidity pool. * @returns {Promise} The function `initializePositionAndAddLiquidityByStrategy` returns a `Promise` that * resolves to either a single `Transaction` object. */ initializePositionAndAddLiquidityByStrategy({ positionPubKey, totalXAmount, totalYAmount, strategy, user, slippage, }: TInitializePositionAndAddLiquidityParamsByStrategy): Promise; /** * @deprecated Use `initializePositionAndAddLiquidityByStrategy` instead which support both token and token2022. * The function `initializePositionAndAddLiquidityByWeight` function is used to initializes a position and adds liquidity * @param {TInitializePositionAndAddLiquidityParams} * - `positionPubKey`: The public key of the position account. (usually use `new Keypair()`) * - `totalXAmount`: The total amount of token X to be added to the liquidity pool. * - `totalYAmount`: The total amount of token Y to be added to the liquidity pool. * - `xYAmountDistribution`: An array of objects of type `XYAmountDistribution` that represents (can use `calculateSpotDistribution`, `calculateBidAskDistribution` & `calculateNormalDistribution`) * - `user`: The public key of the user account. * - `slippage`: The slippage percentage to be used for the liquidity pool. * @returns {Promise} The function `initializePositionAndAddLiquidityByWeight` returns a `Promise` that * resolves to either a single `Transaction` object (if less than 26bin involved) or an array of `Transaction` objects. */ initializePositionAndAddLiquidityByWeight({ positionPubKey, totalXAmount, totalYAmount, xYAmountDistribution, user, slippage, }: TInitializePositionAndAddLiquidityParams): Promise; /** * The `addLiquidityByStrategy` function is used to add liquidity to existing position * @param {TInitializePositionAndAddLiquidityParamsByStrategy} * - `positionPubKey`: The public key of the position account. (usually use `new Keypair()`) * - `totalXAmount`: The total amount of token X to be added to the liquidity pool. * - `totalYAmount`: The total amount of token Y to be added to the liquidity pool. * - `strategy`: The strategy parameters to be used for the liquidity pool (Can use `calculateStrategyParameter` to calculate). * - `user`: The public key of the user account. * - `slippage`: The slippage percentage to be used for the liquidity pool. * @returns {Promise} The function `addLiquidityByWeight` returns a `Promise` that resolves to either a single * `Transaction` object */ addLiquidityByStrategy({ positionPubKey, totalXAmount, totalYAmount, strategy, user, slippage, }: TInitializePositionAndAddLiquidityParamsByStrategy): Promise; /** * The `addLiquidityByWeight2` function is used to add liquidity to existing position * @param {TInitializePositionAndAddLiquidityParams} * - `positionPubKey`: The public key of the position account. (usually use `new Keypair()`) * - `totalXAmount`: The total amount of token X to be added to the liquidity pool. * - `totalYAmount`: The total amount of token Y to be added to the liquidity pool. * - `xYAmountDistribution`: An array of objects of type `XYAmountDistribution` that represents (can use `calculateSpotDistribution`, `calculateBidAskDistribution` & `calculateNormalDistribution`) * - `user`: The public key of the user account. * - `slippage`: The slippage percentage to be used for the liquidity pool. * - `binPerChunk`: The number of bins per chunk when chunking into multiple transactions * @returns {Promise} The function `addLiquidityByWeight2` returns a `Promise` that resolves to transactions */ addLiquidityByWeight2({ positionPubKey, totalXAmount, totalYAmount, xYAmountDistribution, user, slippage, }: TInitializePositionAndAddLiquidityParams, binPerChunk?: number): Promise; /** * @deprecated Use `addLiquidityByStrategy` instead which support both token and token2022. * The `addLiquidityByWeight` function is used to add liquidity to existing position * @param {TInitializePositionAndAddLiquidityParams} * - `positionPubKey`: The public key of the position account. (usually use `new Keypair()`) * - `totalXAmount`: The total amount of token X to be added to the liquidity pool. * - `totalYAmount`: The total amount of token Y to be added to the liquidity pool. * - `xYAmountDistribution`: An array of objects of type `XYAmountDistribution` that represents (can use `calculateSpotDistribution`, `calculateBidAskDistribution` & `calculateNormalDistribution`) * - `user`: The public key of the user account. * - `slippage`: The slippage percentage to be used for the liquidity pool. * @returns {Promise} The function `addLiquidityByWeight` returns a `Promise` that resolves to either a single * `Transaction` object (if less than 26bin involved) or an array of `Transaction` objects. */ addLiquidityByWeight({ positionPubKey, totalXAmount, totalYAmount, xYAmountDistribution, user, slippage, }: TInitializePositionAndAddLiquidityParams): Promise; /** * The `removeLiquidity` function is used to remove liquidity from a position, * with the option to claim rewards and close the position. * @param * - `user`: The public key of the user account. * - `position`: The public key of the position account. * - `fromBinId`: The ID of the starting bin to remove liquidity from. Must within position range. * - `toBinId`: The ID of the ending bin to remove liquidity from. Must within position range. * - `liquiditiesBpsToRemove`: An array of numbers (percentage) that represent the liquidity to remove from each bin. * - `shouldClaimAndClose`: A boolean flag that indicates whether to claim rewards and close the position. * - `skipUnwrapSOL`: A boolean flag that indicates whether to skip unwrapping SOL. Enable this when using zap-sdk to ensure accuracy in SOL zap out amount when SOL is in token * @returns {Promise} */ removeLiquidity({ user, position, fromBinId, toBinId, bps, shouldClaimAndClose, skipUnwrapSOL, }: { user: PublicKey; position: PublicKey; fromBinId: number; toBinId: number; bps: BN; shouldClaimAndClose?: boolean; skipUnwrapSOL?: boolean; }): Promise; /** * The `closePositionIfEmpty` function closes a position if it is empty. Else, it does nothing. */ closePositionIfEmpty({ owner, position, }: { owner: PublicKey; position: LbPosition; }): Promise; /** * The `closePosition` function closes a position * @param * - `owner`: The public key of the owner of the position. * - `position`: The public key of the position account. * @returns {Promise} */ closePosition({ owner, position, }: { owner: PublicKey; position: LbPosition; }): Promise; /** * The `swapQuoteExactOut` function returns a quote for a swap * @param * - `outAmount`: Amount of lamport to swap out * - `swapForY`: Swap token X to Y when it is true, else reversed. * - `allowedSlippage`: Allowed slippage for the swap. Expressed in BPS. To convert from slippage percentage to BPS unit: SLIPPAGE_PERCENTAGE * 100 * - `maxExtraBinArrays`: Maximum number of extra binArrays to return * @returns {SwapQuote} * - `inAmount`: Amount of lamport to swap in * - `outAmount`: Amount of lamport to swap out * - `fee`: Fee amount * - `protocolFee`: Protocol fee amount * - `maxInAmount`: Maximum amount of lamport to swap in * - `binArraysPubkey`: Array of bin arrays involved in the swap * @throws {DlmmSdkError} * */ swapQuoteExactOut(outAmount: BN, swapForY: boolean, allowedSlippage: BN, binArrays: BinArrayAccount[], maxExtraBinArrays?: number): SwapQuoteExactOut; /** * The `swapQuote` function returns a quote for a swap * @param * - `inAmount`: Amount of lamport to swap in * - `swapForY`: Swap token X to Y when it is true, else reversed. * - `allowedSlippage`: Allowed slippage for the swap. Expressed in BPS. To convert from slippage percentage to BPS unit: SLIPPAGE_PERCENTAGE * 100 * - `binArrays`: binArrays for swapQuote. * - `isPartialFill`: Flag to check whether the the swapQuote is partial fill, default = false. * - `maxExtraBinArrays`: Maximum number of extra binArrays to return * @returns {SwapQuote} * - `consumedInAmount`: Amount of lamport to swap in * - `outAmount`: Amount of lamport to swap out * - `fee`: Fee amount * - `protocolFee`: Protocol fee amount * - `minOutAmount`: Minimum amount of lamport to swap out * - `priceImpact`: Price impact of the swap * - `binArraysPubkey`: Array of bin arrays involved in the swap * @throws {DlmmSdkError} */ swapQuote(inAmount: BN, swapForY: boolean, allowedSlippage: BN, binArrays: BinArrayAccount[], isPartialFill?: boolean, maxExtraBinArrays?: number): SwapQuote; swapExactOut({ inToken, outToken, outAmount, maxInAmount, lbPair, user, binArraysPubkey, }: SwapExactOutParams): Promise; /** * Returns a transaction to be signed and sent by user performing swap. * @param {SwapWithPriceImpactParams} * - `inToken`: The public key of the token to be swapped in. * - `outToken`: The public key of the token to be swapped out. * - `inAmount`: The amount of token to be swapped in. * - `priceImpact`: Accepted price impact bps. * - `lbPair`: The public key of the liquidity pool. * - `user`: The public key of the user account. * - `binArraysPubkey`: Array of bin arrays involved in the swap * @returns {Promise} */ swapWithPriceImpact({ inToken, outToken, inAmount, lbPair, user, priceImpact, binArraysPubkey, }: SwapWithPriceImpactParams): Promise; /** * Returns a transaction to be signed and sent by user performing swap. * @param {SwapParams} * - `inToken`: The public key of the token to be swapped in. * - `outToken`: The public key of the token to be swapped out. * - `inAmount`: The amount of token to be swapped in. * - `minOutAmount`: The minimum amount of token to be swapped out. * - `lbPair`: The public key of the liquidity pool. * - `user`: The public key of the user account. * - `binArraysPubkey`: Array of bin arrays involved in the swap * @returns {Promise} */ swap({ inToken, outToken, inAmount, minOutAmount, lbPair, user, binArraysPubkey, }: SwapParams): Promise; /** * The claimLMReward function is used to claim rewards for a specific position owned by a specific owner. * @param * - `owner`: The public key of the owner of the position. * - `position`: The public key of the position account. * @returns {Promise} Claim LM reward transactions. */ claimLMReward({ owner, position, }: { owner: PublicKey; position: LbPosition; }): Promise; /** * The `claimAllLMRewards` function is used to claim all liquidity mining rewards for a given owner * and their positions. * @param * - `owner`: The public key of the owner of the positions. * - `positions`: An array of objects of type `PositionData` that represents the positions to claim rewards from. * @returns {Promise} Array of claim LM reward and fees transactions. */ claimAllLMRewards({ owner, positions, }: { owner: PublicKey; positions: LbPosition[]; }): Promise; setActivationPoint(activationPoint: BN): Promise; setPairStatus(enabled: boolean): Promise; /** * The function `claimSwapFee` is used to claim swap fees for a specific position owned by a specific owner. * @param * - `owner`: The public key of the owner of the position. * - `position`: The public key of the position account. * - `binRange`: The bin range to claim swap fees for. If not provided, the function claim swap fees for full range. * @returns {Promise} Claim swap fee transactions. */ claimSwapFee({ owner, position, }: { owner: PublicKey; position: LbPosition; }): Promise; /** * The `claimAllSwapFee` function to claim swap fees for multiple positions owned by a specific owner. * @param * - `owner`: The public key of the owner of the positions. * - `positions`: An array of objects of type `PositionData` that represents the positions to claim swap fees from. * @returns {Promise} Array of claim swap fee transactions. */ claimAllSwapFee({ owner, positions, }: { owner: PublicKey; positions: LbPosition[]; }): Promise; /** * The function `claimAllRewardsByPosition` allows a user to claim all rewards for a specific * position. * @param * - `owner`: The public key of the owner of the position. * - `position`: The public key of the position account. * @returns {Promise} Array of claim reward transactions. */ claimAllRewardsByPosition({ owner, position, }: { owner: PublicKey; position: LbPosition; }): Promise; /** * The `seedLiquidity` function create multiple grouped instructions. The grouped instructions will be [init ata + send lamport for token provde], [initialize bin array + initialize position instructions] and [deposit instruction]. Each grouped instructions can be executed parallelly. * @param * - `owner`: The public key of the positions owner. * - `seedAmount`: Lamport amount to be seeded to the pool. * - `minPrice`: Start price in UI format * - `maxPrice`: End price in UI format * - `base`: Base key * - `txPayer`: Account rental fee payer * - `feeOwner`: Fee owner key. Default to position owner * - `operator`: Operator key * - `lockReleasePoint`: Timelock. Point (slot/timestamp) the position can withdraw the liquidity, * - `shouldSeedPositionOwner` (optional): Whether to send 1 lamport amount of token X to the position owner to prove ownership. * @returns {Promise} */ seedLiquidity(owner: PublicKey, seedAmount: BN, curvature: number, minPrice: number, maxPrice: number, base: PublicKey, payer: PublicKey, feeOwner: PublicKey, operator: PublicKey, lockReleasePoint: BN, shouldSeedPositionOwner?: boolean): Promise; /** * The `seedLiquiditySingleBin` function seed liquidity into a single bin. * @param * - `payer`: The public key of the tx payer. * - `base`: Base key * - `seedAmount`: Token X lamport amount to be seeded to the pool. * - `price`: TokenX/TokenY Price in UI format * - `roundingUp`: Whether to round up the price * - `positionOwner`: The owner of the position * - `feeOwner`: Position fee owner * - `operator`: Operator of the position. Operator able to manage the position on behalf of the position owner. However, liquidity withdrawal issue by the operator can only send to the position owner. * - `lockReleasePoint`: The lock release point of the position. * - `shouldSeedPositionOwner` (optional): Whether to send 1 lamport amount of token X to the position owner to prove ownership. * * The returned instructions need to be executed sequentially if it was separated into multiple transactions. * @returns {Promise} */ seedLiquiditySingleBin(payer: PublicKey, base: PublicKey, seedAmount: BN, price: number, roundingUp: boolean, positionOwner: PublicKey, feeOwner: PublicKey, operator: PublicKey, lockReleasePoint: BN, shouldSeedPositionOwner?: boolean): Promise; /** * Initializes bin arrays for the given bin array indexes if it wasn't initialized. * * @param {BN[]} binArrayIndexes - An array of bin array indexes to initialize. * @param {PublicKey} funder - The public key of the funder. * @return {Promise} An array of transaction instructions to initialize the bin arrays. */ initializeBinArrays(binArrayIndexes: BN[], funder: PublicKey): Promise; /** * * @param * - `lowerBinId`: Lower bin ID of the position. This represent the lowest price of the position * - `positionWidth`: Width of the position. This will decide the upper bin id of the position, which represents the highest price of the position. UpperBinId = lowerBinId + positionWidth * - `owner`: Owner of the position. * - `operator`: Operator of the position. Operator able to manage the position on behalf of the position owner. However, liquidity withdrawal issue by the operator can only send to the position owner. * - `base`: Base key * - `feeOwner`: Owner of the fees earned by the position. * - `payer`: Payer for the position account rental. * - `lockReleasePoint`: The lock release point of the position. * @returns */ initializePositionByOperator({ lowerBinId, positionWidth, owner, feeOwner, base, operator, payer, lockReleasePoint, }: { lowerBinId: BN; positionWidth: BN; owner: PublicKey; feeOwner: PublicKey; operator: PublicKey; payer: PublicKey; base: PublicKey; lockReleasePoint: BN; }): Promise; /** * The `claimAllRewards` function to claim swap fees and LM rewards for multiple positions owned by a specific owner. * @param * - `owner`: The public key of the owner of the positions. * - `positions`: An array of objects of type `PositionData` that represents the positions to claim swap fees and LM rewards from. * @returns {Promise} Array of claim swap fee and LM reward transactions. */ claimAllRewards({ owner, positions, }: { owner: PublicKey; positions: LbPosition[]; }): Promise; canSyncWithMarketPrice(marketPrice: number, activeBinId: number): boolean; /** * The `syncWithMarketPrice` function is used to sync the liquidity pool with the market price. * @param * - `marketPrice`: The market price to sync with. * - `owner`: The public key of the owner of the liquidity pool. * @returns {Promise} */ syncWithMarketPrice(marketPrice: number, owner: PublicKey): Promise; getMaxPriceInBinArrays(binArrayAccounts: BinArrayAccount[]): Promise; /** * * @param swapInitiator Address of the swap initiator * @returns */ isSwapDisabled(swapInitiator: PublicKey): boolean; /** * Decrease the length of a position. The segment of the position to be decreased must be empty. * * @param position The public key of the position to decrease. * @param side The side of the position to decrease. * @param length The amount of length to decrease. * @param allowParallelExecution If true, the instructions will be grouped to allow parallel execution. Otherwise, the instructions will be executed sequentially. * @returns An array of transactions if allowParallelExecution is true. Otherwise, an empty array. */ decreasePositionLength(position: PublicKey, side: ResizeSide, length: BN, allowParallelExecution?: boolean): Promise; /** * Expand the position bin range to the left or right (lower or upper). * * @param position The address of the position to increase the length of. * @param side The side of the position to increase the length of. Must be either * ResizeSide.Lower or ResizeSide.Upper. * @param length The number of bins to increase the length of. Position length after increase must be <= 1400. * @param funder The address to account rental and transaction fee. * @param allowParallelExecution Whether to allow parallel execution of the transaction. * @returns The transaction to execute this instruction. */ increasePositionLength(position: PublicKey, side: ResizeSide, length: BN, funder: PublicKey, allowParallelExecution?: boolean): Promise; simulateRebalancePositionWithBalancedStrategy(positionAddress: PublicKey, positionData: PositionData, strategy: StrategyType, topUpAmountX: BN, topUpAmountY: BN, xWithdrawBps: BN, yWithdrawBps: BN): Promise; private simulateRebalancePositionWithStrategy; private quoteBinArrayAccountsRentalCost; /** * Simulates a rebalance operation on a position without actually executing it. It's recommended to use simulateRebalancePositionWithXStrategy instead unless you know what you're doing. * * @param positionAddress The address of the position to simulate rebalancing. * @param positionData The PositionData object associated with the position. * @param shouldClaimFee True if the fee should be claimed during rebalancing. * @param shouldClaimReward True if the reward should be claimed during rebalancing. * @param deposits An array of RebalanceWithDeposit objects representing the deposits to simulate. * @param withdraws An array of RebalanceWithWithdraw objects representing the withdraws to simulate. */ simulateRebalancePosition(positionAddress: PublicKey, positionData: PositionData, shouldClaimFee: boolean, shouldClaimReward: boolean, deposits: RebalanceWithDeposit[], withdraws: RebalanceWithWithdraw[]): Promise; /** * Rebalances a position and claim rewards if specified. * * @param rebalancePositionResponse The result of `simulateRebalancePosition`. * @param maxActiveBinSlippage The maximum slippage allowed for active bin selection. * @param slippage The slippage tolerance percentage for rebalncing. * * @returns An object containing the instructions to initialize new bin arrays and the instruction to rebalance the position. */ rebalancePosition(rebalancePositionResponse: RebalancePositionResponse, maxActiveBinSlippage: BN, rentPayer?: PublicKey, slippage?: number): Promise<{ initBinArrayInstructions: TransactionInstruction[]; rebalancePositionInstruction: TransactionInstruction[]; }>; /** * Create an extended empty position. * * @param lowerBinid The lowest bin of the position. * @param upperBinId The highest bin of the position. * @param position The public key of the position. * @param owner The owner of the position. * @returns The instructions to create the extended empty position. */ createExtendedEmptyPosition(lowerBinid: number, upperBinId: number, position: PublicKey, owner: PublicKey): Promise; /** * Enables permissionless fee claiming for a position. * @param * - `position`: The public key of the position account. * - `owner`: The public key of the position owner. * @returns {Promise} A transaction that sets the position permission bit for fee claiming. */ enablePositionPermissionlessClaimFee({ position, owner, }: { position: PublicKey; owner: PublicKey; }): Promise; /** * Creates a limit-order transaction for this LB pair. * When `relativeBin` is provided, the `bin.id` in `params.bins` will be treated as relative to the current active bin, which mean bin.id = bin.id + activeId. Otherwise, it will be absolute bin id. * * * @param params Input parameters for placing a limit order. * @param params.owner Owner of the token account used by the order. * @param params.payer Account paying rent for any newly created accounts. * @param params.sender Transaction signer that submits the order. * @param params.limitOrder PDA/public key of the limit-order account. * @param params.params Limit-order configuration. `padding` is injected by the SDK. * @returns A transaction that places the limit order. */ placeLimitOrder({ owner, payer, sender, limitOrder, params, }: { owner: PublicKey; payer: PublicKey; sender: PublicKey; limitOrder: PublicKey; params: Omit; }): Promise; /** * Cancels a limit order * @param * - `limitOrderPubkey`: The public key of the limit-order account to cancel. * - `owner`: The owner of the limit-order account and transaction fee payer. * - `binIds`: Bin IDs to cancel from the limit order. * @returns {Promise} A transaction that cancels the limit order, ensures owner ATAs for both pool * mints (including idempotent creates for non-SOL legs), and unwraps SOL when applicable. */ cancelLimitOrder({ limitOrderPubkey, owner, rentReceiver, binIds, }: { limitOrderPubkey: PublicKey; owner: PublicKey; rentReceiver: PublicKey; binIds: number[]; }): Promise; /** * Closes a limit-order account if it has no remaining open bins. * @param * - `limitOrder`: The public key of the limit-order account to close. * - `owner`: The owner of the limit-order account and transaction fee payer. * - `rentReceiver`: The account that receives reclaimed rent from the closed limit-order account. * @returns {Promise} A transaction that closes the limit-order account when it is empty. */ closeLimitOrderIfEmpty({ limitOrder, owner, rentReceiver, }: { limitOrder: PublicKey; owner: PublicKey; rentReceiver: PublicKey; }): Promise; private createInitAndExtendPositionIx; private increasePositionLengthIxs; /** Private static method */ private static getBinArrays; private static processPosition; private static getBinsBetweenLowerAndUpperBound; /** Private method */ private processXYAmountDistribution; private getBins; private binArraysToBeCreate; private createBinArraysIfNeeded; static updateVolatilityAccumulator(vParameter: vParameters, sParameter: sParameters, activeId: number): void; static updateReference(activeId: number, vParameter: vParameters, sParameter: sParameters, currentTimestamp: number): void; private createClaimBuildMethod; private createClaimSwapFeeMethod; getPotentialToken2022IxDataAndAccounts(actionType: ActionType, rewardIndex?: number): { slices: RemainingAccountsInfoSlice[]; accounts: AccountMeta[]; }; /** * Fetches the oracle account and returns an IDynamicOracle instance that can be * used to query TWAP (Time-Weighted Average Price) data. * * @returns An IDynamicOracle instance with methods like getActiveIdByTime, * getPriceByTime, getUiPriceByTime, etc. */ getOracle(): Promise; /** * Returns a transaction to increase the oracle observation storage length. * A longer oracle stores more historical data, enabling TWAP queries over * longer time ranges. * * @param lengthToAdd - Number of observation slots to add. * @param funder - The public key of the account funding the reallocation. * @returns A Transaction that can be signed and sent. */ increaseOracleLength(lengthToAdd: BN, funder: PublicKey): Promise; } var address = "LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo"; var metadata = { name: "lb_clmm", version: "0.12.0", spec: "0.1.0", description: "Created with Anchor" }; var instructions = [ { name: "add_liquidity", discriminator: [ 181, 157, 89, 67, 143, 182, 52, 72 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension", "bin_array_lower", "bin_array_upper" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token_x", writable: true }, { name: "user_token_y", writable: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "bin_array_lower", writable: true }, { name: "bin_array_upper", writable: true }, { name: "sender", signer: true }, { name: "token_x_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "token_y_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "liquidity_parameter", type: { defined: { name: "LiquidityParameter" } } } ] }, { name: "add_liquidity2", discriminator: [ 228, 162, 78, 28, 70, 219, 116, 115 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token_x", writable: true }, { name: "user_token_y", writable: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "sender", signer: true }, { name: "token_x_program" }, { name: "token_y_program" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "liquidity_parameter", type: { defined: { name: "LiquidityParameter" } } }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "add_liquidity_by_strategy", discriminator: [ 7, 3, 150, 127, 148, 40, 61, 200 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension", "bin_array_lower", "bin_array_upper" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token_x", writable: true }, { name: "user_token_y", writable: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "bin_array_lower", writable: true }, { name: "bin_array_upper", writable: true }, { name: "sender", signer: true }, { name: "token_x_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "token_y_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "liquidity_parameter", type: { defined: { name: "LiquidityParameterByStrategy" } } } ] }, { name: "add_liquidity_by_strategy2", discriminator: [ 3, 221, 149, 218, 111, 141, 118, 213 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token_x", writable: true }, { name: "user_token_y", writable: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "sender", signer: true }, { name: "token_x_program" }, { name: "token_y_program" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "liquidity_parameter", type: { defined: { name: "LiquidityParameterByStrategy" } } }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "add_liquidity_by_strategy_one_side", discriminator: [ 41, 5, 238, 175, 100, 225, 6, 205 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension", "bin_array_lower", "bin_array_upper" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token", writable: true }, { name: "reserve", writable: true }, { name: "token_mint" }, { name: "bin_array_lower", writable: true }, { name: "bin_array_upper", writable: true }, { name: "sender", signer: true }, { name: "token_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "liquidity_parameter", type: { defined: { name: "LiquidityParameterByStrategyOneSide" } } } ] }, { name: "add_liquidity_by_weight", discriminator: [ 28, 140, 238, 99, 231, 162, 21, 149 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension", "bin_array_lower", "bin_array_upper" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token_x", writable: true }, { name: "user_token_y", writable: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "bin_array_lower", writable: true }, { name: "bin_array_upper", writable: true }, { name: "sender", signer: true }, { name: "token_x_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "token_y_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "liquidity_parameter", type: { defined: { name: "LiquidityParameterByWeight" } } } ] }, { name: "add_liquidity_by_weight2", discriminator: [ 209, 59, 63, 91, 111, 200, 153, 228 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token_x", writable: true }, { name: "user_token_y", writable: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "sender", signer: true }, { name: "token_x_program" }, { name: "token_y_program" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "liquidity_parameter", type: { defined: { name: "LiquidityParameterByWeight" } } }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "add_liquidity_one_side", discriminator: [ 94, 155, 103, 151, 70, 95, 220, 165 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension", "bin_array_lower", "bin_array_upper" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token", writable: true }, { name: "reserve", writable: true }, { name: "token_mint" }, { name: "bin_array_lower", writable: true }, { name: "bin_array_upper", writable: true }, { name: "sender", signer: true }, { name: "token_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "liquidity_parameter", type: { defined: { name: "LiquidityOneSideParameter" } } } ] }, { name: "add_liquidity_one_side_precise", discriminator: [ 161, 194, 103, 84, 171, 71, 250, 154 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension", "bin_array_lower", "bin_array_upper" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token", writable: true }, { name: "reserve", writable: true }, { name: "token_mint" }, { name: "bin_array_lower", writable: true }, { name: "bin_array_upper", writable: true }, { name: "sender", signer: true }, { name: "token_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "parameter", type: { defined: { name: "AddLiquiditySingleSidePreciseParameter" } } } ] }, { name: "add_liquidity_one_side_precise2", discriminator: [ 33, 51, 163, 201, 117, 98, 125, 231 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token", writable: true }, { name: "reserve", writable: true }, { name: "token_mint" }, { name: "sender", signer: true }, { name: "token_program" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "liquidity_parameter", type: { defined: { name: "AddLiquiditySingleSidePreciseParameter2" } } }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "cancel_limit_order", discriminator: [ 132, 156, 132, 31, 67, 40, 232, 97 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "bin_array_bitmap_extension", "limit_order" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "limit_order", writable: true }, { name: "owner_token_x", docs: [ "When dont set it tokenAccount to prevent unnecessary create token account (rent fee) when user only withdraw token y" ], writable: true }, { name: "owner_token_y", writable: true }, { name: "owner", signer: true }, { name: "token_x_program" }, { name: "token_y_program" }, { name: "memo_program", address: "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "bins", type: { vec: "i32" } }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "claim_fee", discriminator: [ 169, 32, 79, 137, 136, 232, 70, 137 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "position", "bin_array_lower", "bin_array_upper" ] }, { name: "position", writable: true }, { name: "bin_array_lower", writable: true }, { name: "bin_array_upper", writable: true }, { name: "sender", signer: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "user_token_x", writable: true }, { name: "user_token_y", writable: true }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "token_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ ] }, { name: "claim_fee2", discriminator: [ 112, 191, 101, 171, 28, 144, 127, 187 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "position" ] }, { name: "position", writable: true }, { name: "sender", signer: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "user_token_x", writable: true }, { name: "user_token_y", writable: true }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "token_program_x" }, { name: "token_program_y" }, { name: "memo_program", address: "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "min_bin_id", type: "i32" }, { name: "max_bin_id", type: "i32" }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "claim_reward", discriminator: [ 149, 95, 181, 242, 94, 90, 158, 162 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "position", "bin_array_lower", "bin_array_upper" ] }, { name: "position", writable: true }, { name: "bin_array_lower", writable: true }, { name: "bin_array_upper", writable: true }, { name: "sender", signer: true }, { name: "reward_vault", writable: true }, { name: "reward_mint" }, { name: "user_token_account", writable: true }, { name: "token_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "reward_index", type: "u64" } ] }, { name: "claim_reward2", discriminator: [ 190, 3, 127, 119, 178, 87, 157, 183 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "position" ] }, { name: "position", writable: true }, { name: "sender", signer: true }, { name: "reward_vault", writable: true }, { name: "reward_mint" }, { name: "user_token_account", writable: true }, { name: "token_program" }, { name: "memo_program", address: "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "reward_index", type: "u64" }, { name: "min_bin_id", type: "i32" }, { name: "max_bin_id", type: "i32" }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "close_bin_array", discriminator: [ 68, 174, 88, 80, 181, 204, 19, 224 ], accounts: [ { name: "lb_pair", relations: [ "bin_array" ] }, { name: "bin_array", writable: true }, { name: "rent_receiver", writable: true, signer: true }, { name: "signer", signer: true } ], args: [ ] }, { name: "close_claim_fee_operator_account", discriminator: [ 184, 213, 88, 31, 179, 101, 130, 36 ], accounts: [ { name: "claim_fee_operator", writable: true }, { name: "rent_receiver", writable: true }, { name: "signer", signer: true } ], args: [ ] }, { name: "close_limit_order_if_empty", discriminator: [ 57, 124, 36, 155, 126, 249, 93, 171 ], accounts: [ { name: "limit_order", writable: true }, { name: "owner", signer: true }, { name: "rent_receiver", writable: true }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ ] }, { name: "close_operator_account", discriminator: [ 171, 9, 213, 74, 120, 23, 3, 29 ], accounts: [ { name: "operator", writable: true }, { name: "signer", signer: true }, { name: "rent_receiver", writable: true } ], args: [ ] }, { name: "close_position", discriminator: [ 123, 134, 81, 0, 49, 68, 98, 98 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true }, { name: "bin_array_lower", writable: true }, { name: "bin_array_upper", writable: true }, { name: "sender", signer: true }, { name: "rent_receiver", writable: true }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ ] }, { name: "close_position2", discriminator: [ 174, 90, 35, 115, 186, 40, 147, 226 ], accounts: [ { name: "position", writable: true }, { name: "sender", signer: true }, { name: "rent_receiver", writable: true }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ ] }, { name: "close_position_if_empty", discriminator: [ 59, 124, 212, 118, 91, 152, 110, 157 ], accounts: [ { name: "position", writable: true }, { name: "sender", signer: true }, { name: "rent_receiver", writable: true }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ ] }, { name: "close_preset_parameter", discriminator: [ 4, 148, 145, 100, 134, 26, 181, 61 ], accounts: [ { name: "preset_parameter", writable: true }, { name: "operator" }, { name: "signer", signer: true }, { name: "rent_receiver", writable: true } ], args: [ ] }, { name: "close_preset_parameter2", discriminator: [ 39, 25, 95, 107, 116, 17, 115, 28 ], accounts: [ { name: "preset_parameter", writable: true }, { name: "operator" }, { name: "signer", signer: true }, { name: "rent_receiver", writable: true } ], args: [ ] }, { name: "close_token_badge", discriminator: [ 108, 146, 86, 110, 179, 254, 10, 104 ], accounts: [ { name: "token_badge", writable: true }, { name: "rent_receiver", writable: true }, { name: "operator" }, { name: "signer", signer: true } ], args: [ ] }, { name: "create_operator_account", discriminator: [ 221, 64, 246, 149, 240, 153, 229, 163 ], accounts: [ { name: "operator", writable: true, pda: { seeds: [ { kind: "const", value: [ 111, 112, 101, 114, 97, 116, 111, 114 ] }, { kind: "account", path: "whitelisted_signer" } ] } }, { name: "whitelisted_signer" }, { name: "signer", signer: true }, { name: "payer", writable: true, signer: true }, { name: "system_program", address: "11111111111111111111111111111111" } ], args: [ { name: "permission", type: "u128" } ] }, { name: "decrease_position_length", discriminator: [ 194, 219, 136, 32, 25, 96, 105, 37 ], accounts: [ { name: "rent_receiver", writable: true }, { name: "position", writable: true }, { name: "owner", signer: true, relations: [ "position" ] }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "length_to_remove", type: "u16" }, { name: "side", type: "u8" } ] }, { name: "for_idl_type_generation_do_not_call", discriminator: [ 180, 105, 69, 80, 95, 50, 73, 108 ], accounts: [ { name: "dummy_zc_account" } ], args: [ { name: "_ix", type: { defined: { name: "DummyIx" } } } ] }, { name: "fund_reward", discriminator: [ 188, 50, 249, 165, 93, 151, 38, 63 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "bin_array" ] }, { name: "reward_vault", writable: true }, { name: "reward_mint" }, { name: "funder_token_account", writable: true }, { name: "funder", signer: true }, { name: "bin_array", writable: true }, { name: "token_program" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "reward_index", type: "u64" }, { name: "amount", type: "u64" }, { name: "carry_forward", type: "bool" }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "go_to_a_bin", discriminator: [ 146, 72, 174, 224, 40, 253, 84, 174 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "bin_array_bitmap_extension", "from_bin_array", "to_bin_array" ] }, { name: "bin_array_bitmap_extension", optional: true }, { name: "from_bin_array", optional: true }, { name: "to_bin_array", optional: true }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "bin_id", type: "i32" } ] }, { name: "increase_oracle_length", discriminator: [ 190, 61, 125, 87, 103, 79, 158, 173 ], accounts: [ { name: "oracle", writable: true }, { name: "funder", writable: true, signer: true }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "length_to_add", type: "u64" } ] }, { name: "increase_position_length", discriminator: [ 80, 83, 117, 211, 66, 13, 33, 149 ], accounts: [ { name: "funder", writable: true, signer: true }, { name: "lb_pair", relations: [ "position" ] }, { name: "position", writable: true }, { name: "owner", signer: true, relations: [ "position" ] }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "length_to_add", type: "u16" }, { name: "side", type: "u8" } ] }, { name: "increase_position_length2", discriminator: [ 255, 210, 204, 71, 115, 137, 225, 113 ], accounts: [ { name: "funder", writable: true, signer: true }, { name: "lb_pair", relations: [ "position" ] }, { name: "position", writable: true }, { name: "owner", signer: true, relations: [ "position" ] }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "minimum_upper_bin_id", type: "i32" } ] }, { name: "initialize_bin_array", discriminator: [ 35, 86, 19, 185, 78, 212, 75, 211 ], accounts: [ { name: "lb_pair" }, { name: "bin_array", writable: true, pda: { seeds: [ { kind: "const", value: [ 98, 105, 110, 95, 97, 114, 114, 97, 121 ] }, { kind: "account", path: "lb_pair" }, { kind: "arg", path: "index" } ] } }, { name: "funder", writable: true, signer: true }, { name: "system_program", address: "11111111111111111111111111111111" } ], args: [ { name: "index", type: "i64" } ] }, { name: "initialize_bin_array_bitmap_extension", discriminator: [ 47, 157, 226, 180, 12, 240, 33, 71 ], accounts: [ { name: "lb_pair" }, { name: "bin_array_bitmap_extension", docs: [ "Initialize an account to store if a bin array is initialized." ], writable: true, pda: { seeds: [ { kind: "const", value: [ 98, 105, 116, 109, 97, 112 ] }, { kind: "account", path: "lb_pair" } ] } }, { name: "funder", writable: true, signer: true }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "rent" } ], args: [ ] }, { name: "initialize_customizable_permissionless_lb_pair", discriminator: [ 46, 39, 41, 135, 111, 183, 200, 64 ], accounts: [ { name: "lb_pair", writable: true }, { name: "bin_array_bitmap_extension", writable: true, optional: true, pda: { seeds: [ { kind: "const", value: [ 98, 105, 116, 109, 97, 112 ] }, { kind: "account", path: "lb_pair" } ] } }, { name: "token_mint_x" }, { name: "token_mint_y" }, { name: "reserve_x", writable: true, pda: { seeds: [ { kind: "account", path: "lb_pair" }, { kind: "account", path: "token_mint_x" } ] } }, { name: "reserve_y", writable: true, pda: { seeds: [ { kind: "account", path: "lb_pair" }, { kind: "account", path: "token_mint_y" } ] } }, { name: "oracle", writable: true, pda: { seeds: [ { kind: "const", value: [ 111, 114, 97, 99, 108, 101 ] }, { kind: "account", path: "lb_pair" } ] } }, { name: "user_token_x" }, { name: "funder", writable: true, signer: true }, { name: "token_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "user_token_y" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "params", type: { defined: { name: "CustomizableParams" } } } ] }, { name: "initialize_customizable_permissionless_lb_pair2", discriminator: [ 243, 73, 129, 126, 51, 19, 241, 107 ], accounts: [ { name: "lb_pair", writable: true }, { name: "bin_array_bitmap_extension", writable: true, optional: true, pda: { seeds: [ { kind: "const", value: [ 98, 105, 116, 109, 97, 112 ] }, { kind: "account", path: "lb_pair" } ] } }, { name: "token_mint_x" }, { name: "token_mint_y" }, { name: "reserve_x", writable: true, pda: { seeds: [ { kind: "account", path: "lb_pair" }, { kind: "account", path: "token_mint_x" } ] } }, { name: "reserve_y", writable: true, pda: { seeds: [ { kind: "account", path: "lb_pair" }, { kind: "account", path: "token_mint_y" } ] } }, { name: "oracle", writable: true, pda: { seeds: [ { kind: "const", value: [ 111, 114, 97, 99, 108, 101 ] }, { kind: "account", path: "lb_pair" } ] } }, { name: "user_token_x" }, { name: "funder", writable: true, signer: true }, { name: "token_badge_x", optional: true }, { name: "token_badge_y", optional: true }, { name: "token_program_x" }, { name: "token_program_y" }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "user_token_y" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "params", type: { defined: { name: "CustomizableParams" } } } ] }, { name: "initialize_lb_pair", discriminator: [ 45, 154, 237, 210, 221, 15, 166, 92 ], accounts: [ { name: "lb_pair", writable: true }, { name: "bin_array_bitmap_extension", writable: true, optional: true, pda: { seeds: [ { kind: "const", value: [ 98, 105, 116, 109, 97, 112 ] }, { kind: "account", path: "lb_pair" } ] } }, { name: "token_mint_x" }, { name: "token_mint_y" }, { name: "reserve_x", writable: true, pda: { seeds: [ { kind: "account", path: "lb_pair" }, { kind: "account", path: "token_mint_x" } ] } }, { name: "reserve_y", writable: true, pda: { seeds: [ { kind: "account", path: "lb_pair" }, { kind: "account", path: "token_mint_y" } ] } }, { name: "oracle", writable: true, pda: { seeds: [ { kind: "const", value: [ 111, 114, 97, 99, 108, 101 ] }, { kind: "account", path: "lb_pair" } ] } }, { name: "preset_parameter" }, { name: "funder", writable: true, signer: true }, { name: "token_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "rent" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "active_id", type: "i32" }, { name: "bin_step", type: "u16" } ] }, { name: "initialize_lb_pair2", discriminator: [ 73, 59, 36, 120, 237, 83, 108, 198 ], accounts: [ { name: "lb_pair", writable: true }, { name: "bin_array_bitmap_extension", writable: true, optional: true, pda: { seeds: [ { kind: "const", value: [ 98, 105, 116, 109, 97, 112 ] }, { kind: "account", path: "lb_pair" } ] } }, { name: "token_mint_x" }, { name: "token_mint_y" }, { name: "reserve_x", writable: true, pda: { seeds: [ { kind: "account", path: "lb_pair" }, { kind: "account", path: "token_mint_x" } ] } }, { name: "reserve_y", writable: true, pda: { seeds: [ { kind: "account", path: "lb_pair" }, { kind: "account", path: "token_mint_y" } ] } }, { name: "oracle", writable: true, pda: { seeds: [ { kind: "const", value: [ 111, 114, 97, 99, 108, 101 ] }, { kind: "account", path: "lb_pair" } ] } }, { name: "preset_parameter" }, { name: "funder", writable: true, signer: true }, { name: "token_badge_x", optional: true }, { name: "token_badge_y", optional: true }, { name: "token_program_x" }, { name: "token_program_y" }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "params", type: { defined: { name: "InitializeLbPair2Params" } } } ] }, { name: "initialize_permission_lb_pair", discriminator: [ 108, 102, 213, 85, 251, 3, 53, 21 ], accounts: [ { name: "base", signer: true }, { name: "lb_pair", writable: true }, { name: "bin_array_bitmap_extension", writable: true, optional: true, pda: { seeds: [ { kind: "const", value: [ 98, 105, 116, 109, 97, 112 ] }, { kind: "account", path: "lb_pair" } ] } }, { name: "token_mint_x" }, { name: "token_mint_y" }, { name: "reserve_x", writable: true, pda: { seeds: [ { kind: "account", path: "lb_pair" }, { kind: "account", path: "token_mint_x" } ] } }, { name: "reserve_y", writable: true, pda: { seeds: [ { kind: "account", path: "lb_pair" }, { kind: "account", path: "token_mint_y" } ] } }, { name: "oracle", writable: true, pda: { seeds: [ { kind: "const", value: [ 111, 114, 97, 99, 108, 101 ] }, { kind: "account", path: "lb_pair" } ] } }, { name: "payer", writable: true, signer: true }, { name: "operator" }, { name: "signer", signer: true }, { name: "token_badge_x", optional: true }, { name: "token_badge_y", optional: true }, { name: "token_program_x" }, { name: "token_program_y" }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "ix_data", type: { defined: { name: "InitPermissionPairIx" } } } ] }, { name: "initialize_position", discriminator: [ 219, 192, 234, 71, 190, 191, 102, 80 ], accounts: [ { name: "payer", writable: true, signer: true }, { name: "position", writable: true, signer: true }, { name: "lb_pair" }, { name: "owner", signer: true }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "rent" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "lower_bin_id", type: "i32" }, { name: "width", type: "i32" } ] }, { name: "initialize_position2", discriminator: [ 143, 19, 242, 145, 213, 15, 104, 115 ], accounts: [ { name: "payer", writable: true, signer: true }, { name: "position", writable: true, signer: true }, { name: "lb_pair" }, { name: "owner", signer: true }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "lower_bin_id", type: "i32" }, { name: "width", type: "i32" } ] }, { name: "initialize_position_by_operator", discriminator: [ 251, 189, 190, 244, 117, 254, 35, 148 ], accounts: [ { name: "payer", writable: true, signer: true }, { name: "base", signer: true }, { name: "position", writable: true, pda: { seeds: [ { kind: "const", value: [ 112, 111, 115, 105, 116, 105, 111, 110 ] }, { kind: "account", path: "lb_pair" }, { kind: "account", path: "base" }, { kind: "arg", path: "lower_bin_id" }, { kind: "arg", path: "width" } ] } }, { name: "lb_pair" }, { name: "owner" }, { name: "operator", docs: [ "operator" ], signer: true }, { name: "operator_token_x" }, { name: "owner_token_x" }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "lower_bin_id", type: "i32" }, { name: "width", type: "i32" }, { name: "fee_owner", type: "pubkey" }, { name: "lock_release_point", type: "u64" } ] }, { name: "initialize_position_pda", discriminator: [ 46, 82, 125, 146, 85, 141, 228, 153 ], accounts: [ { name: "payer", writable: true, signer: true }, { name: "base", signer: true }, { name: "position", writable: true, pda: { seeds: [ { kind: "const", value: [ 112, 111, 115, 105, 116, 105, 111, 110 ] }, { kind: "account", path: "lb_pair" }, { kind: "account", path: "base" }, { kind: "arg", path: "lower_bin_id" }, { kind: "arg", path: "width" } ] } }, { name: "lb_pair" }, { name: "owner", docs: [ "owner" ], signer: true }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "rent" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "lower_bin_id", type: "i32" }, { name: "width", type: "i32" } ] }, { name: "initialize_preset_parameter", discriminator: [ 66, 188, 71, 211, 98, 109, 14, 186 ], accounts: [ { name: "preset_parameter", writable: true, pda: { seeds: [ { kind: "const", value: [ 112, 114, 101, 115, 101, 116, 95, 112, 97, 114, 97, 109, 101, 116, 101, 114, 50 ] }, { kind: "arg", path: "ix.index" } ] } }, { name: "operator" }, { name: "signer", signer: true }, { name: "payer", writable: true, signer: true }, { name: "system_program", address: "11111111111111111111111111111111" } ], args: [ { name: "ix", type: { defined: { name: "InitPresetParametersIx" } } } ] }, { name: "initialize_reward", discriminator: [ 95, 135, 192, 196, 242, 129, 230, 68 ], accounts: [ { name: "lb_pair", writable: true }, { name: "reward_vault", writable: true, pda: { seeds: [ { kind: "account", path: "lb_pair" }, { kind: "arg", path: "reward_index" } ] } }, { name: "reward_mint" }, { name: "token_badge", optional: true }, { name: "operator" }, { name: "signer", signer: true }, { name: "payer", writable: true, signer: true }, { name: "token_program" }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "reward_index", type: "u64" }, { name: "reward_duration", type: "u64" }, { name: "funder", type: "pubkey" } ] }, { name: "initialize_token_badge", discriminator: [ 253, 77, 205, 95, 27, 224, 89, 223 ], accounts: [ { name: "token_mint" }, { name: "token_badge", writable: true, pda: { seeds: [ { kind: "const", value: [ 116, 111, 107, 101, 110, 95, 98, 97, 100, 103, 101 ] }, { kind: "account", path: "token_mint" } ] } }, { name: "operator" }, { name: "signer", signer: true }, { name: "payer", writable: true, signer: true }, { name: "system_program", address: "11111111111111111111111111111111" } ], args: [ ] }, { name: "place_limit_order", discriminator: [ 108, 176, 33, 186, 146, 229, 1, 197 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "bin_array_bitmap_extension" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "reserve", writable: true }, { name: "token_mint" }, { name: "limit_order", writable: true, signer: true }, { name: "payer", writable: true, signer: true }, { name: "owner" }, { name: "user_token", writable: true }, { name: "sender", signer: true }, { name: "token_program" }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "params", type: { defined: { name: "PlaceLimitOrderParams" } } }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "rebalance_liquidity", discriminator: [ 92, 4, 176, 193, 119, 185, 83, 9 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token_x", writable: true }, { name: "user_token_y", writable: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "owner", signer: true, relations: [ "position" ] }, { name: "rent_payer", writable: true, signer: true }, { name: "token_x_program" }, { name: "token_y_program" }, { name: "memo_program", address: "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr" }, { name: "system_program", address: "11111111111111111111111111111111" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "params", type: { defined: { name: "RebalanceLiquidityParams" } } }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "remove_all_liquidity", discriminator: [ 10, 51, 61, 35, 112, 105, 24, 85 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension", "bin_array_lower", "bin_array_upper" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token_x", writable: true }, { name: "user_token_y", writable: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "bin_array_lower", writable: true }, { name: "bin_array_upper", writable: true }, { name: "sender", signer: true }, { name: "token_x_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "token_y_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ ] }, { name: "remove_liquidity", discriminator: [ 80, 85, 209, 72, 24, 206, 177, 108 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension", "bin_array_lower", "bin_array_upper" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token_x", writable: true }, { name: "user_token_y", writable: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "bin_array_lower", writable: true }, { name: "bin_array_upper", writable: true }, { name: "sender", signer: true }, { name: "token_x_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "token_y_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "bin_liquidity_removal", type: { vec: { defined: { name: "BinLiquidityReduction" } } } } ] }, { name: "remove_liquidity2", discriminator: [ 230, 215, 82, 127, 241, 101, 227, 146 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token_x", writable: true }, { name: "user_token_y", writable: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "sender", signer: true }, { name: "token_x_program" }, { name: "token_y_program" }, { name: "memo_program", address: "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "bin_liquidity_removal", type: { vec: { defined: { name: "BinLiquidityReduction" } } } }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "remove_liquidity_by_range", discriminator: [ 26, 82, 102, 152, 240, 74, 105, 26 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension", "bin_array_lower", "bin_array_upper" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token_x", writable: true }, { name: "user_token_y", writable: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "bin_array_lower", writable: true }, { name: "bin_array_upper", writable: true }, { name: "sender", signer: true }, { name: "token_x_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "token_y_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "from_bin_id", type: "i32" }, { name: "to_bin_id", type: "i32" }, { name: "bps_to_remove", type: "u16" } ] }, { name: "remove_liquidity_by_range2", discriminator: [ 204, 2, 195, 145, 53, 145, 145, 205 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_bitmap_extension" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "user_token_x", writable: true }, { name: "user_token_y", writable: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "sender", signer: true }, { name: "token_x_program" }, { name: "token_y_program" }, { name: "memo_program", address: "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "from_bin_id", type: "i32" }, { name: "to_bin_id", type: "i32" }, { name: "bps_to_remove", type: "u16" }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "set_activation_point", discriminator: [ 91, 249, 15, 165, 26, 129, 254, 125 ], accounts: [ { name: "lb_pair", writable: true }, { name: "signer", signer: true } ], args: [ { name: "activation_point", type: "u64" } ] }, { name: "set_pair_status", discriminator: [ 67, 248, 231, 137, 154, 149, 217, 174 ], accounts: [ { name: "lb_pair", writable: true }, { name: "operator" }, { name: "signer", signer: true } ], args: [ { name: "status", type: "u8" } ] }, { name: "set_pair_status_permissionless", discriminator: [ 78, 59, 152, 211, 70, 183, 46, 208 ], accounts: [ { name: "lb_pair", writable: true }, { name: "signer", signer: true } ], args: [ { name: "status", type: "u8" } ] }, { name: "set_permissionless_operation_bits", discriminator: [ 84, 58, 203, 139, 163, 81, 190, 186 ], accounts: [ { name: "position", writable: true }, { name: "owner", signer: true, relations: [ "position" ] }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "bits", type: "u8" } ] }, { name: "set_pre_activation_duration", discriminator: [ 165, 61, 201, 244, 130, 159, 22, 100 ], accounts: [ { name: "lb_pair", writable: true }, { name: "signer", signer: true } ], args: [ { name: "pre_activation_duration", type: "u64" } ] }, { name: "set_pre_activation_swap_address", discriminator: [ 57, 139, 47, 123, 216, 80, 223, 10 ], accounts: [ { name: "lb_pair", writable: true }, { name: "signer", signer: true } ], args: [ { name: "pre_activation_swap_address", type: "pubkey" } ] }, { name: "swap", discriminator: [ 248, 198, 158, 145, 225, 117, 135, 200 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "bin_array_bitmap_extension" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "user_token_in", writable: true }, { name: "user_token_out", writable: true }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "oracle", writable: true, relations: [ "lb_pair" ] }, { name: "host_fee_in", writable: true, optional: true }, { name: "user", signer: true }, { name: "token_x_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "token_y_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "amount_in", type: "u64" }, { name: "min_amount_out", type: "u64" } ] }, { name: "swap2", discriminator: [ 65, 75, 63, 76, 235, 91, 91, 136 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "bin_array_bitmap_extension" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "user_token_in", writable: true }, { name: "user_token_out", writable: true }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "oracle", writable: true, relations: [ "lb_pair" ] }, { name: "host_fee_in", writable: true, optional: true }, { name: "user", signer: true }, { name: "token_x_program" }, { name: "token_y_program" }, { name: "memo_program", address: "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "amount_in", type: "u64" }, { name: "min_amount_out", type: "u64" }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "swap_exact_out", discriminator: [ 250, 73, 101, 33, 38, 207, 75, 184 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "bin_array_bitmap_extension" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "user_token_in", writable: true }, { name: "user_token_out", writable: true }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "oracle", writable: true, relations: [ "lb_pair" ] }, { name: "host_fee_in", writable: true, optional: true }, { name: "user", signer: true }, { name: "token_x_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "token_y_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "max_in_amount", type: "u64" }, { name: "out_amount", type: "u64" } ] }, { name: "swap_exact_out2", discriminator: [ 43, 215, 247, 132, 137, 60, 243, 81 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "bin_array_bitmap_extension" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "user_token_in", writable: true }, { name: "user_token_out", writable: true }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "oracle", writable: true, relations: [ "lb_pair" ] }, { name: "host_fee_in", writable: true, optional: true }, { name: "user", signer: true }, { name: "token_x_program" }, { name: "token_y_program" }, { name: "memo_program", address: "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "max_in_amount", type: "u64" }, { name: "out_amount", type: "u64" }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "swap_with_price_impact", discriminator: [ 56, 173, 230, 208, 173, 228, 156, 205 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "bin_array_bitmap_extension" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "user_token_in", writable: true }, { name: "user_token_out", writable: true }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "oracle", writable: true, relations: [ "lb_pair" ] }, { name: "host_fee_in", writable: true, optional: true }, { name: "user", signer: true }, { name: "token_x_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "token_y_program", address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "amount_in", type: "u64" }, { name: "active_id", type: { option: "i32" } }, { name: "max_price_impact_bps", type: "u16" } ] }, { name: "swap_with_price_impact2", discriminator: [ 74, 98, 192, 214, 177, 51, 75, 51 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "bin_array_bitmap_extension" ] }, { name: "bin_array_bitmap_extension", writable: true, optional: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "user_token_in", writable: true }, { name: "user_token_out", writable: true }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "oracle", writable: true, relations: [ "lb_pair" ] }, { name: "host_fee_in", writable: true, optional: true }, { name: "user", signer: true }, { name: "token_x_program" }, { name: "token_y_program" }, { name: "memo_program", address: "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "amount_in", type: "u64" }, { name: "active_id", type: { option: "i32" } }, { name: "max_price_impact_bps", type: "u16" }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "update_base_fee_parameters", discriminator: [ 75, 168, 223, 161, 16, 195, 3, 47 ], accounts: [ { name: "lb_pair", writable: true }, { name: "operator" }, { name: "signer", signer: true }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "fee_parameter", type: { defined: { name: "BaseFeeParameter" } } } ] }, { name: "update_dynamic_fee_parameters", discriminator: [ 92, 161, 46, 246, 255, 189, 22, 22 ], accounts: [ { name: "lb_pair", writable: true }, { name: "operator" }, { name: "signer", signer: true }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "fee_parameter", type: { defined: { name: "DynamicFeeParameter" } } } ] }, { name: "update_fees_and_reward2", discriminator: [ 32, 142, 184, 154, 103, 65, 184, 88 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position" ] }, { name: "owner", signer: true } ], args: [ { name: "min_bin_id", type: "i32" }, { name: "max_bin_id", type: "i32" } ] }, { name: "update_fees_and_rewards", discriminator: [ 154, 230, 250, 13, 236, 209, 75, 223 ], accounts: [ { name: "position", writable: true }, { name: "lb_pair", writable: true, relations: [ "position", "bin_array_lower", "bin_array_upper" ] }, { name: "bin_array_lower", writable: true }, { name: "bin_array_upper", writable: true }, { name: "owner", signer: true } ], args: [ ] }, { name: "update_position_operator", discriminator: [ 202, 184, 103, 143, 180, 191, 116, 217 ], accounts: [ { name: "position", writable: true }, { name: "owner", signer: true, relations: [ "position" ] }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "operator", type: "pubkey" } ] }, { name: "update_reward_duration", discriminator: [ 138, 174, 196, 169, 213, 235, 254, 107 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "bin_array" ] }, { name: "operator" }, { name: "signer", signer: true }, { name: "bin_array", writable: true }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "reward_index", type: "u64" }, { name: "new_duration", type: "u64" } ] }, { name: "update_reward_funder", discriminator: [ 211, 28, 48, 32, 215, 160, 35, 23 ], accounts: [ { name: "lb_pair", writable: true }, { name: "operator" }, { name: "signer", signer: true }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "reward_index", type: "u64" }, { name: "new_funder", type: "pubkey" } ] }, { name: "withdraw_ineligible_reward", discriminator: [ 148, 206, 42, 195, 247, 49, 103, 8 ], accounts: [ { name: "lb_pair", writable: true, relations: [ "bin_array" ] }, { name: "reward_vault", writable: true }, { name: "reward_mint" }, { name: "funder_token_account", writable: true }, { name: "funder", signer: true }, { name: "bin_array", writable: true }, { name: "token_program" }, { name: "memo_program", address: "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr" }, { name: "event_authority", pda: { seeds: [ { kind: "const", value: [ 95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121 ] } ] } }, { name: "program" } ], args: [ { name: "reward_index", type: "u64" }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "withdraw_protocol_fee", discriminator: [ 158, 201, 158, 189, 33, 93, 162, 103 ], accounts: [ { name: "lb_pair", writable: true }, { name: "reserve_x", writable: true, relations: [ "lb_pair" ] }, { name: "reserve_y", writable: true, relations: [ "lb_pair" ] }, { name: "token_x_mint", relations: [ "lb_pair" ] }, { name: "token_y_mint", relations: [ "lb_pair" ] }, { name: "receiver_token_x", writable: true }, { name: "receiver_token_y", writable: true }, { name: "operator" }, { name: "signer", docs: [ "operator" ], signer: true }, { name: "token_x_program" }, { name: "token_y_program" } ], args: [ { name: "max_amount_x", type: "u64" }, { name: "max_amount_y", type: "u64" }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] }, { name: "zap_protocol_fee", discriminator: [ 213, 155, 187, 34, 56, 182, 91, 240 ], accounts: [ { name: "lb_pair", writable: true }, { name: "reserve", writable: true }, { name: "token_mint" }, { name: "receiver_token", writable: true }, { name: "operator" }, { name: "signer", docs: [ "operator" ], signer: true }, { name: "token_program" }, { name: "sysvar_instructions", address: "Sysvar1nstructions1111111111111111111111111" } ], args: [ { name: "max_amount", type: "u64" }, { name: "remaining_accounts_info", type: { defined: { name: "RemainingAccountsInfo" } } } ] } ]; var accounts = [ { name: "BinArray", discriminator: [ 92, 142, 92, 220, 5, 148, 70, 181 ] }, { name: "BinArrayBitmapExtension", discriminator: [ 80, 111, 124, 113, 55, 237, 18, 5 ] }, { name: "ClaimFeeOperator", discriminator: [ 166, 48, 134, 86, 34, 200, 188, 150 ] }, { name: "DummyZcAccount", discriminator: [ 94, 107, 238, 80, 208, 48, 180, 8 ] }, { name: "LbPair", discriminator: [ 33, 11, 49, 98, 181, 101, 177, 13 ] }, { name: "LimitOrder", discriminator: [ 137, 183, 212, 91, 115, 29, 141, 227 ] }, { name: "Operator", discriminator: [ 219, 31, 188, 145, 69, 139, 204, 117 ] }, { name: "Oracle", discriminator: [ 139, 194, 131, 179, 140, 179, 229, 244 ] }, { name: "PositionV2", discriminator: [ 117, 176, 212, 199, 245, 180, 133, 182 ] }, { name: "PresetParameter", discriminator: [ 242, 62, 244, 34, 181, 112, 58, 170 ] }, { name: "PresetParameter2", discriminator: [ 171, 236, 148, 115, 162, 113, 222, 174 ] }, { name: "TokenBadge", discriminator: [ 116, 219, 204, 229, 249, 116, 255, 150 ] } ]; var events = [ { name: "AddLiquidity", discriminator: [ 31, 94, 125, 90, 227, 52, 61, 186 ] }, { name: "CancelLimitOrderEvt", discriminator: [ 131, 234, 194, 133, 9, 14, 189, 209 ] }, { name: "ClaimFee", discriminator: [ 75, 122, 154, 48, 140, 74, 123, 163 ] }, { name: "ClaimFee2", discriminator: [ 232, 171, 242, 97, 58, 77, 35, 45 ] }, { name: "ClaimReward", discriminator: [ 148, 116, 134, 204, 22, 171, 85, 95 ] }, { name: "ClaimReward2", discriminator: [ 27, 143, 244, 33, 80, 43, 110, 146 ] }, { name: "CloseLimitOrderEvt", discriminator: [ 142, 135, 8, 76, 92, 63, 118, 83 ] }, { name: "CompositionFee", discriminator: [ 128, 151, 123, 106, 17, 102, 113, 142 ] }, { name: "DecreasePositionLength", discriminator: [ 52, 118, 235, 85, 172, 169, 15, 128 ] }, { name: "DynamicFeeParameterUpdate", discriminator: [ 88, 88, 178, 135, 194, 146, 91, 243 ] }, { name: "FeeParameterUpdate", discriminator: [ 48, 76, 241, 117, 144, 215, 242, 44 ] }, { name: "FundReward", discriminator: [ 246, 228, 58, 130, 145, 170, 79, 204 ] }, { name: "GoToABin", discriminator: [ 59, 138, 76, 68, 138, 131, 176, 67 ] }, { name: "IncreaseObservation", discriminator: [ 99, 249, 17, 121, 166, 156, 207, 215 ] }, { name: "IncreasePositionLength", discriminator: [ 157, 239, 42, 204, 30, 56, 223, 46 ] }, { name: "InitializeReward", discriminator: [ 211, 153, 88, 62, 149, 60, 177, 70 ] }, { name: "LbPairCreate", discriminator: [ 185, 74, 252, 125, 27, 215, 188, 111 ] }, { name: "PlaceLimitOrderEvt", discriminator: [ 43, 79, 27, 169, 244, 28, 225, 63 ] }, { name: "PositionClose", discriminator: [ 255, 196, 16, 107, 28, 202, 53, 128 ] }, { name: "PositionCreate", discriminator: [ 144, 142, 252, 84, 157, 53, 37, 121 ] }, { name: "Rebalancing", discriminator: [ 0, 109, 117, 179, 61, 91, 199, 200 ] }, { name: "RemoveLiquidity", discriminator: [ 116, 244, 97, 232, 103, 31, 152, 58 ] }, { name: "SetPositionPermissionlessOperationBitsEvt", discriminator: [ 195, 229, 147, 245, 29, 125, 48, 168 ] }, { name: "Swap", discriminator: [ 81, 108, 227, 190, 205, 208, 10, 196 ] }, { name: "Swap2Evt", discriminator: [ 46, 116, 82, 215, 148, 27, 84, 77 ] }, { name: "UpdatePositionLockReleasePoint", discriminator: [ 133, 214, 66, 224, 64, 12, 7, 191 ] }, { name: "UpdatePositionOperator", discriminator: [ 39, 115, 48, 204, 246, 47, 66, 57 ] }, { name: "UpdateRewardDuration", discriminator: [ 223, 245, 224, 153, 49, 29, 163, 172 ] }, { name: "UpdateRewardFunder", discriminator: [ 224, 178, 174, 74, 252, 165, 85, 180 ] }, { name: "WithdrawIneligibleReward", discriminator: [ 231, 189, 65, 149, 102, 215, 154, 244 ] } ]; var errors = [ { code: 6000, name: "InvalidStartBinIndex", msg: "Invalid start bin index" }, { code: 6001, name: "InvalidBinId", msg: "Invalid bin id" }, { code: 6002, name: "InvalidInput", msg: "Invalid input data" }, { code: 6003, name: "ExceededAmountSlippageTolerance", msg: "Exceeded amount slippage tolerance" }, { code: 6004, name: "ExceededBinSlippageTolerance", msg: "Exceeded bin slippage tolerance" }, { code: 6005, name: "CompositionFactorFlawed", msg: "Composition factor flawed" }, { code: 6006, name: "NonPresetBinStep", msg: "Non preset bin step" }, { code: 6007, name: "ZeroLiquidity", msg: "Zero liquidity" }, { code: 6008, name: "InvalidPosition", msg: "Invalid position" }, { code: 6009, name: "BinArrayNotFound", msg: "Bin array not found" }, { code: 6010, name: "InvalidTokenMint", msg: "Invalid token mint" }, { code: 6011, name: "InvalidAccountForSingleDeposit", msg: "Invalid account for single deposit" }, { code: 6012, name: "PairInsufficientLiquidity", msg: "Pair insufficient liquidity" }, { code: 6013, name: "InvalidFeeOwner", msg: "Invalid fee owner" }, { code: 6014, name: "InvalidFeeWithdrawAmount", msg: "Invalid fee withdraw amount" }, { code: 6015, name: "InvalidAdmin", msg: "Invalid admin" }, { code: 6016, name: "IdenticalFeeOwner", msg: "Identical fee owner" }, { code: 6017, name: "InvalidBps", msg: "Invalid basis point" }, { code: 6018, name: "MathOverflow", msg: "Math operation overflow" }, { code: 6019, name: "TypeCastFailed", msg: "Type cast error" }, { code: 6020, name: "InvalidRewardIndex", msg: "Invalid reward index" }, { code: 6021, name: "InvalidRewardDuration", msg: "Invalid reward duration" }, { code: 6022, name: "RewardInitialized", msg: "Reward already initialized" }, { code: 6023, name: "RewardUninitialized", msg: "Reward not initialized" }, { code: 6024, name: "IdenticalFunder", msg: "Identical funder" }, { code: 6025, name: "RewardCampaignInProgress", msg: "Reward campaign in progress" }, { code: 6026, name: "IdenticalRewardDuration", msg: "Reward duration is the same" }, { code: 6027, name: "InvalidBinArray", msg: "Invalid bin array" }, { code: 6028, name: "NonContinuousBinArrays", msg: "Bin arrays must be continuous" }, { code: 6029, name: "InvalidRewardVault", msg: "Invalid reward vault" }, { code: 6030, name: "NonEmptyPosition", msg: "Position is not empty" }, { code: 6031, name: "UnauthorizedAccess", msg: "Unauthorized access" }, { code: 6032, name: "InvalidFeeParameter", msg: "Invalid fee parameter" }, { code: 6033, name: "MissingOracle", msg: "Missing oracle account" }, { code: 6034, name: "InsufficientSample", msg: "Insufficient observation sample" }, { code: 6035, name: "InvalidLookupTimestamp", msg: "Invalid lookup timestamp" }, { code: 6036, name: "BitmapExtensionAccountIsNotProvided", msg: "Bitmap extension account is not provided" }, { code: 6037, name: "CannotFindNonZeroLiquidityBinArrayId", msg: "Cannot find non-zero liquidity binArrayId" }, { code: 6038, name: "BinIdOutOfBound", msg: "Bin id out of bound" }, { code: 6039, name: "InsufficientOutAmount", msg: "Insufficient amount in for minimum out" }, { code: 6040, name: "InvalidPositionWidth", msg: "Invalid position width" }, { code: 6041, name: "ExcessiveFeeUpdate", msg: "Excessive fee update" }, { code: 6042, name: "PoolDisabled", msg: "Pool disabled" }, { code: 6043, name: "InvalidPoolType", msg: "Invalid pool type" }, { code: 6044, name: "ExceedMaxWhitelist", msg: "Whitelist for wallet is full" }, { code: 6045, name: "InvalidIndex", msg: "Invalid index" }, { code: 6046, name: "RewardNotEnded", msg: "Reward not ended" }, { code: 6047, name: "MustWithdrawnIneligibleReward", msg: "Must withdraw ineligible reward" }, { code: 6048, name: "UnauthorizedAddress", msg: "Unauthorized address" }, { code: 6049, name: "OperatorsAreTheSame", msg: "Cannot update because operators are the same" }, { code: 6050, name: "WithdrawToWrongTokenAccount", msg: "Withdraw to wrong token account" }, { code: 6051, name: "WrongRentReceiver", msg: "Wrong rent receiver" }, { code: 6052, name: "AlreadyPassActivationPoint", msg: "Already activated" }, { code: 6053, name: "ExceedMaxSwappedAmount", msg: "Swapped amount is exceeded max swapped amount" }, { code: 6054, name: "InvalidStrategyParameters", msg: "Invalid strategy parameters" }, { code: 6055, name: "LiquidityLocked", msg: "Liquidity locked" }, { code: 6056, name: "BinRangeIsNotEmpty", msg: "Bin range is not empty" }, { code: 6057, name: "NotExactAmountOut", msg: "Amount out is not matched with exact amount out" }, { code: 6058, name: "InvalidActivationType", msg: "Invalid activation type" }, { code: 6059, name: "InvalidActivationDuration", msg: "Invalid activation duration" }, { code: 6060, name: "MissingTokenAmountAsTokenLaunchProof", msg: "Missing token amount as token launch owner proof" }, { code: 6061, name: "InvalidQuoteToken", msg: "Quote token must be SOL or USDC" }, { code: 6062, name: "InvalidBinStep", msg: "Invalid bin step" }, { code: 6063, name: "InvalidBaseFee", msg: "Invalid base fee" }, { code: 6064, name: "InvalidPreActivationDuration", msg: "Invalid pre-activation duration" }, { code: 6065, name: "AlreadyPassPreActivationSwapPoint", msg: "Already pass pre-activation swap point" }, { code: 6066, name: "InvalidStatus", msg: "Invalid status" }, { code: 6067, name: "ExceededMaxOracleLength", msg: "Exceed max oracle length" }, { code: 6068, name: "InvalidMinimumLiquidity", msg: "Invalid minimum liquidity" }, { code: 6069, name: "NotSupportMint", msg: "Not support token_2022 mint extension" }, { code: 6070, name: "UnsupportedMintExtension", msg: "Unsupported mint extension" }, { code: 6071, name: "UnsupportNativeMintToken2022", msg: "Unsupported native mint token2022" }, { code: 6072, name: "UnmatchTokenMint", msg: "Unmatch token mint" }, { code: 6073, name: "UnsupportedTokenMint", msg: "Unsupported token mint" }, { code: 6074, name: "InsufficientRemainingAccounts", msg: "Insufficient remaining accounts" }, { code: 6075, name: "InvalidRemainingAccountSlice", msg: "Invalid remaining account slice" }, { code: 6076, name: "DuplicatedRemainingAccountTypes", msg: "Duplicated remaining account types" }, { code: 6077, name: "MissingRemainingAccountForTransferHook", msg: "Missing remaining account for transfer hook" }, { code: 6078, name: "NoTransferHookProgram", msg: "Remaining account was passed for transfer hook but there's no hook program" }, { code: 6079, name: "ZeroFundedAmount", msg: "Zero funded amount" }, { code: 6080, name: "InvalidSide", msg: "Invalid side" }, { code: 6081, name: "InvalidResizeLength", msg: "Invalid resize length" }, { code: 6082, name: "NotSupportAtTheMoment", msg: "Not support at the moment" }, { code: 6083, name: "InvalidRebalanceParameters", msg: "Invalid rebalance parameters" }, { code: 6084, name: "InvalidRewardAccounts", msg: "Invalid reward accounts" }, { code: 6085, name: "UndeterminedError", msg: "Undetermined error" }, { code: 6086, name: "ReallocExceedMaxLengthPerInstruction", msg: "Realloc exceed max length per instruction" }, { code: 6087, name: "InvalidBaseFeeMantissa", msg: "Mantissa cannot more than two significant digits" }, { code: 6088, name: "InvalidPositionOwner", msg: "Invalid position owner" }, { code: 6089, name: "InvalidPoolAddress", msg: "Invalid pool address" }, { code: 6090, name: "InvalidTokenBadgeType", msg: "Invalid token badge type" }, { code: 6091, name: "InvalidTransferHookAuthority", msg: "Invalid transfer hook authority" }, { code: 6092, name: "AmountXIsNegative", msg: "Amount x is negative" }, { code: 6093, name: "AmountYIsNegative", msg: "Amount y is negative" }, { code: 6094, name: "InvalidPoolCreator", msg: "Invalid pool creator" }, { code: 6095, name: "InvalidFunctionType", msg: "Invalid function type" }, { code: 6096, name: "InvalidPermission", msg: "Invalid permission" }, { code: 6097, name: "IncorrectATA", msg: "Incorrect ATA" }, { code: 6098, name: "InvalidWithdrawProtocolFeeZapAccounts", msg: "Invalid withdraw protocol fee zap accounts" }, { code: 6099, name: "MintRestrictedFromZap", msg: "SOL,USDC protocol fee cannot be withdrawn via zap" }, { code: 6100, name: "CpiDisabled", msg: "CPI disabled" }, { code: 6101, name: "MissingZapOutInstruction", msg: "Missing zap out instruction" }, { code: 6102, name: "InvalidZapAccounts", msg: "Invalid zap accounts" }, { code: 6103, name: "InvalidZapOutParameters", msg: "Invalid zap out parameters" }, { code: 6104, name: "InsufficientInAmount", msg: "Insufficient in amount" }, { code: 6105, name: "InvalidPlaceLimitOrderParameters", msg: "Invalid place limit order parameters" }, { code: 6106, name: "InvalidLimitOrderOwner", msg: "Invalid limit order owner" }, { code: 6107, name: "InvalidCancelLimitOrderParameters", msg: "Invalid cancel limit order parameters" }, { code: 6108, name: "CannotFindLimitOrderByBinId", msg: "Cannot find limit order by bin id" }, { code: 6109, name: "CancelNonEmptyLimitOrder", msg: "Cannot cancel non-empty limit order" }, { code: 6110, name: "InvalidCollectFeeMode", msg: "Invalid collect fee mode" } ]; var types = [ { name: "AccountsType", type: { kind: "enum", variants: [ { name: "TransferHookX" }, { name: "TransferHookY" }, { name: "TransferHookReward" }, { name: "TransferHookMultiReward", fields: [ "u8" ] }, { name: "TransferHookReferral" } ] } }, { name: "ActivationType", docs: [ "Type of the activation" ], repr: { kind: "rust" }, type: { kind: "enum", variants: [ { name: "Slot" }, { name: "Timestamp" } ] } }, { name: "AddLiquidity", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "from", type: "pubkey" }, { name: "position", type: "pubkey" }, { name: "amounts", type: { array: [ "u64", 2 ] } }, { name: "active_bin_id", type: "i32" } ] } }, { name: "AddLiquidityParams", type: { kind: "struct", fields: [ { name: "min_delta_id", type: "i32" }, { name: "max_delta_id", type: "i32" }, { name: "x0", type: "u64" }, { name: "y0", type: "u64" }, { name: "delta_x", type: "u64" }, { name: "delta_y", type: "u64" }, { name: "bit_flag", type: "u8" }, { name: "favor_x_in_active_id", type: "bool" }, { name: "padding", type: { array: [ "u8", 16 ] } } ] } }, { name: "AddLiquiditySingleSidePreciseParameter", type: { kind: "struct", fields: [ { name: "bins", type: { vec: { defined: { name: "CompressedBinDepositAmount" } } } }, { name: "decompress_multiplier", type: "u64" } ] } }, { name: "AddLiquiditySingleSidePreciseParameter2", type: { kind: "struct", fields: [ { name: "bins", type: { vec: { defined: { name: "CompressedBinDepositAmount" } } } }, { name: "decompress_multiplier", type: "u64" }, { name: "max_amount", type: "u64" } ] } }, { name: "BaseFeeParameter", type: { kind: "struct", fields: [ { name: "protocol_share", docs: [ "Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee" ], type: "u16" }, { name: "base_factor", docs: [ "Base factor for base fee rate" ], type: "u16" }, { name: "base_fee_power_factor", docs: [ "Base fee power factor" ], type: "u8" } ] } }, { name: "Bin", serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "amount_x", docs: [ "Amount of token X in the bin for market making. This already excluded protocol fees." ], type: "u64" }, { name: "amount_y", docs: [ "Amount of token Y in the bin for market making. This already excluded protocol fees." ], type: "u64" }, { name: "price", docs: [ "Bin price" ], type: "u128" }, { name: "liquidity_supply", docs: [ "Bin MM liquidity supply." ], type: "u128" }, { name: "fulfilled_order_amount_x", docs: [ "Total fulfilled order amount x" ], type: "u64" }, { name: "fulfilled_order_amount_y", docs: [ "Total fulfilled order amount y" ], type: "u64" }, { name: "limit_order_fee_ask_side", docs: [ "Limit order fee collected by ask side orders" ], type: "u64" }, { name: "limit_order_fee_bid_side", docs: [ "Limit order fee collected by bid side orders" ], type: "u64" }, { name: "fee_amount_x_per_token_stored", docs: [ "Swap fee amount of token X per liquidity deposited." ], type: "u128" }, { name: "fee_amount_y_per_token_stored", docs: [ "Swap fee amount of token Y per liquidity deposited." ], type: "u128" }, { name: "open_order_amount", docs: [ "Pending open limit orders amount in the bin." ], type: "u64" }, { name: "total_processing_order_amount", docs: [ "Total processing order amount" ], type: "u64" }, { name: "processed_order_remaining_amount", docs: [ "Remaining in processing open limit orders amount in the bin." ], type: "u64" }, { name: "order_age", docs: [ "Age" ], type: "u32" }, { name: "limit_order_ask_side", docs: [ "limit order flag" ], type: "u8" }, { name: "_padding_1", docs: [ "padding" ], type: { array: [ "u8", 3 ] } } ] } }, { name: "BinArray", docs: [ "An account to contain a range of bin. For example: Bin 100 <-> 200.", "For example:", "BinArray index: 0 contains bin 0 <-> 599", "index: 2 contains bin 600 <-> 1199, ..." ], serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "index", type: "i64" }, { name: "version", type: "u8" }, { name: "_padding_1", type: { array: [ "u8", 7 ] } }, { name: "lb_pair", type: "pubkey" }, { name: "bins", type: { array: [ { defined: { name: "Bin" } }, 70 ] } } ] } }, { name: "BinArrayBitmapExtension", serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "positive_bin_array_bitmap", docs: [ "Packed initialized bin array state for start_bin_index is positive" ], type: { array: [ { array: [ "u64", 8 ] }, 12 ] } }, { name: "negative_bin_array_bitmap", docs: [ "Packed initialized bin array state for start_bin_index is negative" ], type: { array: [ { array: [ "u64", 8 ] }, 12 ] } } ] } }, { name: "BinLimitOrderAmount", type: { kind: "struct", fields: [ { name: "id", type: "i32" }, { name: "amount", type: "u64" } ] } }, { name: "BinLiquidityDistribution", type: { kind: "struct", fields: [ { name: "bin_id", docs: [ "Define the bin ID wish to deposit to." ], type: "i32" }, { name: "distribution_x", docs: [ "DistributionX (or distributionY) is the percentages of amountX (or amountY) you want to add to each bin." ], type: "u16" }, { name: "distribution_y", docs: [ "DistributionX (or distributionY) is the percentages of amountX (or amountY) you want to add to each bin." ], type: "u16" } ] } }, { name: "BinLiquidityDistributionByWeight", type: { kind: "struct", fields: [ { name: "bin_id", docs: [ "Define the bin ID wish to deposit to." ], type: "i32" }, { name: "weight", docs: [ "weight of liquidity distributed for this bin id" ], type: "u16" } ] } }, { name: "BinLiquidityReduction", type: { kind: "struct", fields: [ { name: "bin_id", type: "i32" }, { name: "bps_to_remove", type: "u16" } ] } }, { name: "CancelLimitOrderEvt", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "from", type: "pubkey" }, { name: "limit_order", type: "pubkey" }, { name: "amounts", type: { array: [ "u64", 2 ] } }, { name: "active_id", type: "i32" }, { name: "bins", type: { vec: "i32" } } ] } }, { name: "ClaimFee", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "position", type: "pubkey" }, { name: "owner", type: "pubkey" }, { name: "fee_x", type: "u64" }, { name: "fee_y", type: "u64" } ] } }, { name: "ClaimFee2", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "position", type: "pubkey" }, { name: "owner", type: "pubkey" }, { name: "fee_x", type: "u64" }, { name: "fee_y", type: "u64" }, { name: "active_bin_id", type: "i32" } ] } }, { name: "ClaimFeeOperator", docs: [ "Parameter that set by the protocol" ], serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "operator", docs: [ "operator" ], type: "pubkey" }, { name: "_padding", docs: [ "Reserve" ], type: { array: [ "u8", 128 ] } } ] } }, { name: "ClaimReward", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "position", type: "pubkey" }, { name: "owner", type: "pubkey" }, { name: "reward_index", type: "u64" }, { name: "total_reward", type: "u64" } ] } }, { name: "ClaimReward2", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "position", type: "pubkey" }, { name: "owner", type: "pubkey" }, { name: "reward_index", type: "u64" }, { name: "total_reward", type: "u64" }, { name: "active_bin_id", type: "i32" } ] } }, { name: "CloseLimitOrderEvt", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "owner", type: "pubkey" }, { name: "limit_order", type: "pubkey" } ] } }, { name: "CompositionFee", type: { kind: "struct", fields: [ { name: "from", type: "pubkey" }, { name: "bin_id", type: "i16" }, { name: "token_x_fee_amount", type: "u64" }, { name: "token_y_fee_amount", type: "u64" }, { name: "protocol_token_x_fee_amount", type: "u64" }, { name: "protocol_token_y_fee_amount", type: "u64" } ] } }, { name: "CompressedBinDepositAmount", type: { kind: "struct", fields: [ { name: "bin_id", type: "i32" }, { name: "amount", type: "u32" } ] } }, { name: "CustomizableParams", type: { kind: "struct", fields: [ { name: "active_id", docs: [ "Pool price" ], type: "i32" }, { name: "bin_step", docs: [ "Bin step" ], type: "u16" }, { name: "base_factor", docs: [ "Base factor" ], type: "u16" }, { name: "activation_type", docs: [ "Activation type. 0 = Slot, 1 = Time. Check ActivationType enum" ], type: "u8" }, { name: "has_alpha_vault", docs: [ "Whether the pool has an alpha vault" ], type: "bool" }, { name: "activation_point", docs: [ "Decide when does the pool start trade. None = Now" ], type: { option: "u64" } }, { name: "creator_pool_on_off_control", docs: [ "Pool creator have permission to enable/disable pool with restricted program validation. Only applicable for customizable permissionless pool." ], type: "bool" }, { name: "base_fee_power_factor", docs: [ "Base fee power factor" ], type: "u8" }, { name: "concrete_function_type", docs: [ "Concrete function type" ], type: "u8" }, { name: "collect_fee_mode", docs: [ "Collect fee mode" ], type: "u8" }, { name: "padding", docs: [ "Padding, for future use" ], type: { array: [ "u8", 60 ] } } ] } }, { name: "DecreasePositionLength", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "position", type: "pubkey" }, { name: "owner", type: "pubkey" }, { name: "length_to_remove", type: "u16" }, { name: "side", type: "u8" } ] } }, { name: "DummyIx", type: { kind: "struct", fields: [ { name: "_pair_status", type: { defined: { name: "PairStatus" } } }, { name: "_pair_type", type: { defined: { name: "PairType" } } }, { name: "_activation_type", type: { defined: { name: "ActivationType" } } }, { name: "_token_program_flag", type: { defined: { name: "TokenProgramFlags" } } }, { name: "_resize_side", type: { defined: { name: "ResizeSide" } } }, { name: "_rounding", type: { defined: { name: "Rounding" } } } ] } }, { name: "DummyZcAccount", serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "position_bin_data", type: { defined: { name: "PositionBinData" } } }, { name: "limit_order_bin_data", type: { defined: { name: "LimitOrderBinData" } } } ] } }, { name: "DynamicFeeParameter", type: { kind: "struct", fields: [ { name: "filter_period", docs: [ "Filter period determine high frequency trading time window." ], type: "u16" }, { name: "decay_period", docs: [ "Decay period determine when the volatile fee start decay / decrease." ], type: "u16" }, { name: "reduction_factor", docs: [ "Reduction factor controls the volatile fee rate decrement rate." ], type: "u16" }, { name: "variable_fee_control", docs: [ "Used to scale the variable fee component depending on the dynamic of the market" ], type: "u32" }, { name: "max_volatility_accumulator", docs: [ "Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate." ], type: "u32" } ] } }, { name: "DynamicFeeParameterUpdate", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "filter_period", docs: [ "Filter period determine high frequency trading time window." ], type: "u16" }, { name: "decay_period", docs: [ "Decay period determine when the volatile fee start decay / decrease." ], type: "u16" }, { name: "reduction_factor", docs: [ "Reduction factor controls the volatile fee rate decrement rate." ], type: "u16" }, { name: "variable_fee_control", docs: [ "Used to scale the variable fee component depending on the dynamic of the market" ], type: "u32" }, { name: "max_volatility_accumulator", docs: [ "Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate." ], type: "u32" } ] } }, { name: "FeeInfo", serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "fee_x_per_token_complete", type: "u128" }, { name: "fee_y_per_token_complete", type: "u128" }, { name: "fee_x_pending", type: "u64" }, { name: "fee_y_pending", type: "u64" } ] } }, { name: "FeeParameterUpdate", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "protocol_share", type: "u16" }, { name: "base_factor", type: "u16" }, { name: "base_fee_power_factor", type: "u8" } ] } }, { name: "FundReward", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "funder", type: "pubkey" }, { name: "reward_index", type: "u64" }, { name: "amount", type: "u64" } ] } }, { name: "GoToABin", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "from_bin_id", type: "i32" }, { name: "to_bin_id", type: "i32" } ] } }, { name: "IncreaseObservation", type: { kind: "struct", fields: [ { name: "oracle", type: "pubkey" }, { name: "new_observation_length", type: "u64" } ] } }, { name: "IncreasePositionLength", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "position", type: "pubkey" }, { name: "owner", type: "pubkey" }, { name: "length_to_add", type: "u16" }, { name: "side", type: "u8" } ] } }, { name: "InitPermissionPairIx", type: { kind: "struct", fields: [ { name: "active_id", type: "i32" }, { name: "bin_step", type: "u16" }, { name: "base_factor", type: "u16" }, { name: "base_fee_power_factor", type: "u8" }, { name: "activation_type", type: "u8" }, { name: "padding0", type: "u16" }, { name: "concrete_function_type", type: "u8" }, { name: "collect_fee_mode", type: "u8" } ] } }, { name: "InitPresetParametersIx", type: { kind: "struct", fields: [ { name: "index", type: "u16" }, { name: "bin_step", docs: [ "Bin step. Represent the price increment / decrement." ], type: "u16" }, { name: "base_factor", docs: [ "Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor" ], type: "u16" }, { name: "filter_period", docs: [ "Filter period determine high frequency trading time window." ], type: "u16" }, { name: "decay_period", docs: [ "Decay period determine when the volatile fee start decay / decrease." ], type: "u16" }, { name: "reduction_factor", docs: [ "Reduction factor controls the volatile fee rate decrement rate." ], type: "u16" }, { name: "variable_fee_control", docs: [ "Used to scale the variable fee component depending on the dynamic of the market" ], type: "u32" }, { name: "max_volatility_accumulator", docs: [ "Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate." ], type: "u32" }, { name: "protocol_share", docs: [ "Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee" ], type: "u16" }, { name: "base_fee_power_factor", docs: [ "Base fee power factor" ], type: "u8" }, { name: "concrete_function_type", docs: [ "function type" ], type: "u8" }, { name: "collect_fee_mode", docs: [ "collect fee mode" ], type: "u8" } ] } }, { name: "InitializeLbPair2Params", type: { kind: "struct", fields: [ { name: "active_id", docs: [ "Pool price" ], type: "i32" }, { name: "padding", docs: [ "Padding, for future use" ], type: { array: [ "u8", 96 ] } } ] } }, { name: "InitializeReward", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "reward_mint", type: "pubkey" }, { name: "funder", type: "pubkey" }, { name: "reward_index", type: "u64" }, { name: "reward_duration", type: "u64" } ] } }, { name: "LbPair", serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "parameters", type: { defined: { name: "StaticParameters" } } }, { name: "v_parameters", type: { defined: { name: "VariableParameters" } } }, { name: "bump_seed", type: { array: [ "u8", 1 ] } }, { name: "bin_step_seed", docs: [ "Bin step signer seed" ], type: { array: [ "u8", 2 ] } }, { name: "pair_type", docs: [ "Type of the pair" ], type: "u8" }, { name: "active_id", docs: [ "Active bin id" ], type: "i32" }, { name: "bin_step", docs: [ "Bin step. Represent the price increment / decrement." ], type: "u16" }, { name: "status", docs: [ "Status of the pair. Check PairStatus enum." ], type: "u8" }, { name: "require_base_factor_seed", docs: [ "Require base factor seed" ], type: "u8" }, { name: "base_factor_seed", docs: [ "Base factor seed" ], type: { array: [ "u8", 2 ] } }, { name: "activation_type", docs: [ "Activation type" ], type: "u8" }, { name: "creator_pool_on_off_control", docs: [ "Allow pool creator to enable/disable pool with restricted validation. Only applicable for customizable permissionless pair type." ], type: "u8" }, { name: "token_x_mint", docs: [ "Token X mint" ], type: "pubkey" }, { name: "token_y_mint", docs: [ "Token Y mint" ], type: "pubkey" }, { name: "reserve_x", docs: [ "LB token X vault" ], type: "pubkey" }, { name: "reserve_y", docs: [ "LB token Y vault" ], type: "pubkey" }, { name: "protocol_fee", docs: [ "Uncollected protocol fee" ], type: { defined: { name: "ProtocolFee" } } }, { name: "_padding_1", docs: [ "padding 1" ], type: { array: [ "u8", 32 ] } }, { name: "reward_infos", docs: [ "Farming reward information" ], type: { array: [ { defined: { name: "RewardInfo" } }, 2 ] } }, { name: "oracle", docs: [ "Oracle pubkey" ], type: "pubkey" }, { name: "bin_array_bitmap", docs: [ "Packed initialized bin array state" ], type: { array: [ "u64", 16 ] } }, { name: "last_updated_at", docs: [ "Last time the pool fee parameter was updated" ], type: "i64" }, { name: "_padding_2", docs: [ "_padding_2" ], type: { array: [ "u8", 32 ] } }, { name: "pre_activation_swap_address", docs: [ "Address allowed to swap when the current point is greater than or equal to the pre-activation point. The pre-activation point is calculated as `activation_point - pre_activation_duration`." ], type: "pubkey" }, { name: "base_key", docs: [ "Base keypair. Only required for permission pair" ], type: "pubkey" }, { name: "activation_point", docs: [ "Time point to enable the pair. Only applicable for permission pair." ], type: "u64" }, { name: "pre_activation_duration", docs: [ "Duration before activation activation_point. Used to calculate pre-activation time point for pre_activation_swap_address" ], type: "u64" }, { name: "_padding_3", docs: [ "_padding 3" ], type: { array: [ "u8", 8 ] } }, { name: "_padding_4", docs: [ "_padding_4" ], type: "u64" }, { name: "creator", docs: [ "Pool creator" ], type: "pubkey" }, { name: "token_mint_x_program_flag", docs: [ "token_mint_x_program_flag" ], type: "u8" }, { name: "token_mint_y_program_flag", docs: [ "token_mint_y_program_flag" ], type: "u8" }, { name: "version", docs: [ "version to know whether we have reset tombstone fields" ], type: "u8" }, { name: "_reserved", docs: [ "Reserved space for future use" ], type: { array: [ "u8", 21 ] } } ] } }, { name: "LbPairCreate", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "bin_step", type: "u16" }, { name: "token_x", type: "pubkey" }, { name: "token_y", type: "pubkey" } ] } }, { name: "LimitOrder", serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "lb_pair", docs: [ "The LB pair of this LO" ], type: "pubkey" }, { name: "owner", docs: [ "Owner of the LO. Client rely on this to to fetch their LOs." ], type: "pubkey" }, { name: "bin_count", docs: [ "Bin count" ], type: "u16" }, { name: "_padding_0", docs: [ "Padding" ], type: { array: [ "u8", 14 ] } }, { name: "padding_1", docs: [ "Reserved space for future use" ], type: { array: [ "u64", 4 ] } } ] } }, { name: "LimitOrderBinData", serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "amount", type: "u64" }, { name: "age", type: "u32" }, { name: "_padding_0", type: { array: [ "u8", 4 ] } }, { name: "bin_id", type: "i32" }, { name: "is_ask", type: "u8" }, { name: "_padding_1", type: { array: [ "u8", 11 ] } } ] } }, { name: "LiquidityOneSideParameter", type: { kind: "struct", fields: [ { name: "amount", docs: [ "Amount of X token or Y token to deposit" ], type: "u64" }, { name: "active_id", docs: [ "Active bin that integrator observe off-chain" ], type: "i32" }, { name: "max_active_bin_slippage", docs: [ "max active bin slippage allowed" ], type: "i32" }, { name: "bin_liquidity_dist", docs: [ "Liquidity distribution to each bins" ], type: { vec: { defined: { name: "BinLiquidityDistributionByWeight" } } } } ] } }, { name: "LiquidityParameter", type: { kind: "struct", fields: [ { name: "amount_x", docs: [ "Amount of X token to deposit" ], type: "u64" }, { name: "amount_y", docs: [ "Amount of Y token to deposit" ], type: "u64" }, { name: "bin_liquidity_dist", docs: [ "Liquidity distribution to each bins" ], type: { vec: { defined: { name: "BinLiquidityDistribution" } } } } ] } }, { name: "LiquidityParameterByStrategy", type: { kind: "struct", fields: [ { name: "amount_x", docs: [ "Amount of X token to deposit" ], type: "u64" }, { name: "amount_y", docs: [ "Amount of Y token to deposit" ], type: "u64" }, { name: "active_id", docs: [ "Active bin that integrator observe off-chain" ], type: "i32" }, { name: "max_active_bin_slippage", docs: [ "max active bin slippage allowed" ], type: "i32" }, { name: "strategy_parameters", docs: [ "strategy parameters" ], type: { defined: { name: "StrategyParameters" } } } ] } }, { name: "LiquidityParameterByStrategyOneSide", type: { kind: "struct", fields: [ { name: "amount", docs: [ "Amount of X token or Y token to deposit" ], type: "u64" }, { name: "active_id", docs: [ "Active bin that integrator observe off-chain" ], type: "i32" }, { name: "max_active_bin_slippage", docs: [ "max active bin slippage allowed" ], type: "i32" }, { name: "strategy_parameters", docs: [ "strategy parameters" ], type: { defined: { name: "StrategyParameters" } } } ] } }, { name: "LiquidityParameterByWeight", type: { kind: "struct", fields: [ { name: "amount_x", docs: [ "Amount of X token to deposit" ], type: "u64" }, { name: "amount_y", docs: [ "Amount of Y token to deposit" ], type: "u64" }, { name: "active_id", docs: [ "Active bin that integrator observe off-chain" ], type: "i32" }, { name: "max_active_bin_slippage", docs: [ "max active bin slippage allowed" ], type: "i32" }, { name: "bin_liquidity_dist", docs: [ "Liquidity distribution to each bins" ], type: { vec: { defined: { name: "BinLiquidityDistributionByWeight" } } } } ] } }, { name: "Operator", serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "signer", type: "pubkey" }, { name: "permission", type: "u128" }, { name: "padding", type: { array: [ "u64", 2 ] } } ] } }, { name: "Oracle", serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "idx", docs: [ "Index of latest observation" ], type: "u64" }, { name: "active_size", docs: [ "Size of active sample. Active sample is initialized observation." ], type: "u64" }, { name: "length", docs: [ "Number of observations" ], type: "u64" } ] } }, { name: "PairStatus", docs: [ "Pair status. 0 = Enabled, 1 = Disabled. Putting 0 as enabled for backward compatibility." ], repr: { kind: "rust" }, type: { kind: "enum", variants: [ { name: "Enabled" }, { name: "Disabled" } ] } }, { name: "PairType", docs: [ "Type of the Pair. 0 = Permissionless, 1 = Permission, 2 = CustomizablePermissionless. Putting 0 as permissionless for backward compatibility." ], repr: { kind: "rust" }, type: { kind: "enum", variants: [ { name: "Permissionless" }, { name: "Permission" }, { name: "CustomizablePermissionless" }, { name: "PermissionlessV2" } ] } }, { name: "PlaceLimitOrderEvt", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "sender", type: "pubkey" }, { name: "owner", type: "pubkey" }, { name: "limit_order", type: "pubkey" }, { name: "active_id", type: "i32" }, { name: "params", type: { defined: { name: "PlaceLimitOrderParams" } } } ] } }, { name: "PlaceLimitOrderParams", type: { kind: "struct", fields: [ { name: "is_ask_side", type: "bool" }, { name: "padding", type: { array: [ "u8", 16 ] } }, { name: "relative_bin", type: { option: { defined: { name: "RelativeBin" } } } }, { name: "bins", type: { vec: { defined: { name: "BinLimitOrderAmount" } } } } ] } }, { name: "PositionBinData", serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "liquidity_share", type: "u128" }, { name: "reward_info", type: { defined: { name: "UserRewardInfo" } } }, { name: "fee_info", type: { defined: { name: "FeeInfo" } } } ] } }, { name: "PositionClose", type: { kind: "struct", fields: [ { name: "position", type: "pubkey" }, { name: "owner", type: "pubkey" } ] } }, { name: "PositionCreate", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "position", type: "pubkey" }, { name: "owner", type: "pubkey" } ] } }, { name: "PositionV2", serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "lb_pair", docs: [ "The LB pair of this position" ], type: "pubkey" }, { name: "owner", docs: [ "Owner of the position. Client rely on this to to fetch their positions." ], type: "pubkey" }, { name: "liquidity_shares", docs: [ "Liquidity shares of this position in bins (lower_bin_id <-> upper_bin_id). This is the same as LP concept." ], type: { array: [ "u128", 70 ] } }, { name: "reward_infos", docs: [ "Farming reward information" ], type: { array: [ { defined: { name: "UserRewardInfo" } }, 70 ] } }, { name: "fee_infos", docs: [ "Swap fee to claim information" ], type: { array: [ { defined: { name: "FeeInfo" } }, 70 ] } }, { name: "lower_bin_id", docs: [ "Lower bin ID" ], type: "i32" }, { name: "upper_bin_id", docs: [ "Upper bin ID" ], type: "i32" }, { name: "last_updated_at", docs: [ "Last updated timestamp" ], type: "i64" }, { name: "total_claimed_fee_x_amount", docs: [ "Total claimed token fee X" ], type: "u64" }, { name: "total_claimed_fee_y_amount", docs: [ "Total claimed token fee Y" ], type: "u64" }, { name: "total_claimed_rewards", docs: [ "Total claimed rewards" ], type: { array: [ "u64", 2 ] } }, { name: "operator", docs: [ "Operator of position" ], type: "pubkey" }, { name: "lock_release_point", docs: [ "Time point which the locked liquidity can be withdraw" ], type: "u64" }, { name: "_padding_0", docs: [ "_padding_0, previous subjected_to_bootstrap_liquidity_locking, BE CAREFUL FOR TOMBSTONE WHEN REUSE !!" ], type: "u8" }, { name: "fee_owner", docs: [ "Address is able to claim fee in this position, only valid for bootstrap_liquidity_position" ], type: "pubkey" }, { name: "version", docs: [ "version to know whether we have reset tombstone fields" ], type: "u8" }, { name: "permissionless_operation_bits", type: "u8" }, { name: "_reserved", docs: [ "Reserved space for future use" ], type: { array: [ "u8", 85 ] } } ] } }, { name: "PresetParameter", type: { kind: "struct", fields: [ { name: "bin_step", docs: [ "Bin step. Represent the price increment / decrement." ], type: "u16" }, { name: "base_factor", docs: [ "Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor" ], type: "u16" }, { name: "filter_period", docs: [ "Filter period determine high frequency trading time window." ], type: "u16" }, { name: "decay_period", docs: [ "Decay period determine when the volatile fee start decay / decrease." ], type: "u16" }, { name: "reduction_factor", docs: [ "Reduction factor controls the volatile fee rate decrement rate." ], type: "u16" }, { name: "variable_fee_control", docs: [ "Used to scale the variable fee component depending on the dynamic of the market" ], type: "u32" }, { name: "max_volatility_accumulator", docs: [ "Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate." ], type: "u32" }, { name: "min_bin_id", docs: [ "Min bin id supported by the pool based on the configured bin step." ], type: "i32" }, { name: "max_bin_id", docs: [ "Max bin id supported by the pool based on the configured bin step." ], type: "i32" }, { name: "protocol_share", docs: [ "Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee" ], type: "u16" } ] } }, { name: "PresetParameter2", serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "bin_step", docs: [ "Bin step. Represent the price increment / decrement." ], type: "u16" }, { name: "base_factor", docs: [ "Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor" ], type: "u16" }, { name: "filter_period", docs: [ "Filter period determine high frequency trading time window." ], type: "u16" }, { name: "decay_period", docs: [ "Decay period determine when the volatile fee start decay / decrease." ], type: "u16" }, { name: "variable_fee_control", docs: [ "Used to scale the variable fee component depending on the dynamic of the market" ], type: "u32" }, { name: "max_volatility_accumulator", docs: [ "Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate." ], type: "u32" }, { name: "reduction_factor", docs: [ "Reduction factor controls the volatile fee rate decrement rate." ], type: "u16" }, { name: "protocol_share", docs: [ "Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee" ], type: "u16" }, { name: "index", docs: [ "index" ], type: "u16" }, { name: "base_fee_power_factor", docs: [ "Base fee power factor" ], type: "u8" }, { name: "concrete_function_type", docs: [ "function type, to check whether the pool should have LM farming or other functions in the future, refer ConcreteFunctionType" ], type: "u8" }, { name: "collect_fee_mode", docs: [ "collect fee mode" ], type: "u8" }, { name: "padding_0", type: { array: [ "u8", 7 ] } }, { name: "padding_1", docs: [ "Padding 1 for future use" ], type: { array: [ "u64", 19 ] } } ] } }, { name: "ProtocolFee", serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "amount_x", type: "u64" }, { name: "amount_y", type: "u64" } ] } }, { name: "RebalanceLiquidityParams", type: { kind: "struct", fields: [ { name: "active_id", docs: [ "active id" ], type: "i32" }, { name: "max_active_bin_slippage", docs: [ "max active bin slippage allowed" ], type: "u16" }, { name: "should_claim_fee", docs: [ "a flag to indicate that whether fee should be harvested" ], type: "bool" }, { name: "should_claim_reward", docs: [ "a flag to indicate that whether rewards should be harvested" ], type: "bool" }, { name: "min_withdraw_x_amount", docs: [ "threshold for withdraw token x" ], type: "u64" }, { name: "max_deposit_x_amount", docs: [ "threshold for deposit token x" ], type: "u64" }, { name: "min_withdraw_y_amount", docs: [ "threshold for withdraw token y" ], type: "u64" }, { name: "max_deposit_y_amount", docs: [ "threshold for deposit token y" ], type: "u64" }, { name: "shrink_mode", docs: [ "shrink mode" ], type: "u8" }, { name: "padding", docs: [ "padding 32 bytes for future usage" ], type: { array: [ "u8", 31 ] } }, { name: "removes", docs: [ "removes" ], type: { vec: { defined: { name: "RemoveLiquidityParams" } } } }, { name: "adds", docs: [ "adds" ], type: { vec: { defined: { name: "AddLiquidityParams" } } } } ] } }, { name: "Rebalancing", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "position", type: "pubkey" }, { name: "owner", type: "pubkey" }, { name: "active_bin_id", type: "i32" }, { name: "x_withdrawn_amount", type: "u64" }, { name: "x_added_amount", type: "u64" }, { name: "y_withdrawn_amount", type: "u64" }, { name: "y_added_amount", type: "u64" }, { name: "x_fee_amount", type: "u64" }, { name: "y_fee_amount", type: "u64" }, { name: "old_min_id", type: "i32" }, { name: "old_max_id", type: "i32" }, { name: "new_min_id", type: "i32" }, { name: "new_max_id", type: "i32" }, { name: "rewards", type: { array: [ "u64", 2 ] } } ] } }, { name: "RelativeBin", type: { kind: "struct", fields: [ { name: "active_id", docs: [ "Active bin that integrator observe off-chain" ], type: "i32" }, { name: "max_active_bin_slippage", docs: [ "max active bin slippage allowed" ], type: "i32" } ] } }, { name: "RemainingAccountsInfo", type: { kind: "struct", fields: [ { name: "slices", type: { vec: { defined: { name: "RemainingAccountsSlice" } } } } ] } }, { name: "RemainingAccountsSlice", type: { kind: "struct", fields: [ { name: "accounts_type", type: { defined: { name: "AccountsType" } } }, { name: "length", type: "u8" } ] } }, { name: "RemoveLiquidity", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "from", type: "pubkey" }, { name: "position", type: "pubkey" }, { name: "amounts", type: { array: [ "u64", 2 ] } }, { name: "active_bin_id", type: "i32" } ] } }, { name: "RemoveLiquidityParams", type: { kind: "struct", fields: [ { name: "min_bin_id", type: { option: "i32" } }, { name: "max_bin_id", type: { option: "i32" } }, { name: "bps", type: "u16" }, { name: "padding", type: { array: [ "u8", 16 ] } } ] } }, { name: "ResizeSide", docs: [ "Side of resize, 0 for lower and 1 for upper" ], repr: { kind: "rust" }, type: { kind: "enum", variants: [ { name: "Lower" }, { name: "Upper" } ] } }, { name: "RewardInfo", docs: [ "Stores the state relevant for tracking liquidity mining rewards" ], serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "mint", docs: [ "Reward token mint." ], type: "pubkey" }, { name: "vault", docs: [ "Reward vault token account." ], type: "pubkey" }, { name: "funder", docs: [ "Authority account that allows to fund rewards" ], type: "pubkey" }, { name: "reward_duration", docs: [ "LM reward duration in seconds." ], type: "u64" }, { name: "reward_duration_end", docs: [ "LM reward duration end time." ], type: "u64" }, { name: "reward_rate", docs: [ "LM reward rate" ], type: "u128" }, { name: "last_update_time", docs: [ "The last time reward states were updated." ], type: "u64" }, { name: "cumulative_seconds_with_empty_liquidity_reward", docs: [ "Accumulated seconds where when farm distribute rewards, but the bin is empty. The reward will be accumulated for next reward time window." ], type: "u64" } ] } }, { name: "Rounding", type: { kind: "enum", variants: [ { name: "Up" }, { name: "Down" } ] } }, { name: "SetPositionPermissionlessOperationBitsEvt", type: { kind: "struct", fields: [ { name: "position", type: "pubkey" }, { name: "owner", type: "pubkey" }, { name: "old_bits", type: "u8" }, { name: "new_bits", type: "u8" } ] } }, { name: "StaticParameters", docs: [ "Parameter that set by the protocol" ], serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "base_factor", docs: [ "Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor" ], type: "u16" }, { name: "filter_period", docs: [ "Filter period determine high frequency trading time window." ], type: "u16" }, { name: "decay_period", docs: [ "Decay period determine when the volatile fee start decay / decrease." ], type: "u16" }, { name: "reduction_factor", docs: [ "Reduction factor controls the volatile fee rate decrement rate." ], type: "u16" }, { name: "variable_fee_control", docs: [ "Used to scale the variable fee component depending on the dynamic of the market" ], type: "u32" }, { name: "max_volatility_accumulator", docs: [ "Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate." ], type: "u32" }, { name: "min_bin_id", docs: [ "Min bin id supported by the pool based on the configured bin step." ], type: "i32" }, { name: "max_bin_id", docs: [ "Max bin id supported by the pool based on the configured bin step." ], type: "i32" }, { name: "protocol_share", docs: [ "Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee" ], type: "u16" }, { name: "base_fee_power_factor", docs: [ "Base fee power factor" ], type: "u8" }, { name: "function_type", docs: [ "function type" ], type: "u8" }, { name: "collect_fee_mode", docs: [ "Collect fee mode" ], type: "u8" }, { name: "_padding", docs: [ "Padding for bytemuck safe alignment" ], type: { array: [ "u8", 3 ] } } ] } }, { name: "StrategyParameters", type: { kind: "struct", fields: [ { name: "min_bin_id", docs: [ "min bin id" ], type: "i32" }, { name: "max_bin_id", docs: [ "max bin id" ], type: "i32" }, { name: "strategy_type", docs: [ "strategy type" ], type: { defined: { name: "StrategyType" } } }, { name: "parameteres", docs: [ "parameters" ], type: { array: [ "u8", 64 ] } } ] } }, { name: "StrategyType", type: { kind: "enum", variants: [ { name: "SpotOneSide" }, { name: "CurveOneSide" }, { name: "BidAskOneSide" }, { name: "SpotBalanced" }, { name: "CurveBalanced" }, { name: "BidAskBalanced" }, { name: "SpotImBalanced" }, { name: "CurveImBalanced" }, { name: "BidAskImBalanced" } ] } }, { name: "Swap", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "from", type: "pubkey" }, { name: "start_bin_id", type: "i32" }, { name: "end_bin_id", type: "i32" }, { name: "amount_in", type: "u64" }, { name: "amount_out", type: "u64" }, { name: "swap_for_y", type: "bool" }, { name: "fee", type: "u64" }, { name: "protocol_fee", type: "u64" }, { name: "fee_bps", type: "u128" }, { name: "host_fee", type: "u64" } ] } }, { name: "Swap2Evt", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "from", type: "pubkey" }, { name: "start_bin_id", type: "i32" }, { name: "end_bin_id", type: "i32" }, { name: "swap_for_y", type: "bool" }, { name: "fee_bps", type: "u128" }, { name: "amount_in", docs: [ "Total amount, user transfer out" ], type: "u64" }, { name: "amount_left", docs: [ "Leftover amount" ], type: "u64" }, { name: "amount_out", docs: [ "Total amount transfer to user, including transfer fee" ], type: "u64" }, { name: "mm_fee", docs: [ "Market maker fee" ], type: "u64" }, { name: "protocol_fee", docs: [ "Total protocol fee" ], type: "u64" }, { name: "limit_order_fee", docs: [ "Total limit order fee" ], type: "u64" }, { name: "host_fee", docs: [ "Total host fee" ], type: "u64" }, { name: "fees_on_input", docs: [ "check if fees on input" ], type: "bool" }, { name: "fees_on_token_x", docs: [ "check if fees is on token x" ], type: "bool" } ] } }, { name: "TokenBadge", docs: [ "Parameter that set by the protocol" ], serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "token_mint", docs: [ "token mint" ], type: "pubkey" }, { name: "_padding", docs: [ "Reserve" ], type: { array: [ "u8", 128 ] } } ] } }, { name: "TokenProgramFlags", repr: { kind: "rust" }, type: { kind: "enum", variants: [ { name: "TokenProgram" }, { name: "TokenProgram2022" } ] } }, { name: "UpdatePositionLockReleasePoint", type: { kind: "struct", fields: [ { name: "position", type: "pubkey" }, { name: "current_point", type: "u64" }, { name: "new_lock_release_point", type: "u64" }, { name: "old_lock_release_point", type: "u64" }, { name: "sender", type: "pubkey" } ] } }, { name: "UpdatePositionOperator", type: { kind: "struct", fields: [ { name: "position", type: "pubkey" }, { name: "old_operator", type: "pubkey" }, { name: "new_operator", type: "pubkey" } ] } }, { name: "UpdateRewardDuration", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "reward_index", type: "u64" }, { name: "old_reward_duration", type: "u64" }, { name: "new_reward_duration", type: "u64" } ] } }, { name: "UpdateRewardFunder", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "reward_index", type: "u64" }, { name: "old_funder", type: "pubkey" }, { name: "new_funder", type: "pubkey" } ] } }, { name: "UserRewardInfo", serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "reward_per_token_completes", type: { array: [ "u128", 2 ] } }, { name: "reward_pendings", type: { array: [ "u64", 2 ] } } ] } }, { name: "VariableParameters", docs: [ "Parameters that changes based on dynamic of the market" ], serialization: "bytemuck", repr: { kind: "c" }, type: { kind: "struct", fields: [ { name: "volatility_accumulator", docs: [ "Volatility accumulator measure the number of bin crossed since reference bin ID. Normally (without filter period taken into consideration), reference bin ID is the active bin of last swap.", "It affects the variable fee rate" ], type: "u32" }, { name: "volatility_reference", docs: [ "Volatility reference is decayed volatility accumulator. It is always <= volatility_accumulator" ], type: "u32" }, { name: "index_reference", docs: [ "Active bin id of last swap." ], type: "i32" }, { name: "_padding", docs: [ "Padding for bytemuck safe alignment" ], type: { array: [ "u8", 4 ] } }, { name: "last_update_timestamp", docs: [ "Last timestamp the variable parameters was updated" ], type: "i64" }, { name: "_padding_1", docs: [ "Padding for bytemuck safe alignment" ], type: { array: [ "u8", 8 ] } } ] } }, { name: "WithdrawIneligibleReward", type: { kind: "struct", fields: [ { name: "lb_pair", type: "pubkey" }, { name: "reward_mint", type: "pubkey" }, { name: "amount", type: "u64" } ] } } ]; var constants = [ { name: "BASIS_POINT_MAX", type: "u16", value: "10000" }, { name: "BIN_ARRAY", type: "bytes", value: "[98, 105, 110, 95, 97, 114, 114, 97, 121]" }, { name: "BIN_ARRAY_BITMAP_SEED", type: "bytes", value: "[98, 105, 116, 109, 97, 112]" }, { name: "BIN_ARRAY_BITMAP_SIZE", type: "i32", value: "512" }, { name: "CLAIM_PROTOCOL_FEE_OPERATOR", type: "bytes", value: "[99, 102, 95, 111, 112, 101, 114, 97, 116, 111, 114]" }, { name: "DEFAULT_BIN_PER_POSITION", type: "u64", value: "70" }, { name: "EXTENSION_BINARRAY_BITMAP_SIZE", type: "u64", value: "12" }, { name: "FEE_DENOMINATOR", type: "u64", value: "1000000000" }, { name: "HOST_FEE_BPS", docs: [ "Host fee. 20%" ], type: "u16", value: "2000" }, { name: "ILM_PROTOCOL_SHARE", type: "u16", value: "2000" }, { name: "LIMIT_ORDER_FEE_SHARE", type: "u16", value: "5000" }, { name: "MAX_BASE_FEE", docs: [ "Maximum base fee, base_fee / 10^9 = fee_in_percentage" ], type: "u128", value: "100000000" }, { name: "MAX_BIN_ID_PER_BIN_STEP", docs: [ "Maximum bin ID per bin step. Computed based on 1 bps. Used for bin id bound estimation." ], type: "i32", value: "351639" }, { name: "MAX_BIN_PER_ARRAY", type: "u64", value: "70" }, { name: "MAX_BIN_PER_LIMIT_ORDER", type: "u64", value: "50" }, { name: "MAX_BIN_STEP", docs: [ "Maximum bin step" ], type: "u16", value: "400" }, { name: "MAX_FEE_RATE", docs: [ "Maximum fee rate. 10%" ], type: "u64", value: "100000000" }, { name: "MAX_PROTOCOL_SHARE", docs: [ "Maximum protocol share of the fee. 25%" ], type: "u16", value: "2500" }, { name: "MAX_RESIZE_LENGTH", type: "u64", value: "91" }, { name: "MAX_REWARD_BIN_SPLIT", type: "u64", value: "15" }, { name: "MAX_REWARD_DURATION", type: "u64", value: "31536000" }, { name: "MINIMUM_LIQUIDITY", type: "u128", value: "1000000" }, { name: "MIN_BASE_FEE", docs: [ "Minimum base fee" ], type: "u128", value: "100000" }, { name: "MIN_REWARD_DURATION", type: "u64", value: "1" }, { name: "NUM_REWARDS", type: "u64", value: "2" }, { name: "OPERATOR_PREFIX", type: "bytes", value: "[111, 112, 101, 114, 97, 116, 111, 114]" }, { name: "ORACLE", type: "bytes", value: "[111, 114, 97, 99, 108, 101]" }, { name: "POSITION", type: "bytes", value: "[112, 111, 115, 105, 116, 105, 111, 110]" }, { name: "POSITION_MAX_LENGTH", type: "u64", value: "1400" }, { name: "PRESET_PARAMETER", type: "bytes", value: "[112, 114, 101, 115, 101, 116, 95, 112, 97, 114, 97, 109, 101, 116, 101, 114]" }, { name: "PRESET_PARAMETER2", type: "bytes", value: "[112, 114, 101, 115, 101, 116, 95, 112, 97, 114, 97, 109, 101, 116, 101, 114, 50]" }, { name: "PROTOCOL_SHARE", type: "u16", value: "500" } ]; var IDL = { address: address, metadata: metadata, instructions: instructions, accounts: accounts, events: events, errors: errors, types: types, constants: constants }; type Codes = (typeof IDL.errors)[number]["code"]; declare class DLMMError extends Error { errorCode: number; errorName: string; errorMessage: string; constructor(error: object | Codes); } type ErrorName = "SWAP_QUOTE_INSUFFICIENT_LIQUIDITY" | "INVALID_MAX_EXTRA_BIN_ARRAYS"; declare class DlmmSdkError extends Error { name: ErrorName; message: string; constructor(name: ErrorName, message: string); } declare const presetParameter2BinStepFilter: (binStep: BN$1) => GetProgramAccountsFilter; declare const presetParameter2BaseFactorFilter: (baseFactor: BN$1) => GetProgramAccountsFilter; declare const presetParameter2BaseFeePowerFactor: (baseFeePowerFactor: BN$1) => GetProgramAccountsFilter; declare const binArrayLbPairFilter: (lbPair: PublicKey) => GetProgramAccountsFilter; declare const positionOwnerFilter: (owner: PublicKey) => GetProgramAccountsFilter; declare const positionLbPairFilter: (lbPair: PublicKey) => GetProgramAccountsFilter; declare const positionV2Filter: () => GetProgramAccountsFilter; declare const limitOrderFilter: () => GetProgramAccountsFilter; declare const limitOrderOwnerFilter: (owner: PublicKey) => GetProgramAccountsFilter; declare const limitOrderLbPairFilter: (lbPair: PublicKey) => GetProgramAccountsFilter; export { ADMIN, ALT_ADDRESS, AccountName, ActionType, ActivationType, AmountIntoBin, BASIS_POINT_MAX, BIN_ARRAY_BITMAP_FEE, BIN_ARRAY_BITMAP_FEE_BN, BIN_ARRAY_BITMAP_SIZE, BIN_ARRAY_DEFAULT_VERSION, BIN_ARRAY_FEE, BIN_ARRAY_FEE_BN, BidAskParameters, Bin, BinAndAmount, BinArray, BinArrayAccount, BinArrayBitmapExtension, BinArrayBitmapExtensionAccount, BinLiquidity, BinLiquidityDistribution, BinLiquidityReduction, BitmapType, ChunkCallback, ChunkCallbackInfo, ClmmProgram, Clock, ClockLayout, CollectFeeMode, CompressedBinDepositAmount, CompressedBinDepositAmounts, ConcreteFunctionType, CreateRebalancePositionParams, DEFAULT_BIN_PER_POSITION, DLMMError, DlmmSdkError, DynamicOracle, EXTENSION_BINARRAY_BITMAP_SIZE, EmissionRate, ExtendedPositionBinData, FEE_PRECISION, FeeInfo, FeeMode, FunctionType, GetOrCreateATAResponse, GetPositionsOpt, IAccountsCache, IDL, IDynamicOracle, ILM_BASE, IPosition, InitCustomizablePermissionlessPairIx, InitPermissionPairIx, InitializeMultiplePositionAndAddLiquidityByStrategyResponse, InitializeMultiplePositionAndAddLiquidityByStrategyResponse2, LBCLMM_PROGRAM_IDS, LIMIT_ORDER_BIN_DATA_SIZE, LIMIT_ORDER_FEE_SHARE, LIMIT_ORDER_MIN_SIZE, LMRewards, LbClmm, LbPair, LbPairAccount, LbPosition, LimitOrder, LimitOrderBinData, LimitOrderStatus, LiquidityOneSideParameter, LiquidityParameter, LiquidityParameterByStrategy, LiquidityParameterByStrategyOneSide, LiquidityParameterByWeight, LiquidityStrategyParameterBuilder, LiquidityStrategyParameters, MAX_ACTIVE_BIN_SLIPPAGE, MAX_BINS_PER_POSITION, MAX_BIN_ARRAY_SIZE, MAX_BIN_LENGTH_ALLOWED_IN_ONE_TX, MAX_BIN_PER_LIMIT_ORDER, MAX_CLAIM_ALL_ALLOWED, MAX_EXTRA_BIN_ARRAYS, MAX_FEE_RATE, MAX_RESIZE_LENGTH, MEMO_PROGRAM_ID, Network, Observation, Opt, Oracle, POOL_FEE, POOL_FEE_BN, POSITION_BIN_DATA_SIZE, POSITION_FEE, POSITION_FEE_BN, POSITION_MAX_LENGTH, POSITION_MIN_SIZE, PRECISION, PairLockInfo, PairStatus, PairType, ParsedLimitOrderWithPubkey, PlaceLimitOrderParams, PositionBinData, PositionData, PositionInfo, PositionLockInfo, PositionPermission, PositionV2, PositionV2Wrapper, PositionVersion, PresetParameter, PresetParameter2, ProgramStrategyParameter, ProgramStrategyType, REBALANCE_POSITION_PADDING, RebalanceAddLiquidityParam, RebalancePosition, RebalancePositionBinArrayRentalCostQuote, RebalancePositionResponse, RebalanceRemoveLiquidityParam, RebalanceWithDeposit, RebalanceWithWithdraw, RemainingAccountInfo, RemainingAccountsInfoSlice, ResizeSide, ResizeSideEnum, RewardInfo, RewardInfos, Rounding, SCALE, SCALE_OFFSET, SIMULATION_USER, SeedLiquidityCostBreakdown, SeedLiquidityResponse, SeedLiquiditySingleBinResponse, ShrinkMode, SimulateRebalanceResp, Strategy, StrategyParameters, StrategyType, SwapExactOutParams, SwapFee, SwapParams, SwapQuote, SwapQuoteExactOut, SwapWithPriceImpactParams, TInitializeMultiplePositionAndAddLiquidityParamsByStrategy, TInitializePositionAndAddLiquidityParams, TInitializePositionAndAddLiquidityParamsByStrategy, TOKEN_ACCOUNT_FEE, TOKEN_ACCOUNT_FEE_BN, TQuoteCreatePositionParams, TokenReserve, TwapResult, U64_MAX, UserFeeInfo, UserRewardInfo, autoFillXByStrategy, autoFillXByWeight, autoFillYByStrategy, autoFillYByWeight, binArrayLbPairFilter, binDeltaToMinMaxBinId, binIdToBinArrayIndex, buildBitFlagAndNegateStrategyParameters, buildLiquidityStrategyParameters, calculateBidAskDistribution, calculateNormalDistribution, calculatePositionSize, calculateSpotDistribution, calculateTransferFeeExcludedAmount, calculateTransferFeeIncludedAmount, capSlippagePercentage, chunkBinRange, chunkBinRangeIntoExtendedPositions, chunkDepositWithRebalanceEndpoint, chunkPositionBinRange, chunkedFetchMultipleBinArrayBitmapExtensionAccount, chunkedFetchMultiplePoolAccount, chunkedGetMultipleAccountInfos, chunkedGetProgramAccounts, chunks, compressBinAmount, computeBaseFactorFromFeeBps, computeFee, computeFeeFromAmount, computeProtocolFee, createProgram, decodeAccount, decodeExtendedPosition, decodeRewardPerTokenStored, DLMM as default, deriveBinArray, deriveBinArrayBitmapExtension, deriveCustomizablePermissionlessLbPair, deriveEventAuthority, deriveLbPair, deriveLbPair2, deriveLbPairWithPresetParamWithIndexKey, deriveOperator, deriveOracle, derivePermissionLbPair, derivePlaceHolderAccountMeta, derivePosition, derivePresetParameter, derivePresetParameter2, derivePresetParameterWithIndex, deriveReserve, deriveRewardVault, deriveTokenBadge, distributeAmountToCompressedBinsByRatio, encodePositionPermissions, enumerateBins, findNextBinArrayIndexWithLiquidity, findNextBinArrayWithLiquidity, findOptimumDecompressMultiplier, fromWeightDistributionToAmount, fromWeightDistributionToAmountOneSide, generateAmountForBinRange, generateBinAmount, getAccountDiscriminator, getAmountIn, getAmountInBinsAskSide, getAmountInBinsBidSide, getAmountOut, getAndCapMaxActiveBinSlippage, getAutoFillAmountByRebalancedPosition, getBaseFee, getBinArrayAccountMetasCoverage, getBinArrayIndexesCoverage, getBinArrayInfoForNonContiguousBinIds, getBinArrayKeysCoverage, getBinArrayLowerUpperBinId, getBinArraysRequiredByPositionRange, getBinCount, getBinFromBinArray, getBinIdIndexInBinArray, getBinMaxAmountOut, getC, getEstimatedComputeUnitIxWithBuffer, getEstimatedComputeUnitUsageWithBuffer, getExcludedFeeAmount, getExtendedPositionBinCount, getExtraAccountMetasForTransferHook, getFeeMode, getIncludedFeeAmount, getLimitOrderLiquidity, getLiquidityStrategyParameterBuilder, getMultipleMintsExtraAccountMetasForTransferHook, getOrCreateATAInstruction, getPositionCount, getPositionCountByBinCount, getPositionExpandRentExemption, getPositionLowerUpperBinIdWithLiquidity, getPositionRentExemption, getPriceOfBinByBinId, getQPriceBaseFactor, getQPriceFromId, getRebalanceBinArrayIndexesAndBitmapCoverage, getSlippageMaxAmount, getSlippageMinAmount, getTokenBalance, getTokenDecimals, getTokenProgramId, getTokensMintFromPoolAddress, getTotalFee, getVariableFee, isBinIdWithinBinArray, isOverflowDefaultBinArrayBitmap, isPositionNoFee, isPositionNoReward, isSupportLimitOrder, limitOrderFilter, limitOrderLbPairFilter, limitOrderOwnerFilter, mulDiv, mulShr, parseLogs, positionLbPairFilter, positionOwnerFilter, positionV2Filter, presetParameter2BaseFactorFilter, presetParameter2BaseFeePowerFactor, presetParameter2BinStepFilter, range, resetUninvolvedLiquidityParams, sParameters, shlDiv, splitFee, suggestBalancedXParametersFromY, suggestBalancedYParametersFromX, swapExactInQuoteAtBin, swapExactOutQuoteAtBin, toAmountAskSide, toAmountBidSide, toAmountBothSide, toAmountIntoBins, toAmountsBothSideByStrategy, toStrategyParameters, toWeightDistribution, unwrapSOLInstruction, vParameters, wrapOracle, wrapPosition, wrapSOLInstruction };