world
Interfaces
Section titled “Interfaces”AsteroidSnapshot
Section titled “AsteroidSnapshot”Defined in: packages/sage/src/world/index.ts:99
Immutable Asteroid projection over a CelestialBody account.
Example
Section titled “Example”declare const asteroid: AsteroidSnapshot;console.log(asteroid.details.resources);Extends
Section titled “Extends”Omit<AsteroidAccountData,"system">
Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/world/index.ts:100
details
Section titled “details”readonly details: WorldAsteroidData;Defined in: packages/sage/src/internal/c4/world.ts:407
Inherited from
Section titled “Inherited from”Omit.detailsreadonly game: Address;Defined in: packages/sage/src/internal/c4/world.ts:393
Inherited from
Section titled “Inherited from”Omit.gamereadonly id: number;Defined in: packages/sage/src/internal/c4/world.ts:391
Inherited from
Section titled “Inherited from”Omit.idreadonly kind: "asteroid";Defined in: packages/sage/src/internal/c4/world.ts:406
Inherited from
Section titled “Inherited from”Omit.kindlastSyncAtUnixSeconds
Section titled “lastSyncAtUnixSeconds”readonly lastSyncAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/world.ts:396
Inherited from
Section titled “Inherited from”Omit.lastSyncAtUnixSecondsreadonly name: string;Defined in: packages/sage/src/internal/c4/world.ts:392
Inherited from
Section titled “Inherited from”Omit.namesystem
Section titled “system”readonly system: EntityRef<"starSystem">;Defined in: packages/sage/src/world/index.ts:101
systemSequenceId
Section titled “systemSequenceId”readonly systemSequenceId: bigint;Defined in: packages/sage/src/internal/c4/world.ts:395
Inherited from
Section titled “Inherited from”Omit.systemSequenceIdversion
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/world.ts:390
Inherited from
Section titled “Inherited from”Omit.versionMethods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/world/index.ts:102
Returns
Section titled “Returns”unknown
PlanetSnapshot
Section titled “PlanetSnapshot”Defined in: packages/sage/src/world/index.ts:86
Immutable Planet projection over a CelestialBody account.
Example
Section titled “Example”declare const planet: PlanetSnapshot;console.log(planet.details.resources);Extends
Section titled “Extends”Omit<PlanetAccountData,"system">
Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/world/index.ts:87
details
Section titled “details”readonly details: WorldPlanetData;Defined in: packages/sage/src/internal/c4/world.ts:403
Inherited from
Section titled “Inherited from”Omit.detailsreadonly game: Address;Defined in: packages/sage/src/internal/c4/world.ts:393
Inherited from
Section titled “Inherited from”Omit.gamereadonly id: number;Defined in: packages/sage/src/internal/c4/world.ts:391
Inherited from
Section titled “Inherited from”Omit.idreadonly kind: "planet";Defined in: packages/sage/src/internal/c4/world.ts:402
Inherited from
Section titled “Inherited from”Omit.kindlastSyncAtUnixSeconds
Section titled “lastSyncAtUnixSeconds”readonly lastSyncAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/world.ts:396
Inherited from
Section titled “Inherited from”Omit.lastSyncAtUnixSecondsreadonly name: string;Defined in: packages/sage/src/internal/c4/world.ts:392
Inherited from
Section titled “Inherited from”Omit.namesystem
Section titled “system”readonly system: EntityRef<"starSystem">;Defined in: packages/sage/src/world/index.ts:88
systemSequenceId
Section titled “systemSequenceId”readonly systemSequenceId: bigint;Defined in: packages/sage/src/internal/c4/world.ts:395
Inherited from
Section titled “Inherited from”Omit.systemSequenceIdversion
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/world.ts:390
Inherited from
Section titled “Inherited from”Omit.versionMethods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/world/index.ts:89
Returns
Section titled “Returns”unknown
StarSystemAccountData
Section titled “StarSystemAccountData”Defined in: packages/sage/src/internal/c4/world.ts:308
SDK-owned decoded StarSystem data.
Example
Section titled “Example”declare const system: StarSystemAccountData;console.log(system.coordinates);Extended by
Section titled “Extended by”Properties
Section titled “Properties”celestialBodyAddresses
Section titled “celestialBodyAddresses”readonly celestialBodyAddresses: readonly Address[];Defined in: packages/sage/src/internal/c4/world.ts:317
connections
Section titled “connections”readonly connections: readonly WorldConnectionData[];Defined in: packages/sage/src/internal/c4/world.ts:316
coordinates
Section titled “coordinates”readonly coordinates: WorldCoordinates;Defined in: packages/sage/src/internal/c4/world.ts:314
readonly game: Address;Defined in: packages/sage/src/internal/c4/world.ts:310
readonly name: string;Defined in: packages/sage/src/internal/c4/world.ts:312
regionId?
Section titled “regionId?”readonly optional regionId?: number;Defined in: packages/sage/src/internal/c4/world.ts:313
sequenceId
Section titled “sequenceId”readonly sequenceId: bigint;Defined in: packages/sage/src/internal/c4/world.ts:315
starbase?
Section titled “starbase?”readonly optional starbase?: WorldStarbaseData;Defined in: packages/sage/src/internal/c4/world.ts:318
systemId
Section titled “systemId”readonly systemId: number;Defined in: packages/sage/src/internal/c4/world.ts:311
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/world.ts:309
StarSystemSnapshot
Section titled “StarSystemSnapshot”Defined in: packages/sage/src/world/index.ts:67
Immutable, translated StarSystem snapshot including nested shared Starbase data.
Example
Section titled “Example”declare const system: StarSystemSnapshot;console.log(system.name, system.coordinates);Extends
Section titled “Extends”Extended by
Section titled “Extended by”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/world/index.ts:69
celestialBodyAddresses
Section titled “celestialBodyAddresses”readonly celestialBodyAddresses: readonly Address[];Defined in: packages/sage/src/internal/c4/world.ts:317
Inherited from
Section titled “Inherited from”StarSystemAccountData.celestialBodyAddresses
connections
Section titled “connections”readonly connections: readonly WorldConnectionData[];Defined in: packages/sage/src/internal/c4/world.ts:316
Inherited from
Section titled “Inherited from”StarSystemAccountData.connections
coordinates
Section titled “coordinates”readonly coordinates: WorldCoordinates;Defined in: packages/sage/src/internal/c4/world.ts:314
Inherited from
Section titled “Inherited from”StarSystemAccountData.coordinates
readonly game: Address;Defined in: packages/sage/src/internal/c4/world.ts:310
Inherited from
Section titled “Inherited from”readonly kind: "starSystem";Defined in: packages/sage/src/world/index.ts:68
readonly name: string;Defined in: packages/sage/src/internal/c4/world.ts:312
Inherited from
Section titled “Inherited from”regionId?
Section titled “regionId?”readonly optional regionId?: number;Defined in: packages/sage/src/internal/c4/world.ts:313
Inherited from
Section titled “Inherited from”StarSystemAccountData.regionId
sequenceId
Section titled “sequenceId”readonly sequenceId: bigint;Defined in: packages/sage/src/internal/c4/world.ts:315
Inherited from
Section titled “Inherited from”StarSystemAccountData.sequenceId
starbase?
Section titled “starbase?”readonly optional starbase?: WorldStarbaseData;Defined in: packages/sage/src/internal/c4/world.ts:318
Inherited from
Section titled “Inherited from”StarSystemAccountData.starbase
systemId
Section titled “systemId”readonly systemId: number;Defined in: packages/sage/src/internal/c4/world.ts:311
Inherited from
Section titled “Inherited from”StarSystemAccountData.systemId
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/world.ts:309
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/world/index.ts:70
Returns
Section titled “Returns”unknown
WorldAsteroidData
Section titled “WorldAsteroidData”Defined in: packages/sage/src/internal/c4/world.ts:385
Fully translated Asteroid projection data.
Example
Section titled “Example”declare const asteroid: WorldAsteroidData;console.log(asteroid.resources);Properties
Section titled “Properties”resources
Section titled “resources”readonly resources: readonly WorldAsteroidResourceData[];Defined in: packages/sage/src/internal/c4/world.ts:386
WorldAsteroidResourceData
Section titled “WorldAsteroidResourceData”Defined in: packages/sage/src/internal/c4/world.ts:371
One translated Asteroid resource state.
Example
Section titled “Example”declare const resource: WorldAsteroidResourceData;console.log(resource.amountMined);Properties
Section titled “Properties”amountMined
Section titled “amountMined”readonly amountMined: bigint;Defined in: packages/sage/src/internal/c4/world.ts:374
cargoId
Section titled “cargoId”readonly cargoId: number;Defined in: packages/sage/src/internal/c4/world.ts:372
miners
Section titled “miners”readonly miners: bigint;Defined in: packages/sage/src/internal/c4/world.ts:375
richness
Section titled “richness”readonly richness: WorldFixedValue;Defined in: packages/sage/src/internal/c4/world.ts:373
WorldClaimStakeGroupData
Section titled “WorldClaimStakeGroupData”Defined in: packages/sage/src/internal/c4/world.ts:340
One translated nested Claim Stake structure group.
Example
Section titled “Example”declare const group: WorldClaimStakeGroupData;console.log(group.structures);Properties
Section titled “Properties”chronoAddresses
Section titled “chronoAddresses”readonly chronoAddresses: readonly Address[];Defined in: packages/sage/src/internal/c4/world.ts:343
readonly key: number;Defined in: packages/sage/src/internal/c4/world.ts:341
offset
Section titled “offset”readonly offset: number;Defined in: packages/sage/src/internal/c4/world.ts:342
structures
Section titled “structures”readonly structures: readonly WorldStructureData[];Defined in: packages/sage/src/internal/c4/world.ts:344
WorldConnectionCosts
Section titled “WorldConnectionCosts”Defined in: packages/sage/src/internal/c4/world.ts:157
Unit-explicit warp-lane costs for one connected system.
Example
Section titled “Example”declare const costs: WorldConnectionCosts;console.log(costs.level1Atlas);Properties
Section titled “Properties”cssAtlas
Section titled “cssAtlas”readonly cssAtlas: number;Defined in: packages/sage/src/internal/c4/world.ts:169
cssRaw
Section titled “cssRaw”readonly cssRaw: bigint;Defined in: packages/sage/src/internal/c4/world.ts:168
level1Atlas
Section titled “level1Atlas”readonly level1Atlas: number;Defined in: packages/sage/src/internal/c4/world.ts:159
level1Raw
Section titled “level1Raw”readonly level1Raw: bigint;Defined in: packages/sage/src/internal/c4/world.ts:158
level2Atlas
Section titled “level2Atlas”readonly level2Atlas: number;Defined in: packages/sage/src/internal/c4/world.ts:161
level2Raw
Section titled “level2Raw”readonly level2Raw: bigint;Defined in: packages/sage/src/internal/c4/world.ts:160
level3Atlas
Section titled “level3Atlas”readonly level3Atlas: number;Defined in: packages/sage/src/internal/c4/world.ts:163
level3Raw
Section titled “level3Raw”readonly level3Raw: bigint;Defined in: packages/sage/src/internal/c4/world.ts:162
level4Atlas
Section titled “level4Atlas”readonly level4Atlas: number;Defined in: packages/sage/src/internal/c4/world.ts:165
level4Raw
Section titled “level4Raw”readonly level4Raw: bigint;Defined in: packages/sage/src/internal/c4/world.ts:164
level5Atlas
Section titled “level5Atlas”readonly level5Atlas: number;Defined in: packages/sage/src/internal/c4/world.ts:167
level5Raw
Section titled “level5Raw”readonly level5Raw: bigint;Defined in: packages/sage/src/internal/c4/world.ts:166
WorldConnectionData
Section titled “WorldConnectionData”Defined in: packages/sage/src/internal/c4/world.ts:179
One StarSystem connection keyed by the connected system id.
Example
Section titled “Example”declare const connection: WorldConnectionData;console.log(connection.systemId);Properties
Section titled “Properties”readonly costs: WorldConnectionCosts;Defined in: packages/sage/src/internal/c4/world.ts:181
systemId
Section titled “systemId”readonly systemId: number;Defined in: packages/sage/src/internal/c4/world.ts:180
WorldCoordinates
Section titled “WorldCoordinates”Defined in: packages/sage/src/internal/c4/world.ts:128
Coordinates in SAGE sector units.
Example
Section titled “Example”const coordinates: WorldCoordinates = { x: 1, y: 2 };Properties
Section titled “Properties”readonly x: number;Defined in: packages/sage/src/internal/c4/world.ts:129
readonly y: number;Defined in: packages/sage/src/internal/c4/world.ts:130
WorldCraftingHabData
Section titled “WorldCraftingHabData”Defined in: packages/sage/src/internal/c4/world.ts:265
One nested Crafting Hab group retained as shared Starbase data.
Example
Section titled “Example”declare const hab: WorldCraftingHabData;console.log(hab.structures);Properties
Section titled “Properties”chronoAddresses
Section titled “chronoAddresses”readonly chronoAddresses: readonly Address[];Defined in: packages/sage/src/internal/c4/world.ts:268
readonly key: number;Defined in: packages/sage/src/internal/c4/world.ts:266
offset
Section titled “offset”readonly offset: number;Defined in: packages/sage/src/internal/c4/world.ts:267
structures
Section titled “structures”readonly structures: readonly WorldStructureData[];Defined in: packages/sage/src/internal/c4/world.ts:269
WorldFixedValue
Section titled “WorldFixedValue”Defined in: packages/sage/src/internal/c4/world.ts:117
A translated fixed-point world value retaining its exact source integer.
Example
Section titled “Example”const value: WorldFixedValue = { raw: 65_536n, value: 1 };Properties
Section titled “Properties”readonly raw: bigint;Defined in: packages/sage/src/internal/c4/world.ts:118
readonly value: number;Defined in: packages/sage/src/internal/c4/world.ts:119
WorldPlanetData
Section titled “WorldPlanetData”Defined in: packages/sage/src/internal/c4/world.ts:354
Fully translated Planet projection data.
Example
Section titled “Example”declare const planet: WorldPlanetData;console.log(planet.resources);Properties
Section titled “Properties”baseClaimStakePlacementFee
Section titled “baseClaimStakePlacementFee”readonly baseClaimStakePlacementFee: readonly readonly WorldFixedValue[][];Defined in: packages/sage/src/internal/c4/world.ts:357
baseClaimStakeRentRate
Section titled “baseClaimStakeRentRate”readonly baseClaimStakeRentRate: readonly readonly WorldFixedValue[][];Defined in: packages/sage/src/internal/c4/world.ts:356
claimedPlots
Section titled “claimedPlots”readonly claimedPlots: readonly WorldClaimStakeGroupData[];Defined in: packages/sage/src/internal/c4/world.ts:361
claimedPlotsUnsizedLength
Section titled “claimedPlotsUnsizedLength”readonly claimedPlotsUnsizedLength: number;Defined in: packages/sage/src/internal/c4/world.ts:360
claimStakePlots
Section titled “claimStakePlots”readonly claimStakePlots: readonly readonly number[][];Defined in: packages/sage/src/internal/c4/world.ts:355
providedTags
Section titled “providedTags”readonly providedTags: readonly number[];Defined in: packages/sage/src/internal/c4/world.ts:359
resources
Section titled “resources”readonly resources: readonly WorldPlanetResourceData[];Defined in: packages/sage/src/internal/c4/world.ts:358
WorldPlanetResourceData
Section titled “WorldPlanetResourceData”Defined in: packages/sage/src/internal/c4/world.ts:328
One translated Planet resource richness value.
Example
Section titled “Example”declare const resource: WorldPlanetResourceData;console.log(resource.richness.value);Properties
Section titled “Properties”cargoId
Section titled “cargoId”readonly cargoId: number;Defined in: packages/sage/src/internal/c4/world.ts:329
richness
Section titled “richness”readonly richness: WorldFixedValue;Defined in: packages/sage/src/internal/c4/world.ts:330
WorldStarbaseData
Section titled “WorldStarbaseData”Defined in: packages/sage/src/internal/c4/world.ts:279
Fully translated nested shared Starbase data.
Example
Section titled “Example”declare const starbase: WorldStarbaseData;console.log(starbase.owner, starbase.level);Properties
Section titled “Properties”baseCraftingHabPlacementFee
Section titled “baseCraftingHabPlacementFee”readonly baseCraftingHabPlacementFee: readonly readonly WorldFixedValue[][];Defined in: packages/sage/src/internal/c4/world.ts:292
baseCraftingHabRentRate
Section titled “baseCraftingHabRentRate”readonly baseCraftingHabRentRate: readonly readonly WorldFixedValue[][];Defined in: packages/sage/src/internal/c4/world.ts:291
buildingTags
Section titled “buildingTags”readonly buildingTags: readonly number[];Defined in: packages/sage/src/internal/c4/world.ts:295
builtDestroyedAtUnixSeconds
Section titled “builtDestroyedAtUnixSeconds”readonly builtDestroyedAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/world.ts:289
craftingHabPlots
Section titled “craftingHabPlots”readonly craftingHabPlots: readonly readonly number[][];Defined in: packages/sage/src/internal/c4/world.ts:290
craftingHabs
Section titled “craftingHabs”readonly craftingHabs: readonly WorldCraftingHabData[];Defined in: packages/sage/src/internal/c4/world.ts:298
craftingHabsUnsizedLength
Section titled “craftingHabsUnsizedLength”readonly craftingHabsUnsizedLength: number;Defined in: packages/sage/src/internal/c4/world.ts:297
readonly hp: number;Defined in: packages/sage/src/internal/c4/world.ts:284
lastCombatUpdateUnixSeconds
Section titled “lastCombatUpdateUnixSeconds”readonly lastCombatUpdateUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/world.ts:288
readonly level: WorldStarbaseLevel;Defined in: packages/sage/src/internal/c4/world.ts:281
localMarketEnableLevel
Section titled “localMarketEnableLevel”readonly localMarketEnableLevel: WorldStarbaseLevel;Defined in: packages/sage/src/internal/c4/world.ts:282
locationTags
Section titled “locationTags”readonly locationTags: readonly number[];Defined in: packages/sage/src/internal/c4/world.ts:294
maxLevel
Section titled “maxLevel”readonly maxLevel: WorldStarbaseMaxLevelData;Defined in: packages/sage/src/internal/c4/world.ts:293
readonly owner: WorldFaction;Defined in: packages/sage/src/internal/c4/world.ts:280
pendingHp
Section titled “pendingHp”readonly pendingHp: number;Defined in: packages/sage/src/internal/c4/world.ts:285
repairEnableLevel
Section titled “repairEnableLevel”readonly repairEnableLevel: WorldStarbaseLevel;Defined in: packages/sage/src/internal/c4/world.ts:283
shieldBreakDelayExpiresAtUnixSeconds
Section titled “shieldBreakDelayExpiresAtUnixSeconds”readonly shieldBreakDelayExpiresAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/world.ts:287
readonly sp: number;Defined in: packages/sage/src/internal/c4/world.ts:286
validRecipeIds
Section titled “validRecipeIds”readonly validRecipeIds: readonly number[];Defined in: packages/sage/src/internal/c4/world.ts:296
WorldStarbaseLevelData
Section titled “WorldStarbaseLevelData”Defined in: packages/sage/src/internal/c4/world.ts:228
One translated level inside the Starbase maximum-level union.
Example
Section titled “Example”declare const level: WorldStarbaseLevelData;console.log(level.upgrades);Properties
Section titled “Properties”readonly info: WorldStarbaseLevelInfoData;Defined in: packages/sage/src/internal/c4/world.ts:230
readonly level: WorldStarbaseLevel;Defined in: packages/sage/src/internal/c4/world.ts:229
upgrades
Section titled “upgrades”readonly upgrades: readonly WorldStarbaseUpgradeData[];Defined in: packages/sage/src/internal/c4/world.ts:231
WorldStarbaseLevelInfoData
Section titled “WorldStarbaseLevelInfoData”Defined in: packages/sage/src/internal/c4/world.ts:191
Fully translated combat/economy values for one Starbase level.
Example
Section titled “Example”declare const info: WorldStarbaseLevelInfoData;console.log(info.repairFeeAtlas);Properties
Section titled “Properties”damagePerRound
Section titled “damagePerRound”readonly damagePerRound: number;Defined in: packages/sage/src/internal/c4/world.ts:203
readonly hp: number;Defined in: packages/sage/src/internal/c4/world.ts:192
repairAbility
Section titled “repairAbility”readonly repairAbility: WorldFixedValue;Defined in: packages/sage/src/internal/c4/world.ts:198
repairCost
Section titled “repairCost”readonly repairCost: WorldFixedValue;Defined in: packages/sage/src/internal/c4/world.ts:200
repairEfficiency
Section titled “repairEfficiency”readonly repairEfficiency: WorldFixedValue;Defined in: packages/sage/src/internal/c4/world.ts:199
repairFeeAtlas
Section titled “repairFeeAtlas”readonly repairFeeAtlas: number;Defined in: packages/sage/src/internal/c4/world.ts:202
repairFeeRaw
Section titled “repairFeeRaw”readonly repairFeeRaw: bigint;Defined in: packages/sage/src/internal/c4/world.ts:201
repairRate
Section titled “repairRate”readonly repairRate: WorldFixedValue;Defined in: packages/sage/src/internal/c4/world.ts:197
shieldBreakDelaySeconds
Section titled “shieldBreakDelaySeconds”readonly shieldBreakDelaySeconds: number;Defined in: packages/sage/src/internal/c4/world.ts:195
shieldRechargeRate
Section titled “shieldRechargeRate”readonly shieldRechargeRate: WorldFixedValue;Defined in: packages/sage/src/internal/c4/world.ts:196
readonly sp: number;Defined in: packages/sage/src/internal/c4/world.ts:193
readonly xp: WorldFixedValue;Defined in: packages/sage/src/internal/c4/world.ts:194
WorldStarbaseMaxLevelData
Section titled “WorldStarbaseMaxLevelData”Defined in: packages/sage/src/internal/c4/world.ts:241
Plain replacement for the generated StarbaseMaxLevel union.
Example
Section titled “Example”declare const maximum: WorldStarbaseMaxLevelData;console.log(maximum.kind);Properties
Section titled “Properties”readonly kind: WorldStarbaseLevel;Defined in: packages/sage/src/internal/c4/world.ts:242
levels
Section titled “levels”readonly levels: readonly WorldStarbaseLevelData[];Defined in: packages/sage/src/internal/c4/world.ts:243
WorldStarbaseUpgradeData
Section titled “WorldStarbaseUpgradeData”Defined in: packages/sage/src/internal/c4/world.ts:213
One cargo deposit requirement for an intermediate Starbase level.
Example
Section titled “Example”declare const upgrade: WorldStarbaseUpgradeData;console.log(upgrade.cargoId);Properties
Section titled “Properties”cargoId
Section titled “cargoId”readonly cargoId: number;Defined in: packages/sage/src/internal/c4/world.ts:214
readonly crew: number;Defined in: packages/sage/src/internal/c4/world.ts:217
deposited
Section titled “deposited”readonly deposited: bigint;Defined in: packages/sage/src/internal/c4/world.ts:216
durationSeconds
Section titled “durationSeconds”readonly durationSeconds: number;Defined in: packages/sage/src/internal/c4/world.ts:218
needed
Section titled “needed”readonly needed: bigint;Defined in: packages/sage/src/internal/c4/world.ts:215
WorldStructureData
Section titled “WorldStructureData”Defined in: packages/sage/src/internal/c4/world.ts:253
One nested shared structure value from Starbase crafting-hab data.
Example
Section titled “Example”declare const structure: WorldStructureData;console.log(structure.address);Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/internal/c4/world.ts:254
deactivationTimeUnixSeconds
Section titled “deactivationTimeUnixSeconds”readonly deactivationTimeUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/world.ts:255
Type Aliases
Section titled “Type Aliases”CelestialBodySnapshot
Section titled “CelestialBodySnapshot”type CelestialBodySnapshot = | PlanetSnapshot | AsteroidSnapshot;Defined in: packages/sage/src/world/index.ts:112
A translated CelestialBody snapshot projected as a Planet or Asteroid.
Example
Section titled “Example”declare const body: CelestialBodySnapshot;if (body.kind === 'planet') console.log(body.details.claimStakePlots);StarSystemDiscoveryOptions
Section titled “StarSystemDiscoveryOptions”type StarSystemDiscoveryOptions = Omit<DiscoveryRequest, "filters" | "strategy">;Defined in: packages/sage/src/world/index.ts:55
Options supported by galaxy-scale StarSystem discovery.
Example
Section titled “Example”const options: StarSystemDiscoveryOptions = { commitment: 'confirmed' };WorldFaction
Section titled “WorldFaction”type WorldFaction = "unaligned" | "mud" | "oni" | "ustur";Defined in: packages/sage/src/internal/c4/world.ts:139
Human-readable faction labels used by shared Starbase data.
Example
Section titled “Example”const faction: WorldFaction = 'mud';WorldStarbaseLevel
Section titled “WorldStarbaseLevel”type WorldStarbaseLevel = | "level-0" | "level-1" | "level-2" | "level-3" | "level-4" | "level-5" | "css";Defined in: packages/sage/src/internal/c4/world.ts:147
Human-readable Starbase level labels.
Example
Section titled “Example”const level: WorldStarbaseLevel = 'level-1';Functions
Section titled “Functions”distanceBetweenStarSystems()
Section titled “distanceBetweenStarSystems()”function distanceBetweenStarSystems(from, to): number;Defined in: packages/sage/src/world/index.ts:523
Returns Euclidean distance between two SAGE sector coordinates.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
from | WorldCoordinates |
to | WorldCoordinates |
Returns
Section titled “Returns”number
Example
Section titled “Example”const distance = distanceBetweenStarSystems({ x: 0, y: 0 }, { x: 3, y: 4 });findCelestialBodyPda()
Section titled “findCelestialBodyPda()”function findCelestialBodyPda(game, bodyId): Promise<Address>;Defined in: packages/sage/src/world/index.ts:260
Derives the CelestialBody PDA for a Game and numeric body id.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
game | Address |
bodyId | number |
Returns
Section titled “Returns”Promise<Address>
Example
Section titled “Example”declare const game: Address;const address = await findCelestialBodyPda(game, 11);findStarSystemPda()
Section titled “findStarSystemPda()”function findStarSystemPda(game, systemId): Promise<Address>;Defined in: packages/sage/src/world/index.ts:246
Derives the StarSystem PDA for a Game and numeric system id.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
game | Address |
systemId | number |
Returns
Section titled “Returns”Promise<Address>
Example
Section titled “Example”declare const game: Address;const address = await findStarSystemPda(game, 1);getAsteroids()
Section titled “getAsteroids()”function getAsteroids( ctx, systemAddress,options?): Promise<readonly AsteroidSnapshot[]>;Defined in: packages/sage/src/world/index.ts:502
Returns only Asteroid projections in one StarSystem.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
systemAddress | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<readonly AsteroidSnapshot[]>
Example
Section titled “Example”declare const ctx: SageContext;declare const systemAddress: Address;const asteroids = await getAsteroids(ctx, systemAddress);getCelestialBodies()
Section titled “getCelestialBodies()”function getCelestialBodies( ctx, systemAddress,options?): Promise<readonly CelestialBodySnapshot[]>;Defined in: packages/sage/src/world/index.ts:441
Traverses a StarSystem’s stored CelestialBody addresses with explicit reads.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
systemAddress | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<readonly CelestialBodySnapshot[]>
Example
Section titled “Example”declare const ctx: SageContext;declare const systemAddress: Address;const bodies = await getCelestialBodies(ctx, systemAddress);getCelestialBody()
Section titled “getCelestialBody()”function getCelestialBody( ctx, address,options?): Promise<CelestialBodySnapshot>;Defined in: packages/sage/src/world/index.ts:369
Reads a required CelestialBody by account address.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<CelestialBodySnapshot>
Example
Section titled “Example”declare const ctx: SageContext;declare const address: Address;const body = await getCelestialBody(ctx, address);getCelestialBodyById()
Section titled “getCelestialBodyById()”function getCelestialBodyById( ctx, bodyId,options?): Promise<CelestialBodySnapshot>;Defined in: packages/sage/src/world/index.ts:412
Derives and reads a CelestialBody by its Game-scoped numeric id.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
bodyId | number |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<CelestialBodySnapshot>
Example
Section titled “Example”declare const ctx: SageContext;const body = await getCelestialBodyById(ctx, 11);getCelestialBodyCoordinates()
Section titled “getCelestialBodyCoordinates()”function getCelestialBodyCoordinates( ctx, bodyAddress,options?): Promise<WorldCoordinates>;Defined in: packages/sage/src/world/index.ts:538
Resolves a CelestialBody’s stored StarSystem relation to sector coordinates.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
bodyAddress | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<WorldCoordinates>
Example
Section titled “Example”declare const ctx: SageContext;declare const bodyAddress: Address;const coordinates = await getCelestialBodyCoordinates(ctx, bodyAddress);getPlanets()
Section titled “getPlanets()”function getPlanets( ctx, systemAddress,options?): Promise<readonly PlanetSnapshot[]>;Defined in: packages/sage/src/world/index.ts:479
Returns only Planet projections in one StarSystem.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
systemAddress | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<readonly PlanetSnapshot[]>
Example
Section titled “Example”declare const ctx: SageContext;declare const systemAddress: Address;const planets = await getPlanets(ctx, systemAddress);getStarSystem()
Section titled “getStarSystem()”function getStarSystem( ctx, address,options?): Promise<StarSystemSnapshot>;Defined in: packages/sage/src/world/index.ts:275
Reads a required StarSystem by account address.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarSystemSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;declare const address: Address;const system = await getStarSystem(ctx, address);getStarSystemById()
Section titled “getStarSystemById()”function getStarSystemById( ctx, systemId,options?): Promise<StarSystemSnapshot>;Defined in: packages/sage/src/world/index.ts:318
Derives and reads a StarSystem by its Game-scoped numeric id.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
systemId | number |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarSystemSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;const system = await getStarSystemById(ctx, 1);getStarSystems()
Section titled “getStarSystems()”function getStarSystems(ctx, options?): Promise<readonly StarSystemSnapshot[]>;Defined in: packages/sage/src/world/index.ts:344
Discovers all StarSystems for the configured Game with stable targeted filters.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
options | StarSystemDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly StarSystemSnapshot[]>
Example
Section titled “Example”declare const ctx: SageContext;const systems = await getStarSystems(ctx);maybeGetCelestialBody()
Section titled “maybeGetCelestialBody()”function maybeGetCelestialBody( ctx, address, options?): Promise< | CelestialBodySnapshot| undefined>;Defined in: packages/sage/src/world/index.ts:389
Reads an optional CelestialBody by account address.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<
| CelestialBodySnapshot
| undefined>
Example
Section titled “Example”declare const ctx: SageContext;declare const address: Address;const body = await maybeGetCelestialBody(ctx, address);maybeGetStarSystem()
Section titled “maybeGetStarSystem()”function maybeGetStarSystem( ctx, address, options?): Promise< | StarSystemSnapshot| undefined>;Defined in: packages/sage/src/world/index.ts:295
Reads an optional StarSystem by account address.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
ctx | SageContext |
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<
| StarSystemSnapshot
| undefined>
Example
Section titled “Example”declare const ctx: SageContext;declare const address: Address;const system = await maybeGetStarSystem(ctx, address);