@kamino-finance/kliquidity-sdk
Version:
Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol
44 lines • 5.01 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 ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/kit';
import { AMM_V3_PROGRAM_ADDRESS } from '../programs';
export declare const CLOSE_POSITION_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
export declare function getClosePositionDiscriminatorBytes(): ReadonlyUint8Array;
export type ClosePositionInstruction<TProgram extends string = typeof AMM_V3_PROGRAM_ADDRESS, TAccountNftOwner extends string | AccountMeta<string> = string, TAccountPositionNftMint extends string | AccountMeta<string> = string, TAccountPositionNftAccount extends string | AccountMeta<string> = string, TAccountPersonalPosition extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountNftOwner extends string ? WritableSignerAccount<TAccountNftOwner> & AccountSignerMeta<TAccountNftOwner> : TAccountNftOwner, TAccountPositionNftMint extends string ? WritableAccount<TAccountPositionNftMint> : TAccountPositionNftMint, TAccountPositionNftAccount extends string ? WritableAccount<TAccountPositionNftAccount> : TAccountPositionNftAccount, TAccountPersonalPosition extends string ? WritableAccount<TAccountPersonalPosition> : TAccountPersonalPosition, TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram, TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram, ...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<TAccountNftOwner extends string = string, TAccountPositionNftMint extends string = string, TAccountPositionNftAccount extends string = string, TAccountPersonalPosition extends string = string, TAccountSystemProgram extends string = string, TAccountTokenProgram extends string = string> = {
nftOwner: TransactionSigner<TAccountNftOwner>;
positionNftMint: Address<TAccountPositionNftMint>;
positionNftAccount: Address<TAccountPositionNftAccount>;
personalPosition: Address<TAccountPersonalPosition>;
systemProgram?: Address<TAccountSystemProgram>;
tokenProgram?: Address<TAccountTokenProgram>;
};
export declare function getClosePositionInstruction<TAccountNftOwner extends string, TAccountPositionNftMint extends string, TAccountPositionNftAccount extends string, TAccountPersonalPosition extends string, TAccountSystemProgram extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof AMM_V3_PROGRAM_ADDRESS>(input: ClosePositionInput<TAccountNftOwner, TAccountPositionNftMint, TAccountPositionNftAccount, TAccountPersonalPosition, TAccountSystemProgram, TAccountTokenProgram>, config?: {
programAddress?: TProgramAddress;
}): ClosePositionInstruction<TProgramAddress, TAccountNftOwner, TAccountPositionNftMint, TAccountPositionNftAccount, TAccountPersonalPosition, TAccountSystemProgram, TAccountTokenProgram>;
export type ParsedClosePositionInstruction<TProgram extends string = typeof AMM_V3_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
programAddress: Address<TProgram>;
accounts: {
nftOwner: TAccountMetas[0];
positionNftMint: TAccountMetas[1];
positionNftAccount: TAccountMetas[2];
personalPosition: TAccountMetas[3];
systemProgram: TAccountMetas[4];
tokenProgram: TAccountMetas[5];
};
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