/** * 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, getU32Decoder, getU32Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from '@solana/kit'; import { getCategoryXpInfoDecoder, getCategoryXpInfoEncoder, type CategoryXpInfo, type CategoryXpInfoArgs, } from '.'; export type XpInfo = { /** The seq id of the xp info. This should be in sync with the seq id of the xp definitions on game. */ seqId: number; councilRank: CategoryXpInfo; dailyXp: CategoryXpInfo; pilot: CategoryXpInfo; dataRunner: CategoryXpInfo; mining: CategoryXpInfo; building: CategoryXpInfo; crafting: CategoryXpInfo; combat: CategoryXpInfo; /** Career levels gained toward the next Council Rank renown point. */ councilRankLevelCarry: number; }; export type XpInfoArgs = { /** The seq id of the xp info. This should be in sync with the seq id of the xp definitions on game. */ seqId: number; councilRank: CategoryXpInfoArgs; dailyXp: CategoryXpInfoArgs; pilot: CategoryXpInfoArgs; dataRunner: CategoryXpInfoArgs; mining: CategoryXpInfoArgs; building: CategoryXpInfoArgs; crafting: CategoryXpInfoArgs; combat: CategoryXpInfoArgs; /** Career levels gained toward the next Council Rank renown point. */ councilRankLevelCarry: number; }; export function getXpInfoEncoder(): FixedSizeEncoder { return getStructEncoder([ ['seqId', getU32Encoder()], ['councilRank', getCategoryXpInfoEncoder()], ['dailyXp', getCategoryXpInfoEncoder()], ['pilot', getCategoryXpInfoEncoder()], ['dataRunner', getCategoryXpInfoEncoder()], ['mining', getCategoryXpInfoEncoder()], ['building', getCategoryXpInfoEncoder()], ['crafting', getCategoryXpInfoEncoder()], ['combat', getCategoryXpInfoEncoder()], ['councilRankLevelCarry', getU32Encoder()], ]); } export function getXpInfoDecoder(): FixedSizeDecoder { return getStructDecoder([ ['seqId', getU32Decoder()], ['councilRank', getCategoryXpInfoDecoder()], ['dailyXp', getCategoryXpInfoDecoder()], ['pilot', getCategoryXpInfoDecoder()], ['dataRunner', getCategoryXpInfoDecoder()], ['mining', getCategoryXpInfoDecoder()], ['building', getCategoryXpInfoDecoder()], ['crafting', getCategoryXpInfoDecoder()], ['combat', getCategoryXpInfoDecoder()], ['councilRankLevelCarry', getU32Decoder()], ]); } export function getXpInfoCodec(): FixedSizeCodec { return combineCodec(getXpInfoEncoder(), getXpInfoDecoder()); }