/** * 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, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from '@solana/kit'; import { getCargoIdDecoder, getCargoIdEncoder, type CargoId, type CargoIdArgs, } from '.'; /** Token resources */ export type Resources = { /** ammunition */ ammo: CargoId; /** food */ food: CargoId; /** fuel */ fuel: CargoId; /** repair kit */ repairKit: CargoId; }; export type ResourcesArgs = { /** ammunition */ ammo: CargoIdArgs; /** food */ food: CargoIdArgs; /** fuel */ fuel: CargoIdArgs; /** repair kit */ repairKit: CargoIdArgs; }; export function getResourcesEncoder(): FixedSizeEncoder { return getStructEncoder([ ['ammo', getCargoIdEncoder()], ['food', getCargoIdEncoder()], ['fuel', getCargoIdEncoder()], ['repairKit', getCargoIdEncoder()], ]); } export function getResourcesDecoder(): FixedSizeDecoder { return getStructDecoder([ ['ammo', getCargoIdDecoder()], ['food', getCargoIdDecoder()], ['fuel', getCargoIdDecoder()], ['repairKit', getCargoIdDecoder()], ]); } export function getResourcesCodec(): FixedSizeCodec { return combineCodec(getResourcesEncoder(), getResourcesDecoder()); }