/** * 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, getAddressDecoder, getAddressEncoder, getArrayDecoder, getArrayEncoder, getMapDecoder, getMapEncoder, getStructDecoder, getStructEncoder, type Address, type Codec, type Decoder, type Encoder, } from '@solana/kit'; import { getStructureStateDecoder, getStructureStateEncoder, type StructureState, type StructureStateArgs, } from '.'; export type CraftingHabsInfo = { chronoList: Array
; habMap: Map; }; export type CraftingHabsInfoArgs = { chronoList: Array
; habMap: Map; }; export function getCraftingHabsInfoEncoder(): Encoder { return getStructEncoder([ ['chronoList', getArrayEncoder(getAddressEncoder())], ['habMap', getMapEncoder(getAddressEncoder(), getStructureStateEncoder())], ]); } export function getCraftingHabsInfoDecoder(): Decoder { return getStructDecoder([ ['chronoList', getArrayDecoder(getAddressDecoder())], ['habMap', getMapDecoder(getAddressDecoder(), getStructureStateDecoder())], ]); } export function getCraftingHabsInfoCodec(): Codec< CraftingHabsInfoArgs, CraftingHabsInfo > { return combineCodec( getCraftingHabsInfoEncoder(), getCraftingHabsInfoDecoder(), ); }