/** * 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, getStructDecoder, getStructEncoder, getU8Decoder, getU8Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from '@solana/kit'; import { getShipIdDecoder, getShipIdEncoder, type ShipId, type ShipIdArgs, } from '.'; export type AddShipArgs = { id: ShipId; amount: number }; export type AddShipArgsArgs = { id: ShipIdArgs; amount: number }; export function getAddShipArgsEncoder(): FixedSizeEncoder { return getStructEncoder([ ['id', getShipIdEncoder()], ['amount', getU8Encoder()], ]); } export function getAddShipArgsDecoder(): FixedSizeDecoder { return getStructDecoder([ ['id', getShipIdDecoder()], ['amount', getU8Decoder()], ]); } export function getAddShipArgsCodec(): FixedSizeCodec< AddShipArgsArgs, AddShipArgs > { return combineCodec(getAddShipArgsEncoder(), getAddShipArgsDecoder()); }