/** * 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, getI32Decoder, getI32Encoder, getMapDecoder, getMapEncoder, getStructDecoder, getStructEncoder, getU16Decoder, getU16Encoder, type Codec, type Decoder, type Encoder, } from '@solana/kit'; import { getBuildingIdDecoder, getBuildingIdEncoder, type BuildingId, type BuildingIdArgs, } from '.'; export type IntermediateData = { sequenceId: number; buildings: Map; }; export type IntermediateDataArgs = { sequenceId: number; buildings: Map; }; export function getIntermediateDataEncoder(): Encoder { return getStructEncoder([ ['sequenceId', getU16Encoder()], ['buildings', getMapEncoder(getBuildingIdEncoder(), getI32Encoder())], ]); } export function getIntermediateDataDecoder(): Decoder { return getStructDecoder([ ['sequenceId', getU16Decoder()], ['buildings', getMapDecoder(getBuildingIdDecoder(), getI32Decoder())], ]); } export function getIntermediateDataCodec(): Codec< IntermediateDataArgs, IntermediateData > { return combineCodec( getIntermediateDataEncoder(), getIntermediateDataDecoder(), ); }