@kamino-finance/kliquidity-sdk
Version:
Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol
50 lines • 5.51 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 { WHIRLPOOL_PROGRAM_ADDRESS } from '../programs';
export declare const COLLECT_REWARD_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
export declare function getCollectRewardDiscriminatorBytes(): ReadonlyUint8Array;
export type CollectRewardInstruction<TProgram extends string = typeof WHIRLPOOL_PROGRAM_ADDRESS, TAccountWhirlpool extends string | AccountMeta<string> = string, TAccountPositionAuthority extends string | AccountMeta<string> = string, TAccountPosition extends string | AccountMeta<string> = string, TAccountPositionTokenAccount extends string | AccountMeta<string> = string, TAccountRewardOwnerAccount extends string | AccountMeta<string> = string, TAccountRewardVault extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountWhirlpool extends string ? ReadonlyAccount<TAccountWhirlpool> : TAccountWhirlpool, TAccountPositionAuthority extends string ? ReadonlySignerAccount<TAccountPositionAuthority> & AccountSignerMeta<TAccountPositionAuthority> : TAccountPositionAuthority, TAccountPosition extends string ? WritableAccount<TAccountPosition> : TAccountPosition, TAccountPositionTokenAccount extends string ? ReadonlyAccount<TAccountPositionTokenAccount> : TAccountPositionTokenAccount, TAccountRewardOwnerAccount extends string ? WritableAccount<TAccountRewardOwnerAccount> : TAccountRewardOwnerAccount, TAccountRewardVault extends string ? WritableAccount<TAccountRewardVault> : TAccountRewardVault, TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram, ...TRemainingAccounts]>;
export type CollectRewardInstructionData = {
discriminator: ReadonlyUint8Array;
rewardIndex: number;
};
export type CollectRewardInstructionDataArgs = {
rewardIndex: number;
};
export declare function getCollectRewardInstructionDataEncoder(): FixedSizeEncoder<CollectRewardInstructionDataArgs>;
export declare function getCollectRewardInstructionDataDecoder(): FixedSizeDecoder<CollectRewardInstructionData>;
export declare function getCollectRewardInstructionDataCodec(): FixedSizeCodec<CollectRewardInstructionDataArgs, CollectRewardInstructionData>;
export type CollectRewardInput<TAccountWhirlpool extends string = string, TAccountPositionAuthority extends string = string, TAccountPosition extends string = string, TAccountPositionTokenAccount extends string = string, TAccountRewardOwnerAccount extends string = string, TAccountRewardVault extends string = string, TAccountTokenProgram extends string = string> = {
whirlpool: Address<TAccountWhirlpool>;
positionAuthority: TransactionSigner<TAccountPositionAuthority>;
position: Address<TAccountPosition>;
positionTokenAccount: Address<TAccountPositionTokenAccount>;
rewardOwnerAccount: Address<TAccountRewardOwnerAccount>;
rewardVault: Address<TAccountRewardVault>;
tokenProgram?: Address<TAccountTokenProgram>;
rewardIndex: CollectRewardInstructionDataArgs["rewardIndex"];
};
export declare function getCollectRewardInstruction<TAccountWhirlpool extends string, TAccountPositionAuthority extends string, TAccountPosition extends string, TAccountPositionTokenAccount extends string, TAccountRewardOwnerAccount extends string, TAccountRewardVault extends string, TAccountTokenProgram extends string, TProgramAddress extends Address = typeof WHIRLPOOL_PROGRAM_ADDRESS>(input: CollectRewardInput<TAccountWhirlpool, TAccountPositionAuthority, TAccountPosition, TAccountPositionTokenAccount, TAccountRewardOwnerAccount, TAccountRewardVault, TAccountTokenProgram>, config?: {
programAddress?: TProgramAddress;
}): CollectRewardInstruction<TProgramAddress, TAccountWhirlpool, TAccountPositionAuthority, TAccountPosition, TAccountPositionTokenAccount, TAccountRewardOwnerAccount, TAccountRewardVault, TAccountTokenProgram>;
export type ParsedCollectRewardInstruction<TProgram extends string = typeof WHIRLPOOL_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
programAddress: Address<TProgram>;
accounts: {
whirlpool: TAccountMetas[0];
positionAuthority: TAccountMetas[1];
position: TAccountMetas[2];
positionTokenAccount: TAccountMetas[3];
rewardOwnerAccount: TAccountMetas[4];
rewardVault: TAccountMetas[5];
tokenProgram: TAccountMetas[6];
};
data: CollectRewardInstructionData;
};
export declare function parseCollectRewardInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCollectRewardInstruction<TProgram, TAccountMetas>;
//# sourceMappingURL=collectReward.d.ts.map