/** * 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, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, getU32Decoder, getU32Encoder, getU64Decoder, getU64Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from '@solana/kit'; export type DailyCheckInConfig = { xpBase: bigint; streakBonus: bigint; lpBonusStreakReq: bigint; streakBuyBackCost: bigint; streakBuyBackMaxDays: number; minCheckInTimeDiff: number; epochStartTime: bigint; }; export type DailyCheckInConfigArgs = { xpBase: number | bigint; streakBonus: number | bigint; lpBonusStreakReq: number | bigint; streakBuyBackCost: number | bigint; streakBuyBackMaxDays: number; minCheckInTimeDiff: number; epochStartTime: number | bigint; }; export function getDailyCheckInConfigEncoder(): FixedSizeEncoder { return getStructEncoder([ ['xpBase', getU64Encoder()], ['streakBonus', getU64Encoder()], ['lpBonusStreakReq', getU64Encoder()], ['streakBuyBackCost', getU64Encoder()], ['streakBuyBackMaxDays', getU32Encoder()], ['minCheckInTimeDiff', getU32Encoder()], ['epochStartTime', getI64Encoder()], ]); } export function getDailyCheckInConfigDecoder(): FixedSizeDecoder { return getStructDecoder([ ['xpBase', getU64Decoder()], ['streakBonus', getU64Decoder()], ['lpBonusStreakReq', getU64Decoder()], ['streakBuyBackCost', getU64Decoder()], ['streakBuyBackMaxDays', getU32Decoder()], ['minCheckInTimeDiff', getU32Decoder()], ['epochStartTime', getI64Decoder()], ]); } export function getDailyCheckInConfigCodec(): FixedSizeCodec< DailyCheckInConfigArgs, DailyCheckInConfig > { return combineCodec( getDailyCheckInConfigEncoder(), getDailyCheckInConfigDecoder(), ); }