@aephia/atlas-kit 0.6.0-next.16 → 0.6.0-next.161
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 +2 -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 +98 -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 +93 -14
- package/dist/claim-stakes/actions/index.d.ts.map +1 -1
- package/dist/claim-stakes/actions/index.js +713 -742
- 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/deployments.d.ts +17 -0
- package/dist/client/deployments.d.ts.map +1 -1
- package/dist/client/deployments.js +17 -0
- package/dist/client/deployments.js.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 +56 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +56 -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 +30 -12
- package/dist/combat/actions/index.d.ts.map +1 -1
- package/dist/combat/actions/index.js +360 -302
- 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/fee-rate.d.ts +47 -0
- package/dist/crafting/actions/fee-rate.d.ts.map +1 -0
- package/dist/crafting/actions/fee-rate.js +58 -0
- package/dist/crafting/actions/fee-rate.js.map +1 -0
- package/dist/crafting/actions/index.d.ts +29 -18
- package/dist/crafting/actions/index.d.ts.map +1 -1
- package/dist/crafting/actions/index.js +298 -352
- package/dist/crafting/actions/index.js.map +1 -1
- package/dist/crafting/estimate.d.ts +101 -0
- package/dist/crafting/estimate.d.ts.map +1 -0
- package/dist/crafting/estimate.js +108 -0
- package/dist/crafting/estimate.js.map +1 -0
- package/dist/crafting/index.d.ts +34 -3
- package/dist/crafting/index.d.ts.map +1 -1
- package/dist/crafting/index.js +50 -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 +19 -2
- package/dist/factions/index.d.ts.map +1 -1
- package/dist/factions/index.js +38 -26
- 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 +48 -0
- package/dist/fleets/actions/add-ship.d.ts.map +1 -0
- package/dist/fleets/actions/add-ship.js +136 -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/disband.d.ts +42 -0
- package/dist/fleets/actions/disband.d.ts.map +1 -0
- package/dist/fleets/actions/disband.js +107 -0
- package/dist/fleets/actions/disband.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 +89 -25
- package/dist/fleets/actions/index.d.ts.map +1 -1
- package/dist/fleets/actions/index.js +491 -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/actions/sync.d.ts +24 -0
- package/dist/fleets/actions/sync.d.ts.map +1 -0
- package/dist/fleets/actions/sync.js +55 -0
- package/dist/fleets/actions/sync.js.map +1 -0
- package/dist/fleets/composition-stats.d.ts +101 -0
- package/dist/fleets/composition-stats.d.ts.map +1 -0
- package/dist/fleets/composition-stats.js +354 -0
- package/dist/fleets/composition-stats.js.map +1 -0
- 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 +36 -0
- package/dist/fleets/index.d.ts.map +1 -1
- package/dist/fleets/index.js +55 -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-storage.d.ts +45 -0
- package/dist/internal/c4/claim-stake-storage.d.ts.map +1 -0
- package/dist/internal/c4/claim-stake-storage.js +207 -0
- package/dist/internal/c4/claim-stake-storage.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-storage.d.ts +20 -0
- package/dist/internal/c4/combat-storage.d.ts.map +1 -0
- package/dist/internal/c4/combat-storage.js +43 -0
- package/dist/internal/c4/combat-storage.js.map +1 -0
- 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 +33 -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 +92 -0
- package/dist/internal/c4/discriminators.d.ts.map +1 -0
- package/dist/internal/c4/discriminators.js +188 -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 +40 -60
- package/dist/internal/c4/factions.d.ts.map +1 -1
- package/dist/internal/c4/factions.js +106 -225
- 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-disband-layout.d.ts +7 -0
- package/dist/internal/c4/fleet-disband-layout.d.ts.map +1 -0
- package/dist/internal/c4/fleet-disband-layout.js +7 -0
- package/dist/internal/c4/fleet-disband-layout.js.map +1 -0
- package/dist/internal/c4/fleet-disband.d.ts +27 -0
- package/dist/internal/c4/fleet-disband.d.ts.map +1 -0
- package/dist/internal/c4/fleet-disband.js +63 -0
- package/dist/internal/c4/fleet-disband.js.map +1 -0
- package/dist/internal/c4/fleet-points.d.ts +3 -0
- package/dist/internal/c4/fleet-points.d.ts.map +1 -0
- package/dist/internal/c4/fleet-points.js +8 -0
- package/dist/internal/c4/fleet-points.js.map +1 -0
- 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 +26 -0
- package/dist/internal/c4/fleet-ship-assembly.d.ts.map +1 -0
- package/dist/internal/c4/fleet-ship-assembly.js +96 -0
- package/dist/internal/c4/fleet-ship-assembly.js.map +1 -0
- package/dist/internal/c4/fleet-storage.d.ts +44 -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-sync.d.ts +5 -0
- package/dist/internal/c4/fleet-sync.d.ts.map +1 -0
- package/dist/internal/c4/fleet-sync.js +15 -0
- package/dist/internal/c4/fleet-sync.js.map +1 -0
- package/dist/internal/c4/fleet.d.ts +65 -24
- package/dist/internal/c4/fleet.d.ts.map +1 -1
- package/dist/internal/c4/fleet.js +50 -91
- 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 +122 -32
- package/dist/internal/c4/game.d.ts.map +1 -1
- package/dist/internal/c4/game.js +229 -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 +5 -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 +49 -1
- package/dist/internal/c4/pda.d.ts.map +1 -1
- package/dist/internal/c4/pda.js +122 -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 +17 -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 +324 -0
- package/dist/internal/c4/scan-lifecycle.d.ts.map +1 -0
- package/dist/internal/c4/scan-lifecycle.js +249 -0
- package/dist/internal/c4/scan-lifecycle.js.map +1 -0
- package/dist/internal/c4/scan-storage.d.ts +7 -0
- package/dist/internal/c4/scan-storage.d.ts.map +1 -0
- package/dist/internal/c4/scan-storage.js +10 -0
- package/dist/internal/c4/scan-storage.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 +26 -0
- package/dist/internal/c4/stimulant.d.ts.map +1 -0
- package/dist/internal/c4/stimulant.js +36 -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 +40 -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 +3 -2
- package/dist/internal/fleet.d.ts.map +1 -1
- package/dist/internal/fleet.js +3 -5
- 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 +53 -39
- package/dist/internal/planning/authorization-adapter.d.ts.map +1 -1
- package/dist/internal/planning/authorization-adapter.js +204 -83
- 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-access.d.ts +28 -0
- package/dist/internal/planning/character-access.d.ts.map +1 -0
- package/dist/internal/planning/character-access.js +41 -0
- package/dist/internal/planning/character-access.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/claim-stake-storage-actions.d.ts +12 -0
- package/dist/internal/planning/claim-stake-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/claim-stake-storage-actions.js +63 -0
- package/dist/internal/planning/claim-stake-storage-actions.js.map +1 -0
- package/dist/internal/planning/combat-storage-actions.d.ts +9 -0
- package/dist/internal/planning/combat-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/combat-storage-actions.js +55 -0
- package/dist/internal/planning/combat-storage-actions.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 +6 -0
- package/dist/internal/planning/currency-cache-guard.d.ts.map +1 -0
- package/dist/internal/planning/currency-cache-guard.js +77 -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/disband-storage-actions.d.ts +9 -0
- package/dist/internal/planning/disband-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/disband-storage-actions.js +24 -0
- package/dist/internal/planning/disband-storage-actions.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-disband-guard.d.ts +12 -0
- package/dist/internal/planning/fleet-disband-guard.d.ts.map +1 -0
- package/dist/internal/planning/fleet-disband-guard.js +54 -0
- package/dist/internal/planning/fleet-disband-guard.js.map +1 -0
- package/dist/internal/planning/fleet-disband.d.ts +36 -0
- package/dist/internal/planning/fleet-disband.d.ts.map +1 -0
- package/dist/internal/planning/fleet-disband.js +82 -0
- package/dist/internal/planning/fleet-disband.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 +216 -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-rental.d.ts +5 -0
- package/dist/internal/planning/fleet-rental.d.ts.map +1 -0
- package/dist/internal/planning/fleet-rental.js +9 -0
- package/dist/internal/planning/fleet-rental.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 +38 -0
- package/dist/internal/planning/fleet-ship-assembly.d.ts.map +1 -0
- package/dist/internal/planning/fleet-ship-assembly.js +167 -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-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 +184 -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 +29 -0
- package/dist/internal/planning/profile-storage-funding-guard.d.ts.map +1 -0
- package/dist/internal/planning/profile-storage-funding-guard.js +115 -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/region-access.d.ts +30 -0
- package/dist/internal/planning/region-access.d.ts.map +1 -0
- package/dist/internal/planning/region-access.js +94 -0
- package/dist/internal/planning/region-access.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/scan-storage-actions.d.ts +9 -0
- package/dist/internal/planning/scan-storage-actions.d.ts.map +1 -0
- package/dist/internal/planning/scan-storage-actions.js +27 -0
- package/dist/internal/planning/scan-storage-actions.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 +58 -0
- package/dist/internal/planning/storage-action-readers.js.map +1 -0
- package/dist/internal/planning/storage-actions.d.ts +89 -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 +19 -15
- package/dist/mining/actions/index.d.ts.map +1 -1
- package/dist/mining/actions/index.js +147 -69
- package/dist/mining/actions/index.js.map +1 -1
- package/dist/mining/estimate-input.d.ts +103 -0
- package/dist/mining/estimate-input.d.ts.map +1 -0
- package/dist/mining/estimate-input.js +86 -0
- package/dist/mining/estimate-input.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 +10 -2
- package/dist/mining/index.d.ts.map +1 -1
- package/dist/mining/index.js +11 -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 +623 -72
- package/dist/planning/execution.js.map +1 -1
- package/dist/planning/index.d.ts +252 -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 +143 -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 +35 -4
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +226 -227
- 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 +215 -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 +126 -0
- package/dist/scanning/signals.d.ts.map +1 -0
- package/dist/scanning/signals.js +173 -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 +6 -2
|
@@ -1,13 +1,48 @@
|
|
|
1
|
+
import { validateCurrencyCache } from '../internal/c4/currency-cache.js';
|
|
2
|
+
import { revalidateDockFunding } from '../internal/planning/fleet-dock-funding.js';
|
|
3
|
+
import { decodeDockingSequences } from '../registry/docking.js';
|
|
4
|
+
import { revalidateMarketOrder, marketOrderFundingAddresses, } from '../internal/planning/local-market-order-funding.js';
|
|
5
|
+
import { resolveFleetCrewTransfer } from '../internal/planning/fleet-crew-transfer.js';
|
|
6
|
+
import { revalidateScanCompletion } from '../internal/planning/scan-completion.js';
|
|
7
|
+
import { openSignalAddresses, validateOpenSignal, } from '../internal/planning/open-signal.js';
|
|
8
|
+
import { revalidateDetect } from '../internal/planning/scan-detect.js';
|
|
9
|
+
import { resolveFleetRespawn } from '../internal/planning/fleet-respawn.js';
|
|
10
|
+
import { validateFleetAttackActors } from '../internal/planning/fleet-attack-xp.js';
|
|
11
|
+
import { RENT_ADDRESS, readRent } from '../internal/planning/rent.js';
|
|
12
|
+
import { getBase64Decoder, } from '@solana/kit';
|
|
13
|
+
import { hashCharacterAccess } from '../internal/planning/character-access.js';
|
|
14
|
+
import { validateFleetDockingPolicy } from '../internal/planning/fleet-docking.js';
|
|
15
|
+
import { validateStarbaseSystem } from '../internal/planning/starbase-system.js';
|
|
16
|
+
import { fleetActionCoordinate, hashRegionAccess, hashRegionPath, } from '../internal/planning/region-access.js';
|
|
17
|
+
import { revalidateCharacterRegistration, isEmptySystemAccount, } from '../internal/planning/character-registration.js';
|
|
18
|
+
import { validateFleetArrivalIntent } from '../internal/planning/fleet-arrival.js';
|
|
19
|
+
import { isRuntimeGuard, revalidateRuntimeGuards, } from '../internal/planning/runtime-guards.js';
|
|
20
|
+
import { isFactionTradeGuard } from '../internal/planning/faction-trade-guards.js';
|
|
21
|
+
import { resolveShipImportFunding, validateShipImportFunding, } from '../internal/planning/ship-import-funding.js';
|
|
22
|
+
import { matchesFleetMiningState } from '../internal/planning/mining-stop.js';
|
|
23
|
+
import { requireGameAddress } from '../internal/game-context.js';
|
|
24
|
+
import { matchesFactionTradeState } from '../internal/planning/faction-trade-state.js';
|
|
25
|
+
import { resolveFleetShipAssembly, validateFleetShipAssembly, } from '../internal/planning/fleet-ship-assembly.js';
|
|
26
|
+
import { resolveFleetCreation, validateFleetCreation, } from '../internal/planning/fleet-creation.js';
|
|
1
27
|
import { validateTokenMint } from '../internal/planning/token-mint.js';
|
|
2
|
-
import {
|
|
28
|
+
import { resolveResearchUnlock, validateResearchUnlock, } from '../internal/planning/research-unlock.js';
|
|
29
|
+
import { storageSteps, validateStorageFunding, } from '../internal/planning/storage-actions.js';
|
|
30
|
+
import { readStorageAction, storageActionAccounts, } from '../internal/planning/storage-action-readers.js';
|
|
31
|
+
import { decodeGameCargoConfigurationRows } from '../internal/c4/game.js';
|
|
32
|
+
import { CLOCK_ADDRESS } from '../internal/planning/faction-enrollment.js';
|
|
33
|
+
import { decodeGameResearchUnlockRules } from '../internal/c4/game.js';
|
|
34
|
+
import { hashGameShipConfigurations, decodeGameShipAssemblyCatalog, } from '../registry/ships.js';
|
|
3
35
|
import { validateGameForCharacterRegistration } from '../registry/onboarding.js';
|
|
4
36
|
import { hashAccountState } from '../internal/planning/account-state.js';
|
|
5
|
-
import {
|
|
37
|
+
import { hashGameCargoConfigurationGuards } from '../registry/cargo.js';
|
|
6
38
|
import { validateWalletCargoCache } from '../internal/c4/wallet-cargo-cache.js';
|
|
7
|
-
import {
|
|
39
|
+
import { deriveCargoDefinitionsCacheAddress } from '../internal/c4/pda.js';
|
|
40
|
+
import { getBase58Decoder, getBase64EncodedWireTransaction, getSignatureFromTransaction, isAddress, isTransactionModifyingSigner, isTransactionPartialSigner, isTransactionSendingSigner, signAndSendTransactionWithSigners, signTransactionWithSigners, } from '@solana/kit';
|
|
8
41
|
import { InvalidActionInputError, SageSdkError } from '../client/errors.js';
|
|
9
42
|
import { invalidateContextAddresses, readContextRawAccounts, } from '../client/reconciliation.js';
|
|
10
|
-
import {
|
|
43
|
+
import { assembleValidatedPlanWithContext, requireWriteRpc, validateAssemblyPolicy, validatePlanAssemblyPolicy, validatePlan, } from './assembly.js';
|
|
44
|
+
import { hashRecipeConfiguration, validateRecipeUsage, } from '../internal/planning/recipe-state.js';
|
|
45
|
+
import { originalTokenBalance } from '../internal/planning/original-token.js';
|
|
11
46
|
const DEFAULT_TIMEOUT_MS = 60_000;
|
|
12
47
|
const DEFAULT_POLL_INTERVAL_MS = 500;
|
|
13
48
|
const MAX_HOST_TIMER_MS = 2_147_483_647;
|
|
@@ -29,20 +64,26 @@ class SignerMismatchError extends InvalidActionInputError {
|
|
|
29
64
|
this.unexpected = unexpected;
|
|
30
65
|
}
|
|
31
66
|
}
|
|
32
|
-
class
|
|
33
|
-
constructor() {
|
|
34
|
-
super('MISSING_WRITE_TRANSPORT', 'This SAGE context has no writeRpc transport, so it cannot execute a Plan. Pass the optional writeRpc transport when creating the context, then retry.');
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
class ActionPreconditionFailedError extends SageSdkError {
|
|
67
|
+
export class ActionPreconditionFailedError extends SageSdkError {
|
|
38
68
|
describes;
|
|
39
69
|
observedSlot;
|
|
40
|
-
constructor(precondition, observedSlot) {
|
|
41
|
-
super('ACTION_PRECONDITION_FAILED', `The account state required by this Plan changed at ${
|
|
70
|
+
constructor(precondition, observedSlot, cause, address = precondition.address) {
|
|
71
|
+
super('ACTION_PRECONDITION_FAILED', `The account state required by this Plan changed at ${address}: ${cause ?? precondition.describes} Refresh the affected game state and create a new Plan before retrying.`, { address });
|
|
42
72
|
this.describes = precondition.describes;
|
|
43
73
|
this.observedSlot = observedSlot;
|
|
44
74
|
}
|
|
45
75
|
}
|
|
76
|
+
/** The cause a wrapped guard failure may carry: only a validator's own
|
|
77
|
+
* precondition cause and remedy for the guarded address. Adapter, provider and
|
|
78
|
+
* unknown failures yield `undefined`, so the wrapper falls back to the guard's
|
|
79
|
+
* generic description and never concatenates inner exception text. */
|
|
80
|
+
function guardCause(precondition, error) {
|
|
81
|
+
return error instanceof SageSdkError &&
|
|
82
|
+
error.code === 'ACTION_PRECONDITION_FAILED' &&
|
|
83
|
+
(error.address === undefined || error.address === precondition.address)
|
|
84
|
+
? error.message
|
|
85
|
+
: undefined;
|
|
86
|
+
}
|
|
46
87
|
class TransactionExpiredError extends SageSdkError {
|
|
47
88
|
signature;
|
|
48
89
|
lastValidBlockHeight;
|
|
@@ -268,41 +309,262 @@ function assertPlanTransactionMessage(expected, actual) {
|
|
|
268
309
|
invalid('signers', 'modified compiled transaction message', 'signers that preserve the assembled fee payer, instructions, programs, and account roles while optionally replacing only the transaction lifetime', 'Use a signer that signs the assembled Plan without changing its message, or reassemble a new Plan for the intended transaction before retrying.');
|
|
269
310
|
}
|
|
270
311
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
return null;
|
|
274
|
-
const value = transaction.lifetimeConstraint.lastValidBlockHeight;
|
|
275
|
-
if (typeof value !== 'bigint' || value < 0n || value > MAX_U64) {
|
|
276
|
-
invalid('signers', 'invalid final lastValidBlockHeight metadata', 'a final transaction lifetime with lastValidBlockHeight encoded as an unsigned 64-bit bigint', 'Use a signer that returns trustworthy blockhash lifetime metadata, or use an opaque sending signer whose lifetime cannot produce a definite-expiry claim.');
|
|
277
|
-
}
|
|
278
|
-
return value;
|
|
279
|
-
}
|
|
280
|
-
// Original Token Account layout: mint/authority at 0/32, initialized state at
|
|
281
|
-
// 108, and u32 COption tags at 72/109/129. No capability decoder is imported.
|
|
312
|
+
/** Whether the account still is the guarded original Token account, with at
|
|
313
|
+
* least the guarded balance for a `token-account` guard. */
|
|
282
314
|
function matchesTokenAccount(account, expected) {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
315
|
+
const balance = originalTokenBalance(account, expected.mint, expected.owner);
|
|
316
|
+
return (typeof balance === 'bigint' &&
|
|
317
|
+
(expected.kind !== 'token-account' || balance >= expected.minimumBalance));
|
|
318
|
+
}
|
|
319
|
+
function checkRegistrationFunding(registrations, fee) {
|
|
320
|
+
const balances = new Map();
|
|
321
|
+
for (const registration of registrations) {
|
|
322
|
+
const previous = balances.get(registration.funder);
|
|
323
|
+
if (previous === undefined || registration.observedLamports < previous)
|
|
324
|
+
balances.set(registration.funder, registration.observedLamports);
|
|
325
|
+
}
|
|
326
|
+
if (fee && balances.has(fee.payer))
|
|
327
|
+
balances.set(fee.payer, balances.get(fee.payer) - fee.lamports);
|
|
328
|
+
for (const registration of registrations) {
|
|
329
|
+
const balance = balances.get(registration.funder);
|
|
330
|
+
if (balance < registration.requiredLamports)
|
|
331
|
+
throw new SageSdkError('ACTION_PRECONDITION_FAILED', 'Character registration funding cannot cover the ordered upfront storage and applicable transaction fee. Fund the wallet separately and recreate the Plan; a later Character refund cannot fund an earlier allocation.', { address: registration.funder });
|
|
332
|
+
balances.set(registration.funder, balance - registration.netDebit);
|
|
333
|
+
}
|
|
334
|
+
if (fee)
|
|
335
|
+
for (const registration of registrations) {
|
|
336
|
+
const balance = balances.get(registration.funder);
|
|
337
|
+
if (balance !== 0n && balance < registration.minimumBalance)
|
|
338
|
+
throw new SageSdkError('ACTION_PRECONDITION_FAILED', 'Character registration leaves the funder below its empty-System-account rent minimum. Leave zero or a rent-exempt balance after storage and fees, then recreate the Plan.', { address: registration.funder });
|
|
339
|
+
}
|
|
296
340
|
}
|
|
297
|
-
async function checkPreconditions(context,
|
|
298
|
-
const
|
|
341
|
+
async function checkPreconditions(context, allPreconditions, steps, commitment) {
|
|
342
|
+
for (const guard of allPreconditions) {
|
|
343
|
+
if (guard.kind === 'fleet-crew-transfer') {
|
|
344
|
+
try {
|
|
345
|
+
await resolveFleetCrewTransfer(context, guard, guard, commitment);
|
|
346
|
+
}
|
|
347
|
+
catch (error) {
|
|
348
|
+
throw new ActionPreconditionFailedError(guard, undefined, error instanceof SageSdkError
|
|
349
|
+
? error.message
|
|
350
|
+
: 'Crew transfer prerequisites could not be verified. Refresh crew state and recreate the Plan.');
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
if (guard.kind === 'scan-completion')
|
|
354
|
+
await revalidateScanCompletion(context, guard, commitment);
|
|
355
|
+
if (guard.kind === 'scan-detect')
|
|
356
|
+
await revalidateDetect(context, guard, commitment);
|
|
357
|
+
if (guard.kind === 'fleet-attack') {
|
|
358
|
+
try {
|
|
359
|
+
await validateFleetAttackActors(context, guard);
|
|
360
|
+
}
|
|
361
|
+
catch (error) {
|
|
362
|
+
throw new ActionPreconditionFailedError(guard, undefined, guardCause(guard, error) ??
|
|
363
|
+
'The attacking or defending Fleet or Character could not be verified. Refresh both Fleets and their Characters, then recreate the Plan before signing.');
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
for (const guard of allPreconditions) {
|
|
368
|
+
if (guard.kind !== 'fleet-respawn')
|
|
369
|
+
continue;
|
|
370
|
+
try {
|
|
371
|
+
const current = await resolveFleetRespawn(context, { ...guard, fleet: guard.address }, guard, commitment);
|
|
372
|
+
const planned = steps[0].instruction;
|
|
373
|
+
const fresh = current.instruction;
|
|
374
|
+
if (planned.programAddress !== fresh.programAddress ||
|
|
375
|
+
planned.data?.length !== fresh.data?.length ||
|
|
376
|
+
fresh.data?.some((v, i) => planned.data?.[i] !== v) ||
|
|
377
|
+
planned.accounts?.length !== fresh.accounts?.length ||
|
|
378
|
+
fresh.accounts?.some((a, i) => planned.accounts?.[i]?.address !== a.address ||
|
|
379
|
+
planned.accounts?.[i]?.role !== a.role))
|
|
380
|
+
throw new SageSdkError('ACTION_PRECONDITION_FAILED', 'Recovery instruction accounts changed. Recreate and inspect the recovery Plan before signing.');
|
|
381
|
+
}
|
|
382
|
+
catch (error) {
|
|
383
|
+
throw new ActionPreconditionFailedError(guard, undefined, error instanceof SageSdkError
|
|
384
|
+
? error.message
|
|
385
|
+
: 'Recovery prerequisites could not be validated. Refresh the Fleet and recreate the Plan.');
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
const checkedXp = new Set();
|
|
389
|
+
const freshGameVersions = new Map();
|
|
390
|
+
const registrationFunding = [];
|
|
391
|
+
const initializations = new Map();
|
|
392
|
+
for (const guard of allPreconditions) {
|
|
393
|
+
if (guard.kind !== 'character-registration')
|
|
394
|
+
continue;
|
|
395
|
+
registrationFunding.push(await revalidateCharacterRegistration(context, guard, commitment, freshGameVersions, initializations));
|
|
396
|
+
}
|
|
397
|
+
checkRegistrationFunding(registrationFunding);
|
|
398
|
+
for (const guard of allPreconditions) {
|
|
399
|
+
if (guard.kind !== 'fleet-arrival')
|
|
400
|
+
continue;
|
|
401
|
+
try {
|
|
402
|
+
const current = await validateFleetArrivalIntent(context, guard.intent, freshGameVersions);
|
|
403
|
+
for (const xp of allPreconditions) {
|
|
404
|
+
if (xp.kind !== 'xp-runtime' ||
|
|
405
|
+
xp.intent.game !== current.xp.intent.game ||
|
|
406
|
+
xp.intent.character !== current.xp.intent.character ||
|
|
407
|
+
xp.intent.structure !== current.xp.intent.structure ||
|
|
408
|
+
(xp.intent.profile !== undefined &&
|
|
409
|
+
xp.intent.profile !== current.intent.profile))
|
|
410
|
+
continue;
|
|
411
|
+
if (['xpBudget', 'xpBudgetConfig', 'xpAccrual'].some((key) => xp.accounts[key] !== current.xp.accounts[key]))
|
|
412
|
+
throw new SageSdkError('ACTION_PRECONDITION_FAILED', 'Arrival XP runtime changed. Refresh the Fleet and recreate the Plan.');
|
|
413
|
+
checkedXp.add(xp);
|
|
414
|
+
}
|
|
415
|
+
if (current.character !== guard.character ||
|
|
416
|
+
current.regionTracker !== guard.regionTracker)
|
|
417
|
+
throw new SageSdkError('ACTION_PRECONDITION_FAILED', 'Arrival account links changed. Refresh the Fleet and recreate the Plan.');
|
|
418
|
+
}
|
|
419
|
+
catch (error) {
|
|
420
|
+
throw new ActionPreconditionFailedError(guard, undefined, error instanceof SageSdkError
|
|
421
|
+
? error.message
|
|
422
|
+
: 'Arrival prerequisites could not be validated. Refresh the Fleet and recreate the Plan.');
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
await revalidateRuntimeGuards(context, allPreconditions
|
|
426
|
+
.filter(isRuntimeGuard)
|
|
427
|
+
.filter((guard) => !checkedXp.has(guard)), freshGameVersions);
|
|
428
|
+
const preconditions = allPreconditions.filter((guard) => !isRuntimeGuard(guard) &&
|
|
429
|
+
guard.kind !== 'fleet-attack' &&
|
|
430
|
+
guard.kind !== 'fleet-arrival' &&
|
|
431
|
+
guard.kind !== 'character-registration' &&
|
|
432
|
+
guard.kind !== 'scan-detect' &&
|
|
433
|
+
guard.kind !== 'scan-completion' &&
|
|
434
|
+
guard.kind !== 'fleet-respawn' &&
|
|
435
|
+
guard.kind !== 'fleet-crew-transfer');
|
|
436
|
+
const fleetCreationAccounts = new Map();
|
|
437
|
+
const fleetAssemblyAccounts = new Map();
|
|
438
|
+
const importFundingAccounts = new Map();
|
|
439
|
+
const assemblyGames = new Set();
|
|
440
|
+
const assemblyCatalogs = new Map();
|
|
441
|
+
const requiredAddresses = new Set(preconditions.map(({ address }) => address));
|
|
442
|
+
for (const guard of preconditions) {
|
|
443
|
+
if (guard.kind === 'fleet-dock-funding' && guard.status === 'available') {
|
|
444
|
+
for (const address of [
|
|
445
|
+
guard.profile,
|
|
446
|
+
guard.starbasePlayer,
|
|
447
|
+
guard.system,
|
|
448
|
+
guard.game,
|
|
449
|
+
RENT_ADDRESS,
|
|
450
|
+
])
|
|
451
|
+
requiredAddresses.add(address);
|
|
452
|
+
}
|
|
453
|
+
if (guard.kind === 'region-access')
|
|
454
|
+
requiredAddresses.add(guard.system);
|
|
455
|
+
if (guard.kind === 'region-path')
|
|
456
|
+
requiredAddresses.add(guard.fleet);
|
|
457
|
+
if (guard.kind === 'fleet-docking-policy')
|
|
458
|
+
for (const address of [
|
|
459
|
+
guard.ownership,
|
|
460
|
+
guard.system,
|
|
461
|
+
guard.starbasePlayer,
|
|
462
|
+
])
|
|
463
|
+
requiredAddresses.add(address);
|
|
464
|
+
if (guard.kind === 'local-market-order' && guard.status === 'available') {
|
|
465
|
+
for (const address of [
|
|
466
|
+
guard.character,
|
|
467
|
+
guard.starbasePlayer,
|
|
468
|
+
...marketOrderFundingAddresses(guard.profile, allPreconditions),
|
|
469
|
+
])
|
|
470
|
+
requiredAddresses.add(address);
|
|
471
|
+
}
|
|
472
|
+
if (guard.kind === 'scan-signal-open') {
|
|
473
|
+
for (const address of openSignalAddresses(guard))
|
|
474
|
+
requiredAddresses.add(address);
|
|
475
|
+
}
|
|
476
|
+
if (guard.kind !== 'fleet-create')
|
|
477
|
+
continue;
|
|
478
|
+
const resolved = await resolveFleetCreation(guard);
|
|
479
|
+
if (resolved.fleet !== guard.address)
|
|
480
|
+
throw new ActionPreconditionFailedError(guard, undefined, 'The Fleet address does not match this Game, Profile and exact label. Recreate the Fleet creation Plan from its intended label.');
|
|
481
|
+
fleetCreationAccounts.set(guard, resolved);
|
|
482
|
+
for (const address of [
|
|
483
|
+
resolved.game,
|
|
484
|
+
resolved.profile,
|
|
485
|
+
resolved.system,
|
|
486
|
+
resolved.character,
|
|
487
|
+
resolved.profileFaction,
|
|
488
|
+
resolved.starbasePlayer,
|
|
489
|
+
resolved.fleet,
|
|
490
|
+
resolved.rent,
|
|
491
|
+
resolved.clock,
|
|
492
|
+
])
|
|
493
|
+
requiredAddresses.add(address);
|
|
494
|
+
}
|
|
495
|
+
for (const guard of preconditions) {
|
|
496
|
+
if (guard.kind !== 'fleet-add-ship')
|
|
497
|
+
continue;
|
|
498
|
+
const resolved = await resolveFleetShipAssembly(guard);
|
|
499
|
+
fleetAssemblyAccounts.set(guard, resolved);
|
|
500
|
+
assemblyGames.add(resolved.game);
|
|
501
|
+
for (const address of [
|
|
502
|
+
resolved.game,
|
|
503
|
+
resolved.profile,
|
|
504
|
+
resolved.system,
|
|
505
|
+
resolved.character,
|
|
506
|
+
resolved.profileFaction,
|
|
507
|
+
resolved.starbasePlayer,
|
|
508
|
+
resolved.fleet,
|
|
509
|
+
resolved.rent,
|
|
510
|
+
resolved.clock,
|
|
511
|
+
])
|
|
512
|
+
requiredAddresses.add(address);
|
|
513
|
+
}
|
|
514
|
+
for (const guard of preconditions) {
|
|
515
|
+
if (guard.kind !== 'research-unlock')
|
|
516
|
+
continue;
|
|
517
|
+
for (const address of [
|
|
518
|
+
guard.game,
|
|
519
|
+
guard.profile,
|
|
520
|
+
guard.system,
|
|
521
|
+
guard.starbasePlayer,
|
|
522
|
+
guard.currencyCache,
|
|
523
|
+
CLOCK_ADDRESS,
|
|
524
|
+
RENT_ADDRESS,
|
|
525
|
+
])
|
|
526
|
+
requiredAddresses.add(address);
|
|
527
|
+
}
|
|
528
|
+
// Profile storage funding is rederived from each instruction and the fresh
|
|
529
|
+
// accounts it resizes; a deposit's cargo id comes from its source mint.
|
|
530
|
+
const storageActionSteps = storageSteps(steps);
|
|
531
|
+
for (const step of storageActionSteps) {
|
|
532
|
+
for (const address of [
|
|
533
|
+
step.instruction.accounts[step.signer + 1].address,
|
|
534
|
+
...storageActionAccounts(step.kind, step.instruction),
|
|
535
|
+
RENT_ADDRESS,
|
|
536
|
+
])
|
|
537
|
+
requiredAddresses.add(address);
|
|
538
|
+
if (step.kind === 'deposit')
|
|
539
|
+
requiredAddresses.add(requireGameAddress(context));
|
|
540
|
+
}
|
|
541
|
+
for (const guard of preconditions) {
|
|
542
|
+
if (guard.kind !== 'ship-import-funding')
|
|
543
|
+
continue;
|
|
544
|
+
let resolved;
|
|
545
|
+
try {
|
|
546
|
+
resolved = await resolveShipImportFunding(guard);
|
|
547
|
+
}
|
|
548
|
+
catch {
|
|
549
|
+
throw new ActionPreconditionFailedError(guard, undefined, 'The ship import target does not match its Game, Profile and System. Refresh the canonical StarbasePlayer and prepare a new import.');
|
|
550
|
+
}
|
|
551
|
+
importFundingAccounts.set(guard, resolved);
|
|
552
|
+
for (const address of [
|
|
553
|
+
resolved.profile,
|
|
554
|
+
resolved.character,
|
|
555
|
+
resolved.starbasePlayer,
|
|
556
|
+
resolved.rent,
|
|
557
|
+
])
|
|
558
|
+
requiredAddresses.add(address);
|
|
559
|
+
}
|
|
560
|
+
const addresses = [...requiredAddresses];
|
|
299
561
|
const accounts = await readContextRawAccounts(context, addresses, {
|
|
300
562
|
commitment,
|
|
301
563
|
});
|
|
302
564
|
const byAddress = new Map(addresses.map((address, index) => [address, accounts[index]]));
|
|
303
565
|
const cargoIdsByGame = new Map();
|
|
304
566
|
for (const guard of preconditions) {
|
|
305
|
-
if (guard.kind !== 'game-cargo-config')
|
|
567
|
+
if (guard.kind !== 'game-cargo-bytes-config')
|
|
306
568
|
continue;
|
|
307
569
|
const ids = cargoIdsByGame.get(guard.address) ?? [];
|
|
308
570
|
ids.push(guard.cargoId);
|
|
@@ -320,27 +582,276 @@ async function checkPreconditions(context, preconditions, commitment) {
|
|
|
320
582
|
// Invocation-local only: every execution attempt still reads and decodes fresh state.
|
|
321
583
|
const cargoHashesByGame = new Map();
|
|
322
584
|
const validatedGames = new Set();
|
|
323
|
-
|
|
585
|
+
// One exact decode per fresh Game row, shared by every Game guard below.
|
|
586
|
+
const gameDecodes = new Map();
|
|
587
|
+
const profileFunding = new Map();
|
|
588
|
+
const fundedTargets = new Set();
|
|
589
|
+
let storageResults;
|
|
590
|
+
// One decoded cargo row set per Game, shared by cargo-definition guards and
|
|
591
|
+
// a deposit's cargo lookup.
|
|
592
|
+
const cargoRowsByGame = new Map();
|
|
593
|
+
const cargoRows = (game) => {
|
|
594
|
+
let rows = cargoRowsByGame.get(game.address);
|
|
595
|
+
if (!rows) {
|
|
596
|
+
rows = decodeGameCargoConfigurationRows(game, gameDecodes);
|
|
597
|
+
cargoRowsByGame.set(game.address, rows);
|
|
598
|
+
}
|
|
599
|
+
return rows;
|
|
600
|
+
};
|
|
601
|
+
const recordFunding = (guard, funding, target = `${guard.kind}:${guard.address}`) => {
|
|
602
|
+
// Repeated guards for one action are assertions, not additional debits.
|
|
603
|
+
// Every guard still validates its own ceiling before reaching here.
|
|
604
|
+
if (fundedTargets.has(target))
|
|
605
|
+
return;
|
|
606
|
+
fundedTargets.add(target);
|
|
607
|
+
const current = profileFunding.get(guard.profile);
|
|
608
|
+
profileFunding.set(guard.profile, {
|
|
609
|
+
debit: (current?.debit ?? 0n) + funding.profileDebit,
|
|
610
|
+
reserve: funding.profileReserve,
|
|
611
|
+
guard,
|
|
612
|
+
});
|
|
613
|
+
};
|
|
614
|
+
const fleetFailure = (guard, error) => {
|
|
615
|
+
// Only SDK diagnostics from this bounded validation batch are exposed.
|
|
616
|
+
// Never stringify provider/codec objects or retain their inner causes.
|
|
617
|
+
if (error instanceof SageSdkError &&
|
|
618
|
+
error.address !== undefined &&
|
|
619
|
+
requiredAddresses.has(error.address))
|
|
620
|
+
return new ActionPreconditionFailedError(guard, byAddress.get(error.address)?.slot, error.message, error.address);
|
|
621
|
+
return new ActionPreconditionFailedError(guard, undefined, 'Fleet prerequisites could not be validated. Refresh the related accounts and replan with a supported binding version.');
|
|
622
|
+
};
|
|
623
|
+
// A docking Plan from another deployment is reported as such before any
|
|
624
|
+
// freshness guard, whatever the saved guard order.
|
|
625
|
+
for (const precondition of preconditions)
|
|
626
|
+
if ((precondition.kind === 'fleet-dock-funding' ||
|
|
627
|
+
precondition.kind === 'fleet-docking-policy') &&
|
|
628
|
+
precondition.game !== requireGameAddress(context))
|
|
629
|
+
throw fleetFailure(precondition, new SageSdkError('ACTION_PRECONDITION_FAILED', precondition.kind === 'fleet-dock-funding'
|
|
630
|
+
? `The docking Plan belongs to Game ${precondition.game}, but the context uses Game ${requireGameAddress(context)}. Recreate it with the intended Game context.`
|
|
631
|
+
: 'The docking faction policy belongs to another Game. Recreate the Plan with the intended Game context.', { address: precondition.address }));
|
|
632
|
+
// Dependent docking and cargo storage estimates run after every other
|
|
633
|
+
// freshness guard, so an exact account-state, cargo-definition or policy
|
|
634
|
+
// diagnostic wins whatever the saved order.
|
|
635
|
+
const estimate = (g) => g.kind === 'fleet-dock-funding' || g.kind === 'profile-storage-funding';
|
|
636
|
+
const ordered = [
|
|
637
|
+
...preconditions.filter((g) => !estimate(g)),
|
|
638
|
+
...preconditions.filter((g) => g.kind === 'fleet-dock-funding'),
|
|
639
|
+
...preconditions.filter((g) => g.kind === 'profile-storage-funding'),
|
|
640
|
+
];
|
|
641
|
+
for (const precondition of ordered) {
|
|
324
642
|
const account = byAddress.get(precondition.address);
|
|
643
|
+
if (precondition.kind === 'fleet-dock-funding') {
|
|
644
|
+
try {
|
|
645
|
+
const funding = revalidateDockFunding(precondition, byAddress, precondition.status === 'available'
|
|
646
|
+
? decodeDockingSequences(byAddress.get(precondition.game), gameDecodes)
|
|
647
|
+
: undefined);
|
|
648
|
+
if (funding)
|
|
649
|
+
recordFunding(precondition, funding);
|
|
650
|
+
}
|
|
651
|
+
catch (error) {
|
|
652
|
+
throw fleetFailure(precondition, error);
|
|
653
|
+
}
|
|
654
|
+
continue;
|
|
655
|
+
}
|
|
656
|
+
if (precondition.kind === 'local-market-order') {
|
|
657
|
+
try {
|
|
658
|
+
if (precondition.game !== requireGameAddress(context))
|
|
659
|
+
throw new SageSdkError('ACTION_PRECONDITION_FAILED', 'The order belongs to another Game. Recreate it with the intended Game context.');
|
|
660
|
+
revalidateMarketOrder(precondition, byAddress, allPreconditions);
|
|
661
|
+
}
|
|
662
|
+
catch (error) {
|
|
663
|
+
const failedAddress = error instanceof SageSdkError ? error.address : undefined;
|
|
664
|
+
throw new ActionPreconditionFailedError(precondition, byAddress.get(failedAddress ?? precondition.address)?.slot, error instanceof SageSdkError
|
|
665
|
+
? error.message
|
|
666
|
+
: 'The Local Market debit bounds could not be verified. Refresh its funding accounts and recreate the order Plan.', failedAddress);
|
|
667
|
+
}
|
|
668
|
+
continue;
|
|
669
|
+
}
|
|
670
|
+
if (precondition.kind === 'scan-signal-open') {
|
|
671
|
+
if (precondition.game !== requireGameAddress(context))
|
|
672
|
+
throw new ActionPreconditionFailedError(precondition, undefined, 'This signal setup belongs to a different configured Game. Refetch and recreate the Plan using the intended Game context.');
|
|
673
|
+
try {
|
|
674
|
+
recordFunding(precondition, await validateOpenSignal(precondition, byAddress, precondition.authorityHash));
|
|
675
|
+
}
|
|
676
|
+
catch (error) {
|
|
677
|
+
throw fleetFailure(precondition, error);
|
|
678
|
+
}
|
|
679
|
+
continue;
|
|
680
|
+
}
|
|
681
|
+
if (precondition.kind === 'ship-import-funding') {
|
|
682
|
+
try {
|
|
683
|
+
const funding = validateShipImportFunding(precondition, importFundingAccounts.get(precondition), byAddress, precondition.maximumProfileDebit);
|
|
684
|
+
recordFunding(precondition, funding);
|
|
685
|
+
}
|
|
686
|
+
catch (error) {
|
|
687
|
+
throw fleetFailure(precondition, error);
|
|
688
|
+
}
|
|
689
|
+
continue;
|
|
690
|
+
}
|
|
691
|
+
if (precondition.kind === 'profile-storage-funding') {
|
|
692
|
+
try {
|
|
693
|
+
storageResults ??= validateStorageFunding(steps, preconditions.filter((guard) => guard.kind === 'profile-storage-funding'), byAddress, (instruction) => readStorageAction(instruction, byAddress,
|
|
694
|
+
// A deposit Plan's cargo-definition guards already required the
|
|
695
|
+
// Game in this batch.
|
|
696
|
+
(mint) => cargoRows(byAddress.get(requireGameAddress(context))).rows.find((row) => row.mint === mint)?.id));
|
|
697
|
+
const result = storageResults.get(precondition);
|
|
698
|
+
if ('error' in result)
|
|
699
|
+
throw result.error;
|
|
700
|
+
const { funding } = result;
|
|
701
|
+
// Each guard is one action, and several may resize one account, so
|
|
702
|
+
// every guard adds its own debit. A zero debit withdraws nothing and
|
|
703
|
+
// imposes no Profile reserve on the combined check.
|
|
704
|
+
if (funding.profileDebit > 0n)
|
|
705
|
+
recordFunding(precondition, funding, `${precondition.kind}:${String(ordered.indexOf(precondition))}`);
|
|
706
|
+
}
|
|
707
|
+
catch (error) {
|
|
708
|
+
// Every storage check failure names the Profile, a resized account
|
|
709
|
+
// or the Rent sysvar, all read in this batch.
|
|
710
|
+
throw fleetFailure(precondition, error);
|
|
711
|
+
}
|
|
712
|
+
continue;
|
|
713
|
+
}
|
|
714
|
+
if (precondition.kind === 'research-unlock') {
|
|
715
|
+
try {
|
|
716
|
+
const game = byAddress.get(precondition.game);
|
|
717
|
+
if (precondition.game !== requireGameAddress(context) || !game)
|
|
718
|
+
throw new SageSdkError('ACTION_PRECONDITION_FAILED', 'The research unlock belongs to another or missing Game. Recreate it with the intended Game context.', { address: precondition.game });
|
|
719
|
+
const resolved = await resolveResearchUnlock(precondition);
|
|
720
|
+
if (resolved.character !== precondition.address ||
|
|
721
|
+
resolved.starbasePlayer !== precondition.starbasePlayer ||
|
|
722
|
+
resolved.currencyCache !== precondition.currencyCache)
|
|
723
|
+
throw new SageSdkError('ACTION_PRECONDITION_FAILED', 'The research unlock accounts are not canonical for this Game, Profile and System. Recreate the Plan with planUnlockResearchNode.');
|
|
724
|
+
const funding = await validateResearchUnlock(precondition, resolved, byAddress, decodeGameResearchUnlockRules(game, gameDecodes));
|
|
725
|
+
// A zero storage debit withdraws nothing, so it imposes no Profile
|
|
726
|
+
// reserve on the combined check.
|
|
727
|
+
if (funding.profileDebit > 0n)
|
|
728
|
+
recordFunding(precondition, funding);
|
|
729
|
+
}
|
|
730
|
+
catch (error) {
|
|
731
|
+
const failed = error instanceof SageSdkError ? error.address : undefined;
|
|
732
|
+
throw new ActionPreconditionFailedError(precondition, byAddress.get(failed ?? precondition.address)?.slot, error instanceof SageSdkError
|
|
733
|
+
? error.message
|
|
734
|
+
: 'Research prerequisites could not be validated. Refresh the Character, Starbase Player and Game definitions, then recreate the unlock Plan.', failed);
|
|
735
|
+
}
|
|
736
|
+
continue;
|
|
737
|
+
}
|
|
738
|
+
if (precondition.kind === 'fleet-add-ship') {
|
|
739
|
+
try {
|
|
740
|
+
const game = byAddress.get(precondition.game);
|
|
741
|
+
let catalog = assemblyCatalogs.get(precondition.game);
|
|
742
|
+
if (!catalog && game) {
|
|
743
|
+
catalog = decodeGameShipAssemblyCatalog(game, gameDecodes);
|
|
744
|
+
assemblyCatalogs.set(precondition.game, catalog);
|
|
745
|
+
}
|
|
746
|
+
const funding = await validateFleetShipAssembly(precondition, fleetAssemblyAccounts.get(precondition), byAddress, precondition, catalog);
|
|
747
|
+
recordFunding(precondition, funding);
|
|
748
|
+
}
|
|
749
|
+
catch (error) {
|
|
750
|
+
throw fleetFailure(precondition, error);
|
|
751
|
+
}
|
|
752
|
+
continue;
|
|
753
|
+
}
|
|
754
|
+
if (precondition.kind === 'fleet-create') {
|
|
755
|
+
try {
|
|
756
|
+
const funding = await validateFleetCreation(precondition, fleetCreationAccounts.get(precondition), byAddress, precondition.maximumProfileDebit);
|
|
757
|
+
recordFunding(precondition, funding);
|
|
758
|
+
}
|
|
759
|
+
catch (error) {
|
|
760
|
+
throw fleetFailure(precondition, error);
|
|
761
|
+
}
|
|
762
|
+
continue;
|
|
763
|
+
}
|
|
764
|
+
if (precondition.kind === 'fleet-docking-policy') {
|
|
765
|
+
try {
|
|
766
|
+
await validateFleetDockingPolicy({
|
|
767
|
+
tracker: account,
|
|
768
|
+
ownership: byAddress.get(precondition.ownership),
|
|
769
|
+
system: byAddress.get(precondition.system),
|
|
770
|
+
starbasePlayer: byAddress.get(precondition.starbasePlayer),
|
|
771
|
+
}, precondition);
|
|
772
|
+
}
|
|
773
|
+
catch (error) {
|
|
774
|
+
throw fleetFailure(precondition, error);
|
|
775
|
+
}
|
|
776
|
+
continue;
|
|
777
|
+
}
|
|
325
778
|
let narrowed = true;
|
|
779
|
+
let cause;
|
|
326
780
|
if (precondition.kind === 'token-account')
|
|
327
781
|
narrowed =
|
|
328
782
|
account !== undefined && matchesTokenAccount(account, precondition);
|
|
329
|
-
if (precondition.kind === '
|
|
783
|
+
if (precondition.kind === 'currency-cache' ||
|
|
784
|
+
precondition.kind === 'region-access' ||
|
|
785
|
+
precondition.kind === 'region-path' ||
|
|
786
|
+
precondition.kind === 'character-access' ||
|
|
787
|
+
precondition.kind === 'starbase-system' ||
|
|
788
|
+
precondition.kind === 'fleet-mining' ||
|
|
789
|
+
isFactionTradeGuard(precondition) ||
|
|
790
|
+
precondition.kind === 'recipe-state' ||
|
|
791
|
+
precondition.kind === 'token-mint' ||
|
|
330
792
|
precondition.kind === 'game-ship-config' ||
|
|
331
793
|
precondition.kind === 'game-account' ||
|
|
332
|
-
precondition.kind === 'game-cargo-config' ||
|
|
794
|
+
precondition.kind === 'game-cargo-bytes-config' ||
|
|
333
795
|
precondition.kind === 'cargo-cache') {
|
|
334
796
|
try {
|
|
335
797
|
if (!account)
|
|
336
798
|
narrowed = false;
|
|
799
|
+
else if (precondition.kind === 'currency-cache') {
|
|
800
|
+
narrowed = precondition.game === requireGameAddress(context);
|
|
801
|
+
if (narrowed)
|
|
802
|
+
await validateCurrencyCache(account, precondition.game);
|
|
803
|
+
}
|
|
804
|
+
else if (precondition.kind === 'region-access') {
|
|
805
|
+
narrowed =
|
|
806
|
+
precondition.game === requireGameAddress(context) &&
|
|
807
|
+
(await hashRegionAccess(account, byAddress.get(precondition.system), precondition.game)) === precondition.accessHash;
|
|
808
|
+
}
|
|
809
|
+
else if (precondition.kind === 'region-path') {
|
|
810
|
+
const origin = fleetActionCoordinate(byAddress.get(precondition.fleet), precondition.game);
|
|
811
|
+
narrowed =
|
|
812
|
+
precondition.game === requireGameAddress(context) &&
|
|
813
|
+
origin?.x === precondition.fromX &&
|
|
814
|
+
origin.y === precondition.fromY &&
|
|
815
|
+
(await hashRegionPath(account, precondition.game, { x: precondition.fromX, y: precondition.fromY }, { x: precondition.toX, y: precondition.toY })) === precondition.pathHash;
|
|
816
|
+
}
|
|
817
|
+
else if (precondition.kind === 'character-access') {
|
|
818
|
+
narrowed =
|
|
819
|
+
precondition.game === requireGameAddress(context) &&
|
|
820
|
+
(await hashCharacterAccess(account, precondition)) ===
|
|
821
|
+
precondition.stateHash;
|
|
822
|
+
}
|
|
823
|
+
else if (precondition.kind === 'starbase-system') {
|
|
824
|
+
narrowed = precondition.game === requireGameAddress(context);
|
|
825
|
+
if (narrowed)
|
|
826
|
+
await validateStarbaseSystem(account, precondition);
|
|
827
|
+
}
|
|
828
|
+
else if (precondition.kind === 'fleet-mining') {
|
|
829
|
+
narrowed =
|
|
830
|
+
precondition.game === requireGameAddress(context) &&
|
|
831
|
+
(await matchesFleetMiningState(account, precondition));
|
|
832
|
+
}
|
|
833
|
+
else if (isFactionTradeGuard(precondition)) {
|
|
834
|
+
narrowed = await matchesFactionTradeState(account, precondition);
|
|
835
|
+
}
|
|
836
|
+
else if (precondition.kind === 'recipe-state') {
|
|
837
|
+
narrowed =
|
|
838
|
+
(await hashRecipeConfiguration(account)) ===
|
|
839
|
+
precondition.configHash;
|
|
840
|
+
if (narrowed)
|
|
841
|
+
validateRecipeUsage(account, precondition.requiredUses);
|
|
842
|
+
}
|
|
337
843
|
else if (precondition.kind === 'token-mint') {
|
|
338
844
|
narrowed = validateTokenMint(account) === precondition.decimals;
|
|
339
845
|
}
|
|
340
846
|
else if (precondition.kind === 'game-ship-config') {
|
|
341
847
|
let hashes = shipHashesByGame.get(precondition.address);
|
|
342
848
|
if (!hashes) {
|
|
343
|
-
|
|
849
|
+
let catalog = assemblyCatalogs.get(precondition.address);
|
|
850
|
+
if (!catalog && assemblyGames.has(precondition.address)) {
|
|
851
|
+
catalog = decodeGameShipAssemblyCatalog(account, gameDecodes);
|
|
852
|
+
assemblyCatalogs.set(precondition.address, catalog);
|
|
853
|
+
}
|
|
854
|
+
hashes = await hashGameShipConfigurations(account, shipIdsByGame.get(precondition.address), catalog, gameDecodes);
|
|
344
855
|
shipHashesByGame.set(precondition.address, hashes);
|
|
345
856
|
}
|
|
346
857
|
narrowed =
|
|
@@ -348,14 +859,20 @@ async function checkPreconditions(context, preconditions, commitment) {
|
|
|
348
859
|
}
|
|
349
860
|
else if (precondition.kind === 'game-account') {
|
|
350
861
|
if (!validatedGames.has(account.address)) {
|
|
351
|
-
|
|
862
|
+
if (assemblyGames.has(precondition.address)) {
|
|
863
|
+
if (!assemblyCatalogs.has(precondition.address))
|
|
864
|
+
assemblyCatalogs.set(precondition.address, decodeGameShipAssemblyCatalog(account, gameDecodes));
|
|
865
|
+
}
|
|
866
|
+
else
|
|
867
|
+
validateGameForCharacterRegistration(account, gameDecodes);
|
|
352
868
|
validatedGames.add(account.address);
|
|
353
869
|
}
|
|
354
870
|
}
|
|
355
|
-
else if (precondition.kind === 'game-cargo-config') {
|
|
871
|
+
else if (precondition.kind === 'game-cargo-bytes-config') {
|
|
356
872
|
let hashes = cargoHashesByGame.get(precondition.address);
|
|
357
873
|
if (!hashes) {
|
|
358
|
-
|
|
874
|
+
const ids = cargoIdsByGame.get(precondition.address);
|
|
875
|
+
hashes = await hashGameCargoConfigurationGuards(account, ids, cargoRows(account));
|
|
359
876
|
cargoHashesByGame.set(precondition.address, hashes);
|
|
360
877
|
}
|
|
361
878
|
narrowed =
|
|
@@ -363,35 +880,43 @@ async function checkPreconditions(context, preconditions, commitment) {
|
|
|
363
880
|
}
|
|
364
881
|
else {
|
|
365
882
|
validateWalletCargoCache(account, precondition.game, precondition.bump);
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
seeds: [
|
|
369
|
-
new TextEncoder().encode('CargoDefinitionsCache'),
|
|
370
|
-
getAddressEncoder().encode(precondition.game),
|
|
371
|
-
],
|
|
372
|
-
});
|
|
883
|
+
// validateWalletCargoCache requires the SAGE owner.
|
|
884
|
+
const [canonical, bump] = await deriveCargoDefinitionsCacheAddress(precondition.game);
|
|
373
885
|
narrowed =
|
|
374
886
|
canonical === account.address && bump === precondition.bump;
|
|
375
887
|
}
|
|
376
888
|
}
|
|
377
|
-
catch {
|
|
889
|
+
catch (error) {
|
|
378
890
|
narrowed = false;
|
|
891
|
+
cause = guardCause(precondition, error);
|
|
379
892
|
}
|
|
380
893
|
}
|
|
381
894
|
if (!narrowed ||
|
|
382
895
|
(precondition.kind === 'token-account-or-absent' &&
|
|
383
896
|
account !== undefined &&
|
|
384
897
|
!matchesTokenAccount(account, precondition)) ||
|
|
898
|
+
(precondition.kind === 'system-account-or-absent' &&
|
|
899
|
+
account !== undefined &&
|
|
900
|
+
(account.owner !== '11111111111111111111111111111111' ||
|
|
901
|
+
account.executable ||
|
|
902
|
+
account.data.length !== 0)) ||
|
|
385
903
|
(precondition.kind === 'account-absent' && account !== undefined) ||
|
|
386
904
|
(precondition.kind === 'account-state' &&
|
|
387
905
|
(account === undefined ||
|
|
388
906
|
(await hashAccountState(account.owner, account.data)) !==
|
|
389
907
|
precondition.dataHash))) {
|
|
390
|
-
throw new ActionPreconditionFailedError(precondition, account?.slot);
|
|
908
|
+
throw new ActionPreconditionFailedError(precondition, account?.slot, cause);
|
|
391
909
|
}
|
|
392
910
|
}
|
|
911
|
+
for (const [profile, funding] of profileFunding) {
|
|
912
|
+
// Validation above guarantees a fresh Profile from the same finite batch.
|
|
913
|
+
const account = byAddress.get(profile);
|
|
914
|
+
if (account.lamports < funding.reserve + funding.debit)
|
|
915
|
+
throw new ActionPreconditionFailedError(funding.guard, account.slot, 'The Profile cannot cover the combined Profile storage debits while preserving its rent reserve. Fund the Profile explicitly, then recreate and inspect the Plans.', profile);
|
|
916
|
+
}
|
|
917
|
+
return registrationFunding;
|
|
393
918
|
}
|
|
394
|
-
function commitmentReached(actual, requested) {
|
|
919
|
+
export function commitmentReached(actual, requested) {
|
|
395
920
|
if (actual === null)
|
|
396
921
|
return false;
|
|
397
922
|
const strength = {
|
|
@@ -516,7 +1041,9 @@ async function confirmTransaction(writeRpc, signature, lastValidBlockHeight, opt
|
|
|
516
1041
|
}
|
|
517
1042
|
}
|
|
518
1043
|
}
|
|
519
|
-
async function signAndSubmit(writeRpc, transaction, signers, sendingSigner, commitment, lifecycle) {
|
|
1044
|
+
async function signAndSubmit(writeRpc, transaction, contextSlot, signers, sendingSigner, commitment, lifecycle) {
|
|
1045
|
+
// Capture RPC metadata before handing the transaction to any signer.
|
|
1046
|
+
const { blockhash, lastValidBlockHeight: assembledHeight } = transaction.lifetimeConstraint;
|
|
520
1047
|
await lifecycle?.onBeforeSign();
|
|
521
1048
|
if (sendingSigner !== undefined) {
|
|
522
1049
|
let enteredOpaqueSender = false;
|
|
@@ -525,7 +1052,6 @@ async function signAndSubmit(writeRpc, transaction, signers, sendingSigner, comm
|
|
|
525
1052
|
async signAndSendTransactions(transactions, config) {
|
|
526
1053
|
for (const signed of transactions) {
|
|
527
1054
|
assertPlanTransactionMessage(transaction, signed);
|
|
528
|
-
readFinalLastValidBlockHeight(signed);
|
|
529
1055
|
}
|
|
530
1056
|
await lifecycle?.onBeforeOpaqueInvoke();
|
|
531
1057
|
enteredOpaqueSender = true;
|
|
@@ -551,8 +1077,13 @@ async function signAndSubmit(writeRpc, transaction, signers, sendingSigner, comm
|
|
|
551
1077
|
const signed = await signTransactionWithSigners(signingSigners, transaction);
|
|
552
1078
|
assertPlanTransactionMessage(transaction, signed);
|
|
553
1079
|
const signature = getSignatureFromTransaction(signed);
|
|
554
|
-
const lastValidBlockHeight =
|
|
555
|
-
|
|
1080
|
+
const lastValidBlockHeight = 'blockhash' in signed.lifetimeConstraint &&
|
|
1081
|
+
signed.lifetimeConstraint.blockhash === blockhash
|
|
1082
|
+
? assembledHeight
|
|
1083
|
+
: null;
|
|
1084
|
+
await lifecycle?.onSigned(signature, lastValidBlockHeight === null
|
|
1085
|
+
? null
|
|
1086
|
+
: Object.freeze({ lastValidBlockHeight, contextSlot }));
|
|
556
1087
|
await lifecycle?.onBeforeSubmit();
|
|
557
1088
|
try {
|
|
558
1089
|
const submittedSignature = await writeRpc
|
|
@@ -613,22 +1144,42 @@ export async function executePlanWithLifecycle(context, plan, options, lifecycle
|
|
|
613
1144
|
validatePlanAssemblyPolicy(plan, validated);
|
|
614
1145
|
const signers = matchSigners(plan, validated);
|
|
615
1146
|
const sendingSigner = resolveSendingSigner(signers);
|
|
616
|
-
const writeRpc = context
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
1147
|
+
const writeRpc = requireWriteRpc(context, 'execute');
|
|
1148
|
+
// Guard order is not trusted: funding follows instruction order, including hydrated Plans.
|
|
1149
|
+
const ordered = [...plan.preconditions].sort((a, b) => {
|
|
1150
|
+
const index = (guard) => guard.kind === 'character-registration'
|
|
1151
|
+
? plan.steps.findIndex((step) => step.instruction.accounts?.[2]?.address === guard.address)
|
|
1152
|
+
: -1;
|
|
1153
|
+
return index(a) - index(b);
|
|
1154
|
+
});
|
|
1155
|
+
const registrationFunding = await checkPreconditions(context, ordered, plan.steps, validated.commitment);
|
|
1156
|
+
const { transaction, contextSlot } = await assembleValidatedPlanWithContext(writeRpc, plan, {
|
|
621
1157
|
feePayer: validated.feePayer.address,
|
|
622
1158
|
commitment: validated.commitment,
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
: { computeUnitLimit: validated.computeUnitLimit }),
|
|
626
|
-
...(validated.priorityFeeMicroLamports === undefined
|
|
627
|
-
? {}
|
|
628
|
-
: { priorityFeeMicroLamports: validated.priorityFeeMicroLamports }),
|
|
1159
|
+
computeUnitLimit: validated.computeUnitLimit,
|
|
1160
|
+
priorityFeeMicroLamports: validated.priorityFeeMicroLamports,
|
|
629
1161
|
});
|
|
1162
|
+
if (registrationFunding.length > 0) {
|
|
1163
|
+
if (typeof writeRpc.getFeeForMessage !== 'function')
|
|
1164
|
+
throw new SageSdkError('MISSING_WRITE_TRANSPORT', 'The writeRpc transport has no callable getFeeForMessage method, so Character registration cannot check current transaction fees before signing. Update the custom writeRpc transport to implement the required SageWriteRpc getFeeForMessage method, then retry.');
|
|
1165
|
+
const payer = validated.feePayer.address;
|
|
1166
|
+
const { value: fee } = await writeRpc
|
|
1167
|
+
.getFeeForMessage(getBase64Decoder().decode(transaction.messageBytes), { commitment: validated.commitment })
|
|
1168
|
+
.send();
|
|
1169
|
+
if (typeof fee !== 'bigint' || fee < 0n)
|
|
1170
|
+
throw new SageSdkError('ACTION_PRECONDITION_FAILED', 'Current transaction fee could not be determined. Refresh the blockhash and recreate the registration Plan before signing.', { address: payer });
|
|
1171
|
+
if (!registrationFunding.some((funding) => funding.funder === payer)) {
|
|
1172
|
+
const [account, rent] = await readContextRawAccounts(context, [payer, RENT_ADDRESS], { commitment: validated.commitment });
|
|
1173
|
+
if (!account || !isEmptySystemAccount(account) || !rent)
|
|
1174
|
+
throw new SageSdkError('ACTION_PRECONDITION_FAILED', 'Registration fee payer must be an existing empty System wallet with current Rent available. Select and fund it separately.', { address: payer });
|
|
1175
|
+
const remaining = account.lamports - fee;
|
|
1176
|
+
if (remaining < 0n || (remaining > 0n && remaining < readRent(rent)(0)))
|
|
1177
|
+
throw new SageSdkError('ACTION_PRECONDITION_FAILED', 'Registration fee payer cannot pay the current fee and retain zero or a rent-exempt balance. Fund it separately.', { address: payer });
|
|
1178
|
+
}
|
|
1179
|
+
checkRegistrationFunding(registrationFunding, { payer, lamports: fee });
|
|
1180
|
+
}
|
|
630
1181
|
await lifecycle?.onPrepared(sendingSigner === undefined ? 'observable' : 'opaque');
|
|
631
|
-
const submission = await signAndSubmit(writeRpc, transaction, signers, sendingSigner, validated.commitment, lifecycle);
|
|
1182
|
+
const submission = await signAndSubmit(writeRpc, transaction, contextSlot, signers, sendingSigner, validated.commitment, lifecycle);
|
|
632
1183
|
if (submission.status === 'unknown')
|
|
633
1184
|
return submission;
|
|
634
1185
|
const result = await confirmTransaction(writeRpc, submission.signature, submission.lastValidBlockHeight, validated);
|