/** * 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 { getU26F6Decoder, getU26F6Encoder, type U26F6, type U26F6Args, } from '../../fixed/codecs'; export type CraftingModifiers = { /** Changes the amount of crafted outputs by a percentage */ craftingEfficiencyModifier: U26F6; /** * Changes the amount of time taken to craft an item by a percentage * This value gets multiplied by the base crafting time to get the new crafting time, so a value of 0.5 means the crafting time is halved */ craftingSpeedModifier: U26F6; /** Changes the amount of crew required to craft an item by a percentage */ crewCountModifier: U26F6; /** Changes the amount of crafting fee required to craft an item by a percentage */ craftingFeeModifier: U26F6; }; export type CraftingModifiersArgs = { /** Changes the amount of crafted outputs by a percentage */ craftingEfficiencyModifier: U26F6Args; /** * Changes the amount of time taken to craft an item by a percentage * This value gets multiplied by the base crafting time to get the new crafting time, so a value of 0.5 means the crafting time is halved */ craftingSpeedModifier: U26F6Args; /** Changes the amount of crew required to craft an item by a percentage */ crewCountModifier: U26F6Args; /** Changes the amount of crafting fee required to craft an item by a percentage */ craftingFeeModifier: U26F6Args; }; export function getCraftingModifiersEncoder(): Encoder { return getStructEncoder([ ['craftingEfficiencyModifier', getU26F6Encoder()], ['craftingSpeedModifier', getU26F6Encoder()], ['crewCountModifier', getU26F6Encoder()], ['craftingFeeModifier', getU26F6Encoder()], ]); } export function getCraftingModifiersDecoder(): Decoder { return getStructDecoder([ ['craftingEfficiencyModifier', getU26F6Decoder()], ['craftingSpeedModifier', getU26F6Decoder()], ['crewCountModifier', getU26F6Decoder()], ['craftingFeeModifier', getU26F6Decoder()], ]); } export function getCraftingModifiersCodec(): Codec< CraftingModifiersArgs, CraftingModifiers > { return combineCodec( getCraftingModifiersEncoder(), getCraftingModifiersDecoder(), ); }