UNPKG

@kamino-finance/farms-sdk

Version:
53 lines (46 loc) 1.28 kB
/** * 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 { combineCodec, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from "@solana/kit"; export type RewardPerTimeUnitPoint = { tsStart: bigint; rewardPerTimeUnit: bigint; }; export type RewardPerTimeUnitPointArgs = { tsStart: number | bigint; rewardPerTimeUnit: number | bigint; }; export function getRewardPerTimeUnitPointEncoder(): FixedSizeEncoder<RewardPerTimeUnitPointArgs> { return getStructEncoder([ ["tsStart", getU64Encoder()], ["rewardPerTimeUnit", getU64Encoder()], ]); } export function getRewardPerTimeUnitPointDecoder(): FixedSizeDecoder<RewardPerTimeUnitPoint> { return getStructDecoder([ ["tsStart", getU64Decoder()], ["rewardPerTimeUnit", getU64Decoder()], ]); } export function getRewardPerTimeUnitPointCodec(): FixedSizeCodec< RewardPerTimeUnitPointArgs, RewardPerTimeUnitPoint > { return combineCodec( getRewardPerTimeUnitPointEncoder(), getRewardPerTimeUnitPointDecoder(), ); }