/** * 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, getArrayDecoder, getArrayEncoder, getStructDecoder, getStructEncoder, getU32Decoder, getU32Encoder, type Codec, type Decoder, type Encoder, } from '@solana/kit'; import { getDailyCheckInConfigDecoder, getDailyCheckInConfigEncoder, getRenownConfigDecoder, getRenownConfigEncoder, getXpLevelThresholdInfoDecoder, getXpLevelThresholdInfoEncoder, type DailyCheckInConfig, type DailyCheckInConfigArgs, type RenownConfig, type RenownConfigArgs, type XpLevelThresholdInfo, type XpLevelThresholdInfoArgs, } from '.'; export type XpDefinitions = { seqId: number; dailyCheckInConfig: DailyCheckInConfig; renownConfig: RenownConfig; levelThresholds: Array; }; export type XpDefinitionsArgs = { seqId: number; dailyCheckInConfig: DailyCheckInConfigArgs; renownConfig: RenownConfigArgs; levelThresholds: Array; }; export function getXpDefinitionsEncoder(): Encoder { return getStructEncoder([ ['seqId', getU32Encoder()], ['dailyCheckInConfig', getDailyCheckInConfigEncoder()], ['renownConfig', getRenownConfigEncoder()], ['levelThresholds', getArrayEncoder(getXpLevelThresholdInfoEncoder())], ]); } export function getXpDefinitionsDecoder(): Decoder { return getStructDecoder([ ['seqId', getU32Decoder()], ['dailyCheckInConfig', getDailyCheckInConfigDecoder()], ['renownConfig', getRenownConfigDecoder()], ['levelThresholds', getArrayDecoder(getXpLevelThresholdInfoDecoder())], ]); } export function getXpDefinitionsCodec(): Codec< XpDefinitionsArgs, XpDefinitions > { return combineCodec(getXpDefinitionsEncoder(), getXpDefinitionsDecoder()); }