starbases
Interfaces
Section titled “Interfaces”StarbaseCargoAmountData
Section titled “StarbaseCargoAmountData”Defined in: packages/sage/src/internal/c4/starbase.ts:98
One unresolved cargo quantity.
Example
Section titled “Example”declare const amount: StarbaseCargoAmountData;console.log(amount.cargoId, amount.amount);Properties
Section titled “Properties”amount
Section titled “amount”readonly amount: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:100
cargoId
Section titled “cargoId”readonly cargoId: number;Defined in: packages/sage/src/internal/c4/starbase.ts:99
StarbaseCargoInventory
Section titled “StarbaseCargoInventory”Defined in: packages/sage/src/starbases/index.ts:80
One resolved player-local Starbase CargoPod.
Example
Section titled “Example”declare const cargo: StarbaseCargoInventory;console.log(cargo.items);Properties
Section titled “Properties”readonly items: readonly StarbaseCargoItem[];Defined in: packages/sage/src/starbases/index.ts:83
sequenceId
Section titled “sequenceId”readonly sequenceId: number;Defined in: packages/sage/src/starbases/index.ts:81
usedStorageUnitsRaw
Section titled “usedStorageUnitsRaw”readonly usedStorageUnitsRaw: bigint;Defined in: packages/sage/src/starbases/index.ts:82
StarbaseCargoItem
Section titled “StarbaseCargoItem”Defined in: packages/sage/src/starbases/index.ts:69
One resolved cargo quantity stored in a player-local Starbase CargoPod.
Example
Section titled “Example”declare const item: StarbaseCargoItem;console.log(item.name, item.quantityRaw);Extends
Section titled “Extends”Properties
Section titled “Properties”categoryId
Section titled “categoryId”readonly categoryId: number;Defined in: packages/sage/src/registry/index.ts:119
Inherited from
Section titled “Inherited from”CargoDefinitionSummary.categoryId
readonly id: number;Defined in: packages/sage/src/registry/index.ts:120
Inherited from
Section titled “Inherited from”readonly mint: Address;Defined in: packages/sage/src/registry/index.ts:121
Inherited from
Section titled “Inherited from”readonly name: string;Defined in: packages/sage/src/registry/index.ts:122
Inherited from
Section titled “Inherited from”quantityRaw
Section titled “quantityRaw”readonly quantityRaw: bigint;Defined in: packages/sage/src/starbases/index.ts:70
storageCost
Section titled “storageCost”readonly storageCost: number;Defined in: packages/sage/src/registry/index.ts:127
Encoded storage cost with 8 fractional bits: 256 means one whole storage unit.
For a nonnegative bigint quantity, use (quantity * BigInt(storageCost) + 255n) / 256n.
Round each transfer row up before summing; Fleet capacities and pod usage are whole units.
Inherited from
Section titled “Inherited from”CargoDefinitionSummary.storageCost
StarbaseCargoPodData
Section titled “StarbaseCargoPodData”Defined in: packages/sage/src/internal/c4/starbase.ts:110
One translated nested CargoPod before definition resolution.
Example
Section titled “Example”declare const cargo: StarbaseCargoPodData;console.log(cargo.amounts);Properties
Section titled “Properties”amounts
Section titled “amounts”readonly amounts: readonly StarbaseCargoAmountData[];Defined in: packages/sage/src/internal/c4/starbase.ts:113
sequenceId
Section titled “sequenceId”readonly sequenceId: number;Defined in: packages/sage/src/internal/c4/starbase.ts:111
usedStorageUnitsRaw
Section titled “usedStorageUnitsRaw”readonly usedStorageUnitsRaw: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:112
StarbaseEscrowedShip
Section titled “StarbaseEscrowedShip”Defined in: packages/sage/src/starbases/index.ts:103
One resolved escrowed ship quantity.
Example
Section titled “Example”declare const ship: StarbaseEscrowedShip;console.log(ship.name, ship.quantityRaw);Extends
Section titled “Extends”ShipDefinitionSummary.Omit<StarbaseEscrowedShipData,"shipId">
Properties
Section titled “Properties”definitionSequenceId
Section titled “definitionSequenceId”readonly definitionSequenceId: number;Defined in: packages/sage/src/registry/index.ts:95
Inherited from
Section titled “Inherited from”ShipDefinitionSummary.definitionSequenceId
readonly id: number;Defined in: packages/sage/src/registry/index.ts:96
Inherited from
Section titled “Inherited from”readonly mint: Address;Defined in: packages/sage/src/registry/index.ts:97
Inherited from
Section titled “Inherited from”readonly name: string;Defined in: packages/sage/src/registry/index.ts:98
Inherited from
Section titled “Inherited from”quantityRaw
Section titled “quantityRaw”readonly quantityRaw: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:125
Inherited from
Section titled “Inherited from”StarbaseEscrowedShipData.quantityRaw
sizeClass
Section titled “sizeClass”readonly sizeClass: | "xx-small" | "x-small" | "small" | "medium" | "large" | "capital" | "commander" | "titan";Defined in: packages/sage/src/registry/index.ts:99
Inherited from
Section titled “Inherited from”ShipDefinitionSummary.sizeClass
readonly stats: FleetStatsData;Defined in: packages/sage/src/registry/index.ts:94
Inherited from
Section titled “Inherited from”StarbaseEscrowedShipData
Section titled “StarbaseEscrowedShipData”Defined in: packages/sage/src/internal/c4/starbase.ts:123
One unresolved escrowed ship quantity.
Example
Section titled “Example”declare const ship: StarbaseEscrowedShipData;console.log(ship.shipId, ship.quantityRaw);Properties
Section titled “Properties”quantityRaw
Section titled “quantityRaw”readonly quantityRaw: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:125
shipId
Section titled “shipId”readonly shipId: number;Defined in: packages/sage/src/internal/c4/starbase.ts:124
StarbaseFacilityRespawnData
Section titled “StarbaseFacilityRespawnData”Defined in: packages/sage/src/internal/c4/starbase.ts:87
One unresolved facility respawn queue.
Example
Section titled “Example”declare const queue: StarbaseFacilityRespawnData;console.log(queue.definitionId);Extends
Section titled “Extends”Properties
Section titled “Properties”completesAtUnixSeconds
Section titled “completesAtUnixSeconds”readonly completesAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:66
Inherited from
Section titled “Inherited from”StarbaseRespawnQueueData.completesAtUnixSeconds
definitionId
Section titled “definitionId”readonly definitionId: number;Defined in: packages/sage/src/internal/c4/starbase.ts:88
quantityRaw
Section titled “quantityRaw”readonly quantityRaw: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:65
Inherited from
Section titled “Inherited from”StarbaseRespawnQueueData.quantityRaw
StarbasePlayerAccountData
Section titled “StarbasePlayerAccountData”Defined in: packages/sage/src/internal/c4/starbase.ts:135
Fully translated StarbasePlayer account data before registry joins.
Example
Section titled “Example”declare const data: StarbasePlayerAccountData;console.log(data.character, data.respawning.craftingHabs);Properties
Section titled “Properties”readonly bump: number;Defined in: packages/sage/src/internal/c4/starbase.ts:152
busyCrew
Section titled “busyCrew”readonly busyCrew: number;Defined in: packages/sage/src/internal/c4/starbase.ts:142
readonly cargo: StarbaseCargoPodData;Defined in: packages/sage/src/internal/c4/starbase.ts:154
cargoRespawnEndsAtUnixSeconds
Section titled “cargoRespawnEndsAtUnixSeconds”readonly cargoRespawnEndsAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:151
character
Section titled “character”readonly character: Address;Defined in: packages/sage/src/internal/c4/starbase.ts:140
faction
Section titled “faction”readonly faction: StarbasePlayerFaction;Defined in: packages/sage/src/internal/c4/starbase.ts:138
playerProfile
Section titled “playerProfile”readonly playerProfile: Address;Defined in: packages/sage/src/internal/c4/starbase.ts:137
respawning
Section titled “respawning”readonly respawning: { cargo: StarbaseCargoPodData; claimStakes: readonly StarbaseFacilityRespawnData[]; craftingHabs: readonly StarbaseFacilityRespawnData[]; crew: StarbaseRespawnQueueData; ships: readonly StarbaseShipRespawnData[];};Defined in: packages/sage/src/internal/c4/starbase.ts:143
readonly cargo: StarbaseCargoPodData;claimStakes
Section titled “claimStakes”readonly claimStakes: readonly StarbaseFacilityRespawnData[];craftingHabs
Section titled “craftingHabs”readonly craftingHabs: readonly StarbaseFacilityRespawnData[];readonly crew: StarbaseRespawnQueueData;readonly ships: readonly StarbaseShipRespawnData[];sequenceId
Section titled “sequenceId”readonly sequenceId: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:150
shipsInEscrow
Section titled “shipsInEscrow”readonly shipsInEscrow: readonly StarbaseEscrowedShipData[];Defined in: packages/sage/src/internal/c4/starbase.ts:153
system
Section titled “system”readonly system: Address;Defined in: packages/sage/src/internal/c4/starbase.ts:139
totalCrew
Section titled “totalCrew”readonly totalCrew: number;Defined in: packages/sage/src/internal/c4/starbase.ts:141
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/starbase.ts:136
StarbasePlayerSnapshot
Section titled “StarbasePlayerSnapshot”Defined in: packages/sage/src/starbases/index.ts:113
Immutable, translated player-local Starbase snapshot.
Example
Section titled “Example”declare const starbase: StarbasePlayerSnapshot;console.log(starbase.availableCrew, starbase.cargo.items);Extends
Section titled “Extends”Omit<StarbasePlayerAccountData, |"cargo"|"character"|"playerProfile"|"respawning"|"shipsInEscrow"|"system">
Extended by
Section titled “Extended by”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/starbases/index.ts:123
availableCrew
Section titled “availableCrew”readonly availableCrew: number;Defined in: packages/sage/src/starbases/index.ts:127
readonly bump: number;Defined in: packages/sage/src/internal/c4/starbase.ts:152
Inherited from
Section titled “Inherited from”StarbasePlayerAccountData.bump
busyCrew
Section titled “busyCrew”readonly busyCrew: number;Defined in: packages/sage/src/internal/c4/starbase.ts:142
Inherited from
Section titled “Inherited from”StarbasePlayerAccountData.busyCrew
readonly cargo: StarbaseCargoInventory;Defined in: packages/sage/src/starbases/index.ts:128
cargoRespawnEndsAtUnixSeconds
Section titled “cargoRespawnEndsAtUnixSeconds”readonly cargoRespawnEndsAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:151
Inherited from
Section titled “Inherited from”StarbasePlayerAccountData.cargoRespawnEndsAtUnixSeconds
character
Section titled “character”readonly character: EntityRef<"character">;Defined in: packages/sage/src/starbases/index.ts:126
faction
Section titled “faction”readonly faction: StarbasePlayerFaction;Defined in: packages/sage/src/internal/c4/starbase.ts:138
Inherited from
Section titled “Inherited from”StarbasePlayerAccountData.faction
readonly kind: "starbasePlayer";Defined in: packages/sage/src/starbases/index.ts:122
playerProfile
Section titled “playerProfile”readonly playerProfile: EntityRef<"profile">;Defined in: packages/sage/src/starbases/index.ts:124
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:129
Type Declaration
Section titled “Type Declaration”readonly cargo: StarbaseCargoInventory;readonly ships: readonly StarbaseShipRespawn[];sequenceId
Section titled “sequenceId”readonly sequenceId: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:150
Inherited from
Section titled “Inherited from”StarbasePlayerAccountData.sequenceId
shipsInEscrow
Section titled “shipsInEscrow”readonly shipsInEscrow: readonly StarbaseEscrowedShip[];Defined in: packages/sage/src/starbases/index.ts:136
system
Section titled “system”readonly system: EntityRef<"starSystem">;Defined in: packages/sage/src/starbases/index.ts:125
totalCrew
Section titled “totalCrew”readonly totalCrew: number;Defined in: packages/sage/src/internal/c4/starbase.ts:141
Inherited from
Section titled “Inherited from”StarbasePlayerAccountData.totalCrew
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/starbase.ts:136
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:137
Returns
Section titled “Returns”unknown
StarbaseRespawnQueueData
Section titled “StarbaseRespawnQueueData”Defined in: packages/sage/src/internal/c4/starbase.ts:64
One translated respawn queue.
Example
Section titled “Example”declare const queue: StarbaseRespawnQueueData;console.log(queue.quantityRaw);Extended by
Section titled “Extended by”Properties
Section titled “Properties”completesAtUnixSeconds
Section titled “completesAtUnixSeconds”readonly completesAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:66
quantityRaw
Section titled “quantityRaw”readonly quantityRaw: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:65
StarbaseShipRespawn
Section titled “StarbaseShipRespawn”Defined in: packages/sage/src/starbases/index.ts:93
One resolved ship respawn queue.
Example
Section titled “Example”declare const ship: StarbaseShipRespawn;console.log(ship.name, ship.completesAtUnixSeconds);Extends
Section titled “Extends”ShipDefinitionSummary.Omit<StarbaseShipRespawnData,"shipId">
Properties
Section titled “Properties”completesAtUnixSeconds
Section titled “completesAtUnixSeconds”readonly completesAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:66
Inherited from
Section titled “Inherited from”StarbaseRespawnQueueData.completesAtUnixSeconds
definitionSequenceId
Section titled “definitionSequenceId”readonly definitionSequenceId: number;Defined in: packages/sage/src/registry/index.ts:95
Inherited from
Section titled “Inherited from”ShipDefinitionSummary.definitionSequenceId
readonly id: number;Defined in: packages/sage/src/registry/index.ts:96
Inherited from
Section titled “Inherited from”readonly mint: Address;Defined in: packages/sage/src/registry/index.ts:97
Inherited from
Section titled “Inherited from”readonly name: string;Defined in: packages/sage/src/registry/index.ts:98
Inherited from
Section titled “Inherited from”quantityRaw
Section titled “quantityRaw”readonly quantityRaw: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:65
Inherited from
Section titled “Inherited from”StarbaseRespawnQueueData.quantityRaw
sizeClass
Section titled “sizeClass”readonly sizeClass: | "xx-small" | "x-small" | "small" | "medium" | "large" | "capital" | "commander" | "titan";Defined in: packages/sage/src/registry/index.ts:99
Inherited from
Section titled “Inherited from”ShipDefinitionSummary.sizeClass
readonly stats: FleetStatsData;Defined in: packages/sage/src/registry/index.ts:94
Inherited from
Section titled “Inherited from”StarbaseShipRespawnData
Section titled “StarbaseShipRespawnData”Defined in: packages/sage/src/internal/c4/starbase.ts:76
One unresolved ship respawn queue.
Example
Section titled “Example”declare const queue: StarbaseShipRespawnData;console.log(queue.shipId);Extends
Section titled “Extends”Properties
Section titled “Properties”completesAtUnixSeconds
Section titled “completesAtUnixSeconds”readonly completesAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:66
Inherited from
Section titled “Inherited from”StarbaseRespawnQueueData.completesAtUnixSeconds
quantityRaw
Section titled “quantityRaw”readonly quantityRaw: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:65
Inherited from
Section titled “Inherited from”StarbaseRespawnQueueData.quantityRaw
shipId
Section titled “shipId”readonly shipId: number;Defined in: packages/sage/src/internal/c4/starbase.ts:77
StarbaseUpgradeProcessAccountData
Section titled “StarbaseUpgradeProcessAccountData”Defined in: packages/sage/src/internal/c4/starbase.ts:164
Fully translated StarbaseUpgradeProcess account data before registry joins.
Example
Section titled “Example”declare const data: StarbaseUpgradeProcessAccountData;console.log(data.resourceId, data.quantityRaw);Properties
Section titled “Properties”endsAtUnixSeconds
Section titled “endsAtUnixSeconds”readonly endsAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:174
numCrew
Section titled “numCrew”readonly numCrew: number;Defined in: packages/sage/src/internal/c4/starbase.ts:172
playerProfile
Section titled “playerProfile”readonly playerProfile: Address;Defined in: packages/sage/src/internal/c4/starbase.ts:166
quantityRaw
Section titled “quantityRaw”readonly quantityRaw: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:171
resourceId
Section titled “resourceId”readonly resourceId: number;Defined in: packages/sage/src/internal/c4/starbase.ts:170
starbasePlayer
Section titled “starbasePlayer”readonly starbasePlayer: Address;Defined in: packages/sage/src/internal/c4/starbase.ts:168
starbaseSequenceId
Section titled “starbaseSequenceId”readonly starbaseSequenceId: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:169
startsAtUnixSeconds
Section titled “startsAtUnixSeconds”readonly startsAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:173
system
Section titled “system”readonly system: Address;Defined in: packages/sage/src/internal/c4/starbase.ts:167
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/starbase.ts:165
StarbaseUpgradeProcessSnapshot
Section titled “StarbaseUpgradeProcessSnapshot”Defined in: packages/sage/src/starbases/index.ts:147
Immutable, translated Starbase upgrade-process snapshot.
Example
Section titled “Example”declare const upgrade: StarbaseUpgradeProcessSnapshot;console.log(upgrade.resource.name, upgrade.endsAtUnixSeconds);Extends
Section titled “Extends”Omit<StarbaseUpgradeProcessAccountData, |"playerProfile"|"quantityRaw"|"resourceId"|"starbasePlayer"|"system">
Extended by
Section titled “Extended by”Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/starbases/index.ts:152
endsAtUnixSeconds
Section titled “endsAtUnixSeconds”readonly endsAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:174
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessAccountData.endsAtUnixSeconds
readonly kind: "starbaseUpgradeProcess";Defined in: packages/sage/src/starbases/index.ts:151
numCrew
Section titled “numCrew”readonly numCrew: number;Defined in: packages/sage/src/internal/c4/starbase.ts:172
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessAccountData.numCrew
playerProfile
Section titled “playerProfile”readonly playerProfile: EntityRef<"profile">;Defined in: packages/sage/src/starbases/index.ts:153
resource
Section titled “resource”readonly resource: CargoDefinitionSummary & { quantityRaw: bigint;};Defined in: packages/sage/src/starbases/index.ts:156
Type Declaration
Section titled “Type Declaration”quantityRaw
Section titled “quantityRaw”readonly quantityRaw: bigint;starbasePlayer
Section titled “starbasePlayer”readonly starbasePlayer: EntityRef<"starbasePlayer">;Defined in: packages/sage/src/starbases/index.ts:154
starbaseSequenceId
Section titled “starbaseSequenceId”readonly starbaseSequenceId: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:169
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessAccountData.starbaseSequenceId
startsAtUnixSeconds
Section titled “startsAtUnixSeconds”readonly startsAtUnixSeconds: bigint;Defined in: packages/sage/src/internal/c4/starbase.ts:173
Inherited from
Section titled “Inherited from”StarbaseUpgradeProcessAccountData.startsAtUnixSeconds
system
Section titled “system”readonly system: EntityRef<"starSystem">;Defined in: packages/sage/src/starbases/index.ts:155
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/internal/c4/starbase.ts:165
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:157
Returns
Section titled “Returns”unknown
Type Aliases
Section titled “Type Aliases”StarbaseDiscoveryOptions
Section titled “StarbaseDiscoveryOptions”type StarbaseDiscoveryOptions = Omit<DiscoveryRequest, "filters" | "strategy">;Defined in: packages/sage/src/starbases/index.ts:57
Options supported by targeted player-local Starbase discovery.
Example
Section titled “Example”const options: StarbaseDiscoveryOptions = { commitment: 'confirmed' };StarbasePlayerFaction
Section titled “StarbasePlayerFaction”type StarbasePlayerFaction = "unaligned" | "mud" | "oni" | "ustur";Defined in: packages/sage/src/internal/c4/starbase.ts:55
Stable translated Starbase faction.
Example
Section titled “Example”const faction: StarbasePlayerFaction = 'mud';Functions
Section titled “Functions”getStarbasePlayer()
Section titled “getStarbasePlayer()”function getStarbasePlayer( context, address,options?): Promise<StarbasePlayerSnapshot>;Defined in: packages/sage/src/starbases/index.ts:320
Reads one required StarbasePlayer by address.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarbasePlayerSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;declare const address: Address;const starbase = await getStarbasePlayer(ctx, address);getStarbasePlayerForCharacterAtSystem()
Section titled “getStarbasePlayerForCharacterAtSystem()”function getStarbasePlayerForCharacterAtSystem( context, character, system,options?): Promise<StarbasePlayerSnapshot>;Defined in: packages/sage/src/starbases/index.ts:365
Derives and reads StarbasePlayer for one Character at one Star System.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
character | Address |
system | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarbasePlayerSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;declare const character: Address;declare const system: Address;const starbase = await getStarbasePlayerForCharacterAtSystem(ctx, character, system);getStarbasePlayersByCharacter()
Section titled “getStarbasePlayersByCharacter()”function getStarbasePlayersByCharacter( context, character,options?): Promise<readonly StarbasePlayerSnapshot[]>;Defined in: packages/sage/src/starbases/index.ts:400
Discovers player-local Starbases for one Character.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
character | Address |
options? | StarbaseDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly StarbasePlayerSnapshot[]>
Example
Section titled “Example”declare const ctx: SageContext;declare const character: Address;const starbases = await getStarbasePlayersByCharacter(ctx, character);getStarbasePlayersBySystem()
Section titled “getStarbasePlayersBySystem()”function getStarbasePlayersBySystem( context, system,options?): Promise<readonly StarbasePlayerSnapshot[]>;Defined in: packages/sage/src/starbases/index.ts:420
Discovers player-local Starbases in one Star System.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
system | Address |
options? | StarbaseDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly StarbasePlayerSnapshot[]>
Example
Section titled “Example”declare const ctx: SageContext;declare const system: Address;const starbases = await getStarbasePlayersBySystem(ctx, system);getStarbaseUpgradeProcess()
Section titled “getStarbaseUpgradeProcess()”function getStarbaseUpgradeProcess( context, address,options?): Promise<StarbaseUpgradeProcessSnapshot>;Defined in: packages/sage/src/starbases/index.ts:440
Reads one required StarbaseUpgradeProcess by its signer-created address.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<StarbaseUpgradeProcessSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;declare const address: Address;const upgrade = await getStarbaseUpgradeProcess(ctx, address);getStarbaseUpgradeProcessesByPlayer()
Section titled “getStarbaseUpgradeProcessesByPlayer()”function getStarbaseUpgradeProcessesByPlayer( context, player,options?): Promise<readonly StarbaseUpgradeProcessSnapshot[]>;Defined in: packages/sage/src/starbases/index.ts:488
Discovers Starbase upgrade processes stored against one StarbasePlayer.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
player | Address |
options? | StarbaseDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly StarbaseUpgradeProcessSnapshot[]>
Example
Section titled “Example”declare const ctx: SageContext;declare const player: Address;const upgrades = await getStarbaseUpgradeProcessesByPlayer(ctx, player);maybeGetStarbasePlayer()
Section titled “maybeGetStarbasePlayer()”function maybeGetStarbasePlayer( context, address, options?): Promise< | StarbasePlayerSnapshot| undefined>;Defined in: packages/sage/src/starbases/index.ts:340
Reads one optional StarbasePlayer by address.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<
| StarbasePlayerSnapshot
| undefined>
Example
Section titled “Example”declare const ctx: SageContext;declare const address: Address;const starbase = await maybeGetStarbasePlayer(ctx, address);maybeGetStarbaseUpgradeProcess()
Section titled “maybeGetStarbaseUpgradeProcess()”function maybeGetStarbaseUpgradeProcess( context, address, options?): Promise< | StarbaseUpgradeProcessSnapshot| undefined>;Defined in: packages/sage/src/starbases/index.ts:464
Reads one optional StarbaseUpgradeProcess by address.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<
| StarbaseUpgradeProcessSnapshot
| undefined>
Example
Section titled “Example”declare const ctx: SageContext;declare const address: Address;const upgrade = await maybeGetStarbaseUpgradeProcess(ctx, address);