/** * 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 Codec, type Decoder, type Encoder, } from '@solana/kit'; import { getU32F32Decoder, getU32F32Encoder, type U32F32, type U32F32Args, } from '../../fixed/codecs'; /** * A min/max struct storing the min and max modifiers for a recipe. * Each modifier is a percentage of the base value. */ export type MinMax = { min: U32F32; max: U32F32 }; export type MinMaxArgs = { min: U32F32Args; max: U32F32Args }; export function getMinMaxEncoder(): Encoder { return getStructEncoder([ ['min', getU32F32Encoder()], ['max', getU32F32Encoder()], ]); } export function getMinMaxDecoder(): Decoder { return getStructDecoder([ ['min', getU32F32Decoder()], ['max', getU32F32Decoder()], ]); } export function getMinMaxCodec(): Codec { return combineCodec(getMinMaxEncoder(), getMinMaxDecoder()); }