/** * 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, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, type Codec, type Decoder, type Encoder, } from '@solana/kit'; import { getI8F56Decoder, getI8F56Encoder, type I8F56, type I8F56Args, } from '../../fixed/codecs'; export type MoveWarp = { /** The star system the fleet is going to */ to: Array; /** When the fleet started warping */ warpStart: bigint; /** When the warp will end */ warpFinish: bigint; }; export type MoveWarpArgs = { /** The star system the fleet is going to */ to: Array; /** When the fleet started warping */ warpStart: number | bigint; /** When the warp will end */ warpFinish: number | bigint; }; export function getMoveWarpEncoder(): Encoder { return getStructEncoder([ ['to', getArrayEncoder(getI8F56Encoder(), { size: 2 })], ['warpStart', getI64Encoder()], ['warpFinish', getI64Encoder()], ]); } export function getMoveWarpDecoder(): Decoder { return getStructDecoder([ ['to', getArrayDecoder(getI8F56Decoder(), { size: 2 })], ['warpStart', getI64Decoder()], ['warpFinish', getI64Decoder()], ]); } export function getMoveWarpCodec(): Codec { return combineCodec(getMoveWarpEncoder(), getMoveWarpDecoder()); }