@kamino-finance/farms-sdk
Version:
56 lines • 4.25 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 ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from "@solana/kit";
import { FARMS_PROGRAM_ADDRESS } from "../programs";
export declare const REWARD_USER_ONCE_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
export declare function getRewardUserOnceDiscriminatorBytes(): ReadonlyUint8Array;
export type RewardUserOnceInstruction<TProgram extends string = typeof FARMS_PROGRAM_ADDRESS, TAccountDelegateAuthority extends string | AccountMeta<string> = string, TAccountFarmState extends string | AccountMeta<string> = string, TAccountUserState extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
TAccountDelegateAuthority extends string ? WritableSignerAccount<TAccountDelegateAuthority> & AccountSignerMeta<TAccountDelegateAuthority> : TAccountDelegateAuthority,
TAccountFarmState extends string ? WritableAccount<TAccountFarmState> : TAccountFarmState,
TAccountUserState extends string ? WritableAccount<TAccountUserState> : TAccountUserState,
...TRemainingAccounts
]>;
export type RewardUserOnceInstructionData = {
discriminator: ReadonlyUint8Array;
rewardIndex: bigint;
amount: bigint;
expectedRewardsIssuedCumulative: bigint;
userStateId: bigint;
};
export type RewardUserOnceInstructionDataArgs = {
rewardIndex: number | bigint;
amount: number | bigint;
expectedRewardsIssuedCumulative: number | bigint;
userStateId: number | bigint;
};
export declare function getRewardUserOnceInstructionDataEncoder(): FixedSizeEncoder<RewardUserOnceInstructionDataArgs>;
export declare function getRewardUserOnceInstructionDataDecoder(): FixedSizeDecoder<RewardUserOnceInstructionData>;
export declare function getRewardUserOnceInstructionDataCodec(): FixedSizeCodec<RewardUserOnceInstructionDataArgs, RewardUserOnceInstructionData>;
export type RewardUserOnceInput<TAccountDelegateAuthority extends string = string, TAccountFarmState extends string = string, TAccountUserState extends string = string> = {
delegateAuthority: TransactionSigner<TAccountDelegateAuthority>;
farmState: Address<TAccountFarmState>;
userState: Address<TAccountUserState>;
rewardIndex: RewardUserOnceInstructionDataArgs["rewardIndex"];
amount: RewardUserOnceInstructionDataArgs["amount"];
expectedRewardsIssuedCumulative: RewardUserOnceInstructionDataArgs["expectedRewardsIssuedCumulative"];
userStateId: RewardUserOnceInstructionDataArgs["userStateId"];
};
export declare function getRewardUserOnceInstruction<TAccountDelegateAuthority extends string, TAccountFarmState extends string, TAccountUserState extends string, TProgramAddress extends Address = typeof FARMS_PROGRAM_ADDRESS>(input: RewardUserOnceInput<TAccountDelegateAuthority, TAccountFarmState, TAccountUserState>, config?: {
programAddress?: TProgramAddress;
}): RewardUserOnceInstruction<TProgramAddress, TAccountDelegateAuthority, TAccountFarmState, TAccountUserState>;
export type ParsedRewardUserOnceInstruction<TProgram extends string = typeof FARMS_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
programAddress: Address<TProgram>;
accounts: {
delegateAuthority: TAccountMetas[0];
farmState: TAccountMetas[1];
userState: TAccountMetas[2];
};
data: RewardUserOnceInstructionData;
};
export declare function parseRewardUserOnceInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedRewardUserOnceInstruction<TProgram, TAccountMetas>;
//# sourceMappingURL=rewardUserOnce.d.ts.map