/** * 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, getI64Decoder, getI64Encoder, getStructDecoder, getStructEncoder, getU16Decoder, getU16Encoder, getU32Decoder, getU32Encoder, getU8Decoder, getU8Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from '@solana/kit'; export type SetFactionRelationConfigArgs = { /** `0` = OFF (today's same-faction-only combat), `1` = relation-gated combat ON. */ combatGatingEnabled: number; /** `0` = OFF (own-faction docking only), `1` = relation/standing dock admission ON. */ territoryAccessEnabled: number; /** P3.5 reserved: cross-faction warp economics master switch (keep `0`). */ crossFactionEconomicsEnabled: number; /** Minimum ceasefire duration (secs) `SetFactionRelation` will accept. */ ceasefireMinDurationSecs: bigint; /** Cooldown (secs) after a ceasefire ends before the same pair may re-enter one. */ reCeasefireCooldownSecs: bigint; /** P3.5 reserved: allied cross-faction warp toll (bps). */ alliedTollBps: number; /** P3.5 reserved: neutral cross-faction warp toll (bps). */ neutralTollBps: number; /** P4 territory: dynamic-capture regime master switch (`0` = OFF, `1` = ON). */ dynamicCaptureEnabled: number; /** * P4 territory: base contested-window (secs) a capture stamps onto the sidecar (clamped UP to * `MIN_CONTESTED_WINDOW_SECS`); `0` ⇒ only the floor applies. */ contestedWindowSecs: number; /** * P5b antagonist master switch (`0` = OFF, `1` = ON). The activation double-gate is * `dynamic_capture_enabled == 1 && nemesis_active == 1`. Keep `0` until the §10 activation checklist passes. */ nemesisActive: number; }; export type SetFactionRelationConfigArgsArgs = { /** `0` = OFF (today's same-faction-only combat), `1` = relation-gated combat ON. */ combatGatingEnabled: number; /** `0` = OFF (own-faction docking only), `1` = relation/standing dock admission ON. */ territoryAccessEnabled: number; /** P3.5 reserved: cross-faction warp economics master switch (keep `0`). */ crossFactionEconomicsEnabled: number; /** Minimum ceasefire duration (secs) `SetFactionRelation` will accept. */ ceasefireMinDurationSecs: number | bigint; /** Cooldown (secs) after a ceasefire ends before the same pair may re-enter one. */ reCeasefireCooldownSecs: number | bigint; /** P3.5 reserved: allied cross-faction warp toll (bps). */ alliedTollBps: number; /** P3.5 reserved: neutral cross-faction warp toll (bps). */ neutralTollBps: number; /** P4 territory: dynamic-capture regime master switch (`0` = OFF, `1` = ON). */ dynamicCaptureEnabled: number; /** * P4 territory: base contested-window (secs) a capture stamps onto the sidecar (clamped UP to * `MIN_CONTESTED_WINDOW_SECS`); `0` ⇒ only the floor applies. */ contestedWindowSecs: number; /** * P5b antagonist master switch (`0` = OFF, `1` = ON). The activation double-gate is * `dynamic_capture_enabled == 1 && nemesis_active == 1`. Keep `0` until the §10 activation checklist passes. */ nemesisActive: number; }; export function getSetFactionRelationConfigArgsEncoder(): FixedSizeEncoder { return getStructEncoder([ ['combatGatingEnabled', getU8Encoder()], ['territoryAccessEnabled', getU8Encoder()], ['crossFactionEconomicsEnabled', getU8Encoder()], ['ceasefireMinDurationSecs', getI64Encoder()], ['reCeasefireCooldownSecs', getI64Encoder()], ['alliedTollBps', getU16Encoder()], ['neutralTollBps', getU16Encoder()], ['dynamicCaptureEnabled', getU8Encoder()], ['contestedWindowSecs', getU32Encoder()], ['nemesisActive', getU8Encoder()], ]); } export function getSetFactionRelationConfigArgsDecoder(): FixedSizeDecoder { return getStructDecoder([ ['combatGatingEnabled', getU8Decoder()], ['territoryAccessEnabled', getU8Decoder()], ['crossFactionEconomicsEnabled', getU8Decoder()], ['ceasefireMinDurationSecs', getI64Decoder()], ['reCeasefireCooldownSecs', getI64Decoder()], ['alliedTollBps', getU16Decoder()], ['neutralTollBps', getU16Decoder()], ['dynamicCaptureEnabled', getU8Decoder()], ['contestedWindowSecs', getU32Decoder()], ['nemesisActive', getU8Decoder()], ]); } export function getSetFactionRelationConfigArgsCodec(): FixedSizeCodec< SetFactionRelationConfigArgsArgs, SetFactionRelationConfigArgs > { return combineCodec( getSetFactionRelationConfigArgsEncoder(), getSetFactionRelationConfigArgsDecoder(), ); }