@kamino-finance/kliquidity-sdk
Version:
Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol
48 lines • 5.43 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 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 { LB_CLMM_PROGRAM_ADDRESS } from '../programs';
export declare const CLOSE_POSITION_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
export declare function getClosePositionDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
export type ClosePositionInstruction<TProgram extends string = typeof LB_CLMM_PROGRAM_ADDRESS, TAccountPosition extends string | AccountMeta<string> = string, TAccountLbPair extends string | AccountMeta<string> = string, TAccountBinArrayLower extends string | AccountMeta<string> = string, TAccountBinArrayUpper extends string | AccountMeta<string> = string, TAccountSender extends string | AccountMeta<string> = string, TAccountRentReceiver extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountPosition extends string ? WritableAccount<TAccountPosition> : TAccountPosition, TAccountLbPair extends string ? WritableAccount<TAccountLbPair> : TAccountLbPair, TAccountBinArrayLower extends string ? WritableAccount<TAccountBinArrayLower> : TAccountBinArrayLower, TAccountBinArrayUpper extends string ? WritableAccount<TAccountBinArrayUpper> : TAccountBinArrayUpper, TAccountSender extends string ? ReadonlySignerAccount<TAccountSender> & AccountSignerMeta<TAccountSender> : TAccountSender, TAccountRentReceiver extends string ? WritableAccount<TAccountRentReceiver> : TAccountRentReceiver, TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority, TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram, ...TRemainingAccounts]>;
export type ClosePositionInstructionData = {
discriminator: ReadonlyUint8Array;
};
export type ClosePositionInstructionDataArgs = {};
export declare function getClosePositionInstructionDataEncoder(): FixedSizeEncoder<ClosePositionInstructionDataArgs>;
export declare function getClosePositionInstructionDataDecoder(): FixedSizeDecoder<ClosePositionInstructionData>;
export declare function getClosePositionInstructionDataCodec(): FixedSizeCodec<ClosePositionInstructionDataArgs, ClosePositionInstructionData>;
export type ClosePositionInput<TAccountPosition extends string = string, TAccountLbPair extends string = string, TAccountBinArrayLower extends string = string, TAccountBinArrayUpper extends string = string, TAccountSender extends string = string, TAccountRentReceiver extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
position: Address<TAccountPosition>;
lbPair: Address<TAccountLbPair>;
binArrayLower: Address<TAccountBinArrayLower>;
binArrayUpper: Address<TAccountBinArrayUpper>;
sender: TransactionSigner<TAccountSender>;
rentReceiver: Address<TAccountRentReceiver>;
eventAuthority: Address<TAccountEventAuthority>;
program: Address<TAccountProgram>;
};
export declare function getClosePositionInstruction<TAccountPosition extends string, TAccountLbPair extends string, TAccountBinArrayLower extends string, TAccountBinArrayUpper extends string, TAccountSender extends string, TAccountRentReceiver extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof LB_CLMM_PROGRAM_ADDRESS>(input: ClosePositionInput<TAccountPosition, TAccountLbPair, TAccountBinArrayLower, TAccountBinArrayUpper, TAccountSender, TAccountRentReceiver, TAccountEventAuthority, TAccountProgram>, config?: {
programAddress?: TProgramAddress;
}): ClosePositionInstruction<TProgramAddress, TAccountPosition, TAccountLbPair, TAccountBinArrayLower, TAccountBinArrayUpper, TAccountSender, TAccountRentReceiver, TAccountEventAuthority, TAccountProgram>;
export type ParsedClosePositionInstruction<TProgram extends string = typeof LB_CLMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
programAddress: Address<TProgram>;
accounts: {
position: TAccountMetas[0];
lbPair: TAccountMetas[1];
binArrayLower: TAccountMetas[2];
binArrayUpper: TAccountMetas[3];
sender: TAccountMetas[4];
rentReceiver: TAccountMetas[5];
eventAuthority: TAccountMetas[6];
program: TAccountMetas[7];
};
data: ClosePositionInstructionData;
};
export declare function parseClosePositionInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedClosePositionInstruction<TProgram, TAccountMetas>;
//# sourceMappingURL=closePosition.d.ts.map