/** * 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, getTupleDecoder, getTupleEncoder, getU64Decoder, getU64Encoder, type Codec, type Decoder, type Encoder, } from '@solana/kit'; import { getCargoIdDecoder, getCargoIdEncoder, type CargoId, type CargoIdArgs, } from '.'; export type FleetCargoHoldInput = { /** The items to transfer from the starbase player to the fleet cargo hold */ toLoad: Array; /** The items to transfer from the fleet cargo hold to the starbase player */ toUnload: Array; }; export type FleetCargoHoldInputArgs = { /** The items to transfer from the starbase player to the fleet cargo hold */ toLoad: Array; /** The items to transfer from the fleet cargo hold to the starbase player */ toUnload: Array; }; export function getFleetCargoHoldInputEncoder(): Encoder { return getStructEncoder([ [ 'toLoad', getArrayEncoder(getTupleEncoder([getCargoIdEncoder(), getU64Encoder()])), ], [ 'toUnload', getArrayEncoder(getTupleEncoder([getCargoIdEncoder(), getU64Encoder()])), ], ]); } export function getFleetCargoHoldInputDecoder(): Decoder { return getStructDecoder([ [ 'toLoad', getArrayDecoder(getTupleDecoder([getCargoIdDecoder(), getU64Decoder()])), ], [ 'toUnload', getArrayDecoder(getTupleDecoder([getCargoIdDecoder(), getU64Decoder()])), ], ]); } export function getFleetCargoHoldInputCodec(): Codec< FleetCargoHoldInputArgs, FleetCargoHoldInput > { return combineCodec( getFleetCargoHoldInputEncoder(), getFleetCargoHoldInputDecoder(), ); }