@aephia/atlas-kit 0.6.0-next.14 → 0.6.0-next.140
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/cargo/actions/deposit.d.ts +5 -2
- package/dist/cargo/actions/deposit.d.ts.map +1 -1
- package/dist/cargo/actions/deposit.js +60 -129
- package/dist/cargo/actions/deposit.js.map +1 -1
- package/dist/cargo/actions/index.d.ts +12 -6
- package/dist/cargo/actions/index.d.ts.map +1 -1
- package/dist/cargo/actions/index.js +97 -94
- package/dist/cargo/actions/index.js.map +1 -1
- package/dist/cargo/actions/wallet-context.d.ts +52 -3
- package/dist/cargo/actions/wallet-context.d.ts.map +1 -1
- package/dist/cargo/actions/wallet-context.js +118 -7
- package/dist/cargo/actions/wallet-context.js.map +1 -1
- package/dist/cargo/actions/wallet-token.d.ts +1 -6
- package/dist/cargo/actions/wallet-token.d.ts.map +1 -1
- package/dist/cargo/actions/wallet-token.js +0 -45
- package/dist/cargo/actions/wallet-token.js.map +1 -1
- package/dist/cargo/actions/withdrawal.d.ts +1 -1
- package/dist/cargo/actions/withdrawal.d.ts.map +1 -1
- package/dist/cargo/actions/withdrawal.js +39 -168
- package/dist/cargo/actions/withdrawal.js.map +1 -1
- package/dist/cargo/index.d.ts.map +1 -1
- package/dist/cargo/index.js +2 -10
- package/dist/cargo/index.js.map +1 -1
- package/dist/claim-stakes/actions/index.d.ts +69 -14
- package/dist/claim-stakes/actions/index.d.ts.map +1 -1
- package/dist/claim-stakes/actions/index.js +613 -697
- package/dist/claim-stakes/actions/index.js.map +1 -1
- package/dist/claim-stakes/index.d.ts +21 -6
- package/dist/claim-stakes/index.d.ts.map +1 -1
- package/dist/claim-stakes/index.js +33 -19
- package/dist/claim-stakes/index.js.map +1 -1
- package/dist/client/context.d.ts.map +1 -1
- package/dist/client/context.js +1 -1
- package/dist/client/context.js.map +1 -1
- package/dist/client/contracts.d.ts +16 -6
- package/dist/client/contracts.d.ts.map +1 -1
- package/dist/client/errors.d.ts +2 -2
- package/dist/client/errors.d.ts.map +1 -1
- package/dist/client/errors.js.map +1 -1
- package/dist/client/index.d.ts +35 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +35 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/rpc-subscription-provider.d.ts +35 -0
- package/dist/client/rpc-subscription-provider.d.ts.map +1 -0
- package/dist/client/rpc-subscription-provider.js +190 -0
- package/dist/client/rpc-subscription-provider.js.map +1 -0
- package/dist/combat/actions/index.d.ts +24 -12
- package/dist/combat/actions/index.d.ts.map +1 -1
- package/dist/combat/actions/index.js +286 -280
- package/dist/combat/actions/index.js.map +1 -1
- package/dist/combat/index.d.ts +25 -8
- package/dist/combat/index.d.ts.map +1 -1
- package/dist/combat/index.js +21 -18
- package/dist/combat/index.js.map +1 -1
- package/dist/crafting/actions/index.d.ts +28 -18
- package/dist/crafting/actions/index.d.ts.map +1 -1
- package/dist/crafting/actions/index.js +297 -352
- package/dist/crafting/actions/index.js.map +1 -1
- package/dist/crafting/index.d.ts +33 -3
- package/dist/crafting/index.d.ts.map +1 -1
- package/dist/crafting/index.js +49 -28
- package/dist/crafting/index.js.map +1 -1
- package/dist/factions/actions/index.d.ts +2 -1
- package/dist/factions/actions/index.d.ts.map +1 -1
- package/dist/factions/actions/index.js +6 -4
- package/dist/factions/actions/index.js.map +1 -1
- package/dist/factions/index.d.ts +6 -1
- package/dist/factions/index.d.ts.map +1 -1
- package/dist/factions/index.js +16 -18
- package/dist/factions/index.js.map +1 -1
- package/dist/factions/profile-faction.d.ts +20 -8
- package/dist/factions/profile-faction.d.ts.map +1 -1
- package/dist/factions/profile-faction.js +20 -8
- package/dist/factions/profile-faction.js.map +1 -1
- package/dist/fleets/actions/add-ship.d.ts +46 -0
- package/dist/fleets/actions/add-ship.d.ts.map +1 -0
- package/dist/fleets/actions/add-ship.js +131 -0
- package/dist/fleets/actions/add-ship.js.map +1 -0
- package/dist/fleets/actions/create-fleet.d.ts +36 -0
- package/dist/fleets/actions/create-fleet.d.ts.map +1 -0
- package/dist/fleets/actions/create-fleet.js +108 -0
- package/dist/fleets/actions/create-fleet.js.map +1 -0
- package/dist/fleets/actions/crew-transfer.d.ts +42 -0
- package/dist/fleets/actions/crew-transfer.d.ts.map +1 -0
- package/dist/fleets/actions/crew-transfer.js +95 -0
- package/dist/fleets/actions/crew-transfer.js.map +1 -0
- package/dist/fleets/actions/dock-bounds.d.ts +38 -0
- package/dist/fleets/actions/dock-bounds.d.ts.map +1 -0
- package/dist/fleets/actions/dock-bounds.js +46 -0
- package/dist/fleets/actions/dock-bounds.js.map +1 -0
- package/dist/fleets/actions/index.d.ts +81 -25
- package/dist/fleets/actions/index.d.ts.map +1 -1
- package/dist/fleets/actions/index.js +483 -353
- package/dist/fleets/actions/index.js.map +1 -1
- package/dist/fleets/actions/respawn.d.ts +38 -0
- package/dist/fleets/actions/respawn.d.ts.map +1 -0
- package/dist/fleets/actions/respawn.js +93 -0
- package/dist/fleets/actions/respawn.js.map +1 -0
- package/dist/fleets/actions/ship-import.d.ts +1 -1
- package/dist/fleets/actions/ship-import.d.ts.map +1 -1
- package/dist/fleets/actions/ship-import.js +61 -90
- package/dist/fleets/actions/ship-import.js.map +1 -1
- package/dist/fleets/cooldown.d.ts +47 -0
- package/dist/fleets/cooldown.d.ts.map +1 -0
- package/dist/fleets/cooldown.js +48 -0
- package/dist/fleets/cooldown.js.map +1 -0
- package/dist/fleets/coordinate-warp-estimate.d.ts +70 -0
- package/dist/fleets/coordinate-warp-estimate.d.ts.map +1 -0
- package/dist/fleets/coordinate-warp-estimate.js +46 -0
- package/dist/fleets/coordinate-warp-estimate.js.map +1 -0
- package/dist/fleets/index.d.ts +35 -0
- package/dist/fleets/index.d.ts.map +1 -1
- package/dist/fleets/index.js +54 -12
- package/dist/fleets/index.js.map +1 -1
- package/dist/fleets/movement-arithmetic.d.ts +21 -0
- package/dist/fleets/movement-arithmetic.d.ts.map +1 -0
- package/dist/fleets/movement-arithmetic.js +45 -0
- package/dist/fleets/movement-arithmetic.js.map +1 -0
- package/dist/fleets/subwarp-estimate.d.ts +72 -0
- package/dist/fleets/subwarp-estimate.d.ts.map +1 -0
- package/dist/fleets/subwarp-estimate.js +40 -0
- package/dist/fleets/subwarp-estimate.js.map +1 -0
- package/dist/fleets/travel-profile.d.ts +102 -0
- package/dist/fleets/travel-profile.d.ts.map +1 -0
- package/dist/fleets/travel-profile.js +120 -0
- package/dist/fleets/travel-profile.js.map +1 -0
- package/dist/fleets/warp-lane-estimate.d.ts +59 -0
- package/dist/fleets/warp-lane-estimate.d.ts.map +1 -0
- package/dist/fleets/warp-lane-estimate.js +36 -0
- package/dist/fleets/warp-lane-estimate.js.map +1 -0
- package/dist/fleets/warp-lane-policy.d.ts +74 -0
- package/dist/fleets/warp-lane-policy.d.ts.map +1 -0
- package/dist/fleets/warp-lane-policy.js +103 -0
- package/dist/fleets/warp-lane-policy.js.map +1 -0
- package/dist/fleets/warp-lane-toll.d.ts +55 -0
- package/dist/fleets/warp-lane-toll.d.ts.map +1 -0
- package/dist/fleets/warp-lane-toll.js +79 -0
- package/dist/fleets/warp-lane-toll.js.map +1 -0
- package/dist/identity/actions/create-profile.d.ts +1 -1
- package/dist/identity/actions/create-profile.d.ts.map +1 -1
- package/dist/identity/actions/create-profile.js +2 -2
- package/dist/identity/actions/create-profile.js.map +1 -1
- package/dist/identity/actions/index.d.ts +5 -4
- package/dist/identity/actions/index.d.ts.map +1 -1
- package/dist/identity/actions/index.js +52 -29
- package/dist/identity/actions/index.js.map +1 -1
- package/dist/identity/actions/research-unlock.d.ts +61 -0
- package/dist/identity/actions/research-unlock.d.ts.map +1 -0
- package/dist/identity/actions/research-unlock.js +166 -0
- package/dist/identity/actions/research-unlock.js.map +1 -0
- package/dist/identity/index.d.ts +5 -2
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js +6 -12
- package/dist/identity/index.js.map +1 -1
- package/dist/identity/research-state.d.ts +60 -0
- package/dist/identity/research-state.d.ts.map +1 -0
- package/dist/identity/research-state.js +68 -0
- package/dist/identity/research-state.js.map +1 -0
- package/dist/index.d.ts +26 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -7
- package/dist/index.js.map +1 -1
- package/dist/internal/c4/account-decoding.d.ts +49 -0
- package/dist/internal/c4/account-decoding.d.ts.map +1 -0
- package/dist/internal/c4/account-decoding.js +74 -0
- package/dist/internal/c4/account-decoding.js.map +1 -0
- package/dist/internal/c4/cargo-bytes-config.d.ts +7 -0
- package/dist/internal/c4/cargo-bytes-config.d.ts.map +1 -0
- package/dist/internal/c4/cargo-bytes-config.js +19 -0
- package/dist/internal/c4/cargo-bytes-config.js.map +1 -0
- package/dist/internal/c4/cargo-instructions.d.ts +24 -0
- package/dist/internal/c4/cargo-instructions.d.ts.map +1 -0
- package/dist/internal/c4/cargo-instructions.js +30 -0
- package/dist/internal/c4/cargo-instructions.js.map +1 -0
- package/dist/internal/c4/cargo-pod.d.ts +15 -0
- package/dist/internal/c4/cargo-pod.d.ts.map +1 -0
- package/dist/internal/c4/cargo-pod.js +13 -0
- package/dist/internal/c4/cargo-pod.js.map +1 -0
- package/dist/internal/c4/character-modifier.d.ts +1 -1
- package/dist/internal/c4/character-modifier.d.ts.map +1 -1
- package/dist/internal/c4/character-registration.d.ts +2 -0
- package/dist/internal/c4/character-registration.d.ts.map +1 -1
- package/dist/internal/c4/character-registration.js +2 -0
- package/dist/internal/c4/character-registration.js.map +1 -1
- package/dist/internal/c4/character.d.ts +157 -0
- package/dist/internal/c4/character.d.ts.map +1 -0
- package/dist/internal/c4/character.js +64 -0
- package/dist/internal/c4/character.js.map +1 -0
- package/dist/internal/c4/claim-stake-building-definitions.d.ts.map +1 -1
- package/dist/internal/c4/claim-stake-building-definitions.js +2 -1
- package/dist/internal/c4/claim-stake-building-definitions.js.map +1 -1
- package/dist/internal/c4/claim-stake-configuration.d.ts.map +1 -1
- package/dist/internal/c4/claim-stake-configuration.js +5 -36
- package/dist/internal/c4/claim-stake-configuration.js.map +1 -1
- package/dist/internal/c4/claim-stake-definitions.d.ts +4 -4
- package/dist/internal/c4/claim-stake-definitions.d.ts.map +1 -1
- package/dist/internal/c4/claim-stake-definitions.js +2 -1
- package/dist/internal/c4/claim-stake-definitions.js.map +1 -1
- package/dist/internal/c4/claim-stake-plots.d.ts +17 -0
- package/dist/internal/c4/claim-stake-plots.d.ts.map +1 -0
- package/dist/internal/c4/claim-stake-plots.js +29 -0
- package/dist/internal/c4/claim-stake-plots.js.map +1 -0
- package/dist/internal/c4/claim-stake.d.ts +13 -33
- package/dist/internal/c4/claim-stake.d.ts.map +1 -1
- package/dist/internal/c4/claim-stake.js +49 -94
- package/dist/internal/c4/claim-stake.js.map +1 -1
- package/dist/internal/c4/combat.d.ts +1 -82
- package/dist/internal/c4/combat.d.ts.map +1 -1
- package/dist/internal/c4/combat.js +16 -213
- package/dist/internal/c4/combat.js.map +1 -1
- package/dist/internal/c4/crafting-process-codec.d.ts +13 -0
- package/dist/internal/c4/crafting-process-codec.d.ts.map +1 -0
- package/dist/internal/c4/crafting-process-codec.js +34 -0
- package/dist/internal/c4/crafting-process-codec.js.map +1 -0
- package/dist/internal/c4/crafting-storage.d.ts +20 -0
- package/dist/internal/c4/crafting-storage.d.ts.map +1 -0
- package/dist/internal/c4/crafting-storage.js +54 -0
- package/dist/internal/c4/crafting-storage.js.map +1 -0
- package/dist/internal/c4/crafting.d.ts +30 -33
- package/dist/internal/c4/crafting.d.ts.map +1 -1
- package/dist/internal/c4/crafting.js +76 -127
- package/dist/internal/c4/crafting.js.map +1 -1
- package/dist/internal/c4/currency-cache.d.ts +6 -0
- package/dist/internal/c4/currency-cache.d.ts.map +1 -0
- package/dist/internal/c4/currency-cache.js +27 -0
- package/dist/internal/c4/currency-cache.js.map +1 -0
- package/dist/internal/c4/discriminators.d.ts +89 -0
- package/dist/internal/c4/discriminators.d.ts.map +1 -0
- package/dist/internal/c4/discriminators.js +182 -0
- package/dist/internal/c4/discriminators.js.map +1 -0
- package/dist/internal/c4/docking-funding.d.ts +4 -0
- package/dist/internal/c4/docking-funding.d.ts.map +1 -0
- package/dist/internal/c4/docking-funding.js +11 -0
- package/dist/internal/c4/docking-funding.js.map +1 -0
- package/dist/internal/c4/faction-epoch-meter.d.ts +10 -0
- package/dist/internal/c4/faction-epoch-meter.d.ts.map +1 -0
- package/dist/internal/c4/faction-epoch-meter.js +26 -0
- package/dist/internal/c4/faction-epoch-meter.js.map +1 -0
- package/dist/internal/c4/faction-treasury.d.ts +23 -0
- package/dist/internal/c4/faction-treasury.d.ts.map +1 -0
- package/dist/internal/c4/faction-treasury.js +41 -0
- package/dist/internal/c4/faction-treasury.js.map +1 -0
- package/dist/internal/c4/faction.d.ts +21 -0
- package/dist/internal/c4/faction.d.ts.map +1 -0
- package/dist/internal/c4/faction.js +23 -0
- package/dist/internal/c4/faction.js.map +1 -0
- package/dist/internal/c4/factions.d.ts +15 -57
- package/dist/internal/c4/factions.d.ts.map +1 -1
- package/dist/internal/c4/factions.js +80 -223
- package/dist/internal/c4/factions.js.map +1 -1
- package/dist/internal/c4/fleet-arrival.d.ts +28 -0
- package/dist/internal/c4/fleet-arrival.d.ts.map +1 -0
- package/dist/internal/c4/fleet-arrival.js +42 -0
- package/dist/internal/c4/fleet-arrival.js.map +1 -0
- package/dist/internal/c4/fleet-creation.d.ts +7 -0
- package/dist/internal/c4/fleet-creation.d.ts.map +1 -0
- package/dist/internal/c4/fleet-creation.js +171 -0
- package/dist/internal/c4/fleet-creation.js.map +1 -0
- package/dist/internal/c4/fleet-crew-binding.d.ts +9 -0
- package/dist/internal/c4/fleet-crew-binding.d.ts.map +1 -1
- package/dist/internal/c4/fleet-crew-binding.js +31 -44
- package/dist/internal/c4/fleet-crew-binding.js.map +1 -1
- package/dist/internal/c4/fleet-respawn.d.ts +17 -0
- package/dist/internal/c4/fleet-respawn.d.ts.map +1 -0
- package/dist/internal/c4/fleet-respawn.js +62 -0
- package/dist/internal/c4/fleet-respawn.js.map +1 -0
- package/dist/internal/c4/fleet-ship-assembly.d.ts +27 -0
- package/dist/internal/c4/fleet-ship-assembly.d.ts.map +1 -0
- package/dist/internal/c4/fleet-ship-assembly.js +94 -0
- package/dist/internal/c4/fleet-ship-assembly.js.map +1 -0
- package/dist/internal/c4/fleet-storage.d.ts +42 -0
- package/dist/internal/c4/fleet-storage.d.ts.map +1 -0
- package/dist/internal/c4/fleet-storage.js +108 -0
- package/dist/internal/c4/fleet-storage.js.map +1 -0
- package/dist/internal/c4/fleet.d.ts +59 -22
- package/dist/internal/c4/fleet.d.ts.map +1 -1
- package/dist/internal/c4/fleet.js +50 -87
- package/dist/internal/c4/fleet.js.map +1 -1
- package/dist/internal/c4/game-definition-layout.d.ts +2 -0
- package/dist/internal/c4/game-definition-layout.d.ts.map +1 -1
- package/dist/internal/c4/game-definition-layout.js +4 -0
- package/dist/internal/c4/game-definition-layout.js.map +1 -1
- package/dist/internal/c4/game.d.ts +117 -32
- package/dist/internal/c4/game.d.ts.map +1 -1
- package/dist/internal/c4/game.js +227 -130
- package/dist/internal/c4/game.js.map +1 -1
- package/dist/internal/c4/identity.d.ts +3 -152
- package/dist/internal/c4/identity.d.ts.map +1 -1
- package/dist/internal/c4/identity.js +19 -126
- package/dist/internal/c4/identity.js.map +1 -1
- package/dist/internal/c4/local-market-order.d.ts +29 -0
- package/dist/internal/c4/local-market-order.d.ts.map +1 -0
- package/dist/internal/c4/local-market-order.js +46 -0
- package/dist/internal/c4/local-market-order.js.map +1 -0
- package/dist/internal/c4/loot-layout.js +1 -1
- package/dist/internal/c4/loot-layout.js.map +1 -1
- package/dist/internal/c4/loot.d.ts +89 -0
- package/dist/internal/c4/loot.d.ts.map +1 -0
- package/dist/internal/c4/loot.js +109 -0
- package/dist/internal/c4/loot.js.map +1 -0
- package/dist/internal/c4/loyalty.d.ts +2 -28
- package/dist/internal/c4/loyalty.d.ts.map +1 -1
- package/dist/internal/c4/loyalty.js +36 -161
- package/dist/internal/c4/loyalty.js.map +1 -1
- package/dist/internal/c4/market-storage.d.ts +25 -0
- package/dist/internal/c4/market-storage.d.ts.map +1 -0
- package/dist/internal/c4/market-storage.js +53 -0
- package/dist/internal/c4/market-storage.js.map +1 -0
- package/dist/internal/c4/market.d.ts +2 -38
- package/dist/internal/c4/market.d.ts.map +1 -1
- package/dist/internal/c4/market.js +26 -120
- package/dist/internal/c4/market.js.map +1 -1
- package/dist/internal/c4/mining-instructions.d.ts +2 -0
- package/dist/internal/c4/mining-instructions.d.ts.map +1 -0
- package/dist/internal/c4/mining-instructions.js +3 -0
- package/dist/internal/c4/mining-instructions.js.map +1 -0
- package/dist/internal/c4/open-signal.d.ts +8 -0
- package/dist/internal/c4/open-signal.d.ts.map +1 -0
- package/dist/internal/c4/open-signal.js +37 -0
- package/dist/internal/c4/open-signal.js.map +1 -0
- package/dist/internal/c4/pda.d.ts +43 -0
- package/dist/internal/c4/pda.d.ts.map +1 -1
- package/dist/internal/c4/pda.js +83 -17
- package/dist/internal/c4/pda.js.map +1 -1
- package/dist/internal/c4/profile-faction.d.ts +2 -1
- package/dist/internal/c4/profile-faction.d.ts.map +1 -1
- package/dist/internal/c4/profile-faction.js +36 -72
- package/dist/internal/c4/profile-faction.js.map +1 -1
- package/dist/internal/c4/profile-permissions.d.ts +1 -1
- package/dist/internal/c4/profile-permissions.d.ts.map +1 -1
- package/dist/internal/c4/profile-permissions.js +4 -1
- package/dist/internal/c4/profile-permissions.js.map +1 -1
- package/dist/internal/c4/region-geometry.d.ts +8 -0
- package/dist/internal/c4/region-geometry.d.ts.map +1 -0
- package/dist/internal/c4/region-geometry.js +43 -0
- package/dist/internal/c4/region-geometry.js.map +1 -0
- package/dist/internal/c4/rewards.d.ts +1 -61
- package/dist/internal/c4/rewards.d.ts.map +1 -1
- package/dist/internal/c4/rewards.js +23 -203
- package/dist/internal/c4/rewards.js.map +1 -1
- package/dist/internal/c4/runtime-bindings.d.ts +4 -0
- package/dist/internal/c4/runtime-bindings.d.ts.map +1 -0
- package/dist/internal/c4/runtime-bindings.js +4 -0
- package/dist/internal/c4/runtime-bindings.js.map +1 -0
- package/dist/internal/c4/scan-detection-codecs.d.ts +3 -0
- package/dist/internal/c4/scan-detection-codecs.d.ts.map +1 -0
- package/dist/internal/c4/scan-detection-codecs.js +3 -0
- package/dist/internal/c4/scan-detection-codecs.js.map +1 -0
- package/dist/internal/c4/scan-lifecycle.d.ts +306 -0
- package/dist/internal/c4/scan-lifecycle.d.ts.map +1 -0
- package/dist/internal/c4/scan-lifecycle.js +235 -0
- package/dist/internal/c4/scan-lifecycle.js.map +1 -0
- package/dist/internal/c4/scanning.d.ts +4 -41
- package/dist/internal/c4/scanning.d.ts.map +1 -1
- package/dist/internal/c4/scanning.js +27 -108
- package/dist/internal/c4/scanning.js.map +1 -1
- package/dist/internal/c4/ship-import.d.ts +4 -0
- package/dist/internal/c4/ship-import.d.ts.map +1 -0
- package/dist/internal/c4/ship-import.js +13 -0
- package/dist/internal/c4/ship-import.js.map +1 -0
- package/dist/internal/c4/ship-stats.d.ts.map +1 -1
- package/dist/internal/c4/ship-stats.js +46 -44
- package/dist/internal/c4/ship-stats.js.map +1 -1
- package/dist/internal/c4/starbase.d.ts +0 -32
- package/dist/internal/c4/starbase.d.ts.map +1 -1
- package/dist/internal/c4/starbase.js +26 -136
- package/dist/internal/c4/starbase.js.map +1 -1
- package/dist/internal/c4/stimulant.d.ts +24 -0
- package/dist/internal/c4/stimulant.d.ts.map +1 -0
- package/dist/internal/c4/stimulant.js +32 -0
- package/dist/internal/c4/stimulant.js.map +1 -0
- package/dist/internal/c4/wallet-cargo-cache.js +2 -1
- package/dist/internal/c4/wallet-cargo-cache.js.map +1 -1
- package/dist/internal/c4/world.d.ts +37 -7
- package/dist/internal/c4/world.d.ts.map +1 -1
- package/dist/internal/c4/world.js +87 -129
- package/dist/internal/c4/world.js.map +1 -1
- package/dist/internal/cargo.d.ts +2 -0
- package/dist/internal/cargo.d.ts.map +1 -1
- package/dist/internal/cargo.js +8 -0
- package/dist/internal/cargo.js.map +1 -1
- package/dist/internal/fleet-route.d.ts +12 -0
- package/dist/internal/fleet-route.d.ts.map +1 -0
- package/dist/internal/fleet-route.js +11 -0
- package/dist/internal/fleet-route.js.map +1 -0
- package/dist/internal/fleet.d.ts +1 -0
- package/dist/internal/fleet.d.ts.map +1 -1
- package/dist/internal/fleet.js +3 -1
- package/dist/internal/fleet.js.map +1 -1
- package/dist/internal/loyalty-atlas-bank-state.d.ts +17 -0
- package/dist/internal/loyalty-atlas-bank-state.d.ts.map +1 -0
- package/dist/internal/loyalty-atlas-bank-state.js +11 -0
- package/dist/internal/loyalty-atlas-bank-state.js.map +1 -0
- package/dist/internal/planning/account-state.d.ts +6 -0
- package/dist/internal/planning/account-state.d.ts.map +1 -1
- package/dist/internal/planning/account-state.js +13 -0
- package/dist/internal/planning/account-state.js.map +1 -1
- package/dist/internal/planning/action-runtime.d.ts +38 -0
- package/dist/internal/planning/action-runtime.d.ts.map +1 -0
- package/dist/internal/planning/action-runtime.js +63 -0
- package/dist/internal/planning/action-runtime.js.map +1 -0
- package/dist/internal/planning/arrival-guards.d.ts +19 -0
- package/dist/internal/planning/arrival-guards.d.ts.map +1 -0
- package/dist/internal/planning/arrival-guards.js +172 -0
- package/dist/internal/planning/arrival-guards.js.map +1 -0
- package/dist/internal/planning/authorization-adapter.d.ts +55 -37
- package/dist/internal/planning/authorization-adapter.d.ts.map +1 -1
- package/dist/internal/planning/authorization-adapter.js +231 -81
- package/dist/internal/planning/authorization-adapter.js.map +1 -1
- package/dist/internal/planning/cargo-storage-actions.d.ts +8 -0
- package/dist/internal/planning/cargo-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/cargo-storage-actions.js +97 -0
- package/dist/internal/planning/cargo-storage-actions.js.map +1 -0
- package/dist/internal/planning/character-registration-guard.d.ts +4 -0
- package/dist/internal/planning/character-registration-guard.d.ts.map +1 -0
- package/dist/internal/planning/character-registration-guard.js +59 -0
- package/dist/internal/planning/character-registration-guard.js.map +1 -0
- package/dist/internal/planning/character-registration.d.ts +23 -0
- package/dist/internal/planning/character-registration.d.ts.map +1 -0
- package/dist/internal/planning/character-registration.js +87 -0
- package/dist/internal/planning/character-registration.js.map +1 -0
- package/dist/internal/planning/crafting-storage-actions.d.ts +7 -0
- package/dist/internal/planning/crafting-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/crafting-storage-actions.js +64 -0
- package/dist/internal/planning/crafting-storage-actions.js.map +1 -0
- package/dist/internal/planning/currency-cache-guard.d.ts +4 -0
- package/dist/internal/planning/currency-cache-guard.d.ts.map +1 -0
- package/dist/internal/planning/currency-cache-guard.js +34 -0
- package/dist/internal/planning/currency-cache-guard.js.map +1 -0
- package/dist/internal/planning/democracy-history.d.ts +50 -0
- package/dist/internal/planning/democracy-history.d.ts.map +1 -0
- package/dist/internal/planning/democracy-history.js +189 -0
- package/dist/internal/planning/democracy-history.js.map +1 -0
- package/dist/internal/planning/direct-options.d.ts +17 -0
- package/dist/internal/planning/direct-options.d.ts.map +1 -0
- package/dist/internal/planning/direct-options.js +43 -0
- package/dist/internal/planning/direct-options.js.map +1 -0
- package/dist/internal/planning/faction-enrollment.d.ts +0 -4
- package/dist/internal/planning/faction-enrollment.d.ts.map +1 -1
- package/dist/internal/planning/faction-enrollment.js +1 -31
- package/dist/internal/planning/faction-enrollment.js.map +1 -1
- package/dist/internal/planning/faction-trade-guards.d.ts +30 -0
- package/dist/internal/planning/faction-trade-guards.d.ts.map +1 -0
- package/dist/internal/planning/faction-trade-guards.js +15 -0
- package/dist/internal/planning/faction-trade-guards.js.map +1 -0
- package/dist/internal/planning/faction-trade-state.d.ts +16 -0
- package/dist/internal/planning/faction-trade-state.d.ts.map +1 -0
- package/dist/internal/planning/faction-trade-state.js +43 -0
- package/dist/internal/planning/faction-trade-state.js.map +1 -0
- package/dist/internal/planning/fleet-arrival.d.ts +40 -0
- package/dist/internal/planning/fleet-arrival.d.ts.map +1 -0
- package/dist/internal/planning/fleet-arrival.js +107 -0
- package/dist/internal/planning/fleet-arrival.js.map +1 -0
- package/dist/internal/planning/fleet-attack-xp.d.ts +20 -0
- package/dist/internal/planning/fleet-attack-xp.d.ts.map +1 -0
- package/dist/internal/planning/fleet-attack-xp.js +104 -0
- package/dist/internal/planning/fleet-attack-xp.js.map +1 -0
- package/dist/internal/planning/fleet-creation.d.ts +30 -0
- package/dist/internal/planning/fleet-creation.d.ts.map +1 -0
- package/dist/internal/planning/fleet-creation.js +89 -0
- package/dist/internal/planning/fleet-creation.js.map +1 -0
- package/dist/internal/planning/fleet-crew-guard.d.ts +28 -0
- package/dist/internal/planning/fleet-crew-guard.d.ts.map +1 -0
- package/dist/internal/planning/fleet-crew-guard.js +48 -0
- package/dist/internal/planning/fleet-crew-guard.js.map +1 -0
- package/dist/internal/planning/fleet-crew-transfer.d.ts +7 -0
- package/dist/internal/planning/fleet-crew-transfer.d.ts.map +1 -0
- package/dist/internal/planning/fleet-crew-transfer.js +129 -0
- package/dist/internal/planning/fleet-crew-transfer.js.map +1 -0
- package/dist/internal/planning/fleet-dock-funding-guard.d.ts +42 -0
- package/dist/internal/planning/fleet-dock-funding-guard.d.ts.map +1 -0
- package/dist/internal/planning/fleet-dock-funding-guard.js +209 -0
- package/dist/internal/planning/fleet-dock-funding-guard.js.map +1 -0
- package/dist/internal/planning/fleet-dock-funding.d.ts +9 -0
- package/dist/internal/planning/fleet-dock-funding.d.ts.map +1 -0
- package/dist/internal/planning/fleet-dock-funding.js +164 -0
- package/dist/internal/planning/fleet-dock-funding.js.map +1 -0
- package/dist/internal/planning/fleet-docking-guard.d.ts +4 -0
- package/dist/internal/planning/fleet-docking-guard.d.ts.map +1 -0
- package/dist/internal/planning/fleet-docking-guard.js +44 -0
- package/dist/internal/planning/fleet-docking-guard.js.map +1 -0
- package/dist/internal/planning/fleet-docking.d.ts +25 -0
- package/dist/internal/planning/fleet-docking.d.ts.map +1 -0
- package/dist/internal/planning/fleet-docking.js +106 -0
- package/dist/internal/planning/fleet-docking.js.map +1 -0
- package/dist/internal/planning/fleet-respawn.d.ts +28 -0
- package/dist/internal/planning/fleet-respawn.d.ts.map +1 -0
- package/dist/internal/planning/fleet-respawn.js +164 -0
- package/dist/internal/planning/fleet-respawn.js.map +1 -0
- package/dist/internal/planning/fleet-ship-assembly.d.ts +36 -0
- package/dist/internal/planning/fleet-ship-assembly.d.ts.map +1 -0
- package/dist/internal/planning/fleet-ship-assembly.js +158 -0
- package/dist/internal/planning/fleet-ship-assembly.js.map +1 -0
- package/dist/internal/planning/fleet-state.d.ts +25 -0
- package/dist/internal/planning/fleet-state.d.ts.map +1 -0
- package/dist/internal/planning/fleet-state.js +28 -0
- package/dist/internal/planning/fleet-state.js.map +1 -0
- package/dist/internal/planning/governance-fees.d.ts +64 -0
- package/dist/internal/planning/governance-fees.d.ts.map +1 -0
- package/dist/internal/planning/governance-fees.js +231 -0
- package/dist/internal/planning/governance-fees.js.map +1 -0
- package/dist/internal/planning/local-market-order-funding.d.ts +8 -0
- package/dist/internal/planning/local-market-order-funding.d.ts.map +1 -0
- package/dist/internal/planning/local-market-order-funding.js +128 -0
- package/dist/internal/planning/local-market-order-funding.js.map +1 -0
- package/dist/internal/planning/local-market-order.d.ts +40 -0
- package/dist/internal/planning/local-market-order.d.ts.map +1 -0
- package/dist/internal/planning/local-market-order.js +139 -0
- package/dist/internal/planning/local-market-order.js.map +1 -0
- package/dist/internal/planning/market-storage-actions.d.ts +7 -0
- package/dist/internal/planning/market-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/market-storage-actions.js +71 -0
- package/dist/internal/planning/market-storage-actions.js.map +1 -0
- package/dist/internal/planning/mining-stop.d.ts +14 -0
- package/dist/internal/planning/mining-stop.d.ts.map +1 -0
- package/dist/internal/planning/mining-stop.js +42 -0
- package/dist/internal/planning/mining-stop.js.map +1 -0
- package/dist/internal/planning/mining-storage-actions.d.ts +11 -0
- package/dist/internal/planning/mining-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/mining-storage-actions.js +57 -0
- package/dist/internal/planning/mining-storage-actions.js.map +1 -0
- package/dist/internal/planning/movement-character.d.ts +7 -0
- package/dist/internal/planning/movement-character.d.ts.map +1 -0
- package/dist/internal/planning/movement-character.js +41 -0
- package/dist/internal/planning/movement-character.js.map +1 -0
- package/dist/internal/planning/movement-storage-actions.d.ts +7 -0
- package/dist/internal/planning/movement-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/movement-storage-actions.js +38 -0
- package/dist/internal/planning/movement-storage-actions.js.map +1 -0
- package/dist/internal/planning/movement-xp-guard.d.ts +4 -0
- package/dist/internal/planning/movement-xp-guard.d.ts.map +1 -0
- package/dist/internal/planning/movement-xp-guard.js +104 -0
- package/dist/internal/planning/movement-xp-guard.js.map +1 -0
- package/dist/internal/planning/open-signal-guard.d.ts +3 -0
- package/dist/internal/planning/open-signal-guard.d.ts.map +1 -0
- package/dist/internal/planning/open-signal-guard.js +32 -0
- package/dist/internal/planning/open-signal-guard.js.map +1 -0
- package/dist/internal/planning/open-signal.d.ts +31 -0
- package/dist/internal/planning/open-signal.d.ts.map +1 -0
- package/dist/internal/planning/open-signal.js +94 -0
- package/dist/internal/planning/open-signal.js.map +1 -0
- package/dist/internal/planning/original-token.d.ts +40 -0
- package/dist/internal/planning/original-token.d.ts.map +1 -0
- package/dist/internal/planning/original-token.js +112 -0
- package/dist/internal/planning/original-token.js.map +1 -0
- package/dist/internal/planning/own-starbase-facts.d.ts +37 -0
- package/dist/internal/planning/own-starbase-facts.d.ts.map +1 -0
- package/dist/internal/planning/own-starbase-facts.js +52 -0
- package/dist/internal/planning/own-starbase-facts.js.map +1 -0
- package/dist/internal/planning/plan-fields.d.ts +60 -0
- package/dist/internal/planning/plan-fields.d.ts.map +1 -0
- package/dist/internal/planning/plan-fields.js +159 -0
- package/dist/internal/planning/plan-fields.js.map +1 -0
- package/dist/internal/planning/plan-guards.d.ts +4 -0
- package/dist/internal/planning/plan-guards.d.ts.map +1 -0
- package/dist/internal/planning/plan-guards.js +177 -0
- package/dist/internal/planning/plan-guards.js.map +1 -0
- package/dist/internal/planning/profile-key.d.ts +13 -0
- package/dist/internal/planning/profile-key.d.ts.map +1 -0
- package/dist/internal/planning/profile-key.js +20 -0
- package/dist/internal/planning/profile-key.js.map +1 -0
- package/dist/internal/planning/profile-storage-funding-guard.d.ts +28 -0
- package/dist/internal/planning/profile-storage-funding-guard.d.ts.map +1 -0
- package/dist/internal/planning/profile-storage-funding-guard.js +73 -0
- package/dist/internal/planning/profile-storage-funding-guard.js.map +1 -0
- package/dist/internal/planning/profile-storage-funding.d.ts +46 -0
- package/dist/internal/planning/profile-storage-funding.d.ts.map +1 -0
- package/dist/internal/planning/profile-storage-funding.js +58 -0
- package/dist/internal/planning/profile-storage-funding.js.map +1 -0
- package/dist/internal/planning/recipe-state.d.ts +9 -0
- package/dist/internal/planning/recipe-state.d.ts.map +1 -0
- package/dist/internal/planning/recipe-state.js +23 -0
- package/dist/internal/planning/recipe-state.js.map +1 -0
- package/dist/internal/planning/rent-catalog.d.ts +37 -0
- package/dist/internal/planning/rent-catalog.d.ts.map +1 -0
- package/dist/internal/planning/rent-catalog.js +165 -0
- package/dist/internal/planning/rent-catalog.js.map +1 -0
- package/dist/internal/planning/rent.d.ts +19 -0
- package/dist/internal/planning/rent.d.ts.map +1 -0
- package/dist/internal/planning/rent.js +35 -0
- package/dist/internal/planning/rent.js.map +1 -0
- package/dist/internal/planning/research-unlock.d.ts +69 -0
- package/dist/internal/planning/research-unlock.d.ts.map +1 -0
- package/dist/internal/planning/research-unlock.js +287 -0
- package/dist/internal/planning/research-unlock.js.map +1 -0
- package/dist/internal/planning/respawn-guards.d.ts +3 -0
- package/dist/internal/planning/respawn-guards.d.ts.map +1 -0
- package/dist/internal/planning/respawn-guards.js +42 -0
- package/dist/internal/planning/respawn-guards.js.map +1 -0
- package/dist/internal/planning/runtime-guards.d.ts +41 -0
- package/dist/internal/planning/runtime-guards.d.ts.map +1 -0
- package/dist/internal/planning/runtime-guards.js +658 -0
- package/dist/internal/planning/runtime-guards.js.map +1 -0
- package/dist/internal/planning/scan-completion-guard.d.ts +43 -0
- package/dist/internal/planning/scan-completion-guard.d.ts.map +1 -0
- package/dist/internal/planning/scan-completion-guard.js +95 -0
- package/dist/internal/planning/scan-completion-guard.js.map +1 -0
- package/dist/internal/planning/scan-completion.d.ts +20 -0
- package/dist/internal/planning/scan-completion.d.ts.map +1 -0
- package/dist/internal/planning/scan-completion.js +198 -0
- package/dist/internal/planning/scan-completion.js.map +1 -0
- package/dist/internal/planning/scan-detect-guard.d.ts +34 -0
- package/dist/internal/planning/scan-detect-guard.d.ts.map +1 -0
- package/dist/internal/planning/scan-detect-guard.js +77 -0
- package/dist/internal/planning/scan-detect-guard.js.map +1 -0
- package/dist/internal/planning/scan-detect.d.ts +24 -0
- package/dist/internal/planning/scan-detect.d.ts.map +1 -0
- package/dist/internal/planning/scan-detect.js +246 -0
- package/dist/internal/planning/scan-detect.js.map +1 -0
- package/dist/internal/planning/scan-idle-scope.d.ts +5 -0
- package/dist/internal/planning/scan-idle-scope.d.ts.map +1 -0
- package/dist/internal/planning/scan-idle-scope.js +5 -0
- package/dist/internal/planning/scan-idle-scope.js.map +1 -0
- package/dist/internal/planning/scan-input.d.ts +9 -0
- package/dist/internal/planning/scan-input.d.ts.map +1 -0
- package/dist/internal/planning/scan-input.js +58 -0
- package/dist/internal/planning/scan-input.js.map +1 -0
- package/dist/internal/planning/ship-import-funding.d.ts +22 -0
- package/dist/internal/planning/ship-import-funding.d.ts.map +1 -0
- package/dist/internal/planning/ship-import-funding.js +53 -0
- package/dist/internal/planning/ship-import-funding.js.map +1 -0
- package/dist/internal/planning/ship-token.d.ts +1 -6
- package/dist/internal/planning/ship-token.d.ts.map +1 -1
- package/dist/internal/planning/ship-token.js +0 -37
- package/dist/internal/planning/ship-token.js.map +1 -1
- package/dist/internal/planning/starbase-player-owner.d.ts +21 -0
- package/dist/internal/planning/starbase-player-owner.d.ts.map +1 -0
- package/dist/internal/planning/starbase-player-owner.js +17 -0
- package/dist/internal/planning/starbase-player-owner.js.map +1 -0
- package/dist/internal/planning/starbase-system-guard.d.ts +6 -0
- package/dist/internal/planning/starbase-system-guard.d.ts.map +1 -0
- package/dist/internal/planning/starbase-system-guard.js +94 -0
- package/dist/internal/planning/starbase-system-guard.js.map +1 -0
- package/dist/internal/planning/starbase-system.d.ts +15 -0
- package/dist/internal/planning/starbase-system.d.ts.map +1 -0
- package/dist/internal/planning/starbase-system.js +25 -0
- package/dist/internal/planning/starbase-system.js.map +1 -0
- package/dist/internal/planning/storage-action-readers.d.ts +10 -0
- package/dist/internal/planning/storage-action-readers.d.ts.map +1 -0
- package/dist/internal/planning/storage-action-readers.js +36 -0
- package/dist/internal/planning/storage-action-readers.js.map +1 -0
- package/dist/internal/planning/storage-actions.d.ts +85 -0
- package/dist/internal/planning/storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/storage-actions.js +183 -0
- package/dist/internal/planning/storage-actions.js.map +1 -0
- package/dist/internal/planning/token-mint.d.ts.map +1 -1
- package/dist/internal/planning/token-mint.js +2 -1
- package/dist/internal/planning/token-mint.js.map +1 -1
- package/dist/internal/planning/trade-faction-market.d.ts +20 -0
- package/dist/internal/planning/trade-faction-market.d.ts.map +1 -0
- package/dist/internal/planning/trade-faction-market.js +56 -0
- package/dist/internal/planning/trade-faction-market.js.map +1 -0
- package/dist/internal/planning/wallet-starbase.d.ts +34 -0
- package/dist/internal/planning/wallet-starbase.d.ts.map +1 -0
- package/dist/internal/planning/wallet-starbase.js +39 -0
- package/dist/internal/planning/wallet-starbase.js.map +1 -0
- package/dist/internal/planning/xp-runtime.d.ts +36 -0
- package/dist/internal/planning/xp-runtime.d.ts.map +1 -0
- package/dist/internal/planning/xp-runtime.js +122 -0
- package/dist/internal/planning/xp-runtime.js.map +1 -0
- package/dist/internal/read-meta.d.ts +12 -0
- package/dist/internal/read-meta.d.ts.map +1 -1
- package/dist/internal/read-meta.js +10 -0
- package/dist/internal/read-meta.js.map +1 -1
- package/dist/internal/system-program.d.ts +4 -0
- package/dist/internal/system-program.d.ts.map +1 -0
- package/dist/internal/system-program.js +3 -0
- package/dist/internal/system-program.js.map +1 -0
- package/dist/loyalty/actions/index.d.ts +1 -1
- package/dist/loyalty/actions/index.d.ts.map +1 -1
- package/dist/loyalty/actions/index.js +16 -46
- package/dist/loyalty/actions/index.js.map +1 -1
- package/dist/loyalty/index.d.ts +4 -0
- package/dist/loyalty/index.d.ts.map +1 -1
- package/dist/loyalty/index.js +21 -33
- package/dist/loyalty/index.js.map +1 -1
- package/dist/markets/actions/index.d.ts +62 -4
- package/dist/markets/actions/index.d.ts.map +1 -1
- package/dist/markets/actions/index.js +261 -187
- package/dist/markets/actions/index.js.map +1 -1
- package/dist/markets/actions/trade-faction-market.d.ts +45 -0
- package/dist/markets/actions/trade-faction-market.d.ts.map +1 -0
- package/dist/markets/actions/trade-faction-market.js +311 -0
- package/dist/markets/actions/trade-faction-market.js.map +1 -0
- package/dist/markets/index.d.ts +38 -7
- package/dist/markets/index.d.ts.map +1 -1
- package/dist/markets/index.js +59 -20
- package/dist/markets/index.js.map +1 -1
- package/dist/mining/actions/index.d.ts +87 -0
- package/dist/mining/actions/index.d.ts.map +1 -0
- package/dist/mining/actions/index.js +369 -0
- package/dist/mining/actions/index.js.map +1 -0
- package/dist/mining/estimate.d.ts +114 -0
- package/dist/mining/estimate.d.ts.map +1 -0
- package/dist/mining/estimate.js +127 -0
- package/dist/mining/estimate.js.map +1 -0
- package/dist/mining/index.d.ts +9 -2
- package/dist/mining/index.d.ts.map +1 -1
- package/dist/mining/index.js +10 -13
- package/dist/mining/index.js.map +1 -1
- package/dist/mining/profile.d.ts +82 -0
- package/dist/mining/profile.d.ts.map +1 -0
- package/dist/mining/profile.js +109 -0
- package/dist/mining/profile.js.map +1 -0
- package/dist/planning/assembly.d.ts +6 -1
- package/dist/planning/assembly.d.ts.map +1 -1
- package/dist/planning/assembly.js +12 -8
- package/dist/planning/assembly.js.map +1 -1
- package/dist/planning/execution.d.ts +19 -3
- package/dist/planning/execution.d.ts.map +1 -1
- package/dist/planning/execution.js +603 -72
- package/dist/planning/execution.js.map +1 -1
- package/dist/planning/index.d.ts +226 -165
- package/dist/planning/index.d.ts.map +1 -1
- package/dist/planning/index.js +31 -388
- package/dist/planning/index.js.map +1 -1
- package/dist/planning/plan-construction.d.ts +25 -0
- package/dist/planning/plan-construction.d.ts.map +1 -0
- package/dist/planning/plan-construction.js +143 -0
- package/dist/planning/plan-construction.js.map +1 -0
- package/dist/planning/plan-sequence-checkpoint.d.ts +9 -0
- package/dist/planning/plan-sequence-checkpoint.d.ts.map +1 -1
- package/dist/planning/plan-sequence-checkpoint.js +16 -7
- package/dist/planning/plan-sequence-checkpoint.js.map +1 -1
- package/dist/planning/plan-sequence-execution.d.ts +5 -0
- package/dist/planning/plan-sequence-execution.d.ts.map +1 -1
- package/dist/planning/plan-sequence-execution.js +74 -40
- package/dist/planning/plan-sequence-execution.js.map +1 -1
- package/dist/planning/plan-sequence.d.ts +2 -1
- package/dist/planning/plan-sequence.d.ts.map +1 -1
- package/dist/planning/plan-sequence.js +8 -1
- package/dist/planning/plan-sequence.js.map +1 -1
- package/dist/planning/plan-validation.d.ts +17 -0
- package/dist/planning/plan-validation.d.ts.map +1 -0
- package/dist/planning/plan-validation.js +139 -0
- package/dist/planning/plan-validation.js.map +1 -0
- package/dist/planning/simulation.d.ts +25 -1
- package/dist/planning/simulation.d.ts.map +1 -1
- package/dist/planning/simulation.js +111 -11
- package/dist/planning/simulation.js.map +1 -1
- package/dist/registry/cargo.d.ts +7 -12
- package/dist/registry/cargo.d.ts.map +1 -1
- package/dist/registry/cargo.js +19 -20
- package/dist/registry/cargo.js.map +1 -1
- package/dist/registry/docking.d.ts +10 -0
- package/dist/registry/docking.d.ts.map +1 -0
- package/dist/registry/docking.js +12 -0
- package/dist/registry/docking.js.map +1 -0
- package/dist/registry/index.d.ts +4 -0
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +190 -224
- package/dist/registry/index.js.map +1 -1
- package/dist/registry/onboarding.d.ts +10 -2
- package/dist/registry/onboarding.d.ts.map +1 -1
- package/dist/registry/onboarding.js +22 -7
- package/dist/registry/onboarding.js.map +1 -1
- package/dist/registry/scanning.d.ts +7 -0
- package/dist/registry/scanning.d.ts.map +1 -0
- package/dist/registry/scanning.js +13 -0
- package/dist/registry/scanning.js.map +1 -0
- package/dist/registry/ship-stats-snapshot.d.ts.map +1 -1
- package/dist/registry/ship-stats-snapshot.js +38 -24
- package/dist/registry/ship-stats-snapshot.js.map +1 -1
- package/dist/registry/ships.d.ts +22 -2
- package/dist/registry/ships.d.ts.map +1 -1
- package/dist/registry/ships.js +31 -4
- package/dist/registry/ships.js.map +1 -1
- package/dist/registry/xp-runtime.d.ts +4 -0
- package/dist/registry/xp-runtime.d.ts.map +1 -0
- package/dist/registry/xp-runtime.js +14 -0
- package/dist/registry/xp-runtime.js.map +1 -0
- package/dist/rewards/index.d.ts +11 -5
- package/dist/rewards/index.d.ts.map +1 -1
- package/dist/rewards/index.js +10 -21
- package/dist/rewards/index.js.map +1 -1
- package/dist/scanning/actions/index.d.ts +116 -0
- package/dist/scanning/actions/index.d.ts.map +1 -0
- package/dist/scanning/actions/index.js +191 -0
- package/dist/scanning/actions/index.js.map +1 -0
- package/dist/scanning/index.d.ts +10 -12
- package/dist/scanning/index.d.ts.map +1 -1
- package/dist/scanning/index.js +19 -23
- package/dist/scanning/index.js.map +1 -1
- package/dist/scanning/lifecycle.d.ts +77 -0
- package/dist/scanning/lifecycle.d.ts.map +1 -0
- package/dist/scanning/lifecycle.js +93 -0
- package/dist/scanning/lifecycle.js.map +1 -0
- package/dist/scanning/odds.d.ts +115 -0
- package/dist/scanning/odds.d.ts.map +1 -0
- package/dist/scanning/odds.js +294 -0
- package/dist/scanning/odds.js.map +1 -0
- package/dist/scanning/signals.d.ts +121 -0
- package/dist/scanning/signals.d.ts.map +1 -0
- package/dist/scanning/signals.js +171 -0
- package/dist/scanning/signals.js.map +1 -0
- package/dist/starbases/actions/index.d.ts +6 -4
- package/dist/starbases/actions/index.d.ts.map +1 -1
- package/dist/starbases/actions/index.js +34 -67
- package/dist/starbases/actions/index.js.map +1 -1
- package/dist/starbases/index.d.ts.map +1 -1
- package/dist/starbases/index.js +3 -11
- package/dist/starbases/index.js.map +1 -1
- package/dist/world/index.d.ts +108 -5
- package/dist/world/index.d.ts.map +1 -1
- package/dist/world/index.js +110 -15
- package/dist/world/index.js.map +1 -1
- package/dist/world/planet-claim-stake-plots.d.ts +139 -0
- package/dist/world/planet-claim-stake-plots.d.ts.map +1 -0
- package/dist/world/planet-claim-stake-plots.js +117 -0
- package/dist/world/planet-claim-stake-plots.js.map +1 -0
- package/dist/world/starbase-status.d.ts +176 -0
- package/dist/world/starbase-status.d.ts.map +1 -0
- package/dist/world/starbase-status.js +153 -0
- package/dist/world/starbase-status.js.map +1 -0
- package/package.json +10 -2
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fleetAttackInstructionKey, validateFleetAttackActors, } from '../../internal/planning/fleet-attack-xp.js';
|
|
2
|
+
import { resolveXpRuntime } from '../../internal/planning/xp-runtime.js';
|
|
3
|
+
import { isAddress } from '@solana/kit';
|
|
4
|
+
import { requireDisabledLevelRent } from '../../internal/planning/rent-catalog.js';
|
|
5
|
+
import { resolveActionRuntime } from '../../internal/planning/action-runtime.js';
|
|
2
6
|
import { InvalidActionInputError, SageSdkError } from '../../client/errors.js';
|
|
3
7
|
import { readContextRawAccounts } from '../../client/reconciliation.js';
|
|
4
|
-
import {
|
|
5
|
-
import { lootAccountDefinition, } from '../../internal/c4/
|
|
8
|
+
import { getRetrieveLootInstructionDataEncoder } from '../../internal/c4/runtime-bindings.js';
|
|
9
|
+
import { lootAccountDefinition, } from '../../internal/c4/loot.js';
|
|
6
10
|
import { deriveFleetAddress, fleetAccountDefinition, } from '../../internal/c4/fleet.js';
|
|
7
|
-
import { deriveFleetCrewBindingAddress, fleetCrewBindingAccountDefinition, } from '../../internal/c4/fleet-crew-binding.js';
|
|
11
|
+
import { deriveFleetCrewBindingAddress, fleetCrewBindingAccountDefinition, matchesFleetCrewBindingIdentity, } from '../../internal/c4/fleet-crew-binding.js';
|
|
8
12
|
import { deriveFactionAccountAddress, deriveFactionEconomicsConfigAddress, deriveFactionOwnershipAddress, deriveFactionRelationTrackerAddress, deriveFactionTreasuryAddress, deriveKingSystemTrackerAddress, deriveRegionTrackerAddress, factionAccountDefinition, factionEconomicsConfigAccountDefinition, factionOwnershipAccountDefinition, factionRelationTrackerAccountDefinition, factionTreasuryAccountDefinition, kingSystemTrackerAccountDefinition, regionTrackerAccountDefinition, } from '../../internal/c4/factions.js';
|
|
9
|
-
import {
|
|
13
|
+
import { factionValue } from '../../internal/c4/faction.js';
|
|
14
|
+
import { characterAccountDefinition, findCharacterPda, } from '../../internal/c4/character.js';
|
|
10
15
|
import { deriveLoyaltyContributionAddress, deriveLoyaltyEpochAddress, loyaltyContributionAccountDefinition, loyaltyEpochAccountDefinition, } from '../../internal/c4/loyalty.js';
|
|
11
16
|
import { atlasRewardConfigAccountDefinition, atlasRewardRegistryAccountDefinition, deriveAtlasRewardConfigAddress, deriveAtlasRewardRegistryAddress, } from '../../internal/c4/rewards.js';
|
|
12
17
|
import { deriveStarSystemAddress, starSystemAccountDefinition, } from '../../internal/c4/world.js';
|
|
13
18
|
import { requireGameAddress } from '../../internal/game-context.js';
|
|
14
|
-
import { adaptApplyCombatStimulantInstruction, adaptAttackFleetInstruction, adaptAttackStarbaseInstruction, adaptRetrieveLootInstruction,
|
|
15
|
-
import {
|
|
19
|
+
import { adaptApplyCombatStimulantInstruction, adaptAttackFleetInstruction, adaptAttackStarbaseInstruction, adaptRetrieveLootInstruction, readPlanAuthorization, } from '../../internal/planning/authorization-adapter.js';
|
|
20
|
+
import { buildPlannerPlan } from '../../planning/plan-construction.js';
|
|
16
21
|
import { readGameCombatConfiguration } from '../../registry/combat.js';
|
|
22
|
+
import { CLOCK_ADDRESS, readClock, } from '../../internal/planning/faction-enrollment.js';
|
|
17
23
|
import { resolveCargo, } from '../../registry/index.js';
|
|
24
|
+
import { accountAbsentPrecondition, accountStatePrecondition, } from '../../internal/planning/account-state.js';
|
|
18
25
|
function invalid(field, value, acceptedRange, remedy) {
|
|
19
26
|
throw new InvalidActionInputError(field, value, acceptedRange, remedy);
|
|
20
27
|
}
|
|
@@ -35,19 +42,13 @@ function assertKeys(value, field, required, optional = []) {
|
|
|
35
42
|
function validateOptions(value) {
|
|
36
43
|
const options = readRecord(value, 'options');
|
|
37
44
|
assertKeys(options, 'options', ['authorization']);
|
|
38
|
-
const
|
|
39
|
-
assertKeys(authorizationRecord, 'authorization', ['profile', 'authority', 'keyIndex'], ['certificate']);
|
|
40
|
-
const authorization = authorizationRecord;
|
|
41
|
-
validatePlanAuthorization(authorization);
|
|
45
|
+
const authorization = readPlanAuthorization(options.authorization);
|
|
42
46
|
return { authorization };
|
|
43
47
|
}
|
|
44
48
|
function validateAttackOptions(value) {
|
|
45
49
|
const options = readRecord(value, 'options');
|
|
46
50
|
assertKeys(options, 'options', ['authorization', 'loot']);
|
|
47
|
-
const
|
|
48
|
-
assertKeys(authorizationRecord, 'authorization', ['profile', 'authority', 'keyIndex'], ['certificate']);
|
|
49
|
-
const authorization = authorizationRecord;
|
|
50
|
-
validatePlanAuthorization(authorization);
|
|
51
|
+
const authorization = readPlanAuthorization(options.authorization);
|
|
51
52
|
if (typeof options.loot !== 'string' || !isAddress(options.loot)) {
|
|
52
53
|
invalid('options.loot', options.loot, 'one valid new Loot account address', 'Generate a new address-only Loot signer and provide its public address before retrying.');
|
|
53
54
|
}
|
|
@@ -66,10 +67,7 @@ function validateAttackStance(value) {
|
|
|
66
67
|
function validateRetrieveOptions(value) {
|
|
67
68
|
const options = readRecord(value, 'options');
|
|
68
69
|
assertKeys(options, 'options', ['authorization', 'atUnixSeconds']);
|
|
69
|
-
const
|
|
70
|
-
assertKeys(authorizationRecord, 'authorization', ['profile', 'authority', 'keyIndex'], ['certificate']);
|
|
71
|
-
const authorization = authorizationRecord;
|
|
72
|
-
validatePlanAuthorization(authorization);
|
|
70
|
+
const authorization = readPlanAuthorization(options.authorization);
|
|
73
71
|
if (typeof options.atUnixSeconds !== 'bigint' || options.atUnixSeconds < 0n) {
|
|
74
72
|
invalid('options.atUnixSeconds', options.atUnixSeconds, 'a non-negative bigint Unix timestamp', 'Provide the explicit current Unix timestamp used to evaluate Loot exclusivity before retrying.');
|
|
75
73
|
}
|
|
@@ -119,13 +117,21 @@ function validateLootSelection(value, loot, fleet, retrievingProfile, atUnixSeco
|
|
|
119
117
|
if (item === undefined) {
|
|
120
118
|
invalid(`${field}.itemIndex`, itemIndex, `an available Loot item index below ${String(loot.items.length)}`, 'Refresh the Loot snapshot and select an existing item before retrying.');
|
|
121
119
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
// The retriever is the Fleet's controlling Profile. Reward cargo stays
|
|
121
|
+
// locked to the destroying Profile until it expires and is swept; ordinary
|
|
122
|
+
// cargo is exclusive to the destroying Profile only until the unlock time.
|
|
123
|
+
const destroyer = item.destroyer?.address;
|
|
124
|
+
if (item.rewardReclaimAtUnixSeconds > 0n) {
|
|
125
|
+
if (destroyer !== retrievingProfile) {
|
|
126
|
+
fail(`Loot item ${String(itemIndex)} is reward cargo locked to ${destroyer === undefined ? 'no destroying Profile' : `destroying Profile ${destroyer}`}, not Profile ${retrievingProfile}. Reward cargo never opens to other Profiles; it is swept after ${String(item.rewardReclaimAtUnixSeconds)} Unix seconds. Choose another item or use the destroying Profile's Fleet before retrying.`, loot.address);
|
|
127
|
+
}
|
|
128
|
+
if (atUnixSeconds > item.rewardReclaimAtUnixSeconds) {
|
|
129
|
+
fail(`Loot item ${String(itemIndex)} reward cargo expired at ${String(item.rewardReclaimAtUnixSeconds)} Unix seconds and is swept to the reward treasury, not retrievable at ${String(atUnixSeconds)}. Choose another item or refresh the Loot before retrying.`, loot.address);
|
|
130
|
+
}
|
|
125
131
|
}
|
|
126
|
-
if (
|
|
127
|
-
|
|
128
|
-
fail(`Loot item ${String(itemIndex)}
|
|
132
|
+
else if (atUnixSeconds < item.exclusivityUnlockAtUnixSeconds &&
|
|
133
|
+
destroyer !== retrievingProfile) {
|
|
134
|
+
fail(`Loot item ${String(itemIndex)} is exclusive to ${destroyer === undefined ? 'no Profile (a Starbase kill)' : `destroying Profile ${destroyer}`} until ${String(item.exclusivityUnlockAtUnixSeconds)} Unix seconds, not Profile ${retrievingProfile}. Use the destroying Profile's Fleet or wait for the exclusivity window to pass before retrying.`, loot.address);
|
|
129
135
|
}
|
|
130
136
|
const cargoRequests = denseArray(target.cargo, `${field}.cargo`);
|
|
131
137
|
if (cargoRequests.length === 0 || cargoRequests.length > 65_536) {
|
|
@@ -162,9 +168,7 @@ function validateLootSelection(value, loot, fleet, retrievingProfile, atUnixSeco
|
|
|
162
168
|
}
|
|
163
169
|
generated.push([itemIndex, encoded]);
|
|
164
170
|
}
|
|
165
|
-
const instructionDataLength =
|
|
166
|
-
.getRetrieveLootInstructionDataEncoder()
|
|
167
|
-
.encode({
|
|
171
|
+
const instructionDataLength = getRetrieveLootInstructionDataEncoder().encode({
|
|
168
172
|
keyIndex: 0,
|
|
169
173
|
want: generated.map(([itemIndex, cargo]) => [
|
|
170
174
|
itemIndex,
|
|
@@ -184,7 +188,7 @@ function requireAccount(account, address, message) {
|
|
|
184
188
|
}
|
|
185
189
|
function stimulantFingerprint(stimulant) {
|
|
186
190
|
const effects = stimulant.effects
|
|
187
|
-
.map(({ charges, deltaBps,
|
|
191
|
+
.map(({ charges, deltaBps, stackRule, stat }) => `${String(charges)}:${String(deltaBps)}:${stackRule}:${stat}`)
|
|
188
192
|
.join(',');
|
|
189
193
|
return [
|
|
190
194
|
stimulant.cargo.id,
|
|
@@ -209,35 +213,14 @@ function rawCargoFingerprint(fleet) {
|
|
|
209
213
|
.join(',');
|
|
210
214
|
return [fleet.cargoHold.seqId, fleet.cargoHold.storageCost, items].join('|');
|
|
211
215
|
}
|
|
212
|
-
async function hashAccountState(account) {
|
|
213
|
-
const owner = getAddressEncoder().encode(account.owner);
|
|
214
|
-
const canonical = new Uint8Array(owner.length + account.data.length);
|
|
215
|
-
canonical.set(owner);
|
|
216
|
-
canonical.set(account.data, owner.length);
|
|
217
|
-
const digest = new Uint8Array(await globalThis.crypto.subtle.digest('SHA-256', canonical));
|
|
218
|
-
return [...digest].map((byte) => byte.toString(16).padStart(2, '0')).join('');
|
|
219
|
-
}
|
|
220
|
-
async function precondition(account, describes) {
|
|
221
|
-
return Object.freeze({
|
|
222
|
-
address: account.address,
|
|
223
|
-
dataHash: await hashAccountState(account),
|
|
224
|
-
describes,
|
|
225
|
-
kind: 'account-state',
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
function absentPrecondition(address, describes) {
|
|
229
|
-
return Object.freeze({
|
|
230
|
-
address,
|
|
231
|
-
describes,
|
|
232
|
-
kind: 'account-absent',
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
216
|
/** Plans application of one configured combat stimulant without predicting its effects.
|
|
236
217
|
*
|
|
237
218
|
* The planner validates Fleet ownership and Game membership, current catalog
|
|
238
|
-
* membership, known cargo balance, crewed
|
|
239
|
-
* whole-account Fleet state.
|
|
240
|
-
*
|
|
219
|
+
* membership, known cargo balance, a crewed Fleet that is neither destroyed
|
|
220
|
+
* nor respawning, and fresh whole-account Fleet state. Only stimulants whose
|
|
221
|
+
* effects use the `refresh` stack rule are planned, as the game applies no
|
|
222
|
+
* other rule yet. Permission, charge application, and combat arithmetic remain
|
|
223
|
+
* chain-authoritative.
|
|
241
224
|
*
|
|
242
225
|
* @example
|
|
243
226
|
* ```ts
|
|
@@ -263,8 +246,13 @@ export async function planFleetApplyCombatStimulant(ctx, fleet, stimulant, input
|
|
|
263
246
|
if (fleet.game !== game) {
|
|
264
247
|
fail(`Fleet ${fleet.address} belongs to Game ${fleet.game}, not configured Game ${game}. Refresh the Fleet through this context and retry.`, fleet.address);
|
|
265
248
|
}
|
|
266
|
-
if (fleet.state.kind === 'destroyed') {
|
|
267
|
-
fail(`Fleet ${fleet.name} (${fleet.address}) is
|
|
249
|
+
if (fleet.state.kind === 'destroyed' || fleet.state.kind === 'respawn') {
|
|
250
|
+
fail(`Fleet ${fleet.name} (${fleet.address}) is ${fleet.state.kind} and cannot apply a combat stimulant. Wait until it is back at a Starbase, refresh it, and retry.`, fleet.address);
|
|
251
|
+
}
|
|
252
|
+
// The game applies only refresh-rule effects and refuses the others.
|
|
253
|
+
const unsupported = stimulant.effects.find(({ stackRule }) => stackRule !== 'refresh');
|
|
254
|
+
if (unsupported !== undefined) {
|
|
255
|
+
fail(`Stimulant ${stimulant.cargo.name} has a ${unsupported.stackRule} effect on ${unsupported.stat}; the game applies only refresh effects. Choose another stimulant.`, fleet.address);
|
|
268
256
|
}
|
|
269
257
|
const combat = await readGameCombatConfiguration(ctx);
|
|
270
258
|
const definitions = await Promise.all(combat.data.stimulantDefinitions.definitions.map(async (definition) => ({
|
|
@@ -311,10 +299,10 @@ export async function planFleetApplyCombatStimulant(ctx, fleet, stimulant, input
|
|
|
311
299
|
fail(`Fleet ${fleet.name} (${fleet.address}) has no crew and cannot apply a combat stimulant. Crew the Fleet, refresh it through this context, and retry.`, fleet.address);
|
|
312
300
|
}
|
|
313
301
|
const description = `Apply one ${catalogued.cargo.name} combat stimulant from Fleet ${fleet.name} (${fleet.address}); permission, stacking, charge application, and combat outcomes remain chain-authoritative.`;
|
|
314
|
-
return
|
|
302
|
+
return buildPlannerPlan({
|
|
315
303
|
kind: 'combat.apply-stimulant',
|
|
316
304
|
preconditions: [
|
|
317
|
-
await
|
|
305
|
+
await accountStatePrecondition(account, `Fleet ${fleet.name} retains its configured Game, owning Profile, supported crewed state, and known ${catalogued.cargo.name} cargo balance.`),
|
|
318
306
|
],
|
|
319
307
|
steps: [
|
|
320
308
|
{
|
|
@@ -331,20 +319,6 @@ export async function planFleetApplyCombatStimulant(ctx, fleet, stimulant, input
|
|
|
331
319
|
summary: description,
|
|
332
320
|
});
|
|
333
321
|
}
|
|
334
|
-
function factionId(fleet) {
|
|
335
|
-
if (fleet.npcFactionId > 0)
|
|
336
|
-
return fleet.npcFactionId;
|
|
337
|
-
switch (fleet.faction) {
|
|
338
|
-
case 'mud':
|
|
339
|
-
return 1;
|
|
340
|
-
case 'oni':
|
|
341
|
-
return 2;
|
|
342
|
-
case 'ustur':
|
|
343
|
-
return 3;
|
|
344
|
-
case 'unaligned':
|
|
345
|
-
return 0;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
322
|
function shipFingerprint(fleet) {
|
|
349
323
|
return fleet.ships
|
|
350
324
|
.map(({ id, quantity }) => `${String(id)}:${String(quantity)}`)
|
|
@@ -400,18 +374,36 @@ async function validateCurrentAttackFleet(fleet, account) {
|
|
|
400
374
|
}
|
|
401
375
|
return currentAccount;
|
|
402
376
|
}
|
|
377
|
+
/** The program attacks only with an attacker that is Idle or subwarping at
|
|
378
|
+
* chain time (a finished warp counts as Idle), carries its required crew, and
|
|
379
|
+
* has usable AP: stored AP refills right after an attack, but stays unusable
|
|
380
|
+
* until the reload completes. */
|
|
381
|
+
function validateAttackerReadiness(fleet, account, clock) {
|
|
382
|
+
const now = readClock(requireAccount(clock, CLOCK_ADDRESS, 'The Clock sysvar is missing. Refresh chain time and retry the attack.'));
|
|
383
|
+
const current = fleetAccountDefinition.decode(account);
|
|
384
|
+
const label = `Attacking Fleet ${fleet.name} (${fleet.address})`;
|
|
385
|
+
const { state } = current;
|
|
386
|
+
if (state.kind !== 'idle' &&
|
|
387
|
+
state.kind !== 'subwarp' &&
|
|
388
|
+
!(state.kind === 'warp' && now >= state.arrivesAtUnixSeconds))
|
|
389
|
+
fail(`${label} is ${state.kind === 'warp' ? 'still warping' : state.kind}; only an Idle or subwarping Fleet can attack. Wait or move it into space, refresh the Fleet, and retry.`, fleet.address);
|
|
390
|
+
if (current.crewCount < current.stats.misc.requiredCrew)
|
|
391
|
+
fail(`${label} has ${String(current.crewCount)} crew but needs ${String(current.stats.misc.requiredCrew)} to attack. Load crew, refresh the Fleet, and retry.`, fleet.address);
|
|
392
|
+
// Zero stored AP is refused earlier, and the fresh account matches the snapshot.
|
|
393
|
+
if (now < current.apReloadExpiresAt)
|
|
394
|
+
fail(`${label} has no usable ability power at chain time ${String(now)}: stored AP ${String(current.ap)} with reload completing at ${String(current.apReloadExpiresAt)}. Wait for the reload, refresh the Fleet, and retry.`, fleet.address);
|
|
395
|
+
}
|
|
403
396
|
async function optionalCrewBinding(ctx, fleet) {
|
|
404
397
|
const address = await deriveFleetCrewBindingAddress(fleet.address);
|
|
405
398
|
const [envelope] = await ctx.data.readMany(fleetCrewBindingAccountDefinition, [address]);
|
|
406
399
|
if (envelope !== undefined &&
|
|
407
|
-
(envelope.data.
|
|
408
|
-
envelope.data.ownerProfile !== fleet.ownerProfile.address)) {
|
|
400
|
+
!matchesFleetCrewBindingIdentity(envelope.data, fleet.address, fleet.ownerProfile.address)) {
|
|
409
401
|
fail(`FleetCrewBinding ${address} does not belong to Fleet ${fleet.address} and Profile ${fleet.ownerProfile.address}. Refresh the Fleet crew relationship and retry.`, address);
|
|
410
402
|
}
|
|
411
403
|
return envelope?.address;
|
|
412
404
|
}
|
|
413
405
|
async function resolveRewardAccounts(ctx, fleet, registry, config, epochIndex) {
|
|
414
|
-
const resolvedFaction =
|
|
406
|
+
const resolvedFaction = fleet.npcFactionId > 0 ? fleet.npcFactionId : factionValue(fleet.faction);
|
|
415
407
|
if (resolvedFaction === 0)
|
|
416
408
|
return { config, registry };
|
|
417
409
|
const [epochAddress, contributionAddress] = await Promise.all([
|
|
@@ -446,35 +438,86 @@ async function resolveRewardAccounts(ctx, fleet, registry, config, epochIndex) {
|
|
|
446
438
|
registry,
|
|
447
439
|
};
|
|
448
440
|
}
|
|
449
|
-
|
|
441
|
+
/** Reads and requires an NPC Fleet's canonical FactionOwnership and, when
|
|
442
|
+
* `withFaction`, its Faction account; a player Fleet has neither. */
|
|
443
|
+
async function resolveNpcAccounts(ctx, fleet, withFaction) {
|
|
450
444
|
if (fleet.npcFactionId === 0)
|
|
451
445
|
return {};
|
|
452
|
-
const
|
|
453
|
-
|
|
446
|
+
const addresses = await Promise.all([
|
|
447
|
+
deriveFactionOwnershipAddress(fleet.game, 'fleet', fleet.address),
|
|
448
|
+
...(withFaction
|
|
449
|
+
? [deriveFactionAccountAddress(fleet.game, fleet.npcFactionId)]
|
|
450
|
+
: []),
|
|
451
|
+
]);
|
|
452
|
+
const [ownership, faction] = await readContextRawAccounts(ctx, addresses);
|
|
453
|
+
const ownershipData = ownership && factionOwnershipAccountDefinition.decode(ownership);
|
|
454
454
|
if (ownership === undefined ||
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
fail(`NPC Fleet ${fleet.address} has no matching canonical FactionOwnership for faction ${String(fleet.npcFactionId)}. Refresh the Fleet and faction ownership relationship before retrying.`,
|
|
460
|
-
}
|
|
461
|
-
if (!
|
|
462
|
-
return { ownership
|
|
463
|
-
const
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
fail(`Faction ${
|
|
468
|
-
}
|
|
469
|
-
return {
|
|
455
|
+
ownershipData?.game !== fleet.game ||
|
|
456
|
+
ownershipData.asset.kind !== 'fleet' ||
|
|
457
|
+
ownershipData.asset.fleet !== fleet.address ||
|
|
458
|
+
ownershipData.controllingFactionId !== fleet.npcFactionId) {
|
|
459
|
+
fail(`NPC Fleet ${fleet.address} has no matching canonical FactionOwnership for faction ${String(fleet.npcFactionId)}. Refresh the Fleet and faction ownership relationship before retrying.`, addresses[0]);
|
|
460
|
+
}
|
|
461
|
+
if (!withFaction)
|
|
462
|
+
return { ownership };
|
|
463
|
+
const factionData = faction && factionAccountDefinition.decode(faction);
|
|
464
|
+
if (faction === undefined ||
|
|
465
|
+
factionData?.game !== fleet.game ||
|
|
466
|
+
factionData.factionId !== fleet.npcFactionId) {
|
|
467
|
+
fail(`Faction ${addresses[1]} is missing or does not match NPC Fleet ${fleet.address}'s Game and faction id. Refresh the faction registry relationship before retrying.`, addresses[1]);
|
|
468
|
+
}
|
|
469
|
+
return { faction, ownership };
|
|
470
470
|
}
|
|
471
471
|
function generatedStance(stance) {
|
|
472
472
|
return {
|
|
473
473
|
ammoUsage: stance.ammoUsage === 'none' ? 0 : stance.ammoUsage === 'light' ? 1 : 2,
|
|
474
474
|
};
|
|
475
475
|
}
|
|
476
|
+
/** Requires a live Fleet snapshot of the configured Game with known AP, crew
|
|
477
|
+
* and ship composition; an attacking Fleet also needs AP available. */
|
|
478
|
+
function validateAttackFleet(fleet, role, game) {
|
|
479
|
+
const label = `The ${role} Fleet ${fleet.name} (${fleet.address})`;
|
|
480
|
+
if (fleet.game !== game) {
|
|
481
|
+
fail(`${label} belongs to Game ${fleet.game}, not configured Game ${game}. Refresh the Fleet through this context and retry.`, fleet.address);
|
|
482
|
+
}
|
|
483
|
+
if (fleet.state.kind === 'destroyed') {
|
|
484
|
+
fail(`${label} is destroyed and cannot participate in this attack. Refresh the Fleet after respawn and retry.`, fleet.address);
|
|
485
|
+
}
|
|
486
|
+
if (!Number.isSafeInteger(fleet.ap) ||
|
|
487
|
+
fleet.ap < 0 ||
|
|
488
|
+
!Number.isSafeInteger(fleet.crewCount) ||
|
|
489
|
+
fleet.crewCount <= 0) {
|
|
490
|
+
fail(`${label} has unknown or invalid AP or crew state. Refresh the Fleet through this context and retry.`, fleet.address);
|
|
491
|
+
}
|
|
492
|
+
if (fleet.ships.length === 0 ||
|
|
493
|
+
fleet.ships.some(({ quantity }) => quantity <= 0n)) {
|
|
494
|
+
fail(`${label} has no valid known ship composition. Refresh Fleet composition and retry.`, fleet.address);
|
|
495
|
+
}
|
|
496
|
+
if (role === 'attacking' && fleet.ap === 0) {
|
|
497
|
+
fail(`${label} has no known AP available. Wait for AP reload, refresh the Fleet, and retry.`, fleet.address);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
/** Validates the inputs every attack shares: the stance, an attacking Fleet
|
|
501
|
+
* owned by the authorization Profile that can attack, and a new Loot address
|
|
502
|
+
* distinct from the authorization signers. */
|
|
503
|
+
function validateAttack(ctx, attacker, inputStance, inputOptions) {
|
|
504
|
+
const options = validateAttackOptions(inputOptions);
|
|
505
|
+
const stance = validateAttackStance(inputStance);
|
|
506
|
+
const game = requireGameAddress(ctx);
|
|
507
|
+
if (attacker.ownerProfile.address !== options.authorization.profile) {
|
|
508
|
+
fail(`Attacking Fleet ${attacker.address} does not belong to authorization Profile ${options.authorization.profile}. Choose an owned Fleet and retry.`, attacker.address);
|
|
509
|
+
}
|
|
510
|
+
if (options.loot === options.authorization.authority ||
|
|
511
|
+
options.loot === options.authorization.profile) {
|
|
512
|
+
fail(`The new Loot address ${options.loot} must be distinct from the authorization authority and Profile. Generate a separate Loot signer address and retry.`, options.loot);
|
|
513
|
+
}
|
|
514
|
+
validateAttackFleet(attacker, 'attacking', game);
|
|
515
|
+
return { game, options, stance };
|
|
516
|
+
}
|
|
476
517
|
/** Plans one singleton Fleet-on-Fleet attack without predicting its outcome.
|
|
477
518
|
*
|
|
519
|
+
* At chain time the attacker must be Idle or subwarping (a finished warp
|
|
520
|
+
* counts as Idle), carry its required crew, and have finished reloading AP.
|
|
478
521
|
* Range, randomness, recent slot hashes, final combat arithmetic, and chain
|
|
479
522
|
* races remain authoritative. This Plan cannot be combined with another
|
|
480
523
|
* gameplay instruction because the generated program contract requires a
|
|
@@ -497,47 +540,16 @@ function generatedStance(stance) {
|
|
|
497
540
|
* ```
|
|
498
541
|
*/
|
|
499
542
|
export async function planFleetAttackFleet(ctx, attacker, defender, inputStance, inputOptions) {
|
|
500
|
-
const options =
|
|
501
|
-
const stance = validateAttackStance(inputStance);
|
|
502
|
-
const game = requireGameAddress(ctx);
|
|
543
|
+
const { game, options, stance } = validateAttack(ctx, attacker, inputStance, inputOptions);
|
|
503
544
|
if (attacker.address === defender.address) {
|
|
504
545
|
fail(`Fleet ${attacker.address} cannot attack itself. Choose a distinct defending Fleet and retry.`, attacker.address);
|
|
505
546
|
}
|
|
506
|
-
|
|
507
|
-
fail(`Attacking Fleet ${attacker.address} does not belong to authorization Profile ${options.authorization.profile}. Choose an owned Fleet and retry.`, attacker.address);
|
|
508
|
-
}
|
|
509
|
-
if (options.loot === options.authorization.authority ||
|
|
510
|
-
options.loot === options.authorization.profile) {
|
|
511
|
-
fail(`The new Loot address ${options.loot} must be distinct from the authorization authority and Profile. Generate a separate Loot signer address and retry.`, options.loot);
|
|
512
|
-
}
|
|
513
|
-
for (const [role, fleet] of [
|
|
514
|
-
['attacking', attacker],
|
|
515
|
-
['defending', defender],
|
|
516
|
-
]) {
|
|
517
|
-
if (fleet.game !== game) {
|
|
518
|
-
fail(`The ${role} Fleet ${fleet.address} belongs to Game ${fleet.game}, not configured Game ${game}. Refresh both Fleets through this context and retry.`, fleet.address);
|
|
519
|
-
}
|
|
520
|
-
if (fleet.state.kind === 'destroyed') {
|
|
521
|
-
fail(`The ${role} Fleet ${fleet.name} (${fleet.address}) is destroyed and cannot participate in this attack. Refresh the Fleet after respawn and retry.`, fleet.address);
|
|
522
|
-
}
|
|
523
|
-
if (!Number.isSafeInteger(fleet.ap) ||
|
|
524
|
-
fleet.ap < 0 ||
|
|
525
|
-
!Number.isSafeInteger(fleet.crewCount) ||
|
|
526
|
-
fleet.crewCount <= 0) {
|
|
527
|
-
fail(`The ${role} Fleet ${fleet.name} (${fleet.address}) has unknown or invalid AP or crew state. Refresh the Fleet through this context and retry.`, fleet.address);
|
|
528
|
-
}
|
|
529
|
-
if (fleet.ships.length === 0 ||
|
|
530
|
-
fleet.ships.some(({ quantity }) => quantity <= 0n)) {
|
|
531
|
-
fail(`The ${role} Fleet ${fleet.name} (${fleet.address}) has no valid known ship composition. Refresh Fleet composition and retry.`, fleet.address);
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
if (attacker.ap === 0) {
|
|
535
|
-
fail(`Attacking Fleet ${attacker.name} (${attacker.address}) has no known AP available. Wait for AP reload, refresh the Fleet, and retry.`, attacker.address);
|
|
536
|
-
}
|
|
547
|
+
validateAttackFleet(defender, 'defending', game);
|
|
537
548
|
const currentAccounts = await readContextRawAccounts(ctx, [
|
|
538
549
|
attacker.address,
|
|
539
550
|
defender.address,
|
|
540
551
|
options.loot,
|
|
552
|
+
CLOCK_ADDRESS,
|
|
541
553
|
]);
|
|
542
554
|
if (currentAccounts[2] !== undefined) {
|
|
543
555
|
fail(`Loot account ${options.loot} already exists. Generate a new unused Loot signer address and retry.`, options.loot);
|
|
@@ -546,6 +558,7 @@ export async function planFleetAttackFleet(ctx, attacker, defender, inputStance,
|
|
|
546
558
|
validateCurrentAttackFleet(attacker, currentAccounts[0]),
|
|
547
559
|
validateCurrentAttackFleet(defender, currentAccounts[1]),
|
|
548
560
|
]);
|
|
561
|
+
validateAttackerReadiness(attacker, attackerAccount, currentAccounts[3]);
|
|
549
562
|
const registryAddress = await deriveAtlasRewardRegistryAddress(game);
|
|
550
563
|
const registry = await ctx.data.read(atlasRewardRegistryAccountDefinition, registryAddress);
|
|
551
564
|
if (registry.data.game !== game) {
|
|
@@ -565,58 +578,93 @@ export async function planFleetAttackFleet(ctx, attacker, defender, inputStance,
|
|
|
565
578
|
deriveRegionTrackerAddress(game),
|
|
566
579
|
deriveFactionRelationTrackerAddress(game),
|
|
567
580
|
]);
|
|
581
|
+
const actorIntent = {
|
|
582
|
+
address: attacker.address,
|
|
583
|
+
defender: defender.address,
|
|
584
|
+
game,
|
|
585
|
+
profile: attacker.ownerProfile.address,
|
|
586
|
+
defenderProfile: defender.ownerProfile.address,
|
|
587
|
+
};
|
|
588
|
+
await validateFleetAttackActors(ctx, actorIntent);
|
|
589
|
+
const versions = new Map();
|
|
590
|
+
const attackerXp = await resolveXpRuntime(ctx, { game, character, profile: attacker.ownerProfile.address }, versions);
|
|
591
|
+
const defenderXp = character === defenderCharacter
|
|
592
|
+
? attackerXp
|
|
593
|
+
: await resolveXpRuntime(ctx, {
|
|
594
|
+
game,
|
|
595
|
+
character: defenderCharacter,
|
|
596
|
+
profile: defender.ownerProfile.address,
|
|
597
|
+
}, versions);
|
|
598
|
+
const xpGuards = [...new Set([attackerXp, defenderXp])].map((xp) => ({
|
|
599
|
+
kind: 'xp-runtime',
|
|
600
|
+
address: game,
|
|
601
|
+
intent: xp.intent,
|
|
602
|
+
accounts: xp.accounts,
|
|
603
|
+
describes: 'Both operator XP budgets remain canonical and reconciled; earned XP and bank balances may change.',
|
|
604
|
+
}));
|
|
605
|
+
const instruction = adaptAttackFleetInstruction({
|
|
606
|
+
...(attackerNpc.faction === undefined
|
|
607
|
+
? {}
|
|
608
|
+
: { attackerFactionAccount: attackerNpc.faction.address }),
|
|
609
|
+
...(attackerNpc.ownership === undefined
|
|
610
|
+
? {}
|
|
611
|
+
: { attackerFleetOwnership: attackerNpc.ownership.address }),
|
|
612
|
+
attackerRewardsConfig: attackerRewards.config,
|
|
613
|
+
...(attackerRewards.contribution === undefined
|
|
614
|
+
? {}
|
|
615
|
+
: { attackerRewardsContribution: attackerRewards.contribution }),
|
|
616
|
+
...(attackerRewards.epoch === undefined
|
|
617
|
+
? {}
|
|
618
|
+
: { attackerRewardsEpoch: attackerRewards.epoch }),
|
|
619
|
+
attackerRewardsRegistry: attackerRewards.registry,
|
|
620
|
+
...(defender.state.kind === 'mining'
|
|
621
|
+
? { asteroid: defender.state.asteroid.address }
|
|
622
|
+
: {}),
|
|
623
|
+
authorization: options.authorization,
|
|
624
|
+
attackerXpBudget: attackerXp.accounts.xpBudget,
|
|
625
|
+
defenderXpBudget: defenderXp.accounts.xpBudget,
|
|
626
|
+
xpBudgetConfig: attackerXp.accounts.xpBudgetConfig,
|
|
627
|
+
character,
|
|
628
|
+
...(crewBinding === undefined ? {} : { crewBinding }),
|
|
629
|
+
defenderCharacter,
|
|
630
|
+
...(defenderNpc.ownership === undefined
|
|
631
|
+
? {}
|
|
632
|
+
: { defenderFleetOwnership: defenderNpc.ownership.address }),
|
|
633
|
+
defenderRewardsConfig: defenderRewards.config,
|
|
634
|
+
...(defenderRewards.contribution === undefined
|
|
635
|
+
? {}
|
|
636
|
+
: { defenderRewardsContribution: defenderRewards.contribution }),
|
|
637
|
+
...(defenderRewards.epoch === undefined
|
|
638
|
+
? {}
|
|
639
|
+
: { defenderRewardsEpoch: defenderRewards.epoch }),
|
|
640
|
+
defenderRewardsRegistry: defenderRewards.registry,
|
|
641
|
+
defendingFleet: defender.address,
|
|
642
|
+
factionRelationTracker,
|
|
643
|
+
fleet: attacker.address,
|
|
644
|
+
game,
|
|
645
|
+
loot: options.loot,
|
|
646
|
+
recentSlothashes: 'SysvarS1otHashes111111111111111111111111111',
|
|
647
|
+
regionTracker,
|
|
648
|
+
stance: generatedStance(stance),
|
|
649
|
+
});
|
|
568
650
|
const description = `Attack Fleet ${defender.name} (${defender.address}) with Fleet ${attacker.name} (${attacker.address}) using ${stance.ammoUsage} ammunition; range, randomness, rewards, Loot, damage, and final combat arithmetic remain chain-authoritative.`;
|
|
569
|
-
return
|
|
651
|
+
return buildPlannerPlan({
|
|
570
652
|
kind: 'combat.attack-fleet',
|
|
571
653
|
preconditions: [
|
|
572
|
-
|
|
573
|
-
|
|
654
|
+
{
|
|
655
|
+
kind: 'fleet-attack',
|
|
656
|
+
...actorIntent,
|
|
657
|
+
instructionKey: fleetAttackInstructionKey(instruction),
|
|
658
|
+
describes: 'The exact attack instruction and both canonical operators remain bound.',
|
|
659
|
+
},
|
|
660
|
+
...xpGuards,
|
|
661
|
+
await accountStatePrecondition(attackerAccount, `Attacking Fleet ${attacker.name} retains its owner, Game, live state, crew, AP, faction, and ship composition.`),
|
|
662
|
+
await accountStatePrecondition(defenderAccount, `Defending Fleet ${defender.name} retains its owner, Game, live state, crew, faction, and ship composition.`),
|
|
574
663
|
],
|
|
575
664
|
steps: [
|
|
576
665
|
{
|
|
577
666
|
describes: description,
|
|
578
|
-
instruction
|
|
579
|
-
...(attackerNpc.factionAccount === undefined
|
|
580
|
-
? {}
|
|
581
|
-
: { attackerFactionAccount: attackerNpc.factionAccount }),
|
|
582
|
-
...(attackerNpc.ownership === undefined
|
|
583
|
-
? {}
|
|
584
|
-
: { attackerFleetOwnership: attackerNpc.ownership }),
|
|
585
|
-
attackerRewardsConfig: attackerRewards.config,
|
|
586
|
-
...(attackerRewards.contribution === undefined
|
|
587
|
-
? {}
|
|
588
|
-
: { attackerRewardsContribution: attackerRewards.contribution }),
|
|
589
|
-
...(attackerRewards.epoch === undefined
|
|
590
|
-
? {}
|
|
591
|
-
: { attackerRewardsEpoch: attackerRewards.epoch }),
|
|
592
|
-
attackerRewardsRegistry: attackerRewards.registry,
|
|
593
|
-
...(defender.state.kind === 'mining'
|
|
594
|
-
? { asteroid: defender.state.asteroid.address }
|
|
595
|
-
: {}),
|
|
596
|
-
authorization: options.authorization,
|
|
597
|
-
character,
|
|
598
|
-
...(crewBinding === undefined ? {} : { crewBinding }),
|
|
599
|
-
defenderCharacter,
|
|
600
|
-
...(defenderNpc.ownership === undefined
|
|
601
|
-
? {}
|
|
602
|
-
: { defenderFleetOwnership: defenderNpc.ownership }),
|
|
603
|
-
defenderRewardsConfig: defenderRewards.config,
|
|
604
|
-
...(defenderRewards.contribution === undefined
|
|
605
|
-
? {}
|
|
606
|
-
: { defenderRewardsContribution: defenderRewards.contribution }),
|
|
607
|
-
...(defenderRewards.epoch === undefined
|
|
608
|
-
? {}
|
|
609
|
-
: { defenderRewardsEpoch: defenderRewards.epoch }),
|
|
610
|
-
defenderRewardsRegistry: defenderRewards.registry,
|
|
611
|
-
defendingFleet: defender.address,
|
|
612
|
-
factionRelationTracker,
|
|
613
|
-
fleet: attacker.address,
|
|
614
|
-
game,
|
|
615
|
-
loot: options.loot,
|
|
616
|
-
recentSlothashes: 'SysvarS1otHashes111111111111111111111111111',
|
|
617
|
-
regionTracker,
|
|
618
|
-
stance: generatedStance(stance),
|
|
619
|
-
}),
|
|
667
|
+
instruction,
|
|
620
668
|
semantics: [{ kind: 'exclusive', scope: 'transaction' }],
|
|
621
669
|
signers: [options.authorization.authority, options.loot],
|
|
622
670
|
},
|
|
@@ -639,26 +687,20 @@ function systemFingerprint(system) {
|
|
|
639
687
|
version: system.version,
|
|
640
688
|
}, (_key, value) => typeof value === 'bigint' ? value.toString() : value);
|
|
641
689
|
}
|
|
642
|
-
function starbaseFactionId(owner) {
|
|
643
|
-
switch (owner) {
|
|
644
|
-
case 'mud':
|
|
645
|
-
return 1;
|
|
646
|
-
case 'oni':
|
|
647
|
-
return 2;
|
|
648
|
-
case 'ustur':
|
|
649
|
-
return 3;
|
|
650
|
-
case 'unaligned':
|
|
651
|
-
return null;
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
690
|
/** Plans one singleton Fleet-on-Starbase attack without predicting its outcome.
|
|
655
691
|
*
|
|
692
|
+
* At chain time the attacker must be Idle or subwarping (a finished warp
|
|
693
|
+
* counts as Idle), carry its required crew, and have finished reloading AP.
|
|
656
694
|
* The planner validates the owned attacking Fleet, canonical target System and
|
|
657
695
|
* nested shared Starbase, configured faction ownership mode, reward
|
|
658
696
|
* configuration, and the optional dynamic-NPC capture economy. Range,
|
|
659
697
|
* capture-cost debit outcome, randomness, damage, rewards, and final
|
|
660
698
|
* admissibility remain chain-authoritative.
|
|
661
699
|
*
|
|
700
|
+
* Requires Disabled rent: the Game's rent catalog and the target System's
|
|
701
|
+
* Starbase-level rent history must not exist, and both stay guarded absent until
|
|
702
|
+
* signing.
|
|
703
|
+
*
|
|
662
704
|
* @example
|
|
663
705
|
* ```ts
|
|
664
706
|
* declare const ctx: SageContext;
|
|
@@ -676,32 +718,7 @@ function starbaseFactionId(owner) {
|
|
|
676
718
|
* ```
|
|
677
719
|
*/
|
|
678
720
|
export async function planFleetAttackStarbase(ctx, attacker, target, inputStance, inputOptions) {
|
|
679
|
-
const options =
|
|
680
|
-
const stance = validateAttackStance(inputStance);
|
|
681
|
-
const game = requireGameAddress(ctx);
|
|
682
|
-
if (attacker.ownerProfile.address !== options.authorization.profile) {
|
|
683
|
-
fail(`Attacking Fleet ${attacker.address} does not belong to authorization Profile ${options.authorization.profile}. Choose an owned Fleet and retry.`, attacker.address);
|
|
684
|
-
}
|
|
685
|
-
if (options.loot === options.authorization.authority ||
|
|
686
|
-
options.loot === options.authorization.profile) {
|
|
687
|
-
fail(`The new Loot address ${options.loot} must be distinct from the authorization authority and Profile. Generate a separate Loot signer address and retry.`, options.loot);
|
|
688
|
-
}
|
|
689
|
-
if (attacker.game !== game) {
|
|
690
|
-
fail(`Attacking Fleet ${attacker.address} belongs to Game ${attacker.game}, not configured Game ${game}. Refresh the Fleet through this context and retry.`, attacker.address);
|
|
691
|
-
}
|
|
692
|
-
if (attacker.state.kind === 'destroyed') {
|
|
693
|
-
fail(`Attacking Fleet ${attacker.name} (${attacker.address}) is destroyed and cannot attack a Starbase. Refresh the Fleet after respawn and retry.`, attacker.address);
|
|
694
|
-
}
|
|
695
|
-
if (!Number.isSafeInteger(attacker.ap) ||
|
|
696
|
-
attacker.ap <= 0 ||
|
|
697
|
-
!Number.isSafeInteger(attacker.crewCount) ||
|
|
698
|
-
attacker.crewCount <= 0) {
|
|
699
|
-
fail(`Attacking Fleet ${attacker.name} (${attacker.address}) has no known positive AP or valid crew state. Wait for AP reload, refresh the Fleet, and retry.`, attacker.address);
|
|
700
|
-
}
|
|
701
|
-
if (attacker.ships.length === 0 ||
|
|
702
|
-
attacker.ships.some(({ quantity }) => quantity <= 0n)) {
|
|
703
|
-
fail(`Attacking Fleet ${attacker.name} (${attacker.address}) has no valid known ship composition. Refresh Fleet composition and retry.`, attacker.address);
|
|
704
|
-
}
|
|
721
|
+
const { game, options, stance } = validateAttack(ctx, attacker, inputStance, inputOptions);
|
|
705
722
|
if (target.game !== game) {
|
|
706
723
|
fail(`Target Star System ${target.address} belongs to Game ${target.game}, not configured Game ${game}. Refresh the target through this context and retry.`, target.address);
|
|
707
724
|
}
|
|
@@ -720,9 +737,10 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
720
737
|
deriveRegionTrackerAddress(game),
|
|
721
738
|
deriveFleetCrewBindingAddress(attacker.address),
|
|
722
739
|
]);
|
|
723
|
-
const [probeRelationsAccount, probeRegistryAccount] = await
|
|
724
|
-
relationTrackerAddress,
|
|
725
|
-
|
|
740
|
+
const [[probeRelationsAccount, probeRegistryAccount], attackerNpc, rent] = await Promise.all([
|
|
741
|
+
readContextRawAccounts(ctx, [relationTrackerAddress, registryAddress]),
|
|
742
|
+
resolveNpcAccounts(ctx, attacker, true),
|
|
743
|
+
requireDisabledLevelRent(ctx, game, target, 'the Starbase attack'),
|
|
726
744
|
]);
|
|
727
745
|
const probeRelations = factionRelationTrackerAccountDefinition.decode(requireAccount(probeRelationsAccount, relationTrackerAddress, `FactionRelationTracker ${relationTrackerAddress} is missing. Refresh faction relationships and retry.`));
|
|
728
746
|
const probeRegistry = atlasRewardRegistryAccountDefinition.decode(requireAccount(probeRegistryAccount, registryAddress, `AtlasRewardRegistry ${registryAddress} is missing. Refresh reward configuration and retry.`));
|
|
@@ -733,12 +751,6 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
733
751
|
fail(`AtlasRewardRegistry ${registryAddress} belongs to another Game. Refresh the configured reward registry and retry.`, registryAddress);
|
|
734
752
|
}
|
|
735
753
|
const rewardConfigAddress = await deriveAtlasRewardConfigAddress(game, probeRegistry.activeConfigVersion);
|
|
736
|
-
const attackerOwnership = attacker.npcFactionId === 0
|
|
737
|
-
? undefined
|
|
738
|
-
: await deriveFactionOwnershipAddress(game, 'fleet', attacker.address);
|
|
739
|
-
const attackerFaction = attacker.npcFactionId === 0
|
|
740
|
-
? undefined
|
|
741
|
-
: await deriveFactionAccountAddress(game, attacker.npcFactionId);
|
|
742
754
|
const requiresNpcEconomy = attacker.npcFactionId > 0 &&
|
|
743
755
|
probeRelations.dynamicCaptureEnabled &&
|
|
744
756
|
probeRelations.nemesisActive;
|
|
@@ -762,10 +774,9 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
762
774
|
character,
|
|
763
775
|
regionTracker,
|
|
764
776
|
crewBindingAddress,
|
|
765
|
-
...(attackerOwnership === undefined ? [] : [attackerOwnership]),
|
|
766
|
-
...(attackerFaction === undefined ? [] : [attackerFaction]),
|
|
767
777
|
...(factionEconomicsConfig === undefined ? [] : [factionEconomicsConfig]),
|
|
768
778
|
...(captorTreasury === undefined ? [] : [captorTreasury]),
|
|
779
|
+
CLOCK_ADDRESS,
|
|
769
780
|
];
|
|
770
781
|
const dependencyAccounts = await readContextRawAccounts(ctx, dependencyAddresses);
|
|
771
782
|
const current = new Map(dependencyAddresses.map((address, index) => [
|
|
@@ -776,6 +787,7 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
776
787
|
fail(`Loot account ${options.loot} already exists. Generate a new unused Loot signer address and retry.`, options.loot);
|
|
777
788
|
}
|
|
778
789
|
const attackerAccount = await validateCurrentAttackFleet(attacker, current.get(attacker.address));
|
|
790
|
+
validateAttackerReadiness(attacker, attackerAccount, current.get(CLOCK_ADDRESS));
|
|
779
791
|
const systemAccount = requireAccount(current.get(target.address), target.address, `Target Star System ${target.name} (${target.address}) is missing. Refresh world state and retry the attack.`);
|
|
780
792
|
const currentSystem = starSystemAccountDefinition.decode(systemAccount);
|
|
781
793
|
if ((await deriveStarSystemAddress(currentSystem.game, currentSystem.systemId)) !== target.address ||
|
|
@@ -799,7 +811,8 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
799
811
|
if (ownership === undefined && relations.dynamicCaptureEnabled) {
|
|
800
812
|
fail(`Target Starbase ${target.address} requires canonical FactionOwnership while dynamic capture is enabled. Refresh Starbase ownership and retry.`, ownershipAddress);
|
|
801
813
|
}
|
|
802
|
-
|
|
814
|
+
// KingSystemTracker records an unaligned owner as null.
|
|
815
|
+
const legacyOwner = factionValue(target.starbase.owner) || null;
|
|
803
816
|
if (ownership !== undefined &&
|
|
804
817
|
(ownership.game !== game ||
|
|
805
818
|
ownership.asset.kind !== 'starbase' ||
|
|
@@ -844,32 +857,10 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
844
857
|
const crewBinding = crewBindingAccount === undefined ? undefined : crewBindingAddress;
|
|
845
858
|
if (crewBindingAccount !== undefined) {
|
|
846
859
|
const data = fleetCrewBindingAccountDefinition.decode(crewBindingAccount);
|
|
847
|
-
if (data.
|
|
848
|
-
data.ownerProfile !== attacker.ownerProfile.address) {
|
|
860
|
+
if (!matchesFleetCrewBindingIdentity(data, attacker.address, attacker.ownerProfile.address)) {
|
|
849
861
|
fail(`FleetCrewBinding ${crewBindingAddress} does not belong to Fleet ${attacker.address} and Profile ${attacker.ownerProfile.address}. Refresh the Fleet crew relationship and retry.`, crewBindingAddress);
|
|
850
862
|
}
|
|
851
863
|
}
|
|
852
|
-
const attackerNpc = {};
|
|
853
|
-
let attackerOwnershipAccount;
|
|
854
|
-
let attackerFactionAccount;
|
|
855
|
-
if (attackerOwnership !== undefined && attackerFaction !== undefined) {
|
|
856
|
-
attackerOwnershipAccount = requireAccount(current.get(attackerOwnership), attackerOwnership, `NPC Fleet ${attacker.address} has no canonical FactionOwnership. Refresh the Fleet faction relationship and retry.`);
|
|
857
|
-
const npcOwnership = factionOwnershipAccountDefinition.decode(attackerOwnershipAccount);
|
|
858
|
-
if (npcOwnership.game !== game ||
|
|
859
|
-
npcOwnership.asset.kind !== 'fleet' ||
|
|
860
|
-
npcOwnership.asset.fleet !== attacker.address ||
|
|
861
|
-
npcOwnership.controllingFactionId !== attacker.npcFactionId) {
|
|
862
|
-
fail(`NPC Fleet ${attacker.address} has no matching canonical FactionOwnership for faction ${String(attacker.npcFactionId)}. Refresh the Fleet and faction ownership relationship before retrying.`, attackerOwnership);
|
|
863
|
-
}
|
|
864
|
-
attackerFactionAccount = requireAccount(current.get(attackerFaction), attackerFaction, `Faction ${attackerFaction} is missing for NPC Fleet ${attacker.address}. Refresh the faction registry relationship and retry.`);
|
|
865
|
-
const npcFaction = factionAccountDefinition.decode(attackerFactionAccount);
|
|
866
|
-
if (npcFaction.game !== game ||
|
|
867
|
-
npcFaction.factionId !== attacker.npcFactionId) {
|
|
868
|
-
fail(`Faction ${attackerFaction} does not match NPC Fleet ${attacker.address}'s Game and faction id. Refresh the faction registry relationship before retrying.`, attackerFaction);
|
|
869
|
-
}
|
|
870
|
-
attackerNpc.ownership = attackerOwnership;
|
|
871
|
-
attackerNpc.factionAccount = attackerFaction;
|
|
872
|
-
}
|
|
873
864
|
let economicsAccount;
|
|
874
865
|
let treasuryAccount;
|
|
875
866
|
if (factionEconomicsConfig !== undefined && captorTreasury !== undefined) {
|
|
@@ -928,21 +919,13 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
928
919
|
'The optional Fleet crew binding remains unchanged.',
|
|
929
920
|
],
|
|
930
921
|
]),
|
|
931
|
-
...(
|
|
922
|
+
...(attackerNpc.ownership === undefined
|
|
932
923
|
? []
|
|
933
|
-
: [
|
|
934
|
-
|
|
935
|
-
attackerOwnershipAccount,
|
|
936
|
-
'NPC Fleet ownership remains unchanged.',
|
|
937
|
-
],
|
|
938
|
-
]),
|
|
939
|
-
...(attackerFactionAccount === undefined
|
|
924
|
+
: [[attackerNpc.ownership, 'NPC Fleet ownership remains unchanged.']]),
|
|
925
|
+
...(attackerNpc.faction === undefined
|
|
940
926
|
? []
|
|
941
927
|
: [
|
|
942
|
-
[
|
|
943
|
-
attackerFactionAccount,
|
|
944
|
-
'The NPC faction account remains unchanged.',
|
|
945
|
-
],
|
|
928
|
+
[attackerNpc.faction, 'The NPC faction account remains unchanged.'],
|
|
946
929
|
]),
|
|
947
930
|
...(economicsAccount === undefined
|
|
948
931
|
? []
|
|
@@ -960,29 +943,42 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
960
943
|
'The dynamic-capture treasury remains unchanged.',
|
|
961
944
|
],
|
|
962
945
|
]),
|
|
963
|
-
].map(([account, describes]) =>
|
|
946
|
+
].map(([account, describes]) => accountStatePrecondition(account, describes)));
|
|
964
947
|
const absencePreconditions = [
|
|
965
|
-
|
|
948
|
+
accountAbsentPrecondition(options.loot, `Loot account ${options.loot} remains absent until execution.`),
|
|
966
949
|
...(crewBindingAccount === undefined
|
|
967
950
|
? [
|
|
968
|
-
|
|
951
|
+
accountAbsentPrecondition(crewBindingAddress, 'Optional Fleet crew binding remains absent.'),
|
|
969
952
|
]
|
|
970
953
|
: []),
|
|
971
954
|
];
|
|
955
|
+
const runtime = await resolveActionRuntime(ctx, {
|
|
956
|
+
mode: 'starbase-attack',
|
|
957
|
+
game,
|
|
958
|
+
system: target.address,
|
|
959
|
+
starbaseSeqId: starSystemAccountDefinition.decode(systemAccount).sequenceId,
|
|
960
|
+
character,
|
|
961
|
+
});
|
|
972
962
|
const description = `Attack with Fleet ${attacker.name} (${attacker.address}) against the shared Starbase at ${target.name} (${target.address}) using ${stance.ammoUsage} ammunition; range, capture-cost debit outcome, randomness, rewards, Loot, damage, and final admissibility remain chain-authoritative.`;
|
|
973
|
-
return
|
|
963
|
+
return buildPlannerPlan({
|
|
974
964
|
kind: 'combat.attack-starbase',
|
|
975
|
-
preconditions: [
|
|
965
|
+
preconditions: [
|
|
966
|
+
...statePreconditions,
|
|
967
|
+
...absencePreconditions,
|
|
968
|
+
...rent.guards,
|
|
969
|
+
...runtime.guards,
|
|
970
|
+
],
|
|
976
971
|
steps: [
|
|
977
972
|
{
|
|
978
|
-
describes: description
|
|
973
|
+
describes: `${description} ${runtime.description}`,
|
|
979
974
|
instruction: adaptAttackStarbaseInstruction({
|
|
980
|
-
...
|
|
975
|
+
...runtime.accounts,
|
|
976
|
+
...(attackerNpc.faction === undefined
|
|
981
977
|
? {}
|
|
982
|
-
: { attackerFactionAccount: attackerNpc.
|
|
978
|
+
: { attackerFactionAccount: attackerNpc.faction.address }),
|
|
983
979
|
...(attackerNpc.ownership === undefined
|
|
984
980
|
? {}
|
|
985
|
-
: { attackerFleetOwnership: attackerNpc.ownership }),
|
|
981
|
+
: { attackerFleetOwnership: attackerNpc.ownership.address }),
|
|
986
982
|
authorization: options.authorization,
|
|
987
983
|
...(captorTreasury === undefined ? {} : { captorTreasury }),
|
|
988
984
|
character,
|
|
@@ -1000,6 +996,7 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
1000
996
|
loot: options.loot,
|
|
1001
997
|
recentSlothashes: 'SysvarS1otHashes111111111111111111111111111',
|
|
1002
998
|
regionTracker,
|
|
999
|
+
...rent.accounts,
|
|
1003
1000
|
rewardConfig: rewardConfigAddress,
|
|
1004
1001
|
rewardRegistry: registryAddress,
|
|
1005
1002
|
stance: generatedStance(stance),
|
|
@@ -1009,7 +1006,7 @@ export async function planFleetAttackStarbase(ctx, attacker, target, inputStance
|
|
|
1009
1006
|
signers: [options.authorization.authority, options.loot],
|
|
1010
1007
|
},
|
|
1011
1008
|
],
|
|
1012
|
-
summary: description
|
|
1009
|
+
summary: `${description} ${runtime.description}`,
|
|
1013
1010
|
});
|
|
1014
1011
|
}
|
|
1015
1012
|
function lootSnapshotFingerprint(loot) {
|
|
@@ -1021,11 +1018,11 @@ function lootSnapshotFingerprint(loot) {
|
|
|
1021
1018
|
loot.coordinates.x,
|
|
1022
1019
|
loot.coordinates.y,
|
|
1023
1020
|
...loot.items.map((item) => [
|
|
1024
|
-
item.destroyer
|
|
1021
|
+
item.destroyer?.address ?? '',
|
|
1025
1022
|
item.exclusivityUnlockAtUnixSeconds,
|
|
1026
1023
|
item.rewardReclaimAtUnixSeconds,
|
|
1027
1024
|
item.inventory.sequenceId,
|
|
1028
|
-
item.inventory.
|
|
1025
|
+
item.inventory.usedStorageUnitsRaw,
|
|
1029
1026
|
...item.inventory.items
|
|
1030
1027
|
.map(({ cargo, quantityRaw }) => `${String(cargo.id)}:${String(quantityRaw)}`)
|
|
1031
1028
|
.sort(),
|
|
@@ -1041,11 +1038,11 @@ function rawLootFingerprint(address, loot) {
|
|
|
1041
1038
|
loot.coordinates.x,
|
|
1042
1039
|
loot.coordinates.y,
|
|
1043
1040
|
...loot.items.map((item) => [
|
|
1044
|
-
item.destroyer,
|
|
1041
|
+
item.destroyer ?? '',
|
|
1045
1042
|
item.exclusivityUnlockAtUnixSeconds,
|
|
1046
1043
|
item.rewardReclaimAtUnixSeconds,
|
|
1047
1044
|
item.inventory.sequenceId,
|
|
1048
|
-
item.inventory.
|
|
1045
|
+
item.inventory.usedStorageUnitsRaw,
|
|
1049
1046
|
...item.inventory.amounts
|
|
1050
1047
|
.map(({ amount, cargoId }) => `${String(cargoId)}:${String(amount)}`)
|
|
1051
1048
|
.sort(),
|
|
@@ -1054,10 +1051,12 @@ function rawLootFingerprint(address, loot) {
|
|
|
1054
1051
|
}
|
|
1055
1052
|
/** Plans one transaction-exclusive retrieval from a loaded Loot snapshot.
|
|
1056
1053
|
*
|
|
1057
|
-
* The planner validates the owned idle Fleet,
|
|
1058
|
-
*
|
|
1059
|
-
*
|
|
1060
|
-
*
|
|
1054
|
+
* The planner validates the owned idle Fleet, its normalized crew and usable
|
|
1055
|
+
* ability power at `atUnixSeconds`, Loot identity, destroyer exclusivity and
|
|
1056
|
+
* reward locks against the authorization Profile, and every requested known
|
|
1057
|
+
* quantity. Retrieval spends the Fleet's whole ability power pool. Range,
|
|
1058
|
+
* recent-slot inputs, destination capacity, intervening races, and final
|
|
1059
|
+
* acquired quantities remain chain-authoritative.
|
|
1061
1060
|
*
|
|
1062
1061
|
* @example
|
|
1063
1062
|
* ```ts
|
|
@@ -1105,6 +1104,13 @@ export async function planFleetRetrieveLoot(ctx, fleet, loot, inputWant, inputOp
|
|
|
1105
1104
|
currentFleet.crewCount !== fleet.crewCount) {
|
|
1106
1105
|
fail(`Fleet ${fleet.name} (${fleet.address}) changed or no longer matches its canonical Game, owner, label, idle state, or crew. Refresh the Fleet and retry.`, fleet.address);
|
|
1107
1106
|
}
|
|
1107
|
+
if (currentFleet.crewCount < currentFleet.stats.misc.requiredCrew) {
|
|
1108
|
+
fail(`Fleet ${fleet.name} (${fleet.address}) has ${String(currentFleet.crewCount)} crew but needs ${String(currentFleet.stats.misc.requiredCrew)} to retrieve Loot. Load crew, refresh the Fleet, and retry.`, fleet.address);
|
|
1109
|
+
}
|
|
1110
|
+
if (currentFleet.ap <= 0 ||
|
|
1111
|
+
options.atUnixSeconds < currentFleet.apReloadExpiresAt) {
|
|
1112
|
+
fail(`Fleet ${fleet.name} (${fleet.address}) has no usable ability power at ${String(options.atUnixSeconds)} Unix seconds: stored AP ${String(currentFleet.ap)} with reload completing at ${String(currentFleet.apReloadExpiresAt)}. Retrieving Loot spends the whole AP pool; wait for the reload, refresh the Fleet, and retry.`, fleet.address);
|
|
1113
|
+
}
|
|
1108
1114
|
const lootAccount = requireAccount(lootAccountValue, loot.address, `Loot ${loot.address} is no longer available. Refresh Loot discovery and choose an available account before retrying.`);
|
|
1109
1115
|
const currentLoot = lootAccountDefinition.decode(lootAccount);
|
|
1110
1116
|
if (rawLootFingerprint(lootAccount.address, currentLoot) !==
|
|
@@ -1114,12 +1120,12 @@ export async function planFleetRetrieveLoot(ctx, fleet, loot, inputWant, inputOp
|
|
|
1114
1120
|
const lootCreator = loot.profile.address === options.authorization.profile
|
|
1115
1121
|
? undefined
|
|
1116
1122
|
: loot.profile.address;
|
|
1117
|
-
const description = `Request ${selection.summary} from Loot ${loot.address} with Fleet ${fleet.name} (${fleet.address});
|
|
1118
|
-
return
|
|
1123
|
+
const description = `Request ${selection.summary} from Loot ${loot.address} with Fleet ${fleet.name} (${fleet.address}); this spends the Fleet's whole ability power pool. Range, recent-slot randomness, cargo capacity, availability races, and final transfer quantities remain chain-authoritative.`;
|
|
1124
|
+
return buildPlannerPlan({
|
|
1119
1125
|
kind: 'combat.retrieve-loot',
|
|
1120
1126
|
preconditions: [
|
|
1121
|
-
await
|
|
1122
|
-
await
|
|
1127
|
+
await accountStatePrecondition(fleetAccount, `Fleet ${fleet.name} retains its configured Game, owning Profile, idle state, and normalized crew.`),
|
|
1128
|
+
await accountStatePrecondition(lootAccount, `Loot ${loot.address} retains its identity, creator, destroyer exclusivity, and requested known quantities.`),
|
|
1123
1129
|
],
|
|
1124
1130
|
steps: [
|
|
1125
1131
|
{
|