/** * 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, getMapDecoder, getMapEncoder, getStructDecoder, getStructEncoder, type Codec, type Decoder, type Encoder, } from '@solana/kit'; import { getAsteroidResourceStateDecoder, getAsteroidResourceStateEncoder, getCargoIdDecoder, getCargoIdEncoder, type AsteroidResourceState, type AsteroidResourceStateArgs, type CargoId, type CargoIdArgs, } from '.'; export type Asteroid = { resources: Map }; export type AsteroidArgs = { resources: Map; }; export function getAsteroidEncoder(): Encoder { return getStructEncoder([ [ 'resources', getMapEncoder(getCargoIdEncoder(), getAsteroidResourceStateEncoder()), ], ]); } export function getAsteroidDecoder(): Decoder { return getStructDecoder([ [ 'resources', getMapDecoder(getCargoIdDecoder(), getAsteroidResourceStateDecoder()), ], ]); } export function getAsteroidCodec(): Codec { return combineCodec(getAsteroidEncoder(), getAsteroidDecoder()); }