/** * 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, type Codec, type Decoder, type Encoder, } from '@solana/kit'; import { getCargoStatsDecoder, getCargoStatsEncoder, getCombatStatsDecoder, getCombatStatsEncoder, getMiscStatsDecoder, getMiscStatsEncoder, getMovementStatsDecoder, getMovementStatsEncoder, type CargoStats, type CargoStatsArgs, type CombatStats, type CombatStatsArgs, type MiscStats, type MiscStatsArgs, type MovementStats, type MovementStatsArgs, } from '.'; /** A ship's stats */ export type ShipStats = { /** Movement stats for the ship */ movementStats: MovementStats; /** Cargo stats for the ship */ cargoStats: CargoStats; /** Combat stats for the ship */ combatStats: CombatStats; /** Miscellaneous stats for the ship */ miscStats: MiscStats; }; export type ShipStatsArgs = { /** Movement stats for the ship */ movementStats: MovementStatsArgs; /** Cargo stats for the ship */ cargoStats: CargoStatsArgs; /** Combat stats for the ship */ combatStats: CombatStatsArgs; /** Miscellaneous stats for the ship */ miscStats: MiscStatsArgs; }; export function getShipStatsEncoder(): Encoder { return getStructEncoder([ ['movementStats', getMovementStatsEncoder()], ['cargoStats', getCargoStatsEncoder()], ['combatStats', getCombatStatsEncoder()], ['miscStats', getMiscStatsEncoder()], ]); } export function getShipStatsDecoder(): Decoder { return getStructDecoder([ ['movementStats', getMovementStatsDecoder()], ['cargoStats', getCargoStatsDecoder()], ['combatStats', getCombatStatsDecoder()], ['miscStats', getMiscStatsDecoder()], ]); } export function getShipStatsCodec(): Codec { return combineCodec(getShipStatsEncoder(), getShipStatsDecoder()); }