/** * 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, getBooleanDecoder, getBooleanEncoder, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from '@solana/kit'; export type Respawn = { /** When the fleet started warping */ start: bigint; /** The expected respawn end time */ end: bigint; /** Flag to determine if respawn started at a low risk zone. */ wasInLowRiskZone: boolean; }; export type RespawnArgs = { /** When the fleet started warping */ start: number | bigint; /** The expected respawn end time */ end: number | bigint; /** Flag to determine if respawn started at a low risk zone. */ wasInLowRiskZone: boolean; }; export function getRespawnEncoder(): FixedSizeEncoder { return getStructEncoder([ ['start', getI64Encoder()], ['end', getI64Encoder()], ['wasInLowRiskZone', getBooleanEncoder()], ]); } export function getRespawnDecoder(): FixedSizeDecoder { return getStructDecoder([ ['start', getI64Decoder()], ['end', getI64Decoder()], ['wasInLowRiskZone', getBooleanDecoder()], ]); } export function getRespawnCodec(): FixedSizeCodec { return combineCodec(getRespawnEncoder(), getRespawnDecoder()); }