Skip to content
Next — unreleased

@aephia/atlas-kit

View as Markdown

Defined in: packages/sage/src/client/errors.ts:470

The preload request contains an unsupported definition section or is not an array.

throw new InvalidDefinitionSectionError();

new InvalidDefinitionSectionError(): InvalidDefinitionSectionError;

Defined in: packages/sage/src/client/errors.ts:471

InvalidDefinitionSectionError

SageSdkError.constructor

readonly accountType: EntityType | undefined;

Defined in: packages/sage/src/client/errors.ts:70

SageSdkError.accountType

readonly address: Address | undefined;

Defined in: packages/sage/src/client/errors.ts:71

SageSdkError.address

optional cause?: unknown;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26

SageSdkError.cause

readonly code: SageSdkErrorCode;

Defined in: packages/sage/src/client/errors.ts:69

SageSdkError.code

message: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077

SageSdkError.message

name: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076

SageSdkError.name

readonly provider:
| DataSourceIdentity
| undefined;

Defined in: packages/sage/src/client/errors.ts:72

SageSdkError.provider

optional stack?: string;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078

SageSdkError.stack

readonly strategy: DiscoveryStrategy | undefined;

Defined in: packages/sage/src/client/errors.ts:73

SageSdkError.strategy

static stackTraceLimit: number;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

SageSdkError.stackTraceLimit

static captureStackTrace(targetObject, constructorOpt?): void;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
ParameterType
targetObjectobject
constructorOpt?Function

void

SageSdkError.captureStackTrace

static prepareStackTrace(err, stackTraces): any;

Defined in: node_modules/.pnpm/@types+node@24.10.1/node_modules/@types/node/globals.d.ts:56

ParameterType
errError
stackTracesCallSite[]

any

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

SageSdkError.prepareStackTrace

Defined in: packages/sage/src/client/contracts.ts:392

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.

const subscriptions: AccountSubscriptionProvider = {
identity: { kind: 'websocket', name: 'zink-ptr' },
subscribeAccount: async () => ({ unsubscribe: async () => undefined }),
};

readonly identity: DataSourceIdentity;

Defined in: packages/sage/src/client/contracts.ts:393

subscribeAccount(request, listener): Promise<AccountSubscriptionRegistration>;

Defined in: packages/sage/src/client/contracts.ts:394

ParameterType
requestAccountSubscriptionRequest
listener(event) => void

Promise<AccountSubscriptionRegistration>


Defined in: packages/sage/src/client/contracts.ts:372

Provider-owned handle for one raw WebSocket registration.

declare const registration: AccountSubscriptionRegistration;
await registration.unsubscribe();

unsubscribe(): Promise<void>;

Defined in: packages/sage/src/client/contracts.ts:373

Promise<void>


Defined in: packages/sage/src/client/contracts.ts:345

A context-owned raw-account subscription request.

declare const address: Address;
const request: AccountSubscriptionRequest = { address, commitment: 'confirmed' };

readonly address: Address;

Defined in: packages/sage/src/client/contracts.ts:346

readonly optional commitment?: Commitment;

Defined in: packages/sage/src/client/contracts.ts:179

ReadAccountOptions.commitment

readonly optional signal?: AbortSignal;

Defined in: packages/sage/src/client/contracts.ts:180

ReadAccountOptions.signal


Defined in: packages/sage/src/index.ts:370

A loaded Asteroid whose stored StarSystem reference resolves through the root client.

declare const asteroid: AsteroidView;
const system = await asteroid.system.get();

readonly address: Address;

Defined in: packages/sage/src/world/index.ts:113

AsteroidSnapshot.address

readonly claimStakes: {
all: Promise<readonly ClaimStakeView[]>;
};

Defined in: packages/sage/src/index.ts:371

all(options?): Promise<readonly ClaimStakeView[]>;
ParameterType
options?ClaimStakeDiscoveryOptions

Promise<readonly ClaimStakeView[]>

readonly deposit: {
get: Promise<ResourceDepositView>;
};

Defined in: packages/sage/src/index.ts:376

get(options?): Promise<ResourceDepositView>;
ParameterType
options?ReadOptions

Promise<ResourceDepositView>

readonly details: WorldAsteroidData;

Defined in: packages/sage/src/internal/c4/world.ts:433

Omit.details

readonly game: Address;

Defined in: packages/sage/src/internal/c4/world.ts:419

Omit.game

readonly id: number;

Defined in: packages/sage/src/internal/c4/world.ts:417

Omit.id

readonly kind: "asteroid";

Defined in: packages/sage/src/internal/c4/world.ts:432

Omit.kind

readonly lastSyncAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/world.ts:422

Omit.lastSyncAtUnixSeconds

readonly name: string;

Defined in: packages/sage/src/internal/c4/world.ts:418

Omit.name

readonly system: EntityRef<"starSystem"> & {
get: Promise<StarSystemView>;
};

Defined in: packages/sage/src/index.ts:379

get(options?): Promise<StarSystemView>;
ParameterType
options?ReadOptions

Promise<StarSystemView>

readonly systemSequenceId: bigint;

Defined in: packages/sage/src/internal/c4/world.ts:421

Omit.systemSequenceId

readonly version: number;

Defined in: packages/sage/src/internal/c4/world.ts:416

Omit.version

toJSON(): unknown;

Defined in: packages/sage/src/world/index.ts:115

unknown

AsteroidSnapshot.toJSON


Defined in: packages/sage/src/registry/index.ts:104

Small, stable cargo definition returned to gameplay domains.

declare const ctx: SageContext;
const cargo: CargoDefinitionSummary = await resolveCargo(ctx, 7);

readonly categoryId: number;

Defined in: packages/sage/src/registry/index.ts:105

readonly id: number;

Defined in: packages/sage/src/registry/index.ts:106

readonly mint: Address;

Defined in: packages/sage/src/registry/index.ts:107

readonly name: string;

Defined in: packages/sage/src/registry/index.ts:108

readonly storageCost: number;

Defined in: packages/sage/src/registry/index.ts:109


Defined in: packages/sage/src/index.ts:168

A loaded Character with root-only relation accessors.

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();

readonly address: Address;

Defined in: packages/sage/src/identity/index.ts:122

CharacterSnapshot.address

readonly atlas: number;

Defined in: packages/sage/src/internal/c4/identity.ts:242

CharacterAccountData.atlas

readonly atlasRaw: bigint;

Defined in: packages/sage/src/internal/c4/identity.ts:241

CharacterAccountData.atlasRaw

readonly bump: number;

Defined in: packages/sage/src/internal/c4/identity.ts:235

CharacterAccountData.bump

readonly checkIn: {
lastCheckInTime: bigint;
streak: number;
};

Defined in: packages/sage/src/internal/c4/identity.ts:236

readonly lastCheckInTime: bigint;
readonly streak: number;

CharacterAccountData.checkIn

readonly claimStakes: {
all: Promise<readonly ClaimStakeView[]>;
};

Defined in: packages/sage/src/index.ts:179

all(options?): Promise<readonly ClaimStakeView[]>;
ParameterType
options?ClaimStakeDiscoveryOptions

Promise<readonly ClaimStakeView[]>

readonly counts: {
claimStakes: number;
craftingHabs: number;
fleets: number;
};

Defined in: packages/sage/src/internal/c4/identity.ts:243

readonly claimStakes: number;
readonly craftingHabs: number;
readonly fleets: number;

CharacterAccountData.counts

readonly craftingHabs: {
all: Promise<readonly CraftingHabView[]>;
};

Defined in: packages/sage/src/index.ts:187

all(options?): Promise<readonly CraftingHabView[]>;
ParameterType
options?CraftingDiscoveryOptions

Promise<readonly CraftingHabView[]>

readonly craftingProcesses: {
all: Promise<readonly CraftingProcessView[]>;
};

Defined in: packages/sage/src/index.ts:192

all(options?): Promise<readonly CraftingProcessView[]>;
ParameterType
options?CraftingDiscoveryOptions

Promise<readonly CraftingProcessView[]>

readonly fleets: {
all: Promise<readonly FleetView[]>;
};

Defined in: packages/sage/src/index.ts:184

all(options?): Promise<readonly FleetView[]>;
ParameterType
options?FleetDiscoveryOptions

Promise<readonly FleetView[]>

readonly game: Address;

Defined in: packages/sage/src/internal/c4/identity.ts:234

CharacterAccountData.game

readonly kind: "character";

Defined in: packages/sage/src/identity/index.ts:121

CharacterSnapshot.kind

readonly localMarketOrders: {
at: Promise<readonly LocalMarketOrderSnapshot & {
makerState: LocalMarketMakerStateSnapshot;
}[]>;
};

Defined in: packages/sage/src/index.ts:169

at(market, options?): Promise<readonly LocalMarketOrderSnapshot & {
makerState: LocalMarketMakerStateSnapshot;
}[]>;
ParameterType
marketAddress
options?ReadOptions

Promise<readonly LocalMarketOrderSnapshot & { makerState: LocalMarketMakerStateSnapshot; }[]>

readonly modifiers: CharacterModifiersData;

Defined in: packages/sage/src/internal/c4/identity.ts:254

CharacterAccountData.modifiers

readonly pilotXpBudget: {
available: number;
fractionalCarry: number;
fractionalCarryRaw: bigint;
lastAccrualTime: bigint;
};

Defined in: packages/sage/src/internal/c4/identity.ts:248

readonly available: number;
readonly fractionalCarry: number;
readonly fractionalCarryRaw: bigint;
readonly lastAccrualTime: bigint;

CharacterAccountData.pilotXpBudget

readonly profile: EntityRef<"profile">;

Defined in: packages/sage/src/identity/index.ts:123

CharacterSnapshot.profile

readonly starbases: {
all: Promise<readonly StarbasePlayerView[]>;
at: Promise<StarbasePlayerView>;
};

Defined in: packages/sage/src/index.ts:197

all(options?): Promise<readonly StarbasePlayerView[]>;
ParameterType
options?StarbaseDiscoveryOptions

Promise<readonly StarbasePlayerView[]>

at(system, options?): Promise<StarbasePlayerView>;
ParameterType
systemAddress
options?ReadOptions

Promise<StarbasePlayerView>

readonly version: number;

Defined in: packages/sage/src/internal/c4/identity.ts:232

CharacterAccountData.version

readonly xp: CharacterXpData;

Defined in: packages/sage/src/internal/c4/identity.ts:240

CharacterAccountData.xp

toJSON(): unknown;

Defined in: packages/sage/src/identity/index.ts:124

unknown

CharacterSnapshot.toJSON


Defined in: packages/sage/src/index.ts:278

A loaded Claim Stake exposed by the root convenience client.

declare const stake: ClaimStakeView;
console.log(stake.state.kind);

readonly address: Address;

Defined in: packages/sage/src/claim-stakes/index.ts:73

ClaimStakeSnapshot.address

readonly body: EntityRef<"celestialBody">;

Defined in: packages/sage/src/claim-stakes/index.ts:74

ClaimStakeSnapshot.body

readonly buildingDefinitionSeqId: number;

Defined in: packages/sage/src/internal/c4/claim-stake.ts:157

ClaimStakeAccountData.buildingDefinitionSeqId

readonly buildings: readonly ClaimStakeBuildingData[];

Defined in: packages/sage/src/internal/c4/claim-stake.ts:164

ClaimStakeAccountData.buildings

readonly claimStakeDefinitionId: number;

Defined in: packages/sage/src/internal/c4/claim-stake.ts:155

ClaimStakeAccountData.claimStakeDefinitionId

readonly claimStakeDefinitionSeqId: number;

Defined in: packages/sage/src/internal/c4/claim-stake.ts:156

ClaimStakeAccountData.claimStakeDefinitionSeqId

readonly constructionProgressAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/claim-stake.ts:161

ClaimStakeAccountData.constructionProgressAtUnixSeconds

readonly constructionRemainingSeconds: bigint;

Defined in: packages/sage/src/internal/c4/claim-stake.ts:160

ClaimStakeAccountData.constructionRemainingSeconds

readonly game: Address;

Defined in: packages/sage/src/internal/c4/claim-stake.ts:153

ClaimStakeAccountData.game

readonly kind: "claimStakeInstance";

Defined in: packages/sage/src/claim-stakes/index.ts:72

ClaimStakeSnapshot.kind

readonly lastRentAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/claim-stake.ts:159

ClaimStakeAccountData.lastRentAtUnixSeconds

readonly neededCrew: number;

Defined in: packages/sage/src/internal/c4/claim-stake.ts:163

ClaimStakeAccountData.neededCrew

readonly ownerCharacter: EntityRef<"character">;

Defined in: packages/sage/src/claim-stakes/index.ts:75

ClaimStakeSnapshot.ownerCharacter

readonly rentBalanceRaw: bigint;

Defined in: packages/sage/src/internal/c4/claim-stake.ts:162

ClaimStakeAccountData.rentBalanceRaw

readonly resources: ClaimStakeResources;

Defined in: packages/sage/src/claim-stakes/index.ts:76

ClaimStakeSnapshot.resources

readonly state: ClaimStakeStateData;

Defined in: packages/sage/src/internal/c4/claim-stake.ts:165

ClaimStakeAccountData.state

readonly systemSeqId: bigint;

Defined in: packages/sage/src/internal/c4/claim-stake.ts:158

ClaimStakeAccountData.systemSeqId

readonly version: number;

Defined in: packages/sage/src/internal/c4/claim-stake.ts:151

ClaimStakeAccountData.version

toJSON(): unknown;

Defined in: packages/sage/src/claim-stakes/index.ts:77

unknown

ClaimStakeSnapshot.toJSON


Defined in: packages/sage/src/index.ts:333

A loaded Crafting Hab exposed by the root convenience client.

declare const sage: SageClient;
declare const address: Address;
const hab: CraftingHabView = await sage.craftingHabs.get(address);

readonly address: Address;

Defined in: packages/sage/src/crafting/index.ts:240

CraftingHabSnapshot.address

readonly availableJobSlots: number;

Defined in: packages/sage/src/crafting/index.ts:246

CraftingHabSnapshot.availableJobSlots

readonly buildingDefinitionSequenceId: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:207

CraftingHabSnapshot.buildingDefinitionSequenceId

readonly buildings: readonly CraftingHabBuilding[];

Defined in: packages/sage/src/crafting/index.ts:245

CraftingHabView.buildings

readonly constructionProgressAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:211

CraftingHabSnapshot.constructionProgressAtUnixSeconds

readonly constructionRemainingSeconds: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:210

CraftingHabSnapshot.constructionRemainingSeconds

readonly definition: CraftingHabDefinitionSummary;

Defined in: packages/sage/src/crafting/index.ts:244

CraftingHabSnapshot.definition

readonly definitionId: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:205

CraftingHabSnapshot.definitionId

readonly definitionSequenceId: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:206

CraftingHabSnapshot.definitionSequenceId

readonly game: EntityRef<"game">;

Defined in: packages/sage/src/crafting/index.ts:241

CraftingHabSnapshot.game

readonly jobCapacity: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:214

CraftingHabSnapshot.jobCapacity

readonly jobsRunning: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:215

CraftingHabSnapshot.jobsRunning

readonly kind: "craftingHabInstance";

Defined in: packages/sage/src/crafting/index.ts:239

CraftingHabSnapshot.kind

readonly lastRentAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:209

CraftingHabSnapshot.lastRentAtUnixSeconds

readonly modifiers: CraftingModifierData;

Defined in: packages/sage/src/internal/c4/crafting.ts:216

CraftingHabSnapshot.modifiers

readonly neededCrew: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:213

CraftingHabSnapshot.neededCrew

readonly ownerProfile: EntityRef<"profile">;

Defined in: packages/sage/src/crafting/index.ts:242

CraftingHabSnapshot.ownerProfile

readonly production: {
inventory: CraftingCargoInventory;
lastTickAtUnixSeconds: bigint;
netRates: readonly CargoDefinitionSummary & {
unitsPerSecond: number;
unitsPerSecondRaw: bigint;
}[];
resourceCapacityRaw: bigint;
};

Defined in: packages/sage/src/crafting/index.ts:248

readonly inventory: CraftingCargoInventory;
readonly lastTickAtUnixSeconds: bigint;
readonly netRates: readonly CargoDefinitionSummary & {
unitsPerSecond: number;
unitsPerSecondRaw: bigint;
}[];
readonly resourceCapacityRaw: bigint;

CraftingHabSnapshot.production

readonly rentBalanceRaw: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:212

CraftingHabSnapshot.rentBalanceRaw

readonly state: CraftingHabStateData;

Defined in: packages/sage/src/internal/c4/crafting.ts:219

CraftingHabSnapshot.state

readonly system: EntityRef<"starSystem">;

Defined in: packages/sage/src/crafting/index.ts:243

CraftingHabSnapshot.system

readonly systemSequenceId: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:208

CraftingHabSnapshot.systemSequenceId

readonly unlockedRecipes: readonly EntityRef<"recipe">[];

Defined in: packages/sage/src/crafting/index.ts:247

CraftingHabView.unlockedRecipes

readonly version: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:201

CraftingHabSnapshot.version

toJSON(): unknown;

Defined in: packages/sage/src/crafting/index.ts:257

unknown

CraftingHabSnapshot.toJSON


Defined in: packages/sage/src/index.ts:343

A loaded Crafting Process exposed by the root convenience client.

declare const sage: SageClient;
declare const address: Address;
const process: CraftingProcessView = await sage.craftingProcesses.get(address);

readonly address: Address;

Defined in: packages/sage/src/crafting/index.ts:272

CraftingProcessSnapshot.address

readonly craftingHab: EntityRef<"craftingHabInstance">;

Defined in: packages/sage/src/crafting/index.ts:277

CraftingProcessSnapshot.craftingHab

readonly endsAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:239

CraftingProcessSnapshot.endsAtUnixSeconds

readonly feeEscrowAtlas: number;

Defined in: packages/sage/src/crafting/index.ts:279

CraftingProcessSnapshot.feeEscrowAtlas

readonly feeEscrowRaw: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:240

CraftingProcessSnapshot.feeEscrowRaw

readonly inputs: CraftingCargoInventory;

Defined in: packages/sage/src/crafting/index.ts:278

CraftingProcessSnapshot.inputs

readonly kind: "craftingProcess";

Defined in: packages/sage/src/crafting/index.ts:271

CraftingProcessSnapshot.kind

readonly numCrew: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:237

CraftingProcessSnapshot.numCrew

readonly profile: EntityRef<"profile">;

Defined in: packages/sage/src/crafting/index.ts:274

CraftingProcessSnapshot.profile

readonly quantityRaw: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:236

CraftingProcessSnapshot.quantityRaw

readonly recipe: RecipeSnapshot;

Defined in: packages/sage/src/crafting/index.ts:273

CraftingProcessSnapshot.recipe

readonly starbasePlayer: EntityRef<"starbasePlayer">;

Defined in: packages/sage/src/crafting/index.ts:276

CraftingProcessSnapshot.starbasePlayer

readonly starbaseSequenceId: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:234

CraftingProcessSnapshot.starbaseSequenceId

readonly startsAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:238

CraftingProcessSnapshot.startsAtUnixSeconds

readonly system: EntityRef<"starSystem">;

Defined in: packages/sage/src/crafting/index.ts:275

CraftingProcessSnapshot.system

readonly version: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:229

CraftingProcessSnapshot.version

toJSON(): unknown;

Defined in: packages/sage/src/crafting/index.ts:280

unknown

CraftingProcessSnapshot.toJSON


Defined in: packages/sage/src/registry/index.ts:179

Sequence information supplied by a live account that references a definition.

const options: DefinitionLookupOptions = { expectedSequenceId: 12 };

readonly optional expectedSequenceId?: number;

Defined in: packages/sage/src/registry/index.ts:180


Defined in: packages/sage/src/internal/read-meta.ts:159

Per-section provenance; unavailable observations are never inferred from siblings.

import { preloadDefinitions } from '@aephia/atlas-kit';
declare const ctx: SageContext;
const meta: DefinitionPreloadMeta | undefined = readMeta(await preloadDefinitions(ctx, ['ships']));

readonly kind: "definition-preload";

Defined in: packages/sage/src/internal/read-meta.ts:160

readonly sections: readonly {
observation: | {
availability: "unavailable";
}
| {
availability: "available";
commitment: Commitment;
slot: bigint;
};
section: DefinitionSection;
sequenceId: number;
}[];

Defined in: packages/sage/src/internal/read-meta.ts:161

toJSON(): unknown;

Defined in: packages/sage/src/internal/read-meta.ts:172

unknown


Defined in: packages/sage/src/client/refs.ts:11

A lightweight cross-domain reference to an independently addressable account.

declare const fleetAddress: Address;
const fleet: EntityRef<'fleet'> = entityRef('fleet', fleetAddress);
Type ParameterDefault type
TType extends EntityTypeEntityType

readonly address: Address;

Defined in: packages/sage/src/client/refs.ts:13

readonly type: TType;

Defined in: packages/sage/src/client/refs.ts:12


Defined in: packages/sage/src/index.ts:444

A loaded Faction Market exposed by the root convenience client.

declare const market: FactionMarketView;
console.log(market.offers);

readonly address: Address;

Defined in: packages/sage/src/markets/index.ts:159

FactionMarketSnapshot.address

readonly atlasBurnBasisPoints: number;

Defined in: packages/sage/src/internal/c4/market.ts:179

FactionMarketSnapshot.atlasBurnBasisPoints

readonly authoredTargetQuantityRaw: bigint;

Defined in: packages/sage/src/internal/c4/market.ts:176

FactionMarketSnapshot.authoredTargetQuantityRaw

readonly bump: number;

Defined in: packages/sage/src/internal/c4/market.ts:167

FactionMarketSnapshot.bump

readonly factionId: number;

Defined in: packages/sage/src/internal/c4/market.ts:169

FactionMarketSnapshot.factionId

readonly faucetEnabled: boolean;

Defined in: packages/sage/src/internal/c4/market.ts:181

FactionMarketSnapshot.faucetEnabled

readonly game: EntityRef<"game">;

Defined in: packages/sage/src/markets/index.ts:160

FactionMarketSnapshot.game

readonly kind: "factionMarket";

Defined in: packages/sage/src/markets/index.ts:158

FactionMarketSnapshot.kind

readonly lastRestockedAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/market.ts:178

FactionMarketSnapshot.lastRestockedAtUnixSeconds

readonly minimumStandingToBuy: number;

Defined in: packages/sage/src/internal/c4/market.ts:173

FactionMarketSnapshot.minimumStandingToBuy

readonly minimumStandingToSell: number;

Defined in: packages/sage/src/internal/c4/market.ts:174

FactionMarketSnapshot.minimumStandingToSell

readonly offers: readonly FactionMarketOfferSnapshot[];

Defined in: packages/sage/src/markets/index.ts:162

FactionMarketView.offers

readonly priceTierBasisPoints: readonly number[];

Defined in: packages/sage/src/internal/c4/market.ts:175

FactionMarketSnapshot.priceTierBasisPoints

readonly restockPeriodSeconds: number;

Defined in: packages/sage/src/internal/c4/market.ts:177

FactionMarketSnapshot.restockPeriodSeconds

readonly standingBasisPoints: number;

Defined in: packages/sage/src/internal/c4/market.ts:180

FactionMarketSnapshot.standingBasisPoints

readonly starbaseSequenceId: bigint;

Defined in: packages/sage/src/internal/c4/market.ts:171

FactionMarketSnapshot.starbaseSequenceId

readonly status: "active" | "draft";

Defined in: packages/sage/src/internal/c4/market.ts:172

FactionMarketSnapshot.status

readonly system: EntityRef<"starSystem">;

Defined in: packages/sage/src/markets/index.ts:161

FactionMarketSnapshot.system

readonly version: number;

Defined in: packages/sage/src/internal/c4/market.ts:166

FactionMarketSnapshot.version

toJSON(): unknown;

Defined in: packages/sage/src/markets/index.ts:163

unknown

FactionMarketSnapshot.toJSON


Defined in: packages/sage/src/index.ts:231

A loaded Fleet cargo inventory exposed by a root Fleet relation.

declare const inventory: FleetCargoInventoryView;
console.log(inventory.cargoHold.items);

readonly address: Address;

Defined in: packages/sage/src/cargo/index.ts:81

Parent Fleet address; CargoPods are nested values and have no own address.

FleetCargoInventorySnapshot.address

readonly ammo: CargoInventoryItem;

Defined in: packages/sage/src/internal/cargo.ts:63

FleetCargoInventorySnapshot.ammo

readonly capacities: {
ammoUnits: CargoCapacity;
cargoStorageUnits: CargoCapacity;
fuelUnits: CargoCapacity;
};

Defined in: packages/sage/src/internal/cargo.ts:64

readonly ammoUnits: CargoCapacity;
readonly cargoStorageUnits: CargoCapacity;
readonly fuelUnits: CargoCapacity;

FleetCargoInventorySnapshot.capacities

readonly cargoHold: CargoPodInventory;

Defined in: packages/sage/src/internal/cargo.ts:59

FleetCargoInventorySnapshot.cargoHold

readonly components: CargoPodInventory;

Defined in: packages/sage/src/internal/cargo.ts:60

FleetCargoInventorySnapshot.components

readonly fleet: EntityRef<"fleet">;

Defined in: packages/sage/src/cargo/index.ts:82

FleetCargoInventorySnapshot.fleet

readonly fuel: CargoInventoryItem;

Defined in: packages/sage/src/internal/cargo.ts:62

FleetCargoInventorySnapshot.fuel

readonly kind: "fleetCargoInventory";

Defined in: packages/sage/src/cargo/index.ts:79

FleetCargoInventorySnapshot.kind

readonly ownerProfile: EntityRef<"profile">;

Defined in: packages/sage/src/cargo/index.ts:83

FleetCargoInventorySnapshot.ownerProfile

readonly respawningCargo: CargoPodInventory;

Defined in: packages/sage/src/internal/cargo.ts:61

FleetCargoInventorySnapshot.respawningCargo

toJSON(): unknown;

Defined in: packages/sage/src/cargo/index.ts:84

unknown

FleetCargoInventorySnapshot.toJSON


Defined in: packages/sage/src/index.ts:256

A loaded Fleet mining state with root-only entity traversal.

declare const mining: FleetMiningView;
const asteroid = await mining.asteroid.get();

readonly asteroid: EntityRef<"celestialBody"> & {
get: Promise<CelestialBodyView>;
};

Defined in: packages/sage/src/index.ts:260

get(options?): Promise<CelestialBodyView>;
ParameterType
options?ReadOptions

Promise<CelestialBodyView>

readonly fleet: EntityRef<"fleet"> & {
get: Promise<FleetView>;
};

Defined in: packages/sage/src/index.ts:263

get(options?): Promise<FleetView>;
ParameterType
options?ReadOptions

Promise<FleetView>

readonly kind: "fleetMining";

Defined in: packages/sage/src/mining/index.ts:119

FleetMiningSnapshot.kind

readonly lastUpdatedAtUnixSeconds: bigint;

Defined in: packages/sage/src/mining/index.ts:123

FleetMiningSnapshot.lastUpdatedAtUnixSeconds

readonly miningRate: {
raw: bigint;
unitsPerSecond: number;
};

Defined in: packages/sage/src/mining/index.ts:125

readonly raw: bigint;
readonly unitsPerSecond: number;

FleetMiningSnapshot.miningRate

readonly outputs: readonly FleetMiningOutput[];

Defined in: packages/sage/src/mining/index.ts:129

FleetMiningSnapshot.outputs

readonly ownerProfile: EntityRef<"profile"> & {
get: Promise<ProfileView>;
};

Defined in: packages/sage/src/index.ts:266

get(options?): Promise<ProfileView>;
ParameterType
options?ReadOptions

Promise<ProfileView>

readonly regionXpModifier: WorldFixedValue;

Defined in: packages/sage/src/mining/index.ts:124

FleetMiningSnapshot.regionXpModifier

toJSON(): unknown;

Defined in: packages/sage/src/mining/index.ts:130

unknown

FleetMiningSnapshot.toJSON


Defined in: packages/sage/src/index.ts:215

A loaded Fleet exposed by the root convenience client.

declare const sage: SageClient;
declare const fleetAddress: Address;
const fleet: FleetView = await sage.fleets.get(fleetAddress);
console.log(fleet.name);

readonly activeStimulants: readonly {
chargesRemaining: number;
deltaBps: number;
stat: number;
}[];

Defined in: packages/sage/src/internal/c4/fleet.ts:357

FleetAccountData.activeStimulants

readonly address: Address;

Defined in: packages/sage/src/fleets/index.ts:92

FleetSnapshot.address

readonly ammo: ResolvedCargoAmount;

Defined in: packages/sage/src/internal/fleet.ts:102

ResolvedFleetAccountData.ammo

readonly ap: number;

Defined in: packages/sage/src/internal/c4/fleet.ts:343

FleetAccountData.ap

readonly apReloadExpiresAt: bigint;

Defined in: packages/sage/src/internal/c4/fleet.ts:348

FleetAccountData.apReloadExpiresAt

readonly bump: number;

Defined in: packages/sage/src/internal/c4/fleet.ts:326

FleetAccountData.bump

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;

FleetSnapshot.capacities

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;
readonly storageCost: bigint;

FleetSnapshot.cargoHold

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;
readonly storageCost: bigint;

FleetSnapshot.components

readonly crewCount: number;

Defined in: packages/sage/src/internal/c4/fleet.ts:340

FleetAccountData.crewCount

readonly faction: "unaligned" | "mud" | "oni" | "ustur";

Defined in: packages/sage/src/internal/c4/fleet.ts:331

FleetAccountData.faction

readonly fuel: ResolvedCargoAmount;

Defined in: packages/sage/src/internal/fleet.ts:101

ResolvedFleetAccountData.fuel

readonly game: Address;

Defined in: packages/sage/src/internal/c4/fleet.ts:327

FleetAccountData.game

readonly hp: number;

Defined in: packages/sage/src/internal/c4/fleet.ts:345

FleetAccountData.hp

readonly inventory: {
get: Promise<FleetCargoInventoryView>;
};

Defined in: packages/sage/src/index.ts:216

get(options?): Promise<FleetCargoInventoryView>;
ParameterType
options?ReadOptions

Promise<FleetCargoInventoryView>

readonly kind: "fleet";

Defined in: packages/sage/src/fleets/index.ts:91

FleetSnapshot.kind

readonly lastCombatUpdate: bigint;

Defined in: packages/sage/src/internal/c4/fleet.ts:350

FleetAccountData.lastCombatUpdate

readonly lastUpdateAt: bigint;

Defined in: packages/sage/src/internal/c4/fleet.ts:352

FleetAccountData.lastUpdateAt

readonly location: WorldCoordinates;

Defined in: packages/sage/src/internal/c4/fleet.ts:351

FleetAccountData.location

readonly mining: {
get: Promise<FleetMiningView | undefined>;
};

Defined in: packages/sage/src/index.ts:219

get(options?): Promise<FleetMiningView | undefined>;
ParameterType
options?ReadOptions

Promise<FleetMiningView | undefined>

readonly name: string;

Defined in: packages/sage/src/internal/c4/fleet.ts:333

FleetAccountData.name

readonly npcFactionId: number;

Defined in: packages/sage/src/internal/c4/fleet.ts:332

FleetAccountData.npcFactionId

readonly ownerProfile: EntityRef<"profile">;

Defined in: packages/sage/src/fleets/index.ts:93

FleetSnapshot.ownerProfile

readonly pendingHp: number;

Defined in: packages/sage/src/internal/c4/fleet.ts:346

FleetAccountData.pendingHp

readonly rentedCrew: number;

Defined in: packages/sage/src/internal/c4/fleet.ts:341

FleetAccountData.rentedCrew

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;
readonly storageCost: bigint;

FleetSnapshot.respawningCargo

readonly scanCooldownExpiresAt: bigint;

Defined in: packages/sage/src/internal/c4/fleet.ts:336

FleetAccountData.scanCooldownExpiresAt

readonly shieldBreakDelayExpiresAt: bigint;

Defined in: packages/sage/src/internal/c4/fleet.ts:349

FleetAccountData.shieldBreakDelayExpiresAt

readonly shipCounts: FleetShipCountsData;

Defined in: packages/sage/src/internal/c4/fleet.ts:334

FleetAccountData.shipCounts

readonly shipDefinitionsSeqId: number;

Defined in: packages/sage/src/internal/c4/fleet.ts:342

FleetAccountData.shipDefinitionsSeqId

readonly ships: readonly ResolvedShipAmount[];

Defined in: packages/sage/src/internal/fleet.ts:100

FleetSnapshot.ships

readonly sp: number;

Defined in: packages/sage/src/internal/c4/fleet.ts:344

FleetAccountData.sp

readonly stance: {
ammoUsage: "none" | "light" | "heavy";
};

Defined in: packages/sage/src/internal/c4/fleet.ts:347

readonly ammoUsage: "none" | "light" | "heavy";

FleetAccountData.stance

readonly state: ResolvedFleetState;

Defined in: packages/sage/src/internal/fleet.ts:123

ResolvedFleetAccountData.state

readonly stats: FleetStatsData;

Defined in: packages/sage/src/internal/c4/fleet.ts:337

FleetAccountData.stats

readonly optional subProfile?: Address;

Defined in: packages/sage/src/internal/fleet.ts:98

FleetSnapshot.subProfile

readonly optional subProfileInvalidator?: Address;

Defined in: packages/sage/src/internal/fleet.ts:99

FleetSnapshot.subProfileInvalidator

readonly version: number;

Defined in: packages/sage/src/internal/c4/fleet.ts:325

FleetAccountData.version

readonly warpCooldownExpiresAt: bigint;

Defined in: packages/sage/src/internal/c4/fleet.ts:335

FleetAccountData.warpCooldownExpiresAt

toJSON(): unknown;

Defined in: packages/sage/src/fleets/index.ts:94

unknown

FleetSnapshot.toJSON


Defined in: packages/sage/src/index.ts:435

A loaded Local Market exposed by the root convenience client.

declare const market: LocalMarketView;
console.log(market.cargo.name);

readonly address: Address;

Defined in: packages/sage/src/markets/index.ts:123

LocalMarketSnapshot.address

readonly asks: LocalMarketOrderBookSnapshot;

Defined in: packages/sage/src/markets/index.ts:128

LocalMarketSnapshot.asks

readonly bids: LocalMarketOrderBookSnapshot;

Defined in: packages/sage/src/markets/index.ts:127

LocalMarketSnapshot.bids

readonly bump: number;

Defined in: packages/sage/src/internal/c4/market.ts:147

LocalMarketSnapshot.bump

readonly cargo: CargoDefinitionSummary & {
amountRaw: bigint;
};

Defined in: packages/sage/src/markets/index.ts:126

readonly amountRaw: bigint;

LocalMarketSnapshot.cargo

readonly initializerProfile: EntityRef<"profile">;

Defined in: packages/sage/src/markets/index.ts:125

LocalMarketSnapshot.initializerProfile

readonly kind: "localMarket";

Defined in: packages/sage/src/markets/index.ts:122

LocalMarketSnapshot.kind

readonly starbaseSequenceId: bigint;

Defined in: packages/sage/src/internal/c4/market.ts:146

LocalMarketSnapshot.starbaseSequenceId

readonly system: EntityRef<"starSystem">;

Defined in: packages/sage/src/markets/index.ts:124

LocalMarketSnapshot.system

readonly vaultAtlas: number;

Defined in: packages/sage/src/internal/c4/market.ts:151

LocalMarketSnapshot.vaultAtlas

readonly vaultRaw: bigint;

Defined in: packages/sage/src/internal/c4/market.ts:150

LocalMarketSnapshot.vaultRaw

readonly version: number;

Defined in: packages/sage/src/internal/c4/market.ts:144

LocalMarketSnapshot.version

toJSON(): unknown;

Defined in: packages/sage/src/markets/index.ts:129

unknown

LocalMarketSnapshot.toJSON


Defined in: packages/sage/src/index.ts:352

A loaded Planet whose stored StarSystem reference resolves through the root client.

declare const planet: PlanetView;
const system = await planet.system.get();

readonly address: Address;

Defined in: packages/sage/src/world/index.ts:100

PlanetSnapshot.address

readonly claimStakes: {
all: Promise<readonly ClaimStakeView[]>;
};

Defined in: packages/sage/src/index.ts:353

all(options?): Promise<readonly ClaimStakeView[]>;
ParameterType
options?ClaimStakeDiscoveryOptions

Promise<readonly ClaimStakeView[]>

readonly details: WorldPlanetData;

Defined in: packages/sage/src/internal/c4/world.ts:429

Omit.details

readonly game: Address;

Defined in: packages/sage/src/internal/c4/world.ts:419

Omit.game

readonly id: number;

Defined in: packages/sage/src/internal/c4/world.ts:417

Omit.id

readonly kind: "planet";

Defined in: packages/sage/src/internal/c4/world.ts:428

Omit.kind

readonly lastSyncAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/world.ts:422

Omit.lastSyncAtUnixSeconds

readonly name: string;

Defined in: packages/sage/src/internal/c4/world.ts:418

Omit.name

readonly system: EntityRef<"starSystem"> & {
get: Promise<StarSystemView>;
};

Defined in: packages/sage/src/index.ts:358

get(options?): Promise<StarSystemView>;
ParameterType
options?ReadOptions

Promise<StarSystemView>

readonly systemSequenceId: bigint;

Defined in: packages/sage/src/internal/c4/world.ts:421

Omit.systemSequenceId

readonly version: number;

Defined in: packages/sage/src/internal/c4/world.ts:416

Omit.version

toJSON(): unknown;

Defined in: packages/sage/src/world/index.ts:102

unknown

PlanetSnapshot.toJSON


Defined in: packages/sage/src/index.ts:125

A loaded Player Profile exposed by the root convenience client.

declare const sage: SageClient;
declare const profileAddress: Address;
const profile: ProfileView = await sage.profiles.get(profileAddress);

readonly address: Address;

Defined in: packages/sage/src/identity/index.ts:103

ProfileSnapshot.address

readonly authKeyCount: number;

Defined in: packages/sage/src/internal/c4/identity.ts:87

ProfileSnapshot.authKeyCount

readonly createdAt: bigint;

Defined in: packages/sage/src/internal/c4/identity.ts:90

ProfileSnapshot.createdAt

readonly keys: readonly ProfileKeyData[];

Defined in: packages/sage/src/internal/c4/identity.ts:91

ProfileSnapshot.keys

readonly keyThreshold: number;

Defined in: packages/sage/src/internal/c4/identity.ts:88

ProfileSnapshot.keyThreshold

readonly kind: "profile";

Defined in: packages/sage/src/identity/index.ts:102

ProfileSnapshot.kind

readonly nextSeqId: bigint;

Defined in: packages/sage/src/internal/c4/identity.ts:89

ProfileSnapshot.nextSeqId

readonly version: number;

Defined in: packages/sage/src/internal/c4/identity.ts:86

ProfileSnapshot.version

toJSON(): unknown;

Defined in: packages/sage/src/identity/index.ts:104

unknown

ProfileSnapshot.toJSON


Defined in: packages/sage/src/internal/read-meta.ts:24

Provenance attached non-enumerably to finder results.

declare const fleets: readonly {readonly address: Address}[];
const meta: ReadMeta | undefined = readMeta(fleets);
if (meta) console.log(meta.strategy, meta.slot);

readonly commitment: Commitment;

Defined in: packages/sage/src/internal/read-meta.ts:28

readonly optional filters?: readonly ReadMetaFilter[];

Defined in: packages/sage/src/internal/read-meta.ts:30

readonly optional indexer?: IndexerValidationMeta;

Defined in: packages/sage/src/internal/read-meta.ts:31

readonly slot: bigint;

Defined in: packages/sage/src/internal/read-meta.ts:27

Earliest source slot across the result, or 0n when it is empty.

readonly source: DataSourceIdentity;

Defined in: packages/sage/src/internal/read-meta.ts:29

readonly strategy: DiscoveryStrategy;

Defined in: packages/sage/src/internal/read-meta.ts:25

readonly optional walletProfiles?: WalletProfileValidationMeta;

Defined in: packages/sage/src/internal/read-meta.ts:32

toJSON(): unknown;

Defined in: packages/sage/src/internal/read-meta.ts:34

Returns a JSON-safe copy with bigints as strings and filter bytes as arrays.

unknown


Defined in: packages/sage/src/internal/read-meta.ts:82

Immutable JSON-safe filter provenance exposed by readMeta.

const filter: ReadMetaFilter = { offset: 0, bytes: [1, 2] };

readonly bytes: readonly number[];

Defined in: packages/sage/src/internal/read-meta.ts:84

readonly offset: number;

Defined in: packages/sage/src/internal/read-meta.ts:83


Defined in: packages/sage/src/index.ts:323

A loaded Recipe exposed by the root convenience client.

declare const sage: SageClient;
const recipe: RecipeView = await sage.recipes.byId(7);

readonly address: Address;

Defined in: packages/sage/src/crafting/index.ts:95

RecipeSnapshot.address

readonly craftingDurationSeconds: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:145

RecipeSnapshot.craftingDurationSeconds

readonly fee: {
amountAtlas: number;
amountRaw: bigint;
recipient: "atlas" | "dao-atlas";
};

Defined in: packages/sage/src/internal/c4/crafting.ts:149

readonly amountAtlas: number;
readonly amountRaw: bigint;
readonly recipient: "atlas" | "dao-atlas";

RecipeSnapshot.fee

readonly game: EntityRef<"game">;

Defined in: packages/sage/src/crafting/index.ts:96

RecipeSnapshot.game

readonly habRequired: boolean;

Defined in: packages/sage/src/internal/c4/crafting.ts:154

RecipeSnapshot.habRequired

readonly id: number;

Defined in: packages/sage/src/crafting/index.ts:97

RecipeSnapshot.id

readonly ingredients: readonly CraftingCargoItem[];

Defined in: packages/sage/src/crafting/index.ts:98

RecipeView.ingredients

readonly kind: "recipe";

Defined in: packages/sage/src/crafting/index.ts:94

RecipeSnapshot.kind

readonly minimumDurationSeconds: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:146

RecipeSnapshot.minimumDurationSeconds

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

RecipeSnapshot.minimumStarbaseLevel

readonly modifierBounds: {
crewCount: CraftingModifierBoundsData;
efficiency: CraftingModifierBoundsData;
fee: CraftingModifierBoundsData;
speed: CraftingModifierBoundsData;
};

Defined in: packages/sage/src/internal/c4/crafting.ts:166

readonly crewCount: CraftingModifierBoundsData;
readonly efficiency: CraftingModifierBoundsData;
readonly fee: CraftingModifierBoundsData;
readonly speed: CraftingModifierBoundsData;

RecipeSnapshot.modifierBounds

readonly name: string;

Defined in: packages/sage/src/internal/c4/crafting.ts:147

RecipeSnapshot.name

readonly outputs: readonly CraftingCargoItem[];

Defined in: packages/sage/src/crafting/index.ts:99

RecipeView.outputs

readonly researchRequirementIds: readonly number[];

Defined in: packages/sage/src/internal/c4/crafting.ts:172

RecipeSnapshot.researchRequirementIds

readonly status: "active" | "deactivated";

Defined in: packages/sage/src/internal/c4/crafting.ts:148

RecipeSnapshot.status

readonly usageCountRaw: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:155

RecipeSnapshot.usageCountRaw

readonly usageLimitRaw: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:156

RecipeSnapshot.usageLimitRaw

readonly version: number;

Defined in: packages/sage/src/internal/c4/crafting.ts:142

RecipeSnapshot.version

readonly xpValueRaw: bigint;

Defined in: packages/sage/src/internal/c4/crafting.ts:157

RecipeSnapshot.xpValueRaw

toJSON(): unknown;

Defined in: packages/sage/src/crafting/index.ts:100

unknown

RecipeSnapshot.toJSON


Defined in: packages/sage/src/registry/index.ts:164

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. Ship schema version 2 persists complete configuration stats as JSON-safe data; cargo schema version 1 remains compatible. Older ship snapshots reload lazily. Claim Stake containers/buildings and Crafting Hab containers/buildings each use a strict section-specific v2 schema with exact decimal bigint strings. Malformed snapshots reload from Game; a throwing store load is a ProviderError. XP and research are not persisted. Restored sequences do not prove freshness and carry no observation slot or commitment. Saves are best effort.

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 });

load(game, section): Promise<
| DefinitionSectionSnapshot
| undefined>;

Defined in: packages/sage/src/registry/index.ts:165

ParameterType
gameAddress
section| "ships" | "cargo" | "buildings" | "claimStakes" | "craftingHabs" | "habBuildings"

Promise< | DefinitionSectionSnapshot | undefined>

save(snapshot): Promise<void>;

Defined in: packages/sage/src/registry/index.ts:169

ParameterType
snapshotDefinitionSectionSnapshot

Promise<void>


Defined in: packages/sage/src/index.ts:240

A loaded Asteroid deposit with root-only StarSystem traversal.

declare const deposit: ResourceDepositView;
const system = await deposit.system.get();

readonly address: Address;

Defined in: packages/sage/src/mining/index.ts:67

ResourceDepositSnapshot.address

readonly bodyId: number;

Defined in: packages/sage/src/mining/index.ts:68

ResourceDepositSnapshot.bodyId

readonly game: Address;

Defined in: packages/sage/src/mining/index.ts:70

ResourceDepositSnapshot.game

readonly kind: "resourceDeposit";

Defined in: packages/sage/src/mining/index.ts:66

ResourceDepositSnapshot.kind

readonly lastSyncedAtUnixSeconds: bigint;

Defined in: packages/sage/src/mining/index.ts:73

ResourceDepositSnapshot.lastSyncedAtUnixSeconds

readonly name: string;

Defined in: packages/sage/src/mining/index.ts:69

ResourceDepositSnapshot.name

readonly resources: readonly ResourceDepositItem[];

Defined in: packages/sage/src/mining/index.ts:74

ResourceDepositSnapshot.resources

readonly system: EntityRef<"starSystem"> & {
get: Promise<StarSystemView>;
};

Defined in: packages/sage/src/index.ts:244

get(options?): Promise<StarSystemView>;
ParameterType
options?ReadOptions

Promise<StarSystemView>

readonly systemSequenceId: bigint;

Defined in: packages/sage/src/mining/index.ts:72

ResourceDepositSnapshot.systemSequenceId

toJSON(): unknown;

Defined in: packages/sage/src/mining/index.ts:75

unknown

ResourceDepositSnapshot.toJSON


Defined in: packages/sage/src/index.ts:454

Batteries-included root client composing the currently implemented domains.

declare const rpc: SageRpc;
const sage: SageClient = createSageClient({ cluster: 'zink-ptr', rpc });

readonly celestialBodies: {
all: Promise<readonly CelestialBodyView[]>;
byId: Promise<CelestialBodyView>;
get: Promise<CelestialBodyView>;
maybe: Promise<CelestialBodyView | undefined>;
};

Defined in: packages/sage/src/index.ts:640

all(options?): Promise<readonly CelestialBodyView[]>;

Discovers loaded body views across the configured Game.

ParameterType
options?CelestialBodyDiscoveryOptions

Promise<readonly CelestialBodyView[]>

declare const sage: SageClient;
const bodies = await sage.celestialBodies.all();
byId(bodyId, options?): Promise<CelestialBodyView>;
ParameterType
bodyIdnumber
options?ReadOptions

Promise<CelestialBodyView>

get(address, options?): Promise<CelestialBodyView>;
ParameterType
addressAddress
options?ReadOptions

Promise<CelestialBodyView>

maybe(address, options?): Promise<CelestialBodyView | undefined>;
ParameterType
addressAddress
options?ReadOptions

Promise<CelestialBodyView | undefined>

readonly characters: {
forProfile: Promise<CharacterView>;
};

Defined in: packages/sage/src/index.ts:466

forProfile(profileAddress, options?): Promise<CharacterView>;
ParameterType
profileAddressAddress
options?ReadOptions

Promise<CharacterView>

readonly claimStakes: {
byBody: Promise<readonly ClaimStakeView[]>;
byCharacter: Promise<readonly ClaimStakeView[]>;
get: Promise<ClaimStakeView>;
maybe: Promise<ClaimStakeView | undefined>;
};

Defined in: packages/sage/src/index.ts:580

byBody(body, options?): Promise<readonly ClaimStakeView[]>;
ParameterType
bodyAddress
options?ClaimStakeDiscoveryOptions

Promise<readonly ClaimStakeView[]>

byCharacter(character, options?): Promise<readonly ClaimStakeView[]>;
ParameterType
characterAddress
options?ClaimStakeDiscoveryOptions

Promise<readonly ClaimStakeView[]>

get(address, options?): Promise<ClaimStakeView>;
ParameterType
addressAddress
options?ReadOptions

Promise<ClaimStakeView>

maybe(address, options?): Promise<ClaimStakeView | undefined>;
ParameterType
addressAddress
options?ReadOptions

Promise<ClaimStakeView | undefined>

readonly context: SageContext;

Defined in: packages/sage/src/index.ts:455

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:491

byCharacter(character, options?): Promise<readonly CraftingHabView[]>;
ParameterType
characterAddress
options?CraftingDiscoveryOptions

Promise<readonly CraftingHabView[]>

byProfile(profile, options?): Promise<readonly CraftingHabView[]>;
ParameterType
profileAddress
options?CraftingDiscoveryOptions

Promise<readonly CraftingHabView[]>

byStarbasePlayer(player, options?): Promise<readonly CraftingHabView[]>;
ParameterType
playerAddress
options?CraftingDiscoveryOptions

Promise<readonly CraftingHabView[]>

get(address, options?): Promise<CraftingHabView>;
ParameterType
addressAddress
options?ReadOptions

Promise<CraftingHabView>

maybe(address, options?): Promise<CraftingHabView | undefined>;
ParameterType
addressAddress
options?ReadOptions

Promise<CraftingHabView | undefined>

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:510

byCharacter(character, options?): Promise<readonly CraftingProcessView[]>;
ParameterType
characterAddress
options?CraftingDiscoveryOptions

Promise<readonly CraftingProcessView[]>

byProfile(profile, options?): Promise<readonly CraftingProcessView[]>;
ParameterType
profileAddress
options?CraftingDiscoveryOptions

Promise<readonly CraftingProcessView[]>

byStarbasePlayer(player, options?): Promise<readonly CraftingProcessView[]>;
ParameterType
playerAddress
options?CraftingDiscoveryOptions

Promise<readonly CraftingProcessView[]>

get(address, options?): Promise<CraftingProcessView>;
ParameterType
addressAddress
options?ReadOptions

Promise<CraftingProcessView>

maybe(address, options?): Promise<CraftingProcessView | undefined>;
ParameterType
addressAddress
options?ReadOptions

Promise<CraftingProcessView | undefined>

readonly factionMarkets: {
forSystem: Promise<FactionMarketView>;
get: Promise<FactionMarketView>;
maybe: Promise<FactionMarketView | undefined>;
};

Defined in: packages/sage/src/index.ts:546

forSystem(
system,
starbaseSequenceId,
options?): Promise<FactionMarketView>;
ParameterType
systemAddress
starbaseSequenceIdbigint
options?ReadOptions

Promise<FactionMarketView>

get(address, options?): Promise<FactionMarketView>;
ParameterType
addressAddress
options?ReadOptions

Promise<FactionMarketView>

maybe(address, options?): Promise<FactionMarketView | undefined>;
ParameterType
addressAddress
options?ReadOptions

Promise<FactionMarketView | undefined>

readonly fleets: {
byOwner: Promise<readonly FleetView[]>;
get: Promise<FleetView>;
maybe: Promise<FleetView | undefined>;
};

Defined in: packages/sage/src/index.ts:472

byOwner(profileAddress, options?): Promise<readonly FleetView[]>;
ParameterType
profileAddressAddress
options?FleetDiscoveryOptions

Promise<readonly FleetView[]>

get(address, options?): Promise<FleetView>;
ParameterType
addressAddress
options?ReadOptions

Promise<FleetView>

maybe(address, options?): Promise<FleetView | undefined>;
ParameterType
addressAddress
options?ReadOptions

Promise<FleetView | undefined>

readonly localMarkets: {
bySystem: Promise<readonly LocalMarketView[]>;
forCargo: Promise<LocalMarketView>;
get: Promise<LocalMarketView>;
maybe: Promise<LocalMarketView | undefined>;
};

Defined in: packages/sage/src/index.ts:529

bySystem(system, options?): Promise<readonly LocalMarketView[]>;
ParameterType
systemAddress
options?MarketDiscoveryOptions

Promise<readonly LocalMarketView[]>

forCargo(
system,
cargoId,
starbaseSequenceId,
options?): Promise<LocalMarketView>;
ParameterType
systemAddress
cargoIdnumber
starbaseSequenceIdbigint
options?ReadOptions

Promise<LocalMarketView>

get(address, options?): Promise<LocalMarketView>;
ParameterType
addressAddress
options?ReadOptions

Promise<LocalMarketView>

maybe(address, options?): Promise<LocalMarketView | undefined>;
ParameterType
addressAddress
options?ReadOptions

Promise<LocalMarketView | undefined>

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:558

readonly deposits: {
get: Promise<ResourceDepositView>;
maybe: Promise<ResourceDepositView | undefined>;
};
get(asteroid, options?): Promise<ResourceDepositView>;
ParameterType
asteroidAddress
options?ReadOptions

Promise<ResourceDepositView>

maybe(asteroid, options?): Promise<ResourceDepositView | undefined>;
ParameterType
asteroidAddress
options?ReadOptions

Promise<ResourceDepositView | undefined>

readonly fleets: {
byOwner: Promise<readonly FleetMiningView[]>;
get: Promise<FleetMiningView | undefined>;
};
byOwner(owner, options?): Promise<readonly FleetMiningView[]>;
ParameterType
ownerAddress
options?MiningDiscoveryOptions

Promise<readonly FleetMiningView[]>

get(fleet, options?): Promise<FleetMiningView | undefined>;
ParameterType
fleetAddress
options?ReadOptions

Promise<FleetMiningView | undefined>

readonly profiles: {
get: Promise<ProfileView>;
maybe: Promise<ProfileView | undefined>;
};

Defined in: packages/sage/src/index.ts:459

get(address, options?): Promise<ProfileView>;
ParameterType
addressAddress
options?ReadOptions

Promise<ProfileView>

maybe(address, options?): Promise<ProfileView | undefined>;
ParameterType
addressAddress
options?ReadOptions

Promise<ProfileView | undefined>

readonly recipes: {
byId: Promise<RecipeView>;
get: Promise<RecipeView>;
maybe: Promise<RecipeView | undefined>;
};

Defined in: packages/sage/src/index.ts:483

byId(recipeId, options?): Promise<RecipeView>;
ParameterType
recipeIdnumber
options?ReadOptions

Promise<RecipeView>

get(address, options?): Promise<RecipeView>;
ParameterType
addressAddress
options?ReadOptions

Promise<RecipeView>

maybe(address, options?): Promise<RecipeView | undefined>;
ParameterType
addressAddress
options?ReadOptions

Promise<RecipeView | undefined>

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:595

byCharacter(character, options?): Promise<readonly StarbasePlayerView[]>;
ParameterType
characterAddress
options?StarbaseDiscoveryOptions

Promise<readonly StarbasePlayerView[]>

bySystem(system, options?): Promise<readonly StarbasePlayerView[]>;
ParameterType
systemAddress
options?StarbaseDiscoveryOptions

Promise<readonly StarbasePlayerView[]>

forCharacterAtSystem(
character,
system,
options?): Promise<StarbasePlayerView>;
ParameterType
characterAddress
systemAddress
options?ReadOptions

Promise<StarbasePlayerView>

get(address, options?): Promise<StarbasePlayerView>;
ParameterType
addressAddress
options?ReadOptions

Promise<StarbasePlayerView>

maybe(address, options?): Promise<StarbasePlayerView | undefined>;
ParameterType
addressAddress
options?ReadOptions

Promise<StarbasePlayerView | undefined>

readonly starbaseUpgrades: {
byPlayer: Promise<readonly StarbaseUpgradeProcessView[]>;
get: Promise<StarbaseUpgradeProcessView>;
maybe: Promise<
| StarbaseUpgradeProcessView
| undefined>;
};

Defined in: packages/sage/src/index.ts:615

byPlayer(player, options?): Promise<readonly StarbaseUpgradeProcessView[]>;
ParameterType
playerAddress
options?StarbaseDiscoveryOptions

Promise<readonly StarbaseUpgradeProcessView[]>

get(address, options?): Promise<StarbaseUpgradeProcessView>;
ParameterType
addressAddress
options?ReadOptions

Promise<StarbaseUpgradeProcessView>

maybe(address, options?): Promise<
| StarbaseUpgradeProcessView
| undefined>;
ParameterType
addressAddress
options?ReadOptions

Promise< | StarbaseUpgradeProcessView | undefined>

readonly systems: {
all: Promise<readonly StarSystemView[]>;
byId: Promise<StarSystemView>;
get: Promise<StarSystemView>;
maybe: Promise<StarSystemView | undefined>;
};

Defined in: packages/sage/src/index.ts:629

all(options?): Promise<readonly StarSystemView[]>;
ParameterType
options?StarSystemDiscoveryOptions

Promise<readonly StarSystemView[]>

byId(systemId, options?): Promise<StarSystemView>;
ParameterType
systemIdnumber
options?ReadOptions

Promise<StarSystemView>

get(address, options?): Promise<StarSystemView>;
ParameterType
addressAddress
options?ReadOptions

Promise<StarSystemView>

maybe(address, options?): Promise<StarSystemView | undefined>;
ParameterType
addressAddress
options?ReadOptions

Promise<StarSystemView | undefined>

readonly wallets: {
get: WalletView;
};

Defined in: packages/sage/src/index.ts:456

get(address): WalletView;
ParameterType
addressAddress

WalletView

dispose(): Promise<void>;

Defined in: packages/sage/src/index.ts:658

Promise<void>


Defined in: packages/sage/src/client/contracts.ts:693

Immutable context passed as the first argument to every domain function.

Disposing the context releases its cache and in-flight read registries.

declare const rpc: SageRpc;
const ctx: SageContext = createSageContext({ cluster: 'zink-ptr', rpc });

readonly cluster: ClusterIdentity;

Defined in: packages/sage/src/client/contracts.ts:694

readonly data: SageDataPort;

Defined in: packages/sage/src/client/contracts.ts:696

readonly optional game?: Address;

Defined in: packages/sage/src/client/contracts.ts:695

readonly optional registrySnapshotStore?: RegistrySnapshotStore;

Defined in: packages/sage/src/client/contracts.ts:697

readonly optional writeRpc?: Rpc<GetBlockHeightApi & GetLatestBlockhashApi & SimulateTransactionApi & SendTransactionApi & GetSignatureStatusesApi>;

Defined in: packages/sage/src/client/contracts.ts:698

dispose(): Promise<void>;

Defined in: packages/sage/src/client/contracts.ts:699

Promise<void>


Defined in: packages/sage/src/client/contracts.ts:606

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.

declare const subscription: SageSubscription;
await subscription.unsubscribe();

unsubscribe(): Promise<void>;

Defined in: packages/sage/src/client/contracts.ts:607

Promise<void>


Defined in: packages/sage/src/registry/index.ts:79

One immutable ship configuration from the loaded Game ships section. Stats describe this configuration, not a Fleet’s effective stats. The sequence labels the resolved section; it does not prove chain freshness.

declare const ctx: SageContext;
const ship: ShipDefinitionSummary = await resolveShip(ctx, 3);
const miningRate = ship.stats.cargo.miningRate;
const cargoCapacity = ship.stats.cargo.cargoCapacity;
const fuelCapacity = ship.stats.cargo.fuelCapacity;

readonly definitionSequenceId: number;

Defined in: packages/sage/src/registry/index.ts:81

readonly id: number;

Defined in: packages/sage/src/registry/index.ts:82

readonly mint: Address;

Defined in: packages/sage/src/registry/index.ts:83

readonly name: string;

Defined in: packages/sage/src/registry/index.ts:84

readonly sizeClass:
| "xx-small"
| "x-small"
| "small"
| "medium"
| "large"
| "capital"
| "commander"
| "titan";

Defined in: packages/sage/src/registry/index.ts:85

readonly stats: FleetStatsData;

Defined in: packages/sage/src/registry/index.ts:80


Defined in: packages/sage/src/index.ts:289

A loaded player-local Starbase with root-only upgrade traversal.

declare const starbase: StarbasePlayerView;
const upgrades = await starbase.upgrades.all();
const craftingHabs = await starbase.craftingHabs.all();
const craftingProcesses = await starbase.craftingProcesses.all();

readonly address: Address;

Defined in: packages/sage/src/starbases/index.ts:120

StarbasePlayerSnapshot.address

readonly availableCrew: number;

Defined in: packages/sage/src/starbases/index.ts:124

StarbasePlayerSnapshot.availableCrew

readonly bump: number;

Defined in: packages/sage/src/internal/c4/starbase.ts:202

StarbasePlayerAccountData.bump

readonly busyCrew: number;

Defined in: packages/sage/src/internal/c4/starbase.ts:192

StarbasePlayerAccountData.busyCrew

readonly cargo: StarbaseCargoInventory;

Defined in: packages/sage/src/starbases/index.ts:125

StarbasePlayerSnapshot.cargo

readonly cargoRespawnEndsAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/starbase.ts:201

StarbasePlayerAccountData.cargoRespawnEndsAtUnixSeconds

readonly character: EntityRef<"character">;

Defined in: packages/sage/src/starbases/index.ts:123

StarbasePlayerSnapshot.character

readonly craftingHabs: {
all: Promise<readonly CraftingHabView[]>;
};

Defined in: packages/sage/src/index.ts:290

all(options?): Promise<readonly CraftingHabView[]>;
ParameterType
options?CraftingDiscoveryOptions

Promise<readonly CraftingHabView[]>

readonly craftingProcesses: {
all: Promise<readonly CraftingProcessView[]>;
};

Defined in: packages/sage/src/index.ts:295

all(options?): Promise<readonly CraftingProcessView[]>;
ParameterType
options?CraftingDiscoveryOptions

Promise<readonly CraftingProcessView[]>

readonly faction: StarbasePlayerFaction;

Defined in: packages/sage/src/internal/c4/starbase.ts:188

StarbasePlayerAccountData.faction

readonly kind: "starbasePlayer";

Defined in: packages/sage/src/starbases/index.ts:119

StarbasePlayerSnapshot.kind

readonly playerProfile: EntityRef<"profile">;

Defined in: packages/sage/src/starbases/index.ts:121

StarbasePlayerSnapshot.playerProfile

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

readonly cargo: StarbaseCargoInventory;
readonly ships: readonly StarbaseShipRespawn[];

StarbasePlayerSnapshot.respawning

readonly sequenceId: bigint;

Defined in: packages/sage/src/internal/c4/starbase.ts:200

StarbasePlayerAccountData.sequenceId

readonly shipsInEscrow: readonly StarbaseEscrowedShip[];

Defined in: packages/sage/src/starbases/index.ts:133

StarbasePlayerView.shipsInEscrow

readonly system: EntityRef<"starSystem">;

Defined in: packages/sage/src/starbases/index.ts:122

StarbasePlayerSnapshot.system

readonly totalCrew: number;

Defined in: packages/sage/src/internal/c4/starbase.ts:191

StarbasePlayerAccountData.totalCrew

readonly upgrades: {
all: Promise<readonly StarbaseUpgradeProcessView[]>;
};

Defined in: packages/sage/src/index.ts:300

all(options?): Promise<readonly StarbaseUpgradeProcessView[]>;
ParameterType
options?StarbaseDiscoveryOptions

Promise<readonly StarbaseUpgradeProcessView[]>

readonly version: number;

Defined in: packages/sage/src/internal/c4/starbase.ts:186

StarbasePlayerAccountData.version

toJSON(): unknown;

Defined in: packages/sage/src/starbases/index.ts:134

unknown

StarbasePlayerSnapshot.toJSON


Defined in: packages/sage/src/index.ts:314

A loaded Starbase upgrade process exposed by the root client.

declare const upgrade: StarbaseUpgradeProcessView;
console.log(upgrade.resource.name);

readonly address: Address;

Defined in: packages/sage/src/starbases/index.ts:149

StarbaseUpgradeProcessSnapshot.address

readonly endsAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/starbase.ts:224

StarbaseUpgradeProcessAccountData.endsAtUnixSeconds

readonly kind: "starbaseUpgradeProcess";

Defined in: packages/sage/src/starbases/index.ts:148

StarbaseUpgradeProcessSnapshot.kind

readonly numCrew: number;

Defined in: packages/sage/src/internal/c4/starbase.ts:222

StarbaseUpgradeProcessAccountData.numCrew

readonly playerProfile: EntityRef<"profile">;

Defined in: packages/sage/src/starbases/index.ts:150

StarbaseUpgradeProcessSnapshot.playerProfile

readonly resource: CargoDefinitionSummary & {
quantityRaw: bigint;
};

Defined in: packages/sage/src/starbases/index.ts:153

readonly quantityRaw: bigint;

StarbaseUpgradeProcessSnapshot.resource

readonly starbasePlayer: EntityRef<"starbasePlayer">;

Defined in: packages/sage/src/starbases/index.ts:151

StarbaseUpgradeProcessSnapshot.starbasePlayer

readonly starbaseSequenceId: bigint;

Defined in: packages/sage/src/internal/c4/starbase.ts:219

StarbaseUpgradeProcessAccountData.starbaseSequenceId

readonly startsAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/starbase.ts:223

StarbaseUpgradeProcessAccountData.startsAtUnixSeconds

readonly system: EntityRef<"starSystem">;

Defined in: packages/sage/src/starbases/index.ts:152

StarbaseUpgradeProcessSnapshot.system

readonly version: number;

Defined in: packages/sage/src/internal/c4/starbase.ts:215

StarbaseUpgradeProcessAccountData.version

toJSON(): unknown;

Defined in: packages/sage/src/starbases/index.ts:154

unknown

StarbaseUpgradeProcessSnapshot.toJSON


Defined in: packages/sage/src/index.ts:400

A loaded StarSystem with explicit body projection relation accessors.

declare const system: StarSystemView;
const planets = await system.planets.all();

readonly address: Address;

Defined in: packages/sage/src/world/index.ts:82

StarSystemSnapshot.address

readonly asteroids: {
all: Promise<readonly AsteroidView[]>;
};

Defined in: packages/sage/src/index.ts:414

all(options?): Promise<readonly AsteroidView[]>;
ParameterType
options?ReadOptions

Promise<readonly AsteroidView[]>

readonly celestialBodies: {
all: Promise<readonly CelestialBodyView[]>;
};

Defined in: packages/sage/src/index.ts:408

all(options?): Promise<readonly CelestialBodyView[]>;
ParameterType
options?ReadOptions

Promise<readonly CelestialBodyView[]>

readonly celestialBodyAddresses: readonly Address[];

Defined in: packages/sage/src/internal/c4/world.ts:317

StarSystemSnapshot.celestialBodyAddresses

readonly connections: readonly WorldConnectionData[];

Defined in: packages/sage/src/internal/c4/world.ts:316

StarSystemSnapshot.connections

readonly coordinates: WorldCoordinates;

Defined in: packages/sage/src/internal/c4/world.ts:314

StarSystemSnapshot.coordinates

readonly factionMarket: {
get: Promise<FactionMarketView>;
};

Defined in: packages/sage/src/index.ts:405

get(options?): Promise<FactionMarketView>;
ParameterType
options?ReadOptions

Promise<FactionMarketView>

readonly game: Address;

Defined in: packages/sage/src/internal/c4/world.ts:310

StarSystemSnapshot.game

readonly kind: "starSystem";

Defined in: packages/sage/src/world/index.ts:81

StarSystemSnapshot.kind

readonly localMarkets: {
all: Promise<readonly LocalMarketView[]>;
forCargo: Promise<LocalMarketView>;
};

Defined in: packages/sage/src/index.ts:401

all(options?): Promise<readonly LocalMarketView[]>;
ParameterType
options?MarketDiscoveryOptions

Promise<readonly LocalMarketView[]>

forCargo(cargoId, options?): Promise<LocalMarketView>;
ParameterType
cargoIdnumber
options?ReadOptions

Promise<LocalMarketView>

readonly name: string;

Defined in: packages/sage/src/internal/c4/world.ts:312

StarSystemSnapshot.name

readonly planets: {
all: Promise<readonly PlanetView[]>;
};

Defined in: packages/sage/src/index.ts:411

all(options?): Promise<readonly PlanetView[]>;
ParameterType
options?ReadOptions

Promise<readonly PlanetView[]>

readonly playerStarbases: {
all: Promise<readonly StarbasePlayerView[]>;
forCharacter: Promise<StarbasePlayerView>;
};

Defined in: packages/sage/src/index.ts:417

all(options?): Promise<readonly StarbasePlayerView[]>;
ParameterType
options?StarbaseDiscoveryOptions

Promise<readonly StarbasePlayerView[]>

forCharacter(character, options?): Promise<StarbasePlayerView>;
ParameterType
characterAddress
options?ReadOptions

Promise<StarbasePlayerView>

readonly optional regionId?: number;

Defined in: packages/sage/src/internal/c4/world.ts:313

StarSystemSnapshot.regionId

readonly sequenceId: bigint;

Defined in: packages/sage/src/internal/c4/world.ts:315

StarSystemSnapshot.sequenceId

readonly optional starbase?: WorldStarbaseData;

Defined in: packages/sage/src/internal/c4/world.ts:318

StarSystemSnapshot.starbase

readonly systemId: number;

Defined in: packages/sage/src/internal/c4/world.ts:311

StarSystemSnapshot.systemId

readonly version: number;

Defined in: packages/sage/src/internal/c4/world.ts:309

StarSystemSnapshot.version

toJSON(): unknown;

Defined in: packages/sage/src/world/index.ts:83

unknown

StarSystemSnapshot.toJSON


Defined in: packages/sage/src/client/contracts.ts:544

Observer for validated snapshots and recoverable subscription errors.

Malformed account events call onError without replacing the last valid cache entry or ending the subscription.

const observer: SubscriptionObserver<{ name: string }> = {
onSnapshot: snapshot => console.log(snapshot.data.name),
onError: error => console.error(error),
};
Type Parameter
TSnapshot

readonly optional onDiagnostic?: (event) => void;

Defined in: packages/sage/src/client/contracts.ts:550

Observes bounded-delivery coalescing without treating it as an error.

ParameterType
eventSubscriptionDiagnosticEvent

void

readonly onError: (error) => void | Promise<void>;

Defined in: packages/sage/src/client/contracts.ts:548

ParameterType
errorSageSdkError

void | Promise<void>

readonly onSnapshot: (snapshot) => void | Promise<void>;

Defined in: packages/sage/src/client/contracts.ts:545

ParameterType
snapshotSnapshotEnvelope<TSnapshot>

void | Promise<void>


Defined in: packages/sage/src/index.ts:140

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.

declare const sage: SageClient;
declare const walletAddress: Address;
const wallet: WalletView = sage.wallets.get(walletAddress);
const profiles = await wallet.profiles.all({ strategy: 'provider' });

readonly address: Address;

Defined in: packages/sage/src/index.ts:142

readonly characters: {
all: Promise<readonly CharacterView[]>;
};

Defined in: packages/sage/src/index.ts:148

all(options): Promise<readonly CharacterView[]>;
ParameterType
optionsWalletProfileDiscoveryOptions

Promise<readonly CharacterView[]>

readonly kind: "wallet";

Defined in: packages/sage/src/index.ts:141

readonly profiles: {
all: Promise<readonly ProfileView[]>;
};

Defined in: packages/sage/src/index.ts:143

all(options): Promise<readonly ProfileView[]>;
ParameterType
optionsWalletProfileDiscoveryOptions

Promise<readonly ProfileView[]>

toJSON(): unknown;

Defined in: packages/sage/src/index.ts:153

unknown

type AccountSubscriptionEvent =
| {
account: RawAccount;
kind: "account";
}
| {
kind: "reconnected";
};

Defined in: packages/sage/src/client/contracts.ts:360

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.

declare const account: RawAccount;
const event: AccountSubscriptionEvent = { kind: 'account', account };

type Address = KitAddress;

Defined in: packages/sage/src/client/contracts.ts:24

A z.ink/Solana account address represented by @solana/kit.

declare const profileAddress: Address;

type CelestialBodyView =
| PlanetView
| AsteroidView;

Defined in: packages/sage/src/index.ts:391

A loaded CelestialBody root view projected as a Planet or Asteroid.

declare const body: CelestialBodyView;
console.log(body.kind);

type DefinitionSection =
| "ships"
| "cargo"
| "buildings"
| "claimStakes"
| "craftingHabs"
| "habBuildings"
| "xp"
| "research";

Defined in: packages/sage/src/registry/index.ts:56

Definition sections implemented by the first registry slice.

const section: DefinitionSection = 'ships';

type DefinitionSectionSnapshot =
| { [S in PersistedDefinitionSection]: DefinitionSectionWire<S> }[PersistedDefinitionSection]
| {
definitions: readonly Omit<ShipDefinitionSummary, "definitionSequenceId" | "stats"> & {
stats: ShipStatsJson;
}[];
game: Address;
schemaVersion: 2;
section: "ships";
sequenceId: number;
}
| {
definitions: readonly CargoDefinitionSummary[];
game: Address;
schemaVersion: 1;
section: "cargo";
sequenceId: number;
};

Defined in: packages/sage/src/registry/index.ts:121

Serializable cold-start snapshot for one Game definitions section.

declare const store: RegistrySnapshotStore;
declare const snapshot: DefinitionSectionSnapshot;
await store.save(snapshot);

type PreloadedDefinitions = readonly DefinitionSection[] & {
[PRELOADED_DEFINITIONS]: true;
};

Defined in: packages/sage/src/internal/read-meta.ts:147

The immutable section names satisfied by one preload call.

readonly [PRELOADED_DEFINITIONS]: true;
import { preloadDefinitions } from '@aephia/atlas-kit';
declare const ctx: SageContext;
const sections: PreloadedDefinitions = await preloadDefinitions(ctx, ['cargo']);

type SageContextOptions =
| SharedContextOptions & ContextTransport & {
cluster: KnownCluster;
}
| SharedContextOptions & ContextTransport & {
cluster: CustomClusterIdentity;
game: Address;
};

Defined in: packages/sage/src/client/contracts.ts:743

Configuration accepted by the synchronous context and client factories.

Custom clusters require an explicit canonical Game address.

declare const rpc: SageRpc;
const options: SageContextOptions = { cluster: 'zink-ptr', rpc };

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:570

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.

declare const address: Address;
const event: SubscriptionDiagnosticEvent = {
kind: 'subscription-snapshot-coalesced',
accountType: 'fleet',
address,
coalescedCount: 2,
};

type SubscriptionOptions = ReadAccountOptions;

Defined in: packages/sage/src/client/contracts.ts:592

Options for one context-owned subscription.

const options: SubscriptionOptions = { commitment: 'confirmed' };

function createSageClient(options): SageClient;

Defined in: packages/sage/src/index.ts:1113

Creates the root client synchronously without performing network I/O.

ParameterType
optionsSageContextOptions

SageClient

declare const rpc: SageRpc;
const sage = createSageClient({ cluster: 'zink-ptr', rpc });

function listCargoDefinitions(context): Promise<readonly CargoDefinitionSummary[]>;

Defined in: packages/sage/src/registry/index.ts:1253

Lists all cargo definitions from the context’s retained Game section.

The readonly array and its definitions are shared with by-id lookups for one section generation. A refresh replaces the array and id map together; old arrays remain immutable snapshots. Results have no guaranteed sorting order. Loading is lazy and may use a compatible cargo schema-v1 stored snapshot. The retained generation does not prove latest-chain freshness.

ParameterType
contextSageContext

Promise<readonly CargoDefinitionSummary[]>

declare const ctx: SageContext;
const definitions = await listCargoDefinitions(ctx);
for (const cargo of definitions) console.log(cargo.id, cargo.name);

function listShipConfigurations(context): Promise<readonly ShipDefinitionSummary[]>;

Defined in: packages/sage/src/registry/index.ts:1068

Lists every ship configuration in the context’s loaded Game definitions section.

Entries and the readonly array are retained for the section generation. Each entry is the same immutable object returned by resolveShip; loading either route serves the other without another Game read. A section refresh replaces the array and its entries together. Existing returned arrays remain immutable snapshots of their prior generation.

definitionSequenceId identifies the loaded section, not proven-current chain state. This enumerates existing configurations without grouping by model or filling unallocated ids. The result has no guaranteed sorting order.

ParameterType
contextSageContext

Promise<readonly ShipDefinitionSummary[]>

declare const ctx: SageContext;
const configurations = await listShipConfigurations(ctx);
for (const ship of configurations) {
console.log(ship.id, ship.name, ship.stats.cargo.cargoCapacity);
}

function listShipConfigurationsByMint(context, mint): Promise<readonly ShipDefinitionSummary[]>;

Defined in: packages/sage/src/registry/index.ts:1098

Lists current ship configurations associated with a mint in this context’s Game.

Groups by each configuration’s on-chain mint, never display names, id ranges, or historical mintToId entries. Use a mint from the selected deployment; this does not map production mints to PTR or provide make/model labels or a default configuration. See docs/research/ship-model-identity.md (#395/#397).

The frozen result shares objects with resolveShip and listShipConfigurations. A lazy index is retained with the ships section and replaced on section refresh; building it adds no RPC calls or metadata fetches. Unknown mints return a retained frozen empty array. Results have no guaranteed order or configuration count. definitionSequenceId denotes the loaded generation, not proven-current state.

ParameterType
contextSageContext
mintAddress

Promise<readonly ShipDefinitionSummary[]>

declare const ctx: SageContext;
declare const shipMint: Address;
const configurations = await listShipConfigurationsByMint(ctx, shipMint);
for (const ship of configurations) {
console.log(ship.id, ship.stats.cargo.cargoCapacity);
}

function preloadDefinitions(
context,
sections,
options?): Promise<PreloadedDefinitions>;

Defined in: packages/sage/src/registry/index.ts:922

Warm selected definition catalogs, retaining each section’s own observation. Already usable sections are reused; this is not a freshness refresh.

ParameterType
contextSageContext
sectionsreadonly DefinitionSection[]
options{ signal?: AbortSignal; }
options.signal?AbortSignal

Promise<PreloadedDefinitions>

declare const ctx: SageContext;
const loaded = await preloadDefinitions(ctx, ['ships', 'claimStakes']);
const provenance = readMeta(loaded);

function readMeta<T>(result):
| unknown extends T ?
| ReadMeta
| DefinitionPreloadMeta : T extends PreloadedDefinitions ? DefinitionPreloadMeta : PreloadedDefinitions extends T ?
| ReadMeta
| DefinitionPreloadMeta : ReadMeta
| undefined;

Defined in: packages/sage/src/internal/read-meta.ts:99

Returns finder provenance without wrapping the finder result.

Type Parameter
T extends object
ParameterType
resultT

| unknown extends T ? | ReadMeta | DefinitionPreloadMeta : T extends PreloadedDefinitions ? DefinitionPreloadMeta : PreloadedDefinitions extends T ? | ReadMeta | DefinitionPreloadMeta : ReadMeta | undefined

declare const ctx: SageContext;
declare const profileAddress: Address;
const fleets = await getFleetsByOwner(ctx, profileAddress);
const meta = readMeta(fleets);

function resolveCargo(
context,
cargoId,
options?): Promise<CargoDefinitionSummary>;

Defined in: packages/sage/src/registry/index.ts:1126

Resolves one cargo id to an immutable SDK-owned definition summary.

ParameterType
contextSageContext
cargoIdnumber
optionsDefinitionLookupOptions

Promise<CargoDefinitionSummary>

declare const ctx: SageContext;
declare const cargoId: number;
declare const expectedSequenceId: number;
const cargo = await resolveCargo(ctx, cargoId, { expectedSequenceId });

function resolveShip(
context,
shipId,
options?): Promise<ShipDefinitionSummary>;

Defined in: packages/sage/src/registry/index.ts:1039

Resolves one ship id to an immutable SDK-owned definition summary.

ParameterType
contextSageContext
shipIdnumber
optionsDefinitionLookupOptions

Promise<ShipDefinitionSummary>

declare const ctx: SageContext;
declare const fleet: { readonly shipId: number; readonly shipDefinitionsSeqId: number };
const ship = await resolveShip(ctx, fleet.shipId, { expectedSequenceId: fleet.shipDefinitionsSeqId });