/** * 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, getU16Decoder, getU16Encoder, getU32Decoder, getU32Encoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, type Codec, type Decoder, type Encoder, } from '@solana/kit'; import { getCargoIdDecoder, getCargoIdEncoder, getResearchTagDecoder, getResearchTagEncoder, type CargoId, type CargoIdArgs, type ResearchTag, type ResearchTagArgs, } from '.'; export type ScanProfileLootEntryInput = { cargoId: CargoId; baseQuantity: bigint; rollWeight: number; valueUnits: number; quantityMode: number; rarity: number; category: number; patternMask: number; researchRequirements: Array; }; export type ScanProfileLootEntryInputArgs = { cargoId: CargoIdArgs; baseQuantity: number | bigint; rollWeight: number; valueUnits: number; quantityMode: number; rarity: number; category: number; patternMask: number; researchRequirements: Array; }; export function getScanProfileLootEntryInputEncoder(): Encoder { return getStructEncoder([ ['cargoId', getCargoIdEncoder()], ['baseQuantity', getU64Encoder()], ['rollWeight', getU32Encoder()], ['valueUnits', getU16Encoder()], ['quantityMode', getU8Encoder()], ['rarity', getU8Encoder()], ['category', getU8Encoder()], ['patternMask', getU8Encoder()], ['researchRequirements', getArrayEncoder(getResearchTagEncoder())], ]); } export function getScanProfileLootEntryInputDecoder(): Decoder { return getStructDecoder([ ['cargoId', getCargoIdDecoder()], ['baseQuantity', getU64Decoder()], ['rollWeight', getU32Decoder()], ['valueUnits', getU16Decoder()], ['quantityMode', getU8Decoder()], ['rarity', getU8Decoder()], ['category', getU8Decoder()], ['patternMask', getU8Decoder()], ['researchRequirements', getArrayDecoder(getResearchTagDecoder())], ]); } export function getScanProfileLootEntryInputCodec(): Codec< ScanProfileLootEntryInputArgs, ScanProfileLootEntryInput > { return combineCodec( getScanProfileLootEntryInputEncoder(), getScanProfileLootEntryInputDecoder(), ); }