@kamino-finance/kliquidity-sdk
Version:
Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol
57 lines • 6.08 kB
TypeScript
/**
* 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 Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type WritableAccount } from '@solana/kit';
import { LB_CLMM_PROGRAM_ADDRESS } from '../programs';
export declare const WITHDRAW_PROTOCOL_FEE_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
export declare function getWithdrawProtocolFeeDiscriminatorBytes(): ReadonlyUint8Array;
export type WithdrawProtocolFeeInstruction<TProgram extends string = typeof LB_CLMM_PROGRAM_ADDRESS, TAccountLbPair extends string | AccountMeta<string> = string, TAccountReserveX extends string | AccountMeta<string> = string, TAccountReserveY extends string | AccountMeta<string> = string, TAccountTokenXMint extends string | AccountMeta<string> = string, TAccountTokenYMint extends string | AccountMeta<string> = string, TAccountReceiverTokenX extends string | AccountMeta<string> = string, TAccountReceiverTokenY extends string | AccountMeta<string> = string, TAccountTokenXProgram extends string | AccountMeta<string> = string, TAccountTokenYProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountLbPair extends string ? WritableAccount<TAccountLbPair> : TAccountLbPair, TAccountReserveX extends string ? WritableAccount<TAccountReserveX> : TAccountReserveX, TAccountReserveY extends string ? WritableAccount<TAccountReserveY> : TAccountReserveY, TAccountTokenXMint extends string ? ReadonlyAccount<TAccountTokenXMint> : TAccountTokenXMint, TAccountTokenYMint extends string ? ReadonlyAccount<TAccountTokenYMint> : TAccountTokenYMint, TAccountReceiverTokenX extends string ? WritableAccount<TAccountReceiverTokenX> : TAccountReceiverTokenX, TAccountReceiverTokenY extends string ? WritableAccount<TAccountReceiverTokenY> : TAccountReceiverTokenY, TAccountTokenXProgram extends string ? ReadonlyAccount<TAccountTokenXProgram> : TAccountTokenXProgram, TAccountTokenYProgram extends string ? ReadonlyAccount<TAccountTokenYProgram> : TAccountTokenYProgram, ...TRemainingAccounts]>;
export type WithdrawProtocolFeeInstructionData = {
discriminator: ReadonlyUint8Array;
amountX: bigint;
amountY: bigint;
};
export type WithdrawProtocolFeeInstructionDataArgs = {
amountX: number | bigint;
amountY: number | bigint;
};
export declare function getWithdrawProtocolFeeInstructionDataEncoder(): FixedSizeEncoder<WithdrawProtocolFeeInstructionDataArgs>;
export declare function getWithdrawProtocolFeeInstructionDataDecoder(): FixedSizeDecoder<WithdrawProtocolFeeInstructionData>;
export declare function getWithdrawProtocolFeeInstructionDataCodec(): FixedSizeCodec<WithdrawProtocolFeeInstructionDataArgs, WithdrawProtocolFeeInstructionData>;
export type WithdrawProtocolFeeInput<TAccountLbPair extends string = string, TAccountReserveX extends string = string, TAccountReserveY extends string = string, TAccountTokenXMint extends string = string, TAccountTokenYMint extends string = string, TAccountReceiverTokenX extends string = string, TAccountReceiverTokenY extends string = string, TAccountTokenXProgram extends string = string, TAccountTokenYProgram extends string = string> = {
lbPair: Address<TAccountLbPair>;
reserveX: Address<TAccountReserveX>;
reserveY: Address<TAccountReserveY>;
tokenXMint: Address<TAccountTokenXMint>;
tokenYMint: Address<TAccountTokenYMint>;
receiverTokenX: Address<TAccountReceiverTokenX>;
receiverTokenY: Address<TAccountReceiverTokenY>;
tokenXProgram: Address<TAccountTokenXProgram>;
tokenYProgram: Address<TAccountTokenYProgram>;
amountX: WithdrawProtocolFeeInstructionDataArgs["amountX"];
amountY: WithdrawProtocolFeeInstructionDataArgs["amountY"];
};
export declare function getWithdrawProtocolFeeInstruction<TAccountLbPair extends string, TAccountReserveX extends string, TAccountReserveY extends string, TAccountTokenXMint extends string, TAccountTokenYMint extends string, TAccountReceiverTokenX extends string, TAccountReceiverTokenY extends string, TAccountTokenXProgram extends string, TAccountTokenYProgram extends string, TProgramAddress extends Address = typeof LB_CLMM_PROGRAM_ADDRESS>(input: WithdrawProtocolFeeInput<TAccountLbPair, TAccountReserveX, TAccountReserveY, TAccountTokenXMint, TAccountTokenYMint, TAccountReceiverTokenX, TAccountReceiverTokenY, TAccountTokenXProgram, TAccountTokenYProgram>, config?: {
programAddress?: TProgramAddress;
}): WithdrawProtocolFeeInstruction<TProgramAddress, TAccountLbPair, TAccountReserveX, TAccountReserveY, TAccountTokenXMint, TAccountTokenYMint, TAccountReceiverTokenX, TAccountReceiverTokenY, TAccountTokenXProgram, TAccountTokenYProgram>;
export type ParsedWithdrawProtocolFeeInstruction<TProgram extends string = typeof LB_CLMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
programAddress: Address<TProgram>;
accounts: {
lbPair: TAccountMetas[0];
reserveX: TAccountMetas[1];
reserveY: TAccountMetas[2];
tokenXMint: TAccountMetas[3];
tokenYMint: TAccountMetas[4];
receiverTokenX: TAccountMetas[5];
receiverTokenY: TAccountMetas[6];
tokenXProgram: TAccountMetas[7];
tokenYProgram: TAccountMetas[8];
};
data: WithdrawProtocolFeeInstructionData;
};
export declare function parseWithdrawProtocolFeeInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedWithdrawProtocolFeeInstruction<TProgram, TAccountMetas>;
//# sourceMappingURL=withdrawProtocolFee.d.ts.map