index
Interfaces
Section titled “Interfaces”AccountSubscriptionProvider
Section titled “AccountSubscriptionProvider”Defined in: packages/sage/src/client/contracts.ts:366
Replaceable WebSocket provider used by a SageContext.
The provider owns transport reconnection and emits a reconnected event
after each successful re-registration. The context owns validation, cache
updates, consumer notification, cancellation, and final disposal. Providers
must apply bounded exponential backoff with jitter between reconnect attempts
and must not emit reconnected for a failed attempt.
Example
Section titled “Example”const subscriptions: AccountSubscriptionProvider = { identity: { kind: 'websocket', name: 'zink-ptr' }, subscribeAccount: async () => ({ unsubscribe: async () => undefined }),};Properties
Section titled “Properties”identity
Section titled “identity”readonly identity: DataSourceIdentity;Defined in: packages/sage/src/client/contracts.ts:367
Methods
Section titled “Methods”subscribeAccount()
Section titled “subscribeAccount()”subscribeAccount(request, listener): Promise<AccountSubscriptionRegistration>;Defined in: packages/sage/src/client/contracts.ts:368
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
request | AccountSubscriptionRequest |
listener | (event) => void |
Returns
Section titled “Returns”Promise<AccountSubscriptionRegistration>
AccountSubscriptionRegistration
Section titled “AccountSubscriptionRegistration”Defined in: packages/sage/src/client/contracts.ts:346
Provider-owned handle for one raw WebSocket registration.
Example
Section titled “Example”declare const registration: AccountSubscriptionRegistration;await registration.unsubscribe();Methods
Section titled “Methods”unsubscribe()
Section titled “unsubscribe()”unsubscribe(): Promise<void>;Defined in: packages/sage/src/client/contracts.ts:347
Returns
Section titled “Returns”Promise<void>
AccountSubscriptionRequest
Section titled “AccountSubscriptionRequest”Defined in: packages/sage/src/client/contracts.ts:319
A context-owned raw-account subscription request.
Example
Section titled “Example”declare const address: Address;const request: AccountSubscriptionRequest = { address, commitment: 'confirmed' };Extends
Section titled “Extends”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/client/contracts.ts:320
commitment?
Section titled “commitment?”readonly optional commitment?: Commitment;Defined in: packages/sage/src/client/contracts.ts:153
Inherited from
Section titled “Inherited from”signal?
Section titled “signal?”readonly optional signal?: AbortSignal;Defined in: packages/sage/src/client/contracts.ts:154
Inherited from
Section titled “Inherited from”AsteroidView
Section titled “AsteroidView”Defined in: packages/sage/src/index.ts:368
A loaded Asteroid whose stored StarSystem reference resolves through the root client.
Example
Section titled “Example”declare const asteroid: AsteroidView;const system = await asteroid.system.get();Extends
Section titled “Extends”Omit<AsteroidSnapshot,"system">
Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/world/index.ts:100
Inherited from
Section titled “Inherited from”claimStakes
Section titled “claimStakes”readonly claimStakes: { all: Promise<readonly ClaimStakeView[]>;};Defined in: packages/sage/src/index.ts:369
all(options?): Promise<readonly ClaimStakeView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ClaimStakeDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly ClaimStakeView[]>
deposit
Section titled “deposit”readonly deposit: { get: Promise<ResourceDepositView>;};Defined in: packages/sage/src/index.ts:374
get(options?): Promise<ResourceDepositView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ReadOptions |
Returns
Section titled “Returns”Promise<ResourceDepositView>
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"> & { get: Promise<StarSystemView>;};Defined in: packages/sage/src/index.ts:377
Type Declaration
Section titled “Type Declaration”get(options?): Promise<StarSystemView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarSystemView>
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
Inherited from
Section titled “Inherited from”CargoDefinitionSummary
Section titled “CargoDefinitionSummary”Defined in: packages/sage/src/registry/index.ts:68
Small, stable cargo definition returned to gameplay domains.
Example
Section titled “Example”declare const ctx: SageContext;const cargo: CargoDefinitionSummary = await resolveCargo(ctx, 7);Extended by
Section titled “Extended by”CraftingCargoItemCraftingDefinitionCargoItemFactionMarketOfferSnapshotStarbaseCargoItemCargoInventoryItemClaimStakeResourceRate
Properties
Section titled “Properties”categoryId
Section titled “categoryId”readonly categoryId: number;Defined in: packages/sage/src/registry/index.ts:69
readonly id: number;Defined in: packages/sage/src/registry/index.ts:70
readonly mint: Address;Defined in: packages/sage/src/registry/index.ts:71
readonly name: string;Defined in: packages/sage/src/registry/index.ts:72
storageCost
Section titled “storageCost”readonly storageCost: number;Defined in: packages/sage/src/registry/index.ts:73
CharacterView
Section titled “CharacterView”Defined in: packages/sage/src/index.ts:166
A loaded Character with root-only relation accessors.
Example
Section titled “Example”declare const sage: SageClient;declare const profileAddress: Address;const character: CharacterView = await sage.characters.forProfile(profileAddress);const fleets = await character.fleets.all();const craftingHabs = await character.craftingHabs.all();const craftingProcesses = await character.craftingProcesses.all();Extends
Section titled “Extends”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/identity/index.ts:122
Inherited from
Section titled “Inherited from”readonly atlas: number;Defined in: packages/sage/src/internal/c4/identity.ts:242
Inherited from
Section titled “Inherited from”atlasRaw
Section titled “atlasRaw”readonly atlasRaw: bigint;Defined in: packages/sage/src/internal/c4/identity.ts:241
Inherited from
Section titled “Inherited from”readonly bump: number;Defined in: packages/sage/src/internal/c4/identity.ts:235
Inherited from
Section titled “Inherited from”checkIn
Section titled “checkIn”readonly checkIn: { lastCheckInTime: bigint; streak: number;};Defined in: packages/sage/src/internal/c4/identity.ts:236
lastCheckInTime
Section titled “lastCheckInTime”readonly lastCheckInTime: bigint;streak
Section titled “streak”readonly streak: number;Inherited from
Section titled “Inherited from”claimStakes
Section titled “claimStakes”readonly claimStakes: { all: Promise<readonly ClaimStakeView[]>;};Defined in: packages/sage/src/index.ts:177
all(options?): Promise<readonly ClaimStakeView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ClaimStakeDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly ClaimStakeView[]>
counts
Section titled “counts”readonly counts: { claimStakes: number; craftingHabs: number; fleets: number;};Defined in: packages/sage/src/internal/c4/identity.ts:243
claimStakes
Section titled “claimStakes”readonly claimStakes: number;craftingHabs
Section titled “craftingHabs”readonly craftingHabs: number;fleets
Section titled “fleets”readonly fleets: number;Inherited from
Section titled “Inherited from”craftingHabs
Section titled “craftingHabs”readonly craftingHabs: { all: Promise<readonly CraftingHabView[]>;};Defined in: packages/sage/src/index.ts:185
all(options?): Promise<readonly CraftingHabView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingHabView[]>
craftingProcesses
Section titled “craftingProcesses”readonly craftingProcesses: { all: Promise<readonly CraftingProcessView[]>;};Defined in: packages/sage/src/index.ts:190
all(options?): Promise<readonly CraftingProcessView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingProcessView[]>
fleets
Section titled “fleets”readonly fleets: { all: Promise<readonly FleetView[]>;};Defined in: packages/sage/src/index.ts:182
all(options?): Promise<readonly FleetView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | FleetDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly FleetView[]>
readonly game: Address;Defined in: packages/sage/src/internal/c4/identity.ts:234
Inherited from
Section titled “Inherited from”readonly kind: "character";Defined in: packages/sage/src/identity/index.ts:121
Inherited from
Section titled “Inherited from”localMarketOrders
Section titled “localMarketOrders”readonly localMarketOrders: { at: Promise<readonly LocalMarketOrderSnapshot & { makerState: LocalMarketMakerStateSnapshot; }[]>;};Defined in: packages/sage/src/index.ts:167
at(market, options?): Promise<readonly LocalMarketOrderSnapshot & { makerState: LocalMarketMakerStateSnapshot;}[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
market | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<readonly LocalMarketOrderSnapshot & {
makerState: LocalMarketMakerStateSnapshot;
}[]>
modifiers
Section titled “modifiers”readonly modifiers: CharacterModifiersData;Defined in: packages/sage/src/internal/c4/identity.ts:254
Inherited from
Section titled “Inherited from”CharacterAccountData.modifiers
pilotXpBudget
Section titled “pilotXpBudget”readonly pilotXpBudget: { available: number; fractionalCarry: number; fractionalCarryRaw: bigint; lastAccrualTime: bigint;};Defined in: packages/sage/src/internal/c4/identity.ts:248
available
Section titled “available”readonly available: number;fractionalCarry
Section titled “fractionalCarry”readonly fractionalCarry: number;fractionalCarryRaw
Section titled “fractionalCarryRaw”readonly fractionalCarryRaw: bigint;lastAccrualTime
Section titled “lastAccrualTime”readonly lastAccrualTime: bigint;Inherited from
Section titled “Inherited from”CharacterAccountData.pilotXpBudget
profile
Section titled “profile”readonly profile: EntityRef<"profile">;Defined in: packages/sage/src/identity/index.ts:123
Inherited from
Section titled “Inherited from”starbases
Section titled “starbases”readonly starbases: { all: Promise<readonly StarbasePlayerView[]>; at: Promise<StarbasePlayerView>;};Defined in: packages/sage/src/index.ts:195
all(options?): Promise<readonly StarbasePlayerView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | StarbaseDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly StarbasePlayerView[]>
at(system, options?): Promise<StarbasePlayerView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
system | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarbasePlayerView>
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/identity.ts:232
Inherited from
Section titled “Inherited from”readonly xp: CharacterXpData;Defined in: packages/sage/src/internal/c4/identity.ts:240
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/identity/index.ts:124
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”ClaimStakeView
Section titled “ClaimStakeView”Defined in: packages/sage/src/index.ts:276
A loaded Claim Stake exposed by the root convenience client.
Example
Section titled “Example”declare const stake: ClaimStakeView;console.log(stake.state.kind);Extends
Section titled “Extends”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/claim-stakes/index.ts:63
Inherited from
Section titled “Inherited from”readonly body: EntityRef<"celestialBody">;Defined in: packages/sage/src/claim-stakes/index.ts:64
Inherited from
Section titled “Inherited from”buildingDefinitionSeqId
Section titled “buildingDefinitionSeqId”readonly buildingDefinitionSeqId: number;Defined in: packages/sage/src/internal/c4/claim-stake.ts:157
Inherited from
Section titled “Inherited from”ClaimStakeAccountData.buildingDefinitionSeqId
buildings
Section titled “buildings”readonly buildings: readonly ClaimStakeBuildingData[];Defined in: packages/sage/src/internal/c4/claim-stake.ts:164
Inherited from
Section titled “Inherited from”ClaimStakeAccountData.buildings
claimStakeDefinitionId
Section titled “claimStakeDefinitionId”readonly claimStakeDefinitionId: number;Defined in: packages/sage/src/internal/c4/claim-stake.ts:155
Inherited from
Section titled “Inherited from”ClaimStakeAccountData.claimStakeDefinitionId
claimStakeDefinitionSeqId
Section titled “claimStakeDefinitionSeqId”readonly claimStakeDefinitionSeqId: number;Defined in: packages/sage/src/internal/c4/claim-stake.ts:156
Inherited from
Section titled “Inherited from”ClaimStakeAccountData.claimStakeDefinitionSeqId
constructionProgressAtUnixSeconds
Section titled “constructionProgressAtUnixSeconds”readonly constructionProgressAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/claim-stake.ts:161
Inherited from
Section titled “Inherited from”ClaimStakeAccountData.constructionProgressAtUnixSeconds
constructionRemainingSeconds
Section titled “constructionRemainingSeconds”readonly constructionRemainingSeconds: bigint;Defined in: packages/sage/src/internal/c4/claim-stake.ts:160
Inherited from
Section titled “Inherited from”ClaimStakeAccountData.constructionRemainingSeconds
readonly game: Address;Defined in: packages/sage/src/internal/c4/claim-stake.ts:153
Inherited from
Section titled “Inherited from”readonly kind: "claimStakeInstance";Defined in: packages/sage/src/claim-stakes/index.ts:62
Inherited from
Section titled “Inherited from”lastRentAtUnixSeconds
Section titled “lastRentAtUnixSeconds”readonly lastRentAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/claim-stake.ts:159
Inherited from
Section titled “Inherited from”ClaimStakeAccountData.lastRentAtUnixSeconds
neededCrew
Section titled “neededCrew”readonly neededCrew: number;Defined in: packages/sage/src/internal/c4/claim-stake.ts:163
Inherited from
Section titled “Inherited from”ClaimStakeAccountData.neededCrew
ownerCharacter
Section titled “ownerCharacter”readonly ownerCharacter: EntityRef<"character">;Defined in: packages/sage/src/claim-stakes/index.ts:65
Inherited from
Section titled “Inherited from”ClaimStakeSnapshot.ownerCharacter
rentBalanceRaw
Section titled “rentBalanceRaw”readonly rentBalanceRaw: bigint;Defined in: packages/sage/src/internal/c4/claim-stake.ts:162
Inherited from
Section titled “Inherited from”ClaimStakeAccountData.rentBalanceRaw
resources
Section titled “resources”readonly resources: ClaimStakeResources;Defined in: packages/sage/src/claim-stakes/index.ts:66
Inherited from
Section titled “Inherited from”readonly state: ClaimStakeStateData;Defined in: packages/sage/src/internal/c4/claim-stake.ts:165
Inherited from
Section titled “Inherited from”systemSeqId
Section titled “systemSeqId”readonly systemSeqId: bigint;Defined in: packages/sage/src/internal/c4/claim-stake.ts:158
Inherited from
Section titled “Inherited from”ClaimStakeAccountData.systemSeqId
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/claim-stake.ts:151
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/claim-stakes/index.ts:67
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”CraftingHabView
Section titled “CraftingHabView”Defined in: packages/sage/src/index.ts:331
A loaded Crafting Hab exposed by the root convenience client.
Example
Section titled “Example”declare const sage: SageClient;declare const address: Address;const hab: CraftingHabView = await sage.craftingHabs.get(address);Extends
Section titled “Extends”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/crafting/index.ts:183
Inherited from
Section titled “Inherited from”availableJobSlots
Section titled “availableJobSlots”readonly availableJobSlots: number;Defined in: packages/sage/src/crafting/index.ts:189
Inherited from
Section titled “Inherited from”CraftingHabSnapshot.availableJobSlots
buildingDefinitionSequenceId
Section titled “buildingDefinitionSequenceId”readonly buildingDefinitionSequenceId: number;Defined in: packages/sage/src/internal/c4/crafting.ts:207
Inherited from
Section titled “Inherited from”CraftingHabSnapshot.buildingDefinitionSequenceId
buildings
Section titled “buildings”readonly buildings: readonly CraftingHabBuilding[];Defined in: packages/sage/src/crafting/index.ts:188
Inherited from
Section titled “Inherited from”constructionProgressAtUnixSeconds
Section titled “constructionProgressAtUnixSeconds”readonly constructionProgressAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:211
Inherited from
Section titled “Inherited from”CraftingHabSnapshot.constructionProgressAtUnixSeconds
constructionRemainingSeconds
Section titled “constructionRemainingSeconds”readonly constructionRemainingSeconds: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:210
Inherited from
Section titled “Inherited from”CraftingHabSnapshot.constructionRemainingSeconds
definition
Section titled “definition”readonly definition: CraftingHabDefinitionSummary;Defined in: packages/sage/src/crafting/index.ts:187
Inherited from
Section titled “Inherited from”CraftingHabSnapshot.definition
definitionId
Section titled “definitionId”readonly definitionId: number;Defined in: packages/sage/src/internal/c4/crafting.ts:205
Inherited from
Section titled “Inherited from”CraftingHabSnapshot.definitionId
definitionSequenceId
Section titled “definitionSequenceId”readonly definitionSequenceId: number;Defined in: packages/sage/src/internal/c4/crafting.ts:206
Inherited from
Section titled “Inherited from”CraftingHabSnapshot.definitionSequenceId
readonly game: EntityRef<"game">;Defined in: packages/sage/src/crafting/index.ts:184
Inherited from
Section titled “Inherited from”jobCapacity
Section titled “jobCapacity”readonly jobCapacity: number;Defined in: packages/sage/src/internal/c4/crafting.ts:214
Inherited from
Section titled “Inherited from”CraftingHabSnapshot.jobCapacity
jobsRunning
Section titled “jobsRunning”readonly jobsRunning: number;Defined in: packages/sage/src/internal/c4/crafting.ts:215
Inherited from
Section titled “Inherited from”CraftingHabSnapshot.jobsRunning
readonly kind: "craftingHabInstance";Defined in: packages/sage/src/crafting/index.ts:182
Inherited from
Section titled “Inherited from”lastRentAtUnixSeconds
Section titled “lastRentAtUnixSeconds”readonly lastRentAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:209
Inherited from
Section titled “Inherited from”CraftingHabSnapshot.lastRentAtUnixSeconds
modifiers
Section titled “modifiers”readonly modifiers: CraftingModifierData;Defined in: packages/sage/src/internal/c4/crafting.ts:216
Inherited from
Section titled “Inherited from”neededCrew
Section titled “neededCrew”readonly neededCrew: number;Defined in: packages/sage/src/internal/c4/crafting.ts:213
Inherited from
Section titled “Inherited from”CraftingHabSnapshot.neededCrew
ownerProfile
Section titled “ownerProfile”readonly ownerProfile: EntityRef<"profile">;Defined in: packages/sage/src/crafting/index.ts:185
Inherited from
Section titled “Inherited from”CraftingHabSnapshot.ownerProfile
production
Section titled “production”readonly production: { inventory: CraftingCargoInventory; lastTickAtUnixSeconds: bigint; netRates: readonly CargoDefinitionSummary & { unitsPerSecond: number; unitsPerSecondRaw: bigint; }[]; resourceCapacityRaw: bigint;};Defined in: packages/sage/src/crafting/index.ts:191
inventory
Section titled “inventory”readonly inventory: CraftingCargoInventory;lastTickAtUnixSeconds
Section titled “lastTickAtUnixSeconds”readonly lastTickAtUnixSeconds: bigint;netRates
Section titled “netRates”readonly netRates: readonly CargoDefinitionSummary & { unitsPerSecond: number; unitsPerSecondRaw: bigint;}[];resourceCapacityRaw
Section titled “resourceCapacityRaw”readonly resourceCapacityRaw: bigint;Inherited from
Section titled “Inherited from”CraftingHabSnapshot.production
rentBalanceRaw
Section titled “rentBalanceRaw”readonly rentBalanceRaw: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:212
Inherited from
Section titled “Inherited from”CraftingHabSnapshot.rentBalanceRaw
readonly state: CraftingHabStateData;Defined in: packages/sage/src/internal/c4/crafting.ts:219
Inherited from
Section titled “Inherited from”system
Section titled “system”readonly system: EntityRef<"starSystem">;Defined in: packages/sage/src/crafting/index.ts:186
Inherited from
Section titled “Inherited from”systemSequenceId
Section titled “systemSequenceId”readonly systemSequenceId: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:208
Inherited from
Section titled “Inherited from”CraftingHabSnapshot.systemSequenceId
unlockedRecipes
Section titled “unlockedRecipes”readonly unlockedRecipes: readonly EntityRef<"recipe">[];Defined in: packages/sage/src/crafting/index.ts:190
Inherited from
Section titled “Inherited from”CraftingHabView.unlockedRecipes
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/crafting.ts:201
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/crafting/index.ts:200
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”CraftingProcessView
Section titled “CraftingProcessView”Defined in: packages/sage/src/index.ts:341
A loaded Crafting Process exposed by the root convenience client.
Example
Section titled “Example”declare const sage: SageClient;declare const address: Address;const process: CraftingProcessView = await sage.craftingProcesses.get(address);Extends
Section titled “Extends”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/crafting/index.ts:215
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.address
craftingHab
Section titled “craftingHab”readonly craftingHab: EntityRef<"craftingHabInstance">;Defined in: packages/sage/src/crafting/index.ts:220
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.craftingHab
endsAtUnixSeconds
Section titled “endsAtUnixSeconds”readonly endsAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:239
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.endsAtUnixSeconds
feeEscrowAtlas
Section titled “feeEscrowAtlas”readonly feeEscrowAtlas: number;Defined in: packages/sage/src/crafting/index.ts:222
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.feeEscrowAtlas
feeEscrowRaw
Section titled “feeEscrowRaw”readonly feeEscrowRaw: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:240
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.feeEscrowRaw
inputs
Section titled “inputs”readonly inputs: CraftingCargoInventory;Defined in: packages/sage/src/crafting/index.ts:221
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.inputs
readonly kind: "craftingProcess";Defined in: packages/sage/src/crafting/index.ts:214
Inherited from
Section titled “Inherited from”numCrew
Section titled “numCrew”readonly numCrew: number;Defined in: packages/sage/src/internal/c4/crafting.ts:237
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.numCrew
profile
Section titled “profile”readonly profile: EntityRef<"profile">;Defined in: packages/sage/src/crafting/index.ts:217
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.profile
quantityRaw
Section titled “quantityRaw”readonly quantityRaw: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:236
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.quantityRaw
recipe
Section titled “recipe”readonly recipe: RecipeSnapshot;Defined in: packages/sage/src/crafting/index.ts:216
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.recipe
starbasePlayer
Section titled “starbasePlayer”readonly starbasePlayer: EntityRef<"starbasePlayer">;Defined in: packages/sage/src/crafting/index.ts:219
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.starbasePlayer
starbaseSequenceId
Section titled “starbaseSequenceId”readonly starbaseSequenceId: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:234
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.starbaseSequenceId
startsAtUnixSeconds
Section titled “startsAtUnixSeconds”readonly startsAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:238
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.startsAtUnixSeconds
system
Section titled “system”readonly system: EntityRef<"starSystem">;Defined in: packages/sage/src/crafting/index.ts:218
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.system
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/crafting.ts:229
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.version
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/crafting/index.ts:223
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”CraftingProcessSnapshot.toJSON
DefinitionLookupOptions
Section titled “DefinitionLookupOptions”Defined in: packages/sage/src/registry/index.ts:133
Sequence information supplied by a live account that references a definition.
Example
Section titled “Example”const options: DefinitionLookupOptions = { expectedSequenceId: 12 };Properties
Section titled “Properties”expectedSequenceId?
Section titled “expectedSequenceId?”readonly optional expectedSequenceId?: number;Defined in: packages/sage/src/registry/index.ts:134
EntityRef
Section titled “EntityRef”Defined in: packages/sage/src/client/refs.ts:11
A lightweight cross-domain reference to an independently addressable account.
Example
Section titled “Example”declare const fleetAddress: Address;const fleet: EntityRef<'fleet'> = entityRef('fleet', fleetAddress);Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
TType extends EntityType | EntityType |
Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/client/refs.ts:13
readonly type: TType;Defined in: packages/sage/src/client/refs.ts:12
FactionMarketView
Section titled “FactionMarketView”Defined in: packages/sage/src/index.ts:442
A loaded Faction Market exposed by the root convenience client.
Example
Section titled “Example”declare const market: FactionMarketView;console.log(market.offers);Extends
Section titled “Extends”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/markets/index.ts:159
Inherited from
Section titled “Inherited from”atlasBurnBasisPoints
Section titled “atlasBurnBasisPoints”readonly atlasBurnBasisPoints: number;Defined in: packages/sage/src/internal/c4/market.ts:179
Inherited from
Section titled “Inherited from”FactionMarketSnapshot.atlasBurnBasisPoints
authoredTargetQuantityRaw
Section titled “authoredTargetQuantityRaw”readonly authoredTargetQuantityRaw: bigint;Defined in: packages/sage/src/internal/c4/market.ts:176
Inherited from
Section titled “Inherited from”FactionMarketSnapshot.authoredTargetQuantityRaw
readonly bump: number;Defined in: packages/sage/src/internal/c4/market.ts:167
Inherited from
Section titled “Inherited from”factionId
Section titled “factionId”readonly factionId: number;Defined in: packages/sage/src/internal/c4/market.ts:169
Inherited from
Section titled “Inherited from”FactionMarketSnapshot.factionId
faucetEnabled
Section titled “faucetEnabled”readonly faucetEnabled: boolean;Defined in: packages/sage/src/internal/c4/market.ts:181
Inherited from
Section titled “Inherited from”FactionMarketSnapshot.faucetEnabled
readonly game: EntityRef<"game">;Defined in: packages/sage/src/markets/index.ts:160
Inherited from
Section titled “Inherited from”readonly kind: "factionMarket";Defined in: packages/sage/src/markets/index.ts:158
Inherited from
Section titled “Inherited from”lastRestockedAtUnixSeconds
Section titled “lastRestockedAtUnixSeconds”readonly lastRestockedAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/market.ts:178
Inherited from
Section titled “Inherited from”FactionMarketSnapshot.lastRestockedAtUnixSeconds
minimumStandingToBuy
Section titled “minimumStandingToBuy”readonly minimumStandingToBuy: number;Defined in: packages/sage/src/internal/c4/market.ts:173
Inherited from
Section titled “Inherited from”FactionMarketSnapshot.minimumStandingToBuy
minimumStandingToSell
Section titled “minimumStandingToSell”readonly minimumStandingToSell: number;Defined in: packages/sage/src/internal/c4/market.ts:174
Inherited from
Section titled “Inherited from”FactionMarketSnapshot.minimumStandingToSell
offers
Section titled “offers”readonly offers: readonly FactionMarketOfferSnapshot[];Defined in: packages/sage/src/markets/index.ts:162
Inherited from
Section titled “Inherited from”priceTierBasisPoints
Section titled “priceTierBasisPoints”readonly priceTierBasisPoints: readonly number[];Defined in: packages/sage/src/internal/c4/market.ts:175
Inherited from
Section titled “Inherited from”FactionMarketSnapshot.priceTierBasisPoints
restockPeriodSeconds
Section titled “restockPeriodSeconds”readonly restockPeriodSeconds: number;Defined in: packages/sage/src/internal/c4/market.ts:177
Inherited from
Section titled “Inherited from”FactionMarketSnapshot.restockPeriodSeconds
standingBasisPoints
Section titled “standingBasisPoints”readonly standingBasisPoints: number;Defined in: packages/sage/src/internal/c4/market.ts:180
Inherited from
Section titled “Inherited from”FactionMarketSnapshot.standingBasisPoints
starbaseSequenceId
Section titled “starbaseSequenceId”readonly starbaseSequenceId: bigint;Defined in: packages/sage/src/internal/c4/market.ts:171
Inherited from
Section titled “Inherited from”FactionMarketSnapshot.starbaseSequenceId
status
Section titled “status”readonly status: "active" | "draft";Defined in: packages/sage/src/internal/c4/market.ts:172
Inherited from
Section titled “Inherited from”system
Section titled “system”readonly system: EntityRef<"starSystem">;Defined in: packages/sage/src/markets/index.ts:161
Inherited from
Section titled “Inherited from”version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/market.ts:166
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/markets/index.ts:163
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”FleetCargoInventoryView
Section titled “FleetCargoInventoryView”Defined in: packages/sage/src/index.ts:229
A loaded Fleet cargo inventory exposed by a root Fleet relation.
Example
Section titled “Example”declare const inventory: FleetCargoInventoryView;console.log(inventory.cargoHold.items);Extends
Section titled “Extends”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/cargo/index.ts:79
Parent Fleet address; CargoPods are nested values and have no own address.
Inherited from
Section titled “Inherited from”FleetCargoInventorySnapshot.address
readonly ammo: CargoInventoryItem;Defined in: packages/sage/src/internal/cargo.ts:63
Inherited from
Section titled “Inherited from”FleetCargoInventorySnapshot.ammo
capacities
Section titled “capacities”readonly capacities: { ammoUnits: CargoCapacity; cargoStorageUnits: CargoCapacity; fuelUnits: CargoCapacity;};Defined in: packages/sage/src/internal/cargo.ts:64
ammoUnits
Section titled “ammoUnits”readonly ammoUnits: CargoCapacity;cargoStorageUnits
Section titled “cargoStorageUnits”readonly cargoStorageUnits: CargoCapacity;fuelUnits
Section titled “fuelUnits”readonly fuelUnits: CargoCapacity;Inherited from
Section titled “Inherited from”FleetCargoInventorySnapshot.capacities
cargoHold
Section titled “cargoHold”readonly cargoHold: CargoPodInventory;Defined in: packages/sage/src/internal/cargo.ts:59
Inherited from
Section titled “Inherited from”FleetCargoInventorySnapshot.cargoHold
components
Section titled “components”readonly components: CargoPodInventory;Defined in: packages/sage/src/internal/cargo.ts:60
Inherited from
Section titled “Inherited from”FleetCargoInventorySnapshot.components
readonly fleet: EntityRef<"fleet">;Defined in: packages/sage/src/cargo/index.ts:80
Inherited from
Section titled “Inherited from”FleetCargoInventorySnapshot.fleet
readonly fuel: CargoInventoryItem;Defined in: packages/sage/src/internal/cargo.ts:62
Inherited from
Section titled “Inherited from”FleetCargoInventorySnapshot.fuel
readonly kind: "fleetCargoInventory";Defined in: packages/sage/src/cargo/index.ts:77
Inherited from
Section titled “Inherited from”FleetCargoInventorySnapshot.kind
ownerProfile
Section titled “ownerProfile”readonly ownerProfile: EntityRef<"profile">;Defined in: packages/sage/src/cargo/index.ts:81
Inherited from
Section titled “Inherited from”FleetCargoInventorySnapshot.ownerProfile
respawningCargo
Section titled “respawningCargo”readonly respawningCargo: CargoPodInventory;Defined in: packages/sage/src/internal/cargo.ts:61
Inherited from
Section titled “Inherited from”FleetCargoInventorySnapshot.respawningCargo
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/cargo/index.ts:82
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”FleetCargoInventorySnapshot.toJSON
FleetMiningView
Section titled “FleetMiningView”Defined in: packages/sage/src/index.ts:254
A loaded Fleet mining state with root-only entity traversal.
Example
Section titled “Example”declare const mining: FleetMiningView;const asteroid = await mining.asteroid.get();Extends
Section titled “Extends”Omit<FleetMiningSnapshot,"asteroid"|"fleet"|"ownerProfile">
Properties
Section titled “Properties”asteroid
Section titled “asteroid”readonly asteroid: EntityRef<"celestialBody"> & { get: Promise<CelestialBodyView>;};Defined in: packages/sage/src/index.ts:258
Type Declaration
Section titled “Type Declaration”get(options?): Promise<CelestialBodyView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ReadOptions |
Returns
Section titled “Returns”Promise<CelestialBodyView>
readonly fleet: EntityRef<"fleet"> & { get: Promise<FleetView>;};Defined in: packages/sage/src/index.ts:261
Type Declaration
Section titled “Type Declaration”get(options?): Promise<FleetView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ReadOptions |
Returns
Section titled “Returns”Promise<FleetView>
readonly kind: "fleetMining";Defined in: packages/sage/src/mining/index.ts:119
Inherited from
Section titled “Inherited from”lastUpdatedAtUnixSeconds
Section titled “lastUpdatedAtUnixSeconds”readonly lastUpdatedAtUnixSeconds: bigint;Defined in: packages/sage/src/mining/index.ts:123
Inherited from
Section titled “Inherited from”FleetMiningSnapshot.lastUpdatedAtUnixSeconds
miningRate
Section titled “miningRate”readonly miningRate: { raw: bigint; unitsPerSecond: number;};Defined in: packages/sage/src/mining/index.ts:125
readonly raw: bigint;unitsPerSecond
Section titled “unitsPerSecond”readonly unitsPerSecond: number;Inherited from
Section titled “Inherited from”FleetMiningSnapshot.miningRate
outputs
Section titled “outputs”readonly outputs: readonly FleetMiningOutput[];Defined in: packages/sage/src/mining/index.ts:129
Inherited from
Section titled “Inherited from”ownerProfile
Section titled “ownerProfile”readonly ownerProfile: EntityRef<"profile"> & { get: Promise<ProfileView>;};Defined in: packages/sage/src/index.ts:264
Type Declaration
Section titled “Type Declaration”get(options?): Promise<ProfileView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ReadOptions |
Returns
Section titled “Returns”Promise<ProfileView>
regionXpModifier
Section titled “regionXpModifier”readonly regionXpModifier: WorldFixedValue;Defined in: packages/sage/src/mining/index.ts:124
Inherited from
Section titled “Inherited from”FleetMiningSnapshot.regionXpModifier
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/mining/index.ts:130
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”FleetView
Section titled “FleetView”Defined in: packages/sage/src/index.ts:213
A loaded Fleet exposed by the root convenience client.
Example
Section titled “Example”declare const sage: SageClient;declare const fleetAddress: Address;const fleet: FleetView = await sage.fleets.get(fleetAddress);console.log(fleet.name);Extends
Section titled “Extends”Properties
Section titled “Properties”activeStimulants
Section titled “activeStimulants”readonly activeStimulants: readonly { chargesRemaining: number; deltaBps: number; stat: number;}[];Defined in: packages/sage/src/internal/c4/fleet.ts:369
Inherited from
Section titled “Inherited from”FleetAccountData.activeStimulants
address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/fleets/index.ts:90
Inherited from
Section titled “Inherited from”readonly ammo: ResolvedCargoAmount;Defined in: packages/sage/src/internal/fleet.ts:102
Inherited from
Section titled “Inherited from”readonly ap: number;Defined in: packages/sage/src/internal/c4/fleet.ts:355
Inherited from
Section titled “Inherited from”apReloadExpiresAt
Section titled “apReloadExpiresAt”readonly apReloadExpiresAt: bigint;Defined in: packages/sage/src/internal/c4/fleet.ts:360
Inherited from
Section titled “Inherited from”FleetAccountData.apReloadExpiresAt
readonly bump: number;Defined in: packages/sage/src/internal/c4/fleet.ts:338
Inherited from
Section titled “Inherited from”capacities
Section titled “capacities”readonly capacities: { ammo: CapacitySummary; cargo: CapacitySummary; fuel: CapacitySummary;};Defined in: packages/sage/src/internal/fleet.ts:118
readonly ammo: CapacitySummary;readonly cargo: CapacitySummary;readonly fuel: CapacitySummary;Inherited from
Section titled “Inherited from”cargoHold
Section titled “cargoHold”readonly cargoHold: { items: readonly ResolvedCargoAmount[]; seqId: number; storageCost: bigint;};Defined in: packages/sage/src/internal/fleet.ts:103
readonly items: readonly ResolvedCargoAmount[];readonly seqId: number;storageCost
Section titled “storageCost”readonly storageCost: bigint;Inherited from
Section titled “Inherited from”components
Section titled “components”readonly components: { items: readonly ResolvedCargoAmount[]; seqId: number; storageCost: bigint;};Defined in: packages/sage/src/internal/fleet.ts:108
readonly items: readonly ResolvedCargoAmount[];readonly seqId: number;storageCost
Section titled “storageCost”readonly storageCost: bigint;Inherited from
Section titled “Inherited from”crewCount
Section titled “crewCount”readonly crewCount: number;Defined in: packages/sage/src/internal/c4/fleet.ts:352
Inherited from
Section titled “Inherited from”faction
Section titled “faction”readonly faction: "unaligned" | "mud" | "oni" | "ustur";Defined in: packages/sage/src/internal/c4/fleet.ts:343
Inherited from
Section titled “Inherited from”readonly fuel: ResolvedCargoAmount;Defined in: packages/sage/src/internal/fleet.ts:101
Inherited from
Section titled “Inherited from”readonly game: Address;Defined in: packages/sage/src/internal/c4/fleet.ts:339
Inherited from
Section titled “Inherited from”readonly hp: number;Defined in: packages/sage/src/internal/c4/fleet.ts:357
Inherited from
Section titled “Inherited from”inventory
Section titled “inventory”readonly inventory: { get: Promise<FleetCargoInventoryView>;};Defined in: packages/sage/src/index.ts:214
get(options?): Promise<FleetCargoInventoryView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ReadOptions |
Returns
Section titled “Returns”Promise<FleetCargoInventoryView>
readonly kind: "fleet";Defined in: packages/sage/src/fleets/index.ts:89
Inherited from
Section titled “Inherited from”lastCombatUpdate
Section titled “lastCombatUpdate”readonly lastCombatUpdate: bigint;Defined in: packages/sage/src/internal/c4/fleet.ts:362
Inherited from
Section titled “Inherited from”FleetAccountData.lastCombatUpdate
lastUpdateAt
Section titled “lastUpdateAt”readonly lastUpdateAt: bigint;Defined in: packages/sage/src/internal/c4/fleet.ts:364
Inherited from
Section titled “Inherited from”location
Section titled “location”readonly location: SectorCoordinates;Defined in: packages/sage/src/internal/c4/fleet.ts:363
Inherited from
Section titled “Inherited from”mining
Section titled “mining”readonly mining: { get: Promise<FleetMiningView | undefined>;};Defined in: packages/sage/src/index.ts:217
get(options?): Promise<FleetMiningView | undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ReadOptions |
Returns
Section titled “Returns”Promise<FleetMiningView | undefined>
readonly name: string;Defined in: packages/sage/src/internal/c4/fleet.ts:345
Inherited from
Section titled “Inherited from”npcFactionId
Section titled “npcFactionId”readonly npcFactionId: number;Defined in: packages/sage/src/internal/c4/fleet.ts:344
Inherited from
Section titled “Inherited from”ownerProfile
Section titled “ownerProfile”readonly ownerProfile: EntityRef<"profile">;Defined in: packages/sage/src/fleets/index.ts:91
Inherited from
Section titled “Inherited from”pendingHp
Section titled “pendingHp”readonly pendingHp: number;Defined in: packages/sage/src/internal/c4/fleet.ts:358
Inherited from
Section titled “Inherited from”rentedCrew
Section titled “rentedCrew”readonly rentedCrew: number;Defined in: packages/sage/src/internal/c4/fleet.ts:353
Inherited from
Section titled “Inherited from”respawningCargo
Section titled “respawningCargo”readonly respawningCargo: { items: readonly ResolvedCargoAmount[]; seqId: number; storageCost: bigint;};Defined in: packages/sage/src/internal/fleet.ts:113
readonly items: readonly ResolvedCargoAmount[];readonly seqId: number;storageCost
Section titled “storageCost”readonly storageCost: bigint;Inherited from
Section titled “Inherited from”scanCooldownExpiresAt
Section titled “scanCooldownExpiresAt”readonly scanCooldownExpiresAt: bigint;Defined in: packages/sage/src/internal/c4/fleet.ts:348
Inherited from
Section titled “Inherited from”FleetAccountData.scanCooldownExpiresAt
shieldBreakDelayExpiresAt
Section titled “shieldBreakDelayExpiresAt”readonly shieldBreakDelayExpiresAt: bigint;Defined in: packages/sage/src/internal/c4/fleet.ts:361
Inherited from
Section titled “Inherited from”FleetAccountData.shieldBreakDelayExpiresAt
shipCounts
Section titled “shipCounts”readonly shipCounts: FleetShipCountsData;Defined in: packages/sage/src/internal/c4/fleet.ts:346
Inherited from
Section titled “Inherited from”shipDefinitionsSeqId
Section titled “shipDefinitionsSeqId”readonly shipDefinitionsSeqId: number;Defined in: packages/sage/src/internal/c4/fleet.ts:354
Inherited from
Section titled “Inherited from”FleetAccountData.shipDefinitionsSeqId
readonly ships: readonly ResolvedShipAmount[];Defined in: packages/sage/src/internal/fleet.ts:100
Inherited from
Section titled “Inherited from”readonly sp: number;Defined in: packages/sage/src/internal/c4/fleet.ts:356
Inherited from
Section titled “Inherited from”stance
Section titled “stance”readonly stance: { ammoUsage: "none" | "light" | "heavy";};Defined in: packages/sage/src/internal/c4/fleet.ts:359
ammoUsage
Section titled “ammoUsage”readonly ammoUsage: "none" | "light" | "heavy";Inherited from
Section titled “Inherited from”readonly state: ResolvedFleetState;Defined in: packages/sage/src/internal/fleet.ts:123
Inherited from
Section titled “Inherited from”ResolvedFleetAccountData.state
readonly stats: FleetStatsData;Defined in: packages/sage/src/internal/c4/fleet.ts:349
Inherited from
Section titled “Inherited from”subProfile?
Section titled “subProfile?”readonly optional subProfile?: Address;Defined in: packages/sage/src/internal/fleet.ts:98
Inherited from
Section titled “Inherited from”subProfileInvalidator?
Section titled “subProfileInvalidator?”readonly optional subProfileInvalidator?: Address;Defined in: packages/sage/src/internal/fleet.ts:99
Inherited from
Section titled “Inherited from”FleetSnapshot.subProfileInvalidator
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/fleet.ts:337
Inherited from
Section titled “Inherited from”warpCooldownExpiresAt
Section titled “warpCooldownExpiresAt”readonly warpCooldownExpiresAt: bigint;Defined in: packages/sage/src/internal/c4/fleet.ts:347
Inherited from
Section titled “Inherited from”FleetAccountData.warpCooldownExpiresAt
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/fleets/index.ts:92
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”LocalMarketView
Section titled “LocalMarketView”Defined in: packages/sage/src/index.ts:433
A loaded Local Market exposed by the root convenience client.
Example
Section titled “Example”declare const market: LocalMarketView;console.log(market.cargo.name);Extends
Section titled “Extends”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/markets/index.ts:123
Inherited from
Section titled “Inherited from”readonly asks: LocalMarketOrderBookSnapshot;Defined in: packages/sage/src/markets/index.ts:128
Inherited from
Section titled “Inherited from”readonly bids: LocalMarketOrderBookSnapshot;Defined in: packages/sage/src/markets/index.ts:127
Inherited from
Section titled “Inherited from”readonly bump: number;Defined in: packages/sage/src/internal/c4/market.ts:147
Inherited from
Section titled “Inherited from”readonly cargo: CargoDefinitionSummary & { amountRaw: bigint;};Defined in: packages/sage/src/markets/index.ts:126
Type Declaration
Section titled “Type Declaration”amountRaw
Section titled “amountRaw”readonly amountRaw: bigint;Inherited from
Section titled “Inherited from”initializerProfile
Section titled “initializerProfile”readonly initializerProfile: EntityRef<"profile">;Defined in: packages/sage/src/markets/index.ts:125
Inherited from
Section titled “Inherited from”LocalMarketSnapshot.initializerProfile
readonly kind: "localMarket";Defined in: packages/sage/src/markets/index.ts:122
Inherited from
Section titled “Inherited from”starbaseSequenceId
Section titled “starbaseSequenceId”readonly starbaseSequenceId: bigint;Defined in: packages/sage/src/internal/c4/market.ts:146
Inherited from
Section titled “Inherited from”LocalMarketSnapshot.starbaseSequenceId
system
Section titled “system”readonly system: EntityRef<"starSystem">;Defined in: packages/sage/src/markets/index.ts:124
Inherited from
Section titled “Inherited from”vaultAtlas
Section titled “vaultAtlas”readonly vaultAtlas: number;Defined in: packages/sage/src/internal/c4/market.ts:151
Inherited from
Section titled “Inherited from”LocalMarketSnapshot.vaultAtlas
vaultRaw
Section titled “vaultRaw”readonly vaultRaw: bigint;Defined in: packages/sage/src/internal/c4/market.ts:150
Inherited from
Section titled “Inherited from”version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/market.ts:144
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/markets/index.ts:129
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”PlanetView
Section titled “PlanetView”Defined in: packages/sage/src/index.ts:350
A loaded Planet whose stored StarSystem reference resolves through the root client.
Example
Section titled “Example”declare const planet: PlanetView;const system = await planet.system.get();Extends
Section titled “Extends”Omit<PlanetSnapshot,"system">
Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/world/index.ts:87
Inherited from
Section titled “Inherited from”claimStakes
Section titled “claimStakes”readonly claimStakes: { all: Promise<readonly ClaimStakeView[]>;};Defined in: packages/sage/src/index.ts:351
all(options?): Promise<readonly ClaimStakeView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ClaimStakeDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly ClaimStakeView[]>
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"> & { get: Promise<StarSystemView>;};Defined in: packages/sage/src/index.ts:356
Type Declaration
Section titled “Type Declaration”get(options?): Promise<StarSystemView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarSystemView>
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
Inherited from
Section titled “Inherited from”ProfileView
Section titled “ProfileView”Defined in: packages/sage/src/index.ts:123
A loaded Player Profile exposed by the root convenience client.
Example
Section titled “Example”declare const sage: SageClient;declare const profileAddress: Address;const profile: ProfileView = await sage.profiles.get(profileAddress);Extends
Section titled “Extends”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/identity/index.ts:103
Inherited from
Section titled “Inherited from”authKeyCount
Section titled “authKeyCount”readonly authKeyCount: number;Defined in: packages/sage/src/internal/c4/identity.ts:87
Inherited from
Section titled “Inherited from”createdAt
Section titled “createdAt”readonly createdAt: bigint;Defined in: packages/sage/src/internal/c4/identity.ts:90
Inherited from
Section titled “Inherited from”readonly keys: readonly ProfileKeyData[];Defined in: packages/sage/src/internal/c4/identity.ts:91
Inherited from
Section titled “Inherited from”keyThreshold
Section titled “keyThreshold”readonly keyThreshold: number;Defined in: packages/sage/src/internal/c4/identity.ts:88
Inherited from
Section titled “Inherited from”readonly kind: "profile";Defined in: packages/sage/src/identity/index.ts:102
Inherited from
Section titled “Inherited from”nextSeqId
Section titled “nextSeqId”readonly nextSeqId: bigint;Defined in: packages/sage/src/internal/c4/identity.ts:89
Inherited from
Section titled “Inherited from”version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/identity.ts:86
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/identity/index.ts:104
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”ReadMeta
Section titled “ReadMeta”Defined in: packages/sage/src/internal/read-meta.ts:23
Provenance attached non-enumerably to finder results.
Example
Section titled “Example”declare const fleets: object;const meta: ReadMeta | undefined = readMeta(fleets);if (meta) console.log(meta.strategy, meta.slot);Properties
Section titled “Properties”commitment
Section titled “commitment”readonly commitment: Commitment;Defined in: packages/sage/src/internal/read-meta.ts:27
filters?
Section titled “filters?”readonly optional filters?: readonly ReadMetaFilter[];Defined in: packages/sage/src/internal/read-meta.ts:29
indexer?
Section titled “indexer?”readonly optional indexer?: IndexerValidationMeta;Defined in: packages/sage/src/internal/read-meta.ts:30
readonly slot: bigint;Defined in: packages/sage/src/internal/read-meta.ts:26
Earliest source slot across the result, or 0n when it is empty.
source
Section titled “source”readonly source: DataSourceIdentity;Defined in: packages/sage/src/internal/read-meta.ts:28
strategy
Section titled “strategy”readonly strategy: DiscoveryStrategy;Defined in: packages/sage/src/internal/read-meta.ts:24
walletProfiles?
Section titled “walletProfiles?”readonly optional walletProfiles?: WalletProfileValidationMeta;Defined in: packages/sage/src/internal/read-meta.ts:31
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/internal/read-meta.ts:33
Returns a JSON-safe copy with bigints as strings and filter bytes as arrays.
Returns
Section titled “Returns”unknown
ReadMetaFilter
Section titled “ReadMetaFilter”Defined in: packages/sage/src/internal/read-meta.ts:81
Immutable JSON-safe filter provenance exposed by readMeta.
Example
Section titled “Example”const filter: ReadMetaFilter = { offset: 0, bytes: [1, 2] };Properties
Section titled “Properties”readonly bytes: readonly number[];Defined in: packages/sage/src/internal/read-meta.ts:83
offset
Section titled “offset”readonly offset: number;Defined in: packages/sage/src/internal/read-meta.ts:82
RecipeView
Section titled “RecipeView”Defined in: packages/sage/src/index.ts:321
A loaded Recipe exposed by the root convenience client.
Example
Section titled “Example”declare const sage: SageClient;const recipe: RecipeView = await sage.recipes.byId(7);Extends
Section titled “Extends”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/crafting/index.ts:87
Inherited from
Section titled “Inherited from”craftingDurationSeconds
Section titled “craftingDurationSeconds”readonly craftingDurationSeconds: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:145
Inherited from
Section titled “Inherited from”RecipeSnapshot.craftingDurationSeconds
readonly fee: { amountAtlas: number; amountRaw: bigint; recipient: "atlas" | "dao-atlas";};Defined in: packages/sage/src/internal/c4/crafting.ts:149
amountAtlas
Section titled “amountAtlas”readonly amountAtlas: number;amountRaw
Section titled “amountRaw”readonly amountRaw: bigint;recipient
Section titled “recipient”readonly recipient: "atlas" | "dao-atlas";Inherited from
Section titled “Inherited from”readonly game: EntityRef<"game">;Defined in: packages/sage/src/crafting/index.ts:88
Inherited from
Section titled “Inherited from”habRequired
Section titled “habRequired”readonly habRequired: boolean;Defined in: packages/sage/src/internal/c4/crafting.ts:154
Inherited from
Section titled “Inherited from”readonly id: number;Defined in: packages/sage/src/crafting/index.ts:89
Inherited from
Section titled “Inherited from”ingredients
Section titled “ingredients”readonly ingredients: readonly CraftingCargoItem[];Defined in: packages/sage/src/crafting/index.ts:90
Inherited from
Section titled “Inherited from”readonly kind: "recipe";Defined in: packages/sage/src/crafting/index.ts:86
Inherited from
Section titled “Inherited from”minimumDurationSeconds
Section titled “minimumDurationSeconds”readonly minimumDurationSeconds: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:146
Inherited from
Section titled “Inherited from”RecipeSnapshot.minimumDurationSeconds
minimumStarbaseLevel
Section titled “minimumStarbaseLevel”readonly minimumStarbaseLevel: | "level-0" | "level-1" | "level-2" | "level-3" | "level-4" | "level-5" | "css";Defined in: packages/sage/src/internal/c4/crafting.ts:158
Inherited from
Section titled “Inherited from”RecipeSnapshot.minimumStarbaseLevel
modifierBounds
Section titled “modifierBounds”readonly modifierBounds: { crewCount: CraftingModifierBoundsData; efficiency: CraftingModifierBoundsData; fee: CraftingModifierBoundsData; speed: CraftingModifierBoundsData;};Defined in: packages/sage/src/internal/c4/crafting.ts:166
crewCount
Section titled “crewCount”readonly crewCount: CraftingModifierBoundsData;efficiency
Section titled “efficiency”readonly efficiency: CraftingModifierBoundsData;readonly fee: CraftingModifierBoundsData;readonly speed: CraftingModifierBoundsData;Inherited from
Section titled “Inherited from”readonly name: string;Defined in: packages/sage/src/internal/c4/crafting.ts:147
Inherited from
Section titled “Inherited from”outputs
Section titled “outputs”readonly outputs: readonly CraftingCargoItem[];Defined in: packages/sage/src/crafting/index.ts:91
Inherited from
Section titled “Inherited from”researchRequirementIds
Section titled “researchRequirementIds”readonly researchRequirementIds: readonly number[];Defined in: packages/sage/src/internal/c4/crafting.ts:172
Inherited from
Section titled “Inherited from”RecipeSnapshot.researchRequirementIds
status
Section titled “status”readonly status: "active" | "deactivated";Defined in: packages/sage/src/internal/c4/crafting.ts:148
Inherited from
Section titled “Inherited from”usageCountRaw
Section titled “usageCountRaw”readonly usageCountRaw: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:155
Inherited from
Section titled “Inherited from”usageLimitRaw
Section titled “usageLimitRaw”readonly usageLimitRaw: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:156
Inherited from
Section titled “Inherited from”version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/crafting.ts:142
Inherited from
Section titled “Inherited from”xpValueRaw
Section titled “xpValueRaw”readonly xpValueRaw: bigint;Defined in: packages/sage/src/internal/c4/crafting.ts:157
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/crafting/index.ts:92
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”RegistrySnapshotStore
Section titled “RegistrySnapshotStore”Defined in: packages/sage/src/registry/index.ts:118
Optional application storage contract for registry cold starts.
Implementations may use IndexedDB, a filesystem, or another application-owned store. Loading remains lazy and begins only with the first definition lookup. Schema version 1 persists only the bigint-free ship and cargo sections. Crafting Hab and Hab building sections continue to load lazily from Game because their exact bigint fields do not yet have a versioned JSON encoding.
Example
Section titled “Example”declare const load: RegistrySnapshotStore['load'];declare const save: RegistrySnapshotStore['save'];declare const rpc: SageRpc;const store: RegistrySnapshotStore = { load, save };const ctx = createSageContext({ cluster: 'zink-ptr', rpc, registrySnapshotStore: store });Methods
Section titled “Methods”load()
Section titled “load()”load(game, section): Promise< | DefinitionSectionSnapshot| undefined>;Defined in: packages/sage/src/registry/index.ts:119
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
game | Address |
section | "ships" | "cargo" |
Returns
Section titled “Returns”Promise<
| DefinitionSectionSnapshot
| undefined>
save()
Section titled “save()”save(snapshot): Promise<void>;Defined in: packages/sage/src/registry/index.ts:123
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
snapshot | DefinitionSectionSnapshot |
Returns
Section titled “Returns”Promise<void>
ResourceDepositView
Section titled “ResourceDepositView”Defined in: packages/sage/src/index.ts:238
A loaded Asteroid deposit with root-only StarSystem traversal.
Example
Section titled “Example”declare const deposit: ResourceDepositView;const system = await deposit.system.get();Extends
Section titled “Extends”Omit<ResourceDepositSnapshot,"system">
Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/mining/index.ts:67
Inherited from
Section titled “Inherited from”ResourceDepositSnapshot.address
bodyId
Section titled “bodyId”readonly bodyId: number;Defined in: packages/sage/src/mining/index.ts:68
Inherited from
Section titled “Inherited from”ResourceDepositSnapshot.bodyId
readonly game: Address;Defined in: packages/sage/src/mining/index.ts:70
Inherited from
Section titled “Inherited from”readonly kind: "resourceDeposit";Defined in: packages/sage/src/mining/index.ts:66
Inherited from
Section titled “Inherited from”lastSyncedAtUnixSeconds
Section titled “lastSyncedAtUnixSeconds”readonly lastSyncedAtUnixSeconds: bigint;Defined in: packages/sage/src/mining/index.ts:73
Inherited from
Section titled “Inherited from”ResourceDepositSnapshot.lastSyncedAtUnixSeconds
readonly name: string;Defined in: packages/sage/src/mining/index.ts:69
Inherited from
Section titled “Inherited from”resources
Section titled “resources”readonly resources: readonly ResourceDepositItem[];Defined in: packages/sage/src/mining/index.ts:74
Inherited from
Section titled “Inherited from”ResourceDepositSnapshot.resources
system
Section titled “system”readonly system: EntityRef<"starSystem"> & { get: Promise<StarSystemView>;};Defined in: packages/sage/src/index.ts:242
Type Declaration
Section titled “Type Declaration”get(options?): Promise<StarSystemView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarSystemView>
systemSequenceId
Section titled “systemSequenceId”readonly systemSequenceId: bigint;Defined in: packages/sage/src/mining/index.ts:72
Inherited from
Section titled “Inherited from”ResourceDepositSnapshot.systemSequenceId
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/mining/index.ts:75
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”ResourceDepositSnapshot.toJSON
SageClient
Section titled “SageClient”Defined in: packages/sage/src/index.ts:452
Batteries-included root client composing the currently implemented domains.
Example
Section titled “Example”declare const rpc: SageRpc;const sage: SageClient = createSageClient({ cluster: 'zink-ptr', rpc });Properties
Section titled “Properties”celestialBodies
Section titled “celestialBodies”readonly celestialBodies: { byId: Promise<CelestialBodyView>; get: Promise<CelestialBodyView>; maybe: Promise<CelestialBodyView | undefined>;};Defined in: packages/sage/src/index.ts:638
byId()
Section titled “byId()”byId(bodyId, options?): Promise<CelestialBodyView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
bodyId | number |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<CelestialBodyView>
get(address, options?): Promise<CelestialBodyView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<CelestialBodyView>
maybe()
Section titled “maybe()”maybe(address, options?): Promise<CelestialBodyView | undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<CelestialBodyView | undefined>
characters
Section titled “characters”readonly characters: { forProfile: Promise<CharacterView>;};Defined in: packages/sage/src/index.ts:464
forProfile()
Section titled “forProfile()”forProfile(profileAddress, options?): Promise<CharacterView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
profileAddress | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<CharacterView>
claimStakes
Section titled “claimStakes”readonly claimStakes: { byBody: Promise<readonly ClaimStakeView[]>; byCharacter: Promise<readonly ClaimStakeView[]>; get: Promise<ClaimStakeView>; maybe: Promise<ClaimStakeView | undefined>;};Defined in: packages/sage/src/index.ts:578
byBody()
Section titled “byBody()”byBody(body, options?): Promise<readonly ClaimStakeView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
body | Address |
options? | ClaimStakeDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly ClaimStakeView[]>
byCharacter()
Section titled “byCharacter()”byCharacter(character, options?): Promise<readonly ClaimStakeView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
character | Address |
options? | ClaimStakeDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly ClaimStakeView[]>
get(address, options?): Promise<ClaimStakeView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<ClaimStakeView>
maybe()
Section titled “maybe()”maybe(address, options?): Promise<ClaimStakeView | undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<ClaimStakeView | undefined>
context
Section titled “context”readonly context: SageContext;Defined in: packages/sage/src/index.ts:453
craftingHabs
Section titled “craftingHabs”readonly craftingHabs: { byCharacter: Promise<readonly CraftingHabView[]>; byProfile: Promise<readonly CraftingHabView[]>; byStarbasePlayer: Promise<readonly CraftingHabView[]>; get: Promise<CraftingHabView>; maybe: Promise<CraftingHabView | undefined>;};Defined in: packages/sage/src/index.ts:489
byCharacter()
Section titled “byCharacter()”byCharacter(character, options?): Promise<readonly CraftingHabView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
character | Address |
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingHabView[]>
byProfile()
Section titled “byProfile()”byProfile(profile, options?): Promise<readonly CraftingHabView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
profile | Address |
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingHabView[]>
byStarbasePlayer()
Section titled “byStarbasePlayer()”byStarbasePlayer(player, options?): Promise<readonly CraftingHabView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
player | Address |
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingHabView[]>
get(address, options?): Promise<CraftingHabView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<CraftingHabView>
maybe()
Section titled “maybe()”maybe(address, options?): Promise<CraftingHabView | undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<CraftingHabView | undefined>
craftingProcesses
Section titled “craftingProcesses”readonly craftingProcesses: { byCharacter: Promise<readonly CraftingProcessView[]>; byProfile: Promise<readonly CraftingProcessView[]>; byStarbasePlayer: Promise<readonly CraftingProcessView[]>; get: Promise<CraftingProcessView>; maybe: Promise<CraftingProcessView | undefined>;};Defined in: packages/sage/src/index.ts:508
byCharacter()
Section titled “byCharacter()”byCharacter(character, options?): Promise<readonly CraftingProcessView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
character | Address |
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingProcessView[]>
byProfile()
Section titled “byProfile()”byProfile(profile, options?): Promise<readonly CraftingProcessView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
profile | Address |
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingProcessView[]>
byStarbasePlayer()
Section titled “byStarbasePlayer()”byStarbasePlayer(player, options?): Promise<readonly CraftingProcessView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
player | Address |
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingProcessView[]>
get(address, options?): Promise<CraftingProcessView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<CraftingProcessView>
maybe()
Section titled “maybe()”maybe(address, options?): Promise<CraftingProcessView | undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<CraftingProcessView | undefined>
factionMarkets
Section titled “factionMarkets”readonly factionMarkets: { forSystem: Promise<FactionMarketView>; get: Promise<FactionMarketView>; maybe: Promise<FactionMarketView | undefined>;};Defined in: packages/sage/src/index.ts:544
forSystem()
Section titled “forSystem()”forSystem( system, starbaseSequenceId,options?): Promise<FactionMarketView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
system | Address |
starbaseSequenceId | bigint |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<FactionMarketView>
get(address, options?): Promise<FactionMarketView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<FactionMarketView>
maybe()
Section titled “maybe()”maybe(address, options?): Promise<FactionMarketView | undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<FactionMarketView | undefined>
fleets
Section titled “fleets”readonly fleets: { byOwner: Promise<readonly FleetView[]>; get: Promise<FleetView>; maybe: Promise<FleetView | undefined>;};Defined in: packages/sage/src/index.ts:470
byOwner()
Section titled “byOwner()”byOwner(profileAddress, options?): Promise<readonly FleetView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
profileAddress | Address |
options? | FleetDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly FleetView[]>
get(address, options?): Promise<FleetView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<FleetView>
maybe()
Section titled “maybe()”maybe(address, options?): Promise<FleetView | undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<FleetView | undefined>
localMarkets
Section titled “localMarkets”readonly localMarkets: { bySystem: Promise<readonly LocalMarketView[]>; forCargo: Promise<LocalMarketView>; get: Promise<LocalMarketView>; maybe: Promise<LocalMarketView | undefined>;};Defined in: packages/sage/src/index.ts:527
bySystem()
Section titled “bySystem()”bySystem(system, options?): Promise<readonly LocalMarketView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
system | Address |
options? | MarketDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly LocalMarketView[]>
forCargo()
Section titled “forCargo()”forCargo( system, cargoId, starbaseSequenceId,options?): Promise<LocalMarketView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
system | Address |
cargoId | number |
starbaseSequenceId | bigint |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<LocalMarketView>
get(address, options?): Promise<LocalMarketView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<LocalMarketView>
maybe()
Section titled “maybe()”maybe(address, options?): Promise<LocalMarketView | undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<LocalMarketView | undefined>
mining
Section titled “mining”readonly mining: { deposits: { get: Promise<ResourceDepositView>; maybe: Promise<ResourceDepositView | undefined>; }; fleets: { byOwner: Promise<readonly FleetMiningView[]>; get: Promise<FleetMiningView | undefined>; };};Defined in: packages/sage/src/index.ts:556
deposits
Section titled “deposits”readonly deposits: { get: Promise<ResourceDepositView>; maybe: Promise<ResourceDepositView | undefined>;};deposits.get()
Section titled “deposits.get()”get(asteroid, options?): Promise<ResourceDepositView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
asteroid | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<ResourceDepositView>
deposits.maybe()
Section titled “deposits.maybe()”maybe(asteroid, options?): Promise<ResourceDepositView | undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
asteroid | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<ResourceDepositView | undefined>
fleets
Section titled “fleets”readonly fleets: { byOwner: Promise<readonly FleetMiningView[]>; get: Promise<FleetMiningView | undefined>;};fleets.byOwner()
Section titled “fleets.byOwner()”byOwner(owner, options?): Promise<readonly FleetMiningView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
owner | Address |
options? | MiningDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly FleetMiningView[]>
fleets.get()
Section titled “fleets.get()”get(fleet, options?): Promise<FleetMiningView | undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
fleet | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<FleetMiningView | undefined>
profiles
Section titled “profiles”readonly profiles: { get: Promise<ProfileView>; maybe: Promise<ProfileView | undefined>;};Defined in: packages/sage/src/index.ts:457
get(address, options?): Promise<ProfileView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<ProfileView>
maybe()
Section titled “maybe()”maybe(address, options?): Promise<ProfileView | undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<ProfileView | undefined>
recipes
Section titled “recipes”readonly recipes: { byId: Promise<RecipeView>; get: Promise<RecipeView>; maybe: Promise<RecipeView | undefined>;};Defined in: packages/sage/src/index.ts:481
byId()
Section titled “byId()”byId(recipeId, options?): Promise<RecipeView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
recipeId | number |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<RecipeView>
get(address, options?): Promise<RecipeView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<RecipeView>
maybe()
Section titled “maybe()”maybe(address, options?): Promise<RecipeView | undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<RecipeView | undefined>
starbases
Section titled “starbases”readonly starbases: { byCharacter: Promise<readonly StarbasePlayerView[]>; bySystem: Promise<readonly StarbasePlayerView[]>; forCharacterAtSystem: Promise<StarbasePlayerView>; get: Promise<StarbasePlayerView>; maybe: Promise<StarbasePlayerView | undefined>;};Defined in: packages/sage/src/index.ts:593
byCharacter()
Section titled “byCharacter()”byCharacter(character, options?): Promise<readonly StarbasePlayerView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
character | Address |
options? | StarbaseDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly StarbasePlayerView[]>
bySystem()
Section titled “bySystem()”bySystem(system, options?): Promise<readonly StarbasePlayerView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
system | Address |
options? | StarbaseDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly StarbasePlayerView[]>
forCharacterAtSystem()
Section titled “forCharacterAtSystem()”forCharacterAtSystem( character, system,options?): Promise<StarbasePlayerView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
character | Address |
system | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarbasePlayerView>
get(address, options?): Promise<StarbasePlayerView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarbasePlayerView>
maybe()
Section titled “maybe()”maybe(address, options?): Promise<StarbasePlayerView | undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarbasePlayerView | undefined>
starbaseUpgrades
Section titled “starbaseUpgrades”readonly starbaseUpgrades: { byPlayer: Promise<readonly StarbaseUpgradeProcessView[]>; get: Promise<StarbaseUpgradeProcessView>; maybe: Promise< | StarbaseUpgradeProcessView | undefined>;};Defined in: packages/sage/src/index.ts:613
byPlayer()
Section titled “byPlayer()”byPlayer(player, options?): Promise<readonly StarbaseUpgradeProcessView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
player | Address |
options? | StarbaseDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly StarbaseUpgradeProcessView[]>
get(address, options?): Promise<StarbaseUpgradeProcessView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarbaseUpgradeProcessView>
maybe()
Section titled “maybe()”maybe(address, options?): Promise< | StarbaseUpgradeProcessView| undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<
| StarbaseUpgradeProcessView
| undefined>
systems
Section titled “systems”readonly systems: { all: Promise<readonly StarSystemView[]>; byId: Promise<StarSystemView>; get: Promise<StarSystemView>; maybe: Promise<StarSystemView | undefined>;};Defined in: packages/sage/src/index.ts:627
all(options?): Promise<readonly StarSystemView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | StarSystemDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly StarSystemView[]>
byId()
Section titled “byId()”byId(systemId, options?): Promise<StarSystemView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
systemId | number |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarSystemView>
get(address, options?): Promise<StarSystemView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarSystemView>
maybe()
Section titled “maybe()”maybe(address, options?): Promise<StarSystemView | undefined>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarSystemView | undefined>
wallets
Section titled “wallets”readonly wallets: { get: WalletView;};Defined in: packages/sage/src/index.ts:454
get(address): WalletView;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
address | Address |
Returns
Section titled “Returns”Methods
Section titled “Methods”dispose()
Section titled “dispose()”dispose(): Promise<void>;Defined in: packages/sage/src/index.ts:646
Returns
Section titled “Returns”Promise<void>
SageContext
Section titled “SageContext”Defined in: packages/sage/src/client/contracts.ts:667
Immutable context passed as the first argument to every domain function.
Disposing the context releases its cache and in-flight read registries.
Example
Section titled “Example”declare const rpc: SageRpc;const ctx: SageContext = createSageContext({ cluster: 'zink-ptr', rpc });Properties
Section titled “Properties”cluster
Section titled “cluster”readonly cluster: ClusterIdentity;Defined in: packages/sage/src/client/contracts.ts:668
readonly data: SageDataPort;Defined in: packages/sage/src/client/contracts.ts:670
readonly optional game?: Address;Defined in: packages/sage/src/client/contracts.ts:669
registrySnapshotStore?
Section titled “registrySnapshotStore?”readonly optional registrySnapshotStore?: RegistrySnapshotStore;Defined in: packages/sage/src/client/contracts.ts:671
Methods
Section titled “Methods”dispose()
Section titled “dispose()”dispose(): Promise<void>;Defined in: packages/sage/src/client/contracts.ts:672
Returns
Section titled “Returns”Promise<void>
SageSubscription
Section titled “SageSubscription”Defined in: packages/sage/src/client/contracts.ts:580
Consumer handle for one context-owned subscription.
Unsubscription is asynchronous, idempotent, and automatically performed by
SageContext.dispose(). Teardown does not wait for an observer callback that
is already running, so that callback may finish after teardown resolves.
Example
Section titled “Example”declare const subscription: SageSubscription;await subscription.unsubscribe();Methods
Section titled “Methods”unsubscribe()
Section titled “unsubscribe()”unsubscribe(): Promise<void>;Defined in: packages/sage/src/client/contracts.ts:581
Returns
Section titled “Returns”Promise<void>
ShipDefinitionSummary
Section titled “ShipDefinitionSummary”Defined in: packages/sage/src/registry/index.ts:45
Small, stable ship definition returned to gameplay domains.
Example
Section titled “Example”declare const ctx: SageContext;const ship: ShipDefinitionSummary = await resolveShip(ctx, 3);Extended by
Section titled “Extended by”Properties
Section titled “Properties”readonly id: number;Defined in: packages/sage/src/registry/index.ts:46
readonly mint: Address;Defined in: packages/sage/src/registry/index.ts:47
readonly name: string;Defined in: packages/sage/src/registry/index.ts:48
sizeClass
Section titled “sizeClass”readonly sizeClass: | "xx-small" | "x-small" | "small" | "medium" | "large" | "capital" | "commander" | "titan";Defined in: packages/sage/src/registry/index.ts:49
StarbasePlayerView
Section titled “StarbasePlayerView”Defined in: packages/sage/src/index.ts:287
A loaded player-local Starbase with root-only upgrade traversal.
Example
Section titled “Example”declare const starbase: StarbasePlayerView;const upgrades = await starbase.upgrades.all();const craftingHabs = await starbase.craftingHabs.all();const craftingProcesses = await starbase.craftingProcesses.all();Extends
Section titled “Extends”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/starbases/index.ts:120
Inherited from
Section titled “Inherited from”StarbasePlayerSnapshot.address
availableCrew
Section titled “availableCrew”readonly availableCrew: number;Defined in: packages/sage/src/starbases/index.ts:124
Inherited from
Section titled “Inherited from”StarbasePlayerSnapshot.availableCrew
readonly bump: number;Defined in: packages/sage/src/internal/c4/starbase.ts:202
Inherited from
Section titled “Inherited from”StarbasePlayerAccountData.bump
busyCrew
Section titled “busyCrew”readonly busyCrew: number;Defined in: packages/sage/src/internal/c4/starbase.ts:192
Inherited from
Section titled “Inherited from”StarbasePlayerAccountData.busyCrew
readonly cargo: StarbaseCargoInventory;Defined in: packages/sage/src/starbases/index.ts:125
Inherited from
Section titled “Inherited from”cargoRespawnEndsAtUnixSeconds
Section titled “cargoRespawnEndsAtUnixSeconds”readonly cargoRespawnEndsAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:201
Inherited from
Section titled “Inherited from”StarbasePlayerAccountData.cargoRespawnEndsAtUnixSeconds
character
Section titled “character”readonly character: EntityRef<"character">;Defined in: packages/sage/src/starbases/index.ts:123
Inherited from
Section titled “Inherited from”StarbasePlayerSnapshot.character
craftingHabs
Section titled “craftingHabs”readonly craftingHabs: { all: Promise<readonly CraftingHabView[]>;};Defined in: packages/sage/src/index.ts:288
all(options?): Promise<readonly CraftingHabView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingHabView[]>
craftingProcesses
Section titled “craftingProcesses”readonly craftingProcesses: { all: Promise<readonly CraftingProcessView[]>;};Defined in: packages/sage/src/index.ts:293
all(options?): Promise<readonly CraftingProcessView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | CraftingDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CraftingProcessView[]>
faction
Section titled “faction”readonly faction: StarbasePlayerFaction;Defined in: packages/sage/src/internal/c4/starbase.ts:188
Inherited from
Section titled “Inherited from”StarbasePlayerAccountData.faction
readonly kind: "starbasePlayer";Defined in: packages/sage/src/starbases/index.ts:119
Inherited from
Section titled “Inherited from”playerProfile
Section titled “playerProfile”readonly playerProfile: EntityRef<"profile">;Defined in: packages/sage/src/starbases/index.ts:121
Inherited from
Section titled “Inherited from”StarbasePlayerSnapshot.playerProfile
respawning
Section titled “respawning”readonly respawning: Omit<{ cargo: StarbaseCargoPodData; claimStakes: readonly StarbaseFacilityRespawnData[]; craftingHabs: readonly StarbaseFacilityRespawnData[]; crew: StarbaseRespawnQueueData; ships: readonly StarbaseShipRespawnData[];}, "ships" | "cargo"> & { cargo: StarbaseCargoInventory; ships: readonly StarbaseShipRespawn[];};Defined in: packages/sage/src/starbases/index.ts:126
Type Declaration
Section titled “Type Declaration”readonly cargo: StarbaseCargoInventory;readonly ships: readonly StarbaseShipRespawn[];Inherited from
Section titled “Inherited from”StarbasePlayerSnapshot.respawning
sequenceId
Section titled “sequenceId”readonly sequenceId: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:200
Inherited from
Section titled “Inherited from”StarbasePlayerAccountData.sequenceId
shipsInEscrow
Section titled “shipsInEscrow”readonly shipsInEscrow: readonly StarbaseEscrowedShip[];Defined in: packages/sage/src/starbases/index.ts:133
Inherited from
Section titled “Inherited from”StarbasePlayerView.shipsInEscrow
system
Section titled “system”readonly system: EntityRef<"starSystem">;Defined in: packages/sage/src/starbases/index.ts:122
Inherited from
Section titled “Inherited from”totalCrew
Section titled “totalCrew”readonly totalCrew: number;Defined in: packages/sage/src/internal/c4/starbase.ts:191
Inherited from
Section titled “Inherited from”StarbasePlayerAccountData.totalCrew
upgrades
Section titled “upgrades”readonly upgrades: { all: Promise<readonly StarbaseUpgradeProcessView[]>;};Defined in: packages/sage/src/index.ts:298
all(options?): Promise<readonly StarbaseUpgradeProcessView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | StarbaseDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly StarbaseUpgradeProcessView[]>
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/starbase.ts:186
Inherited from
Section titled “Inherited from”StarbasePlayerAccountData.version
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/starbases/index.ts:134
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessView
Section titled “StarbaseUpgradeProcessView”Defined in: packages/sage/src/index.ts:312
A loaded Starbase upgrade process exposed by the root client.
Example
Section titled “Example”declare const upgrade: StarbaseUpgradeProcessView;console.log(upgrade.resource.name);Extends
Section titled “Extends”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/starbases/index.ts:149
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessSnapshot.address
endsAtUnixSeconds
Section titled “endsAtUnixSeconds”readonly endsAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:224
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessAccountData.endsAtUnixSeconds
readonly kind: "starbaseUpgradeProcess";Defined in: packages/sage/src/starbases/index.ts:148
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessSnapshot.kind
numCrew
Section titled “numCrew”readonly numCrew: number;Defined in: packages/sage/src/internal/c4/starbase.ts:222
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessAccountData.numCrew
playerProfile
Section titled “playerProfile”readonly playerProfile: EntityRef<"profile">;Defined in: packages/sage/src/starbases/index.ts:150
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessSnapshot.playerProfile
resource
Section titled “resource”readonly resource: CargoDefinitionSummary & { quantityRaw: bigint;};Defined in: packages/sage/src/starbases/index.ts:153
Type Declaration
Section titled “Type Declaration”quantityRaw
Section titled “quantityRaw”readonly quantityRaw: bigint;Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessSnapshot.resource
starbasePlayer
Section titled “starbasePlayer”readonly starbasePlayer: EntityRef<"starbasePlayer">;Defined in: packages/sage/src/starbases/index.ts:151
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessSnapshot.starbasePlayer
starbaseSequenceId
Section titled “starbaseSequenceId”readonly starbaseSequenceId: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:219
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessAccountData.starbaseSequenceId
startsAtUnixSeconds
Section titled “startsAtUnixSeconds”readonly startsAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:223
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessAccountData.startsAtUnixSeconds
system
Section titled “system”readonly system: EntityRef<"starSystem">;Defined in: packages/sage/src/starbases/index.ts:152
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessSnapshot.system
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/starbase.ts:215
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessAccountData.version
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/starbases/index.ts:154
Returns
Section titled “Returns”unknown
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessSnapshot.toJSON
StarSystemView
Section titled “StarSystemView”Defined in: packages/sage/src/index.ts:398
A loaded StarSystem with explicit body projection relation accessors.
Example
Section titled “Example”declare const system: StarSystemView;const planets = await system.planets.all();Extends
Section titled “Extends”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/world/index.ts:69
Inherited from
Section titled “Inherited from”asteroids
Section titled “asteroids”readonly asteroids: { all: Promise<readonly AsteroidView[]>;};Defined in: packages/sage/src/index.ts:412
all(options?): Promise<readonly AsteroidView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ReadOptions |
Returns
Section titled “Returns”Promise<readonly AsteroidView[]>
celestialBodies
Section titled “celestialBodies”readonly celestialBodies: { all: Promise<readonly CelestialBodyView[]>;};Defined in: packages/sage/src/index.ts:406
all(options?): Promise<readonly CelestialBodyView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ReadOptions |
Returns
Section titled “Returns”Promise<readonly CelestialBodyView[]>
celestialBodyAddresses
Section titled “celestialBodyAddresses”readonly celestialBodyAddresses: readonly Address[];Defined in: packages/sage/src/internal/c4/world.ts:317
Inherited from
Section titled “Inherited from”StarSystemSnapshot.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”StarSystemSnapshot.connections
coordinates
Section titled “coordinates”readonly coordinates: WorldCoordinates;Defined in: packages/sage/src/internal/c4/world.ts:314
Inherited from
Section titled “Inherited from”StarSystemSnapshot.coordinates
factionMarket
Section titled “factionMarket”readonly factionMarket: { get: Promise<FactionMarketView>;};Defined in: packages/sage/src/index.ts:403
get(options?): Promise<FactionMarketView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ReadOptions |
Returns
Section titled “Returns”Promise<FactionMarketView>
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
Inherited from
Section titled “Inherited from”localMarkets
Section titled “localMarkets”readonly localMarkets: { all: Promise<readonly LocalMarketView[]>; forCargo: Promise<LocalMarketView>;};Defined in: packages/sage/src/index.ts:399
all(options?): Promise<readonly LocalMarketView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | MarketDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly LocalMarketView[]>
forCargo()
Section titled “forCargo()”forCargo(cargoId, options?): Promise<LocalMarketView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cargoId | number |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<LocalMarketView>
readonly name: string;Defined in: packages/sage/src/internal/c4/world.ts:312
Inherited from
Section titled “Inherited from”planets
Section titled “planets”readonly planets: { all: Promise<readonly PlanetView[]>;};Defined in: packages/sage/src/index.ts:409
all(options?): Promise<readonly PlanetView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | ReadOptions |
Returns
Section titled “Returns”Promise<readonly PlanetView[]>
playerStarbases
Section titled “playerStarbases”readonly playerStarbases: { all: Promise<readonly StarbasePlayerView[]>; forCharacter: Promise<StarbasePlayerView>;};Defined in: packages/sage/src/index.ts:415
all(options?): Promise<readonly StarbasePlayerView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? | StarbaseDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly StarbasePlayerView[]>
forCharacter()
Section titled “forCharacter()”forCharacter(character, options?): Promise<StarbasePlayerView>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
character | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarbasePlayerView>
regionId?
Section titled “regionId?”readonly optional regionId?: number;Defined in: packages/sage/src/internal/c4/world.ts:313
Inherited from
Section titled “Inherited from”sequenceId
Section titled “sequenceId”readonly sequenceId: bigint;Defined in: packages/sage/src/internal/c4/world.ts:315
Inherited from
Section titled “Inherited from”starbase?
Section titled “starbase?”readonly optional starbase?: WorldStarbaseData;Defined in: packages/sage/src/internal/c4/world.ts:318
Inherited from
Section titled “Inherited from”systemId
Section titled “systemId”readonly systemId: number;Defined in: packages/sage/src/internal/c4/world.ts:311
Inherited from
Section titled “Inherited from”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
Inherited from
Section titled “Inherited from”SubscriptionObserver
Section titled “SubscriptionObserver”Defined in: packages/sage/src/client/contracts.ts:518
Observer for validated snapshots and recoverable subscription errors.
Malformed account events call onError without replacing the last valid
cache entry or ending the subscription.
Example
Section titled “Example”const observer: SubscriptionObserver<{ name: string }> = { onSnapshot: snapshot => console.log(snapshot.data.name), onError: error => console.error(error),};Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
TSnapshot |
Properties
Section titled “Properties”onDiagnostic?
Section titled “onDiagnostic?”readonly optional onDiagnostic?: (event) => void;Defined in: packages/sage/src/client/contracts.ts:524
Observes bounded-delivery coalescing without treating it as an error.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
event | SubscriptionDiagnosticEvent |
Returns
Section titled “Returns”void
onError
Section titled “onError”readonly onError: (error) => void | Promise<void>;Defined in: packages/sage/src/client/contracts.ts:522
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
error | SageSdkError |
Returns
Section titled “Returns”void | Promise<void>
onSnapshot
Section titled “onSnapshot”readonly onSnapshot: (snapshot) => void | Promise<void>;Defined in: packages/sage/src/client/contracts.ts:519
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
snapshot | SnapshotEnvelope<TSnapshot> |
Returns
Section titled “Returns”void | Promise<void>
WalletView
Section titled “WalletView”Defined in: packages/sage/src/index.ts:138
A wallet actor with explicit Profile and Character discovery relations.
Wallet views contain no signing capability and perform no I/O until a relation is requested with either a provider or known-address strategy.
Example
Section titled “Example”declare const sage: SageClient;declare const walletAddress: Address;const wallet: WalletView = sage.wallets.get(walletAddress);const profiles = await wallet.profiles.all({ strategy: 'provider' });Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/index.ts:140
characters
Section titled “characters”readonly characters: { all: Promise<readonly CharacterView[]>;};Defined in: packages/sage/src/index.ts:146
all(options): Promise<readonly CharacterView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options | WalletProfileDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly CharacterView[]>
readonly kind: "wallet";Defined in: packages/sage/src/index.ts:139
profiles
Section titled “profiles”readonly profiles: { all: Promise<readonly ProfileView[]>;};Defined in: packages/sage/src/index.ts:141
all(options): Promise<readonly ProfileView[]>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options | WalletProfileDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly ProfileView[]>
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/index.ts:151
Returns
Section titled “Returns”unknown
Type Aliases
Section titled “Type Aliases”AccountSubscriptionEvent
Section titled “AccountSubscriptionEvent”type AccountSubscriptionEvent = | { account: RawAccount; kind: "account";} | { kind: "reconnected";};Defined in: packages/sage/src/client/contracts.ts:334
A raw account update or a transport reconnection boundary.
Providers emit reconnected before post-reconnect account events so the
context can close the missed-update gap through its direct provider.
Example
Section titled “Example”declare const account: RawAccount;const event: AccountSubscriptionEvent = { kind: 'account', account };Address
Section titled “Address”type Address = KitAddress;Defined in: packages/sage/src/client/contracts.ts:19
A z.ink/Solana account address represented by @solana/kit.
Example
Section titled “Example”declare const profileAddress: Address;CelestialBodyView
Section titled “CelestialBodyView”type CelestialBodyView = | PlanetView | AsteroidView;Defined in: packages/sage/src/index.ts:389
A loaded CelestialBody root view projected as a Planet or Asteroid.
Example
Section titled “Example”declare const body: CelestialBodyView;console.log(body.kind);DefinitionSection
Section titled “DefinitionSection”type DefinitionSection = "ships" | "cargo" | "craftingHabs" | "habBuildings" | "xp" | "research";Defined in: packages/sage/src/registry/index.ts:34
Definition sections implemented by the first registry slice.
Example
Section titled “Example”const section: DefinitionSection = 'ships';DefinitionSectionSnapshot
Section titled “DefinitionSectionSnapshot”type DefinitionSectionSnapshot = | { definitions: readonly ShipDefinitionSummary[]; game: Address; schemaVersion: 1; section: "ships"; sequenceId: number;} | { definitions: readonly CargoDefinitionSummary[]; game: Address; schemaVersion: 1; section: "cargo"; sequenceId: number;};Defined in: packages/sage/src/registry/index.ts:85
Serializable cold-start snapshot for one Game definitions section.
Example
Section titled “Example”declare const store: RegistrySnapshotStore;declare const snapshot: DefinitionSectionSnapshot;await store.save(snapshot);SageContextOptions
Section titled “SageContextOptions”type SageContextOptions = | SharedContextOptions & ContextTransport & { cluster: KnownCluster;} | SharedContextOptions & ContextTransport & { cluster: CustomClusterIdentity; game: Address;};Defined in: packages/sage/src/client/contracts.ts:715
Configuration accepted by the synchronous context and client factories.
Custom clusters require an explicit canonical Game address.
Example
Section titled “Example”declare const rpc: SageRpc;const options: SageContextOptions = { cluster: 'zink-ptr', rpc };SubscriptionDiagnosticEvent
Section titled “SubscriptionDiagnosticEvent”type SubscriptionDiagnosticEvent = | { accountType: EntityType; address: Address; coalescedCount: number; kind: "subscription-snapshot-coalesced";} | { accountType: EntityType; address: Address; coalescedCount: number; errorCode: SageSdkError["code"]; kind: "subscription-error-coalesced";};Defined in: packages/sage/src/client/contracts.ts:544
A bounded-delivery diagnostic emitted by one account subscription.
coalescedCount is cumulative for the currently pending observer delivery.
Coalescing is expected under burst traffic and is never reported to
SubscriptionObserver.onError.
Example
Section titled “Example”declare const address: Address;const event: SubscriptionDiagnosticEvent = { kind: 'subscription-snapshot-coalesced', accountType: 'fleet', address, coalescedCount: 2,};SubscriptionOptions
Section titled “SubscriptionOptions”type SubscriptionOptions = ReadAccountOptions;Defined in: packages/sage/src/client/contracts.ts:566
Options for one context-owned subscription.
Example
Section titled “Example”const options: SubscriptionOptions = { commitment: 'confirmed' };Functions
Section titled “Functions”createSageClient()
Section titled “createSageClient()”function createSageClient(options): SageClient;Defined in: packages/sage/src/index.ts:1101
Creates the root client synchronously without performing network I/O.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options | SageContextOptions |
Returns
Section titled “Returns”Example
Section titled “Example”declare const rpc: SageRpc;const sage = createSageClient({ cluster: 'zink-ptr', rpc });readMeta()
Section titled “readMeta()”function readMeta(result): ReadMeta | undefined;Defined in: packages/sage/src/internal/read-meta.ts:98
Returns finder provenance without wrapping the finder result.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
result | object |
Returns
Section titled “Returns”ReadMeta | undefined
Example
Section titled “Example”declare const ctx: SageContext;declare const profileAddress: Address;const fleets = await getFleetsByOwner(ctx, profileAddress);const meta = readMeta(fleets);resolveCargo()
Section titled “resolveCargo()”function resolveCargo( context, cargoId,options?): Promise<CargoDefinitionSummary>;Defined in: packages/sage/src/registry/index.ts:729
Resolves one cargo id to an immutable SDK-owned definition summary.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
cargoId | number |
options | DefinitionLookupOptions |
Returns
Section titled “Returns”Promise<CargoDefinitionSummary>
Example
Section titled “Example”declare const ctx: SageContext;declare const cargoId: number;declare const expectedSequenceId: number;const cargo = await resolveCargo(ctx, cargoId, { expectedSequenceId });resolveShip()
Section titled “resolveShip()”function resolveShip( context, shipId,options?): Promise<ShipDefinitionSummary>;Defined in: packages/sage/src/registry/index.ts:711
Resolves one ship id to an immutable SDK-owned definition summary.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
shipId | number |
options | DefinitionLookupOptions |
Returns
Section titled “Returns”Promise<ShipDefinitionSummary>
Example
Section titled “Example”declare const ctx: SageContext;declare const fleet: { readonly shipId: number; readonly shipDefinitionsSeqId: number };const ship = await resolveShip(ctx, fleet.shipId, { expectedSequenceId: fleet.shipDefinitionsSeqId });