/** * 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, getU32Decoder, getU32Encoder, getU64Decoder, getU64Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, } from '@solana/kit'; /** The 4 tunable dials (shared by `Init` + `Set`). */ export type FactionEconomicsDials = { /** ATLAS debited from the minting faction's treasury per `MintNpcFleet` (`0` = free, test only). */ npcMintCostAtlas: bigint; /** ATLAS debited per NPC fleet respawn (the churn brake). */ npcRespawnCostAtlas: bigint; /** ATLAS debited from the captor faction's treasury per dynamic starbase capture (`0` = no cost). */ captureCostAtlas: number; /** Per-faction anti-blitz capture cooldown (secs). */ factionCaptureCooldownSecs: bigint; }; export type FactionEconomicsDialsArgs = { /** ATLAS debited from the minting faction's treasury per `MintNpcFleet` (`0` = free, test only). */ npcMintCostAtlas: number | bigint; /** ATLAS debited per NPC fleet respawn (the churn brake). */ npcRespawnCostAtlas: number | bigint; /** ATLAS debited from the captor faction's treasury per dynamic starbase capture (`0` = no cost). */ captureCostAtlas: number; /** Per-faction anti-blitz capture cooldown (secs). */ factionCaptureCooldownSecs: number | bigint; }; export function getFactionEconomicsDialsEncoder(): FixedSizeEncoder { return getStructEncoder([ ['npcMintCostAtlas', getU64Encoder()], ['npcRespawnCostAtlas', getU64Encoder()], ['captureCostAtlas', getU32Encoder()], ['factionCaptureCooldownSecs', getI64Encoder()], ]); } export function getFactionEconomicsDialsDecoder(): FixedSizeDecoder { return getStructDecoder([ ['npcMintCostAtlas', getU64Decoder()], ['npcRespawnCostAtlas', getU64Decoder()], ['captureCostAtlas', getU32Decoder()], ['factionCaptureCooldownSecs', getI64Decoder()], ]); } export function getFactionEconomicsDialsCodec(): FixedSizeCodec< FactionEconomicsDialsArgs, FactionEconomicsDials > { return combineCodec( getFactionEconomicsDialsEncoder(), getFactionEconomicsDialsDecoder(), ); }