UNPKG

@kamino-finance/kliquidity-sdk

Version:

Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol

61 lines 7.26 kB
/** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount } from '@solana/kit'; import { AMM_V3_PROGRAM_ADDRESS } from '../programs'; export declare const COLLECT_PROTOCOL_FEE_DISCRIMINATOR: Uint8Array<ArrayBuffer>; export declare function getCollectProtocolFeeDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>; export type CollectProtocolFeeInstruction<TProgram extends string = typeof AMM_V3_PROGRAM_ADDRESS, TAccountOwner extends string | AccountMeta<string> = string, TAccountPoolState extends string | AccountMeta<string> = string, TAccountAmmConfig extends string | AccountMeta<string> = string, TAccountTokenVault0 extends string | AccountMeta<string> = string, TAccountTokenVault1 extends string | AccountMeta<string> = string, TAccountVault0Mint extends string | AccountMeta<string> = string, TAccountVault1Mint extends string | AccountMeta<string> = string, TAccountRecipientTokenAccount0 extends string | AccountMeta<string> = string, TAccountRecipientTokenAccount1 extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TAccountTokenProgram2022 extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountOwner extends string ? ReadonlySignerAccount<TAccountOwner> & AccountSignerMeta<TAccountOwner> : TAccountOwner, TAccountPoolState extends string ? WritableAccount<TAccountPoolState> : TAccountPoolState, TAccountAmmConfig extends string ? ReadonlyAccount<TAccountAmmConfig> : TAccountAmmConfig, TAccountTokenVault0 extends string ? WritableAccount<TAccountTokenVault0> : TAccountTokenVault0, TAccountTokenVault1 extends string ? WritableAccount<TAccountTokenVault1> : TAccountTokenVault1, TAccountVault0Mint extends string ? ReadonlyAccount<TAccountVault0Mint> : TAccountVault0Mint, TAccountVault1Mint extends string ? ReadonlyAccount<TAccountVault1Mint> : TAccountVault1Mint, TAccountRecipientTokenAccount0 extends string ? WritableAccount<TAccountRecipientTokenAccount0> : TAccountRecipientTokenAccount0, TAccountRecipientTokenAccount1 extends string ? WritableAccount<TAccountRecipientTokenAccount1> : TAccountRecipientTokenAccount1, TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram, TAccountTokenProgram2022 extends string ? ReadonlyAccount<TAccountTokenProgram2022> : TAccountTokenProgram2022, ...TRemainingAccounts]>; export type CollectProtocolFeeInstructionData = { discriminator: ReadonlyUint8Array; amount0Requested: bigint; amount1Requested: bigint; }; export type CollectProtocolFeeInstructionDataArgs = { amount0Requested: number | bigint; amount1Requested: number | bigint; }; export declare function getCollectProtocolFeeInstructionDataEncoder(): FixedSizeEncoder<CollectProtocolFeeInstructionDataArgs>; export declare function getCollectProtocolFeeInstructionDataDecoder(): FixedSizeDecoder<CollectProtocolFeeInstructionData>; export declare function getCollectProtocolFeeInstructionDataCodec(): FixedSizeCodec<CollectProtocolFeeInstructionDataArgs, CollectProtocolFeeInstructionData>; export type CollectProtocolFeeInput<TAccountOwner extends string = string, TAccountPoolState extends string = string, TAccountAmmConfig extends string = string, TAccountTokenVault0 extends string = string, TAccountTokenVault1 extends string = string, TAccountVault0Mint extends string = string, TAccountVault1Mint extends string = string, TAccountRecipientTokenAccount0 extends string = string, TAccountRecipientTokenAccount1 extends string = string, TAccountTokenProgram extends string = string, TAccountTokenProgram2022 extends string = string> = { owner: TransactionSigner<TAccountOwner>; poolState: Address<TAccountPoolState>; ammConfig: Address<TAccountAmmConfig>; tokenVault0: Address<TAccountTokenVault0>; tokenVault1: Address<TAccountTokenVault1>; vault0Mint: Address<TAccountVault0Mint>; vault1Mint: Address<TAccountVault1Mint>; recipientTokenAccount0: Address<TAccountRecipientTokenAccount0>; recipientTokenAccount1: Address<TAccountRecipientTokenAccount1>; tokenProgram?: Address<TAccountTokenProgram>; tokenProgram2022: Address<TAccountTokenProgram2022>; amount0Requested: CollectProtocolFeeInstructionDataArgs["amount0Requested"]; amount1Requested: CollectProtocolFeeInstructionDataArgs["amount1Requested"]; }; export declare function getCollectProtocolFeeInstruction<TAccountOwner extends string, TAccountPoolState extends string, TAccountAmmConfig extends string, TAccountTokenVault0 extends string, TAccountTokenVault1 extends string, TAccountVault0Mint extends string, TAccountVault1Mint extends string, TAccountRecipientTokenAccount0 extends string, TAccountRecipientTokenAccount1 extends string, TAccountTokenProgram extends string, TAccountTokenProgram2022 extends string, TProgramAddress extends Address = typeof AMM_V3_PROGRAM_ADDRESS>(input: CollectProtocolFeeInput<TAccountOwner, TAccountPoolState, TAccountAmmConfig, TAccountTokenVault0, TAccountTokenVault1, TAccountVault0Mint, TAccountVault1Mint, TAccountRecipientTokenAccount0, TAccountRecipientTokenAccount1, TAccountTokenProgram, TAccountTokenProgram2022>, config?: { programAddress?: TProgramAddress; }): CollectProtocolFeeInstruction<TProgramAddress, TAccountOwner, TAccountPoolState, TAccountAmmConfig, TAccountTokenVault0, TAccountTokenVault1, TAccountVault0Mint, TAccountVault1Mint, TAccountRecipientTokenAccount0, TAccountRecipientTokenAccount1, TAccountTokenProgram, TAccountTokenProgram2022>; export type ParsedCollectProtocolFeeInstruction<TProgram extends string = typeof AMM_V3_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = { programAddress: Address<TProgram>; accounts: { owner: TAccountMetas[0]; poolState: TAccountMetas[1]; ammConfig: TAccountMetas[2]; tokenVault0: TAccountMetas[3]; tokenVault1: TAccountMetas[4]; vault0Mint: TAccountMetas[5]; vault1Mint: TAccountMetas[6]; recipientTokenAccount0: TAccountMetas[7]; recipientTokenAccount1: TAccountMetas[8]; tokenProgram: TAccountMetas[9]; tokenProgram2022: TAccountMetas[10]; }; data: CollectProtocolFeeInstructionData; }; export declare function parseCollectProtocolFeeInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCollectProtocolFeeInstruction<TProgram, TAccountMetas>; //# sourceMappingURL=collectProtocolFee.d.ts.map