import { ClaimFeeOperator, ClaimFeeOperatorArgs, getClaimFeeOperatorCodec } from "../accounts/claimFeeOperator.js"; import { Config, ConfigArgs, getConfigCodec } from "../accounts/config.js"; import { Pool, PoolArgs, getPoolCodec } from "../accounts/pool.js"; import { Position, PositionArgs, getPositionCodec } from "../accounts/position.js"; import { TokenBadge, TokenBadgeArgs, getTokenBadgeCodec } from "../accounts/tokenBadge.js"; import { Vesting, VestingArgs, getVestingCodec } from "../accounts/vesting.js"; import "../accounts/index.js"; import { findClaimFeeOperatorPda } from "../pdas/claimFeeOperator.js"; import { findConfigPda } from "../pdas/config.js"; import { findCustomizablePoolPda } from "../pdas/customizablePool.js"; import { findEventAuthorityPda } from "../pdas/eventAuthority.js"; import { findPoolPda } from "../pdas/pool.js"; import { findPoolAuthorityPda } from "../pdas/poolAuthority.js"; import { findPositionPda } from "../pdas/position.js"; import { findPositionNftAccountPda } from "../pdas/positionNftAccount.js"; import { findRewardVaultPda } from "../pdas/rewardVault.js"; import { findTokenBadgePda } from "../pdas/tokenBadge.js"; import { findTokenVaultPda } from "../pdas/tokenVault.js"; import "../pdas/index.js"; import { AddLiquidityAsyncInput, ParsedAddLiquidityInstruction, getAddLiquidityInstructionAsync } from "../instructions/addLiquidity.js"; import { ClaimPartnerFeeAsyncInput, ParsedClaimPartnerFeeInstruction, getClaimPartnerFeeInstructionAsync } from "../instructions/claimPartnerFee.js"; import { ClaimPositionFeeAsyncInput, ParsedClaimPositionFeeInstruction, getClaimPositionFeeInstructionAsync } from "../instructions/claimPositionFee.js"; import { ClaimProtocolFeeAsyncInput, ParsedClaimProtocolFeeInstruction, getClaimProtocolFeeInstructionAsync } from "../instructions/claimProtocolFee.js"; import { ClaimRewardAsyncInput, ParsedClaimRewardInstruction, getClaimRewardInstructionAsync } from "../instructions/claimReward.js"; import { CloseClaimFeeOperatorAsyncInput, ParsedCloseClaimFeeOperatorInstruction, getCloseClaimFeeOperatorInstructionAsync } from "../instructions/closeClaimFeeOperator.js"; import { CloseConfigAsyncInput, ParsedCloseConfigInstruction, getCloseConfigInstructionAsync } from "../instructions/closeConfig.js"; import { ClosePositionAsyncInput, ParsedClosePositionInstruction, getClosePositionInstructionAsync } from "../instructions/closePosition.js"; import { CloseTokenBadgeAsyncInput, ParsedCloseTokenBadgeInstruction, getCloseTokenBadgeInstructionAsync } from "../instructions/closeTokenBadge.js"; import { CreateClaimFeeOperatorAsyncInput, ParsedCreateClaimFeeOperatorInstruction, getCreateClaimFeeOperatorInstructionAsync } from "../instructions/createClaimFeeOperator.js"; import { CreateConfigAsyncInput, ParsedCreateConfigInstruction, getCreateConfigInstructionAsync } from "../instructions/createConfig.js"; import { CreateDynamicConfigAsyncInput, ParsedCreateDynamicConfigInstruction, getCreateDynamicConfigInstructionAsync } from "../instructions/createDynamicConfig.js"; import { CreatePositionAsyncInput, ParsedCreatePositionInstruction, getCreatePositionInstructionAsync } from "../instructions/createPosition.js"; import { CreateTokenBadgeAsyncInput, ParsedCreateTokenBadgeInstruction, getCreateTokenBadgeInstructionAsync } from "../instructions/createTokenBadge.js"; import { FundRewardAsyncInput, ParsedFundRewardInstruction, getFundRewardInstructionAsync } from "../instructions/fundReward.js"; import { InitializeCustomizablePoolAsyncInput, ParsedInitializeCustomizablePoolInstruction, getInitializeCustomizablePoolInstructionAsync } from "../instructions/initializeCustomizablePool.js"; import { InitializePoolAsyncInput, ParsedInitializePoolInstruction, getInitializePoolInstructionAsync } from "../instructions/initializePool.js"; import { InitializePoolWithDynamicConfigAsyncInput, ParsedInitializePoolWithDynamicConfigInstruction, getInitializePoolWithDynamicConfigInstructionAsync } from "../instructions/initializePoolWithDynamicConfig.js"; import { InitializeRewardAsyncInput, ParsedInitializeRewardInstruction, getInitializeRewardInstructionAsync } from "../instructions/initializeReward.js"; import { LockPositionAsyncInput, ParsedLockPositionInstruction, getLockPositionInstructionAsync } from "../instructions/lockPosition.js"; import { ParsedPermanentLockPositionInstruction, PermanentLockPositionAsyncInput, getPermanentLockPositionInstructionAsync } from "../instructions/permanentLockPosition.js"; import { ParsedRefreshVestingInstruction, RefreshVestingInput, getRefreshVestingInstruction } from "../instructions/refreshVesting.js"; import { ParsedRemoveAllLiquidityInstruction, RemoveAllLiquidityAsyncInput, getRemoveAllLiquidityInstructionAsync } from "../instructions/removeAllLiquidity.js"; import { ParsedRemoveLiquidityInstruction, RemoveLiquidityAsyncInput, getRemoveLiquidityInstructionAsync } from "../instructions/removeLiquidity.js"; import { ParsedSetPoolStatusInstruction, SetPoolStatusAsyncInput, getSetPoolStatusInstructionAsync } from "../instructions/setPoolStatus.js"; import { ParsedSplitPositionInstruction, SplitPositionAsyncInput, getSplitPositionInstructionAsync } from "../instructions/splitPosition.js"; import { ParsedSplitPosition2Instruction, SplitPosition2AsyncInput, getSplitPosition2InstructionAsync } from "../instructions/splitPosition2.js"; import { ParsedSwapInstruction, SwapAsyncInput, getSwapInstructionAsync } from "../instructions/swap.js"; import { ParsedSwap2Instruction, Swap2AsyncInput, getSwap2InstructionAsync } from "../instructions/swap2.js"; import { ParsedUpdateRewardDurationInstruction, UpdateRewardDurationAsyncInput, getUpdateRewardDurationInstructionAsync } from "../instructions/updateRewardDuration.js"; import { ParsedUpdateRewardFunderInstruction, UpdateRewardFunderAsyncInput, getUpdateRewardFunderInstructionAsync } from "../instructions/updateRewardFunder.js"; import { ParsedWithdrawIneligibleRewardInstruction, WithdrawIneligibleRewardAsyncInput, getWithdrawIneligibleRewardInstructionAsync } from "../instructions/withdrawIneligibleReward.js"; import "../instructions/index.js"; import { Address, ClientWithPayer, ClientWithRpc, ClientWithTransactionPlanning, ClientWithTransactionSending, ExtendedClient, GetAccountInfoApi, GetMultipleAccountsApi, Instruction, InstructionWithData, ReadonlyUint8Array } from "@solana/kit"; import { SelfFetchFunctions, SelfPlanAndSendFunctions } from "@solana/program-client-core"; //#region src/generated/programs/cpAmm.d.ts declare const CP_AMM_PROGRAM_ADDRESS: Address<"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG">; declare enum CpAmmAccount { ClaimFeeOperator = 0, Config = 1, Pool = 2, Position = 3, TokenBadge = 4, Vesting = 5 } declare function identifyCpAmmAccount(account: { data: ReadonlyUint8Array; } | ReadonlyUint8Array): CpAmmAccount; declare enum CpAmmInstruction { AddLiquidity = 0, ClaimPartnerFee = 1, ClaimPositionFee = 2, ClaimProtocolFee = 3, ClaimReward = 4, CloseClaimFeeOperator = 5, CloseConfig = 6, ClosePosition = 7, CloseTokenBadge = 8, CreateClaimFeeOperator = 9, CreateConfig = 10, CreateDynamicConfig = 11, CreatePosition = 12, CreateTokenBadge = 13, FundReward = 14, InitializeCustomizablePool = 15, InitializePool = 16, InitializePoolWithDynamicConfig = 17, InitializeReward = 18, LockPosition = 19, PermanentLockPosition = 20, RefreshVesting = 21, RemoveAllLiquidity = 22, RemoveLiquidity = 23, SetPoolStatus = 24, SplitPosition = 25, SplitPosition2 = 26, Swap = 27, Swap2 = 28, UpdateRewardDuration = 29, UpdateRewardFunder = 30, WithdrawIneligibleReward = 31 } declare function identifyCpAmmInstruction(instruction: { data: ReadonlyUint8Array; } | ReadonlyUint8Array): CpAmmInstruction; type ParsedCpAmmInstruction = ({ instructionType: CpAmmInstruction.AddLiquidity; } & ParsedAddLiquidityInstruction) | ({ instructionType: CpAmmInstruction.ClaimPartnerFee; } & ParsedClaimPartnerFeeInstruction) | ({ instructionType: CpAmmInstruction.ClaimPositionFee; } & ParsedClaimPositionFeeInstruction) | ({ instructionType: CpAmmInstruction.ClaimProtocolFee; } & ParsedClaimProtocolFeeInstruction) | ({ instructionType: CpAmmInstruction.ClaimReward; } & ParsedClaimRewardInstruction) | ({ instructionType: CpAmmInstruction.CloseClaimFeeOperator; } & ParsedCloseClaimFeeOperatorInstruction) | ({ instructionType: CpAmmInstruction.CloseConfig; } & ParsedCloseConfigInstruction) | ({ instructionType: CpAmmInstruction.ClosePosition; } & ParsedClosePositionInstruction) | ({ instructionType: CpAmmInstruction.CloseTokenBadge; } & ParsedCloseTokenBadgeInstruction) | ({ instructionType: CpAmmInstruction.CreateClaimFeeOperator; } & ParsedCreateClaimFeeOperatorInstruction) | ({ instructionType: CpAmmInstruction.CreateConfig; } & ParsedCreateConfigInstruction) | ({ instructionType: CpAmmInstruction.CreateDynamicConfig; } & ParsedCreateDynamicConfigInstruction) | ({ instructionType: CpAmmInstruction.CreatePosition; } & ParsedCreatePositionInstruction) | ({ instructionType: CpAmmInstruction.CreateTokenBadge; } & ParsedCreateTokenBadgeInstruction) | ({ instructionType: CpAmmInstruction.FundReward; } & ParsedFundRewardInstruction) | ({ instructionType: CpAmmInstruction.InitializeCustomizablePool; } & ParsedInitializeCustomizablePoolInstruction) | ({ instructionType: CpAmmInstruction.InitializePool; } & ParsedInitializePoolInstruction) | ({ instructionType: CpAmmInstruction.InitializePoolWithDynamicConfig; } & ParsedInitializePoolWithDynamicConfigInstruction) | ({ instructionType: CpAmmInstruction.InitializeReward; } & ParsedInitializeRewardInstruction) | ({ instructionType: CpAmmInstruction.LockPosition; } & ParsedLockPositionInstruction) | ({ instructionType: CpAmmInstruction.PermanentLockPosition; } & ParsedPermanentLockPositionInstruction) | ({ instructionType: CpAmmInstruction.RefreshVesting; } & ParsedRefreshVestingInstruction) | ({ instructionType: CpAmmInstruction.RemoveAllLiquidity; } & ParsedRemoveAllLiquidityInstruction) | ({ instructionType: CpAmmInstruction.RemoveLiquidity; } & ParsedRemoveLiquidityInstruction) | ({ instructionType: CpAmmInstruction.SetPoolStatus; } & ParsedSetPoolStatusInstruction) | ({ instructionType: CpAmmInstruction.SplitPosition; } & ParsedSplitPositionInstruction) | ({ instructionType: CpAmmInstruction.SplitPosition2; } & ParsedSplitPosition2Instruction) | ({ instructionType: CpAmmInstruction.Swap; } & ParsedSwapInstruction) | ({ instructionType: CpAmmInstruction.Swap2; } & ParsedSwap2Instruction) | ({ instructionType: CpAmmInstruction.UpdateRewardDuration; } & ParsedUpdateRewardDurationInstruction) | ({ instructionType: CpAmmInstruction.UpdateRewardFunder; } & ParsedUpdateRewardFunderInstruction) | ({ instructionType: CpAmmInstruction.WithdrawIneligibleReward; } & ParsedWithdrawIneligibleRewardInstruction); declare function parseCpAmmInstruction(instruction: Instruction & InstructionWithData): ParsedCpAmmInstruction; type CpAmmPlugin = { accounts: CpAmmPluginAccounts; instructions: CpAmmPluginInstructions; pdas: CpAmmPluginPdas; identifyAccount: typeof identifyCpAmmAccount; identifyInstruction: typeof identifyCpAmmInstruction; parseInstruction: typeof parseCpAmmInstruction; }; type CpAmmPluginAccounts = { claimFeeOperator: ReturnType & SelfFetchFunctions; config: ReturnType & SelfFetchFunctions; pool: ReturnType & SelfFetchFunctions; position: ReturnType & SelfFetchFunctions; tokenBadge: ReturnType & SelfFetchFunctions; vesting: ReturnType & SelfFetchFunctions; }; type CpAmmPluginInstructions = { addLiquidity: (input: AddLiquidityAsyncInput) => ReturnType & SelfPlanAndSendFunctions; claimPartnerFee: (input: ClaimPartnerFeeAsyncInput) => ReturnType & SelfPlanAndSendFunctions; claimPositionFee: (input: ClaimPositionFeeAsyncInput) => ReturnType & SelfPlanAndSendFunctions; claimProtocolFee: (input: ClaimProtocolFeeAsyncInput) => ReturnType & SelfPlanAndSendFunctions; claimReward: (input: ClaimRewardAsyncInput) => ReturnType & SelfPlanAndSendFunctions; closeClaimFeeOperator: (input: CloseClaimFeeOperatorAsyncInput) => ReturnType & SelfPlanAndSendFunctions; closeConfig: (input: CloseConfigAsyncInput) => ReturnType & SelfPlanAndSendFunctions; closePosition: (input: ClosePositionAsyncInput) => ReturnType & SelfPlanAndSendFunctions; closeTokenBadge: (input: CloseTokenBadgeAsyncInput) => ReturnType & SelfPlanAndSendFunctions; createClaimFeeOperator: (input: CreateClaimFeeOperatorAsyncInput) => ReturnType & SelfPlanAndSendFunctions; createConfig: (input: CreateConfigAsyncInput) => ReturnType & SelfPlanAndSendFunctions; createDynamicConfig: (input: CreateDynamicConfigAsyncInput) => ReturnType & SelfPlanAndSendFunctions; createPosition: (input: MakeOptional) => ReturnType & SelfPlanAndSendFunctions; createTokenBadge: (input: CreateTokenBadgeAsyncInput) => ReturnType & SelfPlanAndSendFunctions; fundReward: (input: FundRewardAsyncInput) => ReturnType & SelfPlanAndSendFunctions; initializeCustomizablePool: (input: MakeOptional) => ReturnType & SelfPlanAndSendFunctions; initializePool: (input: MakeOptional) => ReturnType & SelfPlanAndSendFunctions; initializePoolWithDynamicConfig: (input: MakeOptional) => ReturnType & SelfPlanAndSendFunctions; initializeReward: (input: MakeOptional) => ReturnType & SelfPlanAndSendFunctions; lockPosition: (input: MakeOptional) => ReturnType & SelfPlanAndSendFunctions; permanentLockPosition: (input: PermanentLockPositionAsyncInput) => ReturnType & SelfPlanAndSendFunctions; refreshVesting: (input: RefreshVestingInput) => ReturnType & SelfPlanAndSendFunctions; removeAllLiquidity: (input: RemoveAllLiquidityAsyncInput) => ReturnType & SelfPlanAndSendFunctions; removeLiquidity: (input: RemoveLiquidityAsyncInput) => ReturnType & SelfPlanAndSendFunctions; setPoolStatus: (input: SetPoolStatusAsyncInput) => ReturnType & SelfPlanAndSendFunctions; splitPosition: (input: SplitPositionAsyncInput) => ReturnType & SelfPlanAndSendFunctions; splitPosition2: (input: SplitPosition2AsyncInput) => ReturnType & SelfPlanAndSendFunctions; swap: (input: MakeOptional) => ReturnType & SelfPlanAndSendFunctions; swap2: (input: MakeOptional) => ReturnType & SelfPlanAndSendFunctions; updateRewardDuration: (input: UpdateRewardDurationAsyncInput) => ReturnType & SelfPlanAndSendFunctions; updateRewardFunder: (input: UpdateRewardFunderAsyncInput) => ReturnType & SelfPlanAndSendFunctions; withdrawIneligibleReward: (input: WithdrawIneligibleRewardAsyncInput) => ReturnType & SelfPlanAndSendFunctions; }; type CpAmmPluginPdas = { poolAuthority: typeof findPoolAuthorityPda; config: typeof findConfigPda; pool: typeof findPoolPda; position: typeof findPositionPda; tokenVault: typeof findTokenVaultPda; rewardVault: typeof findRewardVaultPda; customizablePool: typeof findCustomizablePoolPda; tokenBadge: typeof findTokenBadgePda; claimFeeOperator: typeof findClaimFeeOperatorPda; positionNftAccount: typeof findPositionNftAccountPda; eventAuthority: typeof findEventAuthorityPda; }; type CpAmmPluginRequirements = ClientWithRpc & ClientWithPayer & ClientWithTransactionPlanning & ClientWithTransactionSending; declare function cpAmmProgram(): (client: T) => ExtendedClient; type MakeOptional = Omit & Partial>; //#endregion export { CP_AMM_PROGRAM_ADDRESS, CpAmmAccount, CpAmmInstruction, CpAmmPlugin, CpAmmPluginAccounts, CpAmmPluginInstructions, CpAmmPluginPdas, CpAmmPluginRequirements, ParsedCpAmmInstruction, cpAmmProgram, identifyCpAmmAccount, identifyCpAmmInstruction, parseCpAmmInstruction }; //# sourceMappingURL=cpAmm.d.ts.map