Skip to content
Next — unreleased

Defined in: packages/sage/src/factions/index.ts:116

Immutable optional standing and territory-yield configuration.

declare const config: FactionConfigSnapshot;
console.log(config.standingBps);
  • FactionConfigAccountData

readonly address: Address;

Defined in: packages/sage/src/factions/index.ts:118

readonly bump: number;

Defined in: packages/sage/src/internal/c4/factions.ts:112

FactionConfigAccountData.bump

readonly dailyCap: number;

Defined in: packages/sage/src/internal/c4/factions.ts:114

FactionConfigAccountData.dailyCap

readonly decayPerDay: number;

Defined in: packages/sage/src/internal/c4/factions.ts:113

FactionConfigAccountData.decayPerDay

readonly diminishingReturnsHalfLifeRaw: bigint;

Defined in: packages/sage/src/internal/c4/factions.ts:116

FactionConfigAccountData.diminishingReturnsHalfLifeRaw

readonly diminishingReturnsScaleRaw: bigint;

Defined in: packages/sage/src/internal/c4/factions.ts:117

FactionConfigAccountData.diminishingReturnsScaleRaw

readonly dockMinimumBand: number;

Defined in: packages/sage/src/internal/c4/factions.ts:120

FactionConfigAccountData.dockMinimumBand

readonly game: EntityRef<"game">;

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

readonly kind: "factionConfig";

Defined in: packages/sage/src/factions/index.ts:117

readonly standingBps: number;

Defined in: packages/sage/src/internal/c4/factions.ts:115

FactionConfigAccountData.standingBps

readonly standingEpochCap: number;

Defined in: packages/sage/src/internal/c4/factions.ts:118

FactionConfigAccountData.standingEpochCap

readonly standingEpochLengthSeconds: bigint;

Defined in: packages/sage/src/internal/c4/factions.ts:119

FactionConfigAccountData.standingEpochLengthSeconds

readonly territoryYieldPerTick: number;

Defined in: packages/sage/src/internal/c4/factions.ts:121

FactionConfigAccountData.territoryYieldPerTick

readonly territoryYieldTickSeconds: number;

Defined in: packages/sage/src/internal/c4/factions.ts:122

FactionConfigAccountData.territoryYieldTickSeconds

readonly version: number;

Defined in: packages/sage/src/internal/c4/factions.ts:111

FactionConfigAccountData.version

toJSON(): unknown;

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

unknown


Defined in: packages/sage/src/factions/index.ts:131

Immutable per-Game NPC and capture economics.

declare const economics: FactionEconomicsSnapshot;
console.log(economics.captureCostAtlas); // ATLAS for display
console.log(economics.captureCostAtlasRaw); // exact Floyds for arithmetic
  • Omit<FactionEconomicsConfigAccountData, "game">

readonly address: Address;

Defined in: packages/sage/src/factions/index.ts:136

readonly bump: number;

Defined in: packages/sage/src/internal/c4/factions.ts:127

Omit.bump

readonly captureCostAtlas: number;

Defined in: packages/sage/src/internal/c4/factions.ts:136

Dynamic-capture cost in ATLAS.

Omit.captureCostAtlas

readonly captureCostAtlasRaw: bigint;

Defined in: packages/sage/src/internal/c4/factions.ts:134

Exact dynamic-capture cost in ATLAS Floyds.

Omit.captureCostAtlasRaw

readonly factionCaptureCooldownSeconds: bigint;

Defined in: packages/sage/src/internal/c4/factions.ts:137

Omit.factionCaptureCooldownSeconds

readonly game: EntityRef<"game">;

Defined in: packages/sage/src/factions/index.ts:137

readonly kind: "factionEconomicsConfig";

Defined in: packages/sage/src/factions/index.ts:135

readonly npcMintCostAtlas: number;

Defined in: packages/sage/src/internal/c4/factions.ts:130

Omit.npcMintCostAtlas

readonly npcMintCostAtlasRaw: bigint;

Defined in: packages/sage/src/internal/c4/factions.ts:129

Omit.npcMintCostAtlasRaw

readonly npcRespawnCostAtlas: number;

Defined in: packages/sage/src/internal/c4/factions.ts:132

Omit.npcRespawnCostAtlas

readonly npcRespawnCostAtlasRaw: bigint;

Defined in: packages/sage/src/internal/c4/factions.ts:131

Omit.npcRespawnCostAtlasRaw

readonly version: number;

Defined in: packages/sage/src/internal/c4/factions.ts:126

Omit.version

toJSON(): unknown;

Defined in: packages/sage/src/factions/index.ts:138

unknown


Defined in: packages/sage/src/factions/index.ts:218

Immutable dynamic ownership sidecar for one territory asset. A Starbase sidecar always carries capturedSystemSequenceId, the Star System generation at capture; generation 0 is valid. A sidecar is current only while that equals the System’s sequenceId. Fleet and Region sidecars omit it. An absent controllingFactionId means the legacy Starbase owner controls.

declare const ownership: FactionOwnershipSnapshot;
console.log(ownership.asset.kind, ownership.controllingFactionId);
  • Omit<FactionOwnershipAccountData, | "game" | "asset" | "controllingFactionId" | "previousControllerFactionId" | "contestedUntilUnixSeconds" | "capturedSystemSequenceId" | "lastYieldTickUnixSeconds">

readonly address: Address;

Defined in: packages/sage/src/factions/index.ts:229

readonly asset: FactionOwnershipTarget;

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

readonly bump: number;

Defined in: packages/sage/src/internal/c4/factions.ts:189

Omit.bump

readonly capturedAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/factions.ts:194

Omit.capturedAtUnixSeconds

readonly optional capturedSystemSequenceId?: bigint;

Defined in: packages/sage/src/factions/index.ts:235

readonly optional contestedUntilUnixSeconds?: bigint;

Defined in: packages/sage/src/factions/index.ts:234

readonly optional controllingFactionId?: number;

Defined in: packages/sage/src/factions/index.ts:232

readonly game: EntityRef<"game">;

Defined in: packages/sage/src/factions/index.ts:230

readonly kind: "factionOwnership";

Defined in: packages/sage/src/factions/index.ts:228

readonly optional lastYieldTickUnixSeconds?: bigint;

Defined in: packages/sage/src/factions/index.ts:236

readonly optional previousControllerFactionId?: number;

Defined in: packages/sage/src/factions/index.ts:233

readonly version: number;

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

Omit.version

toJSON(): unknown;

Defined in: packages/sage/src/factions/index.ts:237

unknown


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

Immutable diplomacy and territory-gating configuration.

declare const relations: FactionRelationsSnapshot;
console.log(relations.dynamicCaptureEnabled);
  • Omit<FactionRelationTrackerAccountData, "game">

readonly address: Address;

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

readonly alliedTollBps: number;

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

Omit.alliedTollBps

readonly bump: number;

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

Omit.bump

readonly ceasefireMinimumDurationSeconds: bigint;

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

Omit.ceasefireMinimumDurationSeconds

readonly combatGatingEnabled: boolean;

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

Omit.combatGatingEnabled

readonly contestedWindowSeconds: number;

Defined in: packages/sage/src/internal/c4/factions.ts:152

Omit.contestedWindowSeconds

readonly crossFactionEconomicsEnabled: boolean;

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

Omit.crossFactionEconomicsEnabled

readonly dynamicCaptureEnabled: boolean;

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

Omit.dynamicCaptureEnabled

readonly game: EntityRef<"game">;

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

readonly kind: "factionRelationTracker";

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

readonly nemesisActive: boolean;

Defined in: packages/sage/src/internal/c4/factions.ts:153

Omit.nemesisActive

readonly neutralTollBps: number;

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

Omit.neutralTollBps

readonly reCeasefireCooldownSeconds: bigint;

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

Omit.reCeasefireCooldownSeconds

readonly relations: readonly {
ceasefireUntilUnixSeconds: bigint | null;
factions: readonly [number, number];
relationship: FactionRelationship;
}[];

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

Omit.relations

readonly territoryAccessEnabled: boolean;

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

Omit.territoryAccessEnabled

readonly version: number;

Defined in: packages/sage/src/internal/c4/factions.ts:141

Omit.version

toJSON(): unknown;

Defined in: packages/sage/src/factions/index.ts:155

unknown


Defined in: packages/sage/src/factions/index.ts:87

Immutable faction identity, lifecycle, and NPC capacity state.

declare const faction: FactionSnapshot;
console.log(faction.factionId, faction.status);
  • Omit<FactionAccountData, | "game" | "operatorProfile" | "controller" | "homeRegionId" | "nameHash" | "contentUriHash" | "lastCaptureAtUnixSeconds">

readonly address: Address;

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

readonly alignment: FactionAlignment;

Defined in: packages/sage/src/internal/c4/factions.ts:93

Omit.alignment

readonly authorityBump: number;

Defined in: packages/sage/src/internal/c4/factions.ts:96

Omit.authorityBump

readonly bump: number;

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

Omit.bump

readonly capabilityFlags: number;

Defined in: packages/sage/src/internal/c4/factions.ts:94

Omit.capabilityFlags

readonly optional contentUriHash?: readonly number[];

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

readonly optional controller?: Address;

Defined in: packages/sage/src/factions/index.ts:101

readonly createdAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/factions.ts:103

Omit.createdAtUnixSeconds

readonly factionId: number;

Defined in: packages/sage/src/internal/c4/factions.ts:92

Omit.factionId

readonly game: EntityRef<"game">;

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

readonly optional homeRegionId?: number;

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

readonly kind: "faction";

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

readonly optional lastCaptureAtUnixSeconds?: bigint;

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

readonly maxAllies: number;

Defined in: packages/sage/src/internal/c4/factions.ts:98

Omit.maxAllies

readonly maxNpcFleets: number;

Defined in: packages/sage/src/internal/c4/factions.ts:107

Omit.maxNpcFleets

readonly optional nameHash?: readonly number[];

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

readonly npcFleetCount: number;

Defined in: packages/sage/src/internal/c4/factions.ts:106

Omit.npcFleetCount

readonly optional operatorProfile?: EntityRef<"profile">;

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

readonly status: FactionLifecycleStatus;

Defined in: packages/sage/src/internal/c4/factions.ts:95

Omit.status

readonly treasuryCount: number;

Defined in: packages/sage/src/internal/c4/factions.ts:99

Omit.treasuryCount

readonly version: number;

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

Omit.version

toJSON(): unknown;

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

unknown


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

Immutable optional Profile standing with one faction.

declare const standing: FactionStandingSnapshot;
console.log(standing.profile.address, standing.standing);
  • Omit<FactionStandingAccountData, "game" | "profile" | "storylineExpiresAtUnixSeconds">

readonly accrualToday: number;

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

Omit.accrualToday

readonly address: Address;

Defined in: packages/sage/src/factions/index.ts:170

readonly bandFloor: number;

Defined in: packages/sage/src/internal/c4/factions.ts:168

Omit.bandFloor

readonly bandFloorReachedAtUnixSeconds: bigint;

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

Omit.bandFloorReachedAtUnixSeconds

readonly bump: number;

Defined in: packages/sage/src/internal/c4/factions.ts:163

Omit.bump

readonly dayAnchorUnixSeconds: bigint;

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

Omit.dayAnchorUnixSeconds

readonly factionId: number;

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

Omit.factionId

readonly game: EntityRef<"game">;

Defined in: packages/sage/src/factions/index.ts:171

readonly kind: "factionStanding";

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

readonly lastUpdateUnixSeconds: bigint;

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

Omit.lastUpdateUnixSeconds

readonly lifetimeEarnedRaw: bigint;

Defined in: packages/sage/src/internal/c4/factions.ts:170

Omit.lifetimeEarnedRaw

readonly profile: EntityRef<"profile">;

Defined in: packages/sage/src/factions/index.ts:172

readonly standing: number;

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

Omit.standing

readonly storylineActive: boolean;

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

Omit.storylineActive

readonly optional storylineExpiresAtUnixSeconds?: bigint;

Defined in: packages/sage/src/factions/index.ts:173

readonly version: number;

Defined in: packages/sage/src/internal/c4/factions.ts:162

Omit.version

toJSON(): unknown;

Defined in: packages/sage/src/factions/index.ts:174

unknown


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

Immutable faction ATLAS and cargo reserve state.

declare const treasury: FactionTreasurySnapshot;
console.log(treasury.atlasBalance, treasury.reserves.length);
  • Omit<FactionTreasuryAccountData, "game">

readonly address: Address;

Defined in: packages/sage/src/factions/index.ts:189

readonly atlasBalance: number;

Defined in: packages/sage/src/internal/c4/faction-treasury.ts:23

Omit.atlasBalance

readonly atlasBalanceRaw: bigint;

Defined in: packages/sage/src/internal/c4/faction-treasury.ts:22

Omit.atlasBalanceRaw

readonly atlasOutCapPerEpoch: number;

Defined in: packages/sage/src/internal/c4/faction-treasury.ts:29

Omit.atlasOutCapPerEpoch

readonly atlasOutCapPerEpochRaw: bigint;

Defined in: packages/sage/src/internal/c4/faction-treasury.ts:28

Omit.atlasOutCapPerEpochRaw

readonly atlasOutThisEpoch: number;

Defined in: packages/sage/src/internal/c4/faction-treasury.ts:27

Omit.atlasOutThisEpoch

readonly atlasOutThisEpochRaw: bigint;

Defined in: packages/sage/src/internal/c4/faction-treasury.ts:26

Omit.atlasOutThisEpochRaw

readonly bump: number;

Defined in: packages/sage/src/internal/c4/faction-treasury.ts:19

Omit.bump

readonly epochLengthSeconds: bigint;

Defined in: packages/sage/src/internal/c4/faction-treasury.ts:25

Omit.epochLengthSeconds

readonly epochStartedAtUnixSeconds: bigint;

Defined in: packages/sage/src/internal/c4/faction-treasury.ts:24

Omit.epochStartedAtUnixSeconds

readonly factionId: number;

Defined in: packages/sage/src/internal/c4/faction-treasury.ts:21

Omit.factionId

readonly game: EntityRef<"game">;

Defined in: packages/sage/src/factions/index.ts:190

readonly kind: "factionTreasury";

Defined in: packages/sage/src/factions/index.ts:188

readonly reserves: readonly {
cargoId: number;
floorRaw: bigint;
quantityRaw: bigint;
}[];

Defined in: packages/sage/src/internal/c4/faction-treasury.ts:30

Omit.reserves

readonly version: number;

Defined in: packages/sage/src/internal/c4/faction-treasury.ts:18

Omit.version

toJSON(): unknown;

Defined in: packages/sage/src/factions/index.ts:191

unknown


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

One King system with its current effective faction owner.

declare const system: KingSystemOwnership;
console.log(system.system.address, system.factionId);

readonly optional factionId?: number;

Defined in: packages/sage/src/factions/index.ts:250

readonly system: EntityRef<"starSystem">;

Defined in: packages/sage/src/factions/index.ts:249

readonly systemId: number;

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


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

Immutable King-system ownership catalog.

declare const tracker: KingSystemsSnapshot;
console.log(tracker.systems.length);
  • Omit<KingSystemTrackerAccountData, "game" | "systems">

readonly address: Address;

Defined in: packages/sage/src/factions/index.ts:265

readonly bump: number;

Defined in: packages/sage/src/internal/c4/factions.ts:204

Omit.bump

readonly configuredAtUnixSeconds: bigint;

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

Omit.configuredAtUnixSeconds

readonly game: EntityRef<"game">;

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

readonly kind: "kingSystemTracker";

Defined in: packages/sage/src/factions/index.ts:264

readonly majorFactionCounts: Readonly<{
mud: number;
oni: number;
ustur: number;
}>;

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

Omit.majorFactionCounts

readonly systems: readonly KingSystemOwnership[];

Defined in: packages/sage/src/factions/index.ts:267

readonly version: number;

Defined in: packages/sage/src/internal/c4/factions.ts:203

Omit.version

toJSON(): unknown;

Defined in: packages/sage/src/factions/index.ts:268

unknown


Defined in: packages/sage/src/factions/profile-faction.ts:33

Immutable faction enrollment associated with a Profile across Games.

declare const enrollment: ProfileFactionSnapshot;
console.log(enrollment.profile.address, enrollment.faction);

readonly address: Address;

Defined in: packages/sage/src/factions/profile-faction.ts:35

readonly faction: ProfileFactionAlignment;

Defined in: packages/sage/src/factions/profile-faction.ts:37

readonly factionId: number;

Defined in: packages/sage/src/factions/profile-faction.ts:38

readonly kind: "profileFaction";

Defined in: packages/sage/src/factions/profile-faction.ts:34

readonly profile: EntityRef<"profile">;

Defined in: packages/sage/src/factions/profile-faction.ts:36

readonly version: number;

Defined in: packages/sage/src/factions/profile-faction.ts:39

toJSON(): unknown;

Defined in: packages/sage/src/factions/profile-faction.ts:40

unknown


Defined in: packages/sage/src/factions/index.ts:306

Immutable nested RegionTracker ownership catalog.

declare const tracker: TerritoryRegionsSnapshot;
console.log(tracker.regions.length);
  • Omit<RegionTrackerAccountData, "game" | "regions">

readonly address: Address;

Defined in: packages/sage/src/factions/index.ts:311

readonly game: EntityRef<"game">;

Defined in: packages/sage/src/factions/index.ts:312

readonly gridExponent: number;

Defined in: packages/sage/src/internal/c4/factions.ts:258

Omit.gridExponent

readonly kind: "regionTracker";

Defined in: packages/sage/src/factions/index.ts:310

readonly regions: readonly TerritoryRegionSummary[];

Defined in: packages/sage/src/factions/index.ts:313

readonly version: number;

Defined in: packages/sage/src/internal/c4/factions.ts:256

Omit.version

toJSON(): unknown;

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

unknown


Defined in: packages/sage/src/factions/index.ts:291

Region ownership and geometry summary with edge-aligned neighbor ids.

declare const region: TerritoryRegionSummary;
console.log(region.id, region.owner);
  • Omit<FactionRegionData, "systems" | "coreSystems">

readonly border: readonly {
x: number;
y: number;
}[];

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

Omit.border

readonly boundingBox: {
maxX: number;
maxY: number;
minX: number;
minY: number;
};

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

readonly maxX: number;
readonly maxY: number;
readonly minX: number;
readonly minY: number;
Omit.boundingBox

readonly connections: readonly number[];

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

Omit.connections

readonly coreSystems: readonly TerritoryRegionSystem[];

Defined in: packages/sage/src/factions/index.ts:296

readonly id: number;

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

Omit.id

readonly miningResearchRequirementTagIds: readonly number[];

Defined in: packages/sage/src/internal/c4/factions.ts:252

Omit.miningResearchRequirementTagIds

readonly name: string;

Defined in: packages/sage/src/internal/c4/factions.ts:230

Omit.name

readonly neighborsByEdge: readonly (number | null)[];

Defined in: packages/sage/src/internal/c4/factions.ts:247

Omit.neighborsByEdge

readonly owner: FactionAlignment;

Defined in: packages/sage/src/internal/c4/factions.ts:231

Omit.owner

readonly risk:
| {
faction: FactionAlignment;
kind: "low";
}
| {
kind: "medium" | "high";
};

Defined in: packages/sage/src/internal/c4/factions.ts:233

Omit.risk

readonly safety: "safe" | "border";

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

Omit.safety

readonly scanningResearchRequirementTagIds: readonly number[];

Defined in: packages/sage/src/internal/c4/factions.ts:251

Omit.scanningResearchRequirementTagIds

readonly systems: readonly TerritoryRegionSystem[];

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

readonly xpMultiplier: FactionFixedValueData;

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

Omit.xpMultiplier

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

Compact region system ownership linked to a StarSystem reference.

declare const system: TerritoryRegionSystem;
console.log(system.systemId, system.faction);

readonly faction: FactionAlignment;

Defined in: packages/sage/src/factions/index.ts:281

readonly system: EntityRef<"starSystem">;

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

readonly systemId: number;

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

type FactionOwnershipAsset =
| {
address: Address;
kind: Exclude<FactionOwnershipKind, "region">;
}
| {
kind: "region";
regionId: number;
};

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

A requested asset whose optional ownership sidecar can be derived.

declare const address: Address;
const asset: FactionOwnershipAsset = { kind: 'fleet', address };

type FactionOwnershipDiscoveryOptions = Omit<DiscoveryRequest, "filters" | "strategy">;

Defined in: packages/sage/src/factions/index.ts:61

Options accepted by targeted FactionOwnership discovery.

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

type FactionOwnershipTarget =
| {
kind: "starbase";
system: EntityRef<"starSystem">;
}
| {
fleet: EntityRef<"fleet">;
kind: "fleet";
}
| {
kind: "region";
regionId: number;
};

Defined in: packages/sage/src/factions/index.ts:201

Typed ownership target retaining the underlying capability reference.

declare const asset: FactionOwnershipTarget;
console.log(asset.kind);

type ProfileFactionAlignment = "unaligned" | "mud" | "oni" | "ustur";

Defined in: packages/sage/src/factions/profile-faction.ts:24

Stored Profile enrollment, including unaligned state that the initial-choice planner does not offer.

const alignment: ProfileFactionAlignment = 'ustur';

function getFaction(
context,
factionId,
options?): Promise<FactionSnapshot>;

Defined in: packages/sage/src/factions/index.ts:583

Derives and reads one faction identity.

ParameterType
contextSageContext
factionIdnumber
options?ReadOptions

Promise<FactionSnapshot>

declare const ctx: SageContext;
const faction = await getFaction(ctx, 4);

function getFactionEconomics(context, options?): Promise<FactionEconomicsSnapshot>;

Defined in: packages/sage/src/factions/index.ts:634

Derives and reads per-Game faction economics.

ParameterType
contextSageContext
options?ReadOptions

Promise<FactionEconomicsSnapshot>

declare const ctx: SageContext;
const economics = await getFactionEconomics(ctx);

function getFactionForProfile(
ctx,
profile,
options?): Promise<ProfileFactionSnapshot>;

Defined in: packages/sage/src/factions/profile-faction.ts:89

Derives and reads a Profile’s faction enrollment independently of Game.

Returns the ProfileFaction enrollment snapshot (unaligned, MUD, ONI, or Ustur). This does not read a Game or its dynamic FactionAccount; use getFaction with a Game-scoped faction id for that state. Missing enrollment throws ACCOUNT_NOT_FOUND; use maybeGetFactionForProfile when absence is expected.

ParameterType
ctxSageContext
profileAddress
options?ReadOptions

Promise<ProfileFactionSnapshot>

Illustrative: supply a context and an existing Profile address.

declare const ctx: SageContext;
declare const profile: Address;
const enrollment = await getFactionForProfile(ctx, profile);
console.log(enrollment.faction);

function getFactionOwnerships(
context,
kind,
options?): Promise<readonly FactionOwnershipSnapshot[]>;

Defined in: packages/sage/src/factions/index.ts:798

Discovers validated ownership sidecars for one asset kind.

ParameterType
contextSageContext
kindFactionOwnershipKind
options?FactionOwnershipDiscoveryOptions

Promise<readonly FactionOwnershipSnapshot[]>

declare const ctx: SageContext;
const fleets = await getFactionOwnerships(ctx, 'fleet');

function getFactionRelations(context, options?): Promise<FactionRelationsSnapshot>;

Defined in: packages/sage/src/factions/index.ts:657

Derives and reads the diplomacy relation tracker.

ParameterType
contextSageContext
options?ReadOptions

Promise<FactionRelationsSnapshot>

declare const ctx: SageContext;
const relations = await getFactionRelations(ctx);

function getFactionTreasury(
context,
factionId,
options?): Promise<FactionTreasurySnapshot>;

Defined in: packages/sage/src/factions/index.ts:716

Derives and reads one faction treasury.

ParameterType
contextSageContext
factionIdnumber
options?ReadOptions

Promise<FactionTreasurySnapshot>

declare const ctx: SageContext;
const treasury = await getFactionTreasury(ctx, 4);

function getKingSystems(context, options?): Promise<KingSystemsSnapshot>;

Defined in: packages/sage/src/factions/index.ts:821

Derives and reads current King-system ownership.

ParameterType
contextSageContext
options?ReadOptions

Promise<KingSystemsSnapshot>

declare const ctx: SageContext;
const systems = await getKingSystems(ctx);

function getTerritoryRegions(context, options?): Promise<TerritoryRegionsSnapshot>;

Defined in: packages/sage/src/factions/index.ts:853

Derives and reads compact nested region ownership summaries.

ParameterType
contextSageContext
options?ReadOptions

Promise<TerritoryRegionsSnapshot>

declare const ctx: SageContext;
const regions = await getTerritoryRegions(ctx);

function maybeGetFactionConfig(context, options?): Promise<
| FactionConfigSnapshot
| undefined>;

Defined in: packages/sage/src/factions/index.ts:613

Derives and reads the optional per-Game standing configuration.

ParameterType
contextSageContext
options?ReadOptions

Promise< | FactionConfigSnapshot | undefined>

declare const ctx: SageContext;
const config = await maybeGetFactionConfig(ctx);

function maybeGetFactionForProfile(
ctx,
profile,
options?): Promise<
| ProfileFactionSnapshot
| undefined>;

Defined in: packages/sage/src/factions/profile-faction.ts:115

Reads optional Profile faction enrollment independently of Game.

Returns the ProfileFaction enrollment snapshot, or undefined when the Profile is not enrolled. Malformed accounts still fail validation. This does not load Game or resolve its dynamic FactionAccount; use getFaction with a Game-scoped faction id for that state.

ParameterType
ctxSageContext
profileAddress
options?ReadOptions

Promise< | ProfileFactionSnapshot | undefined>

Illustrative: supply a context and an existing Profile address.

declare const ctx: SageContext;
declare const profile: Address;
const enrollment = await maybeGetFactionForProfile(ctx, profile);
console.log(enrollment?.faction ?? 'not enrolled');

function maybeGetFactionOwnership(
context,
asset,
options?): Promise<
| FactionOwnershipSnapshot
| undefined>;

Defined in: packages/sage/src/factions/index.ts:747

Derives and reads an optional ownership sidecar for one asset.

ParameterType
contextSageContext
assetFactionOwnershipAsset
options?ReadOptions

Promise< | FactionOwnershipSnapshot | undefined>

declare const ctx: SageContext;
declare const address: Address;
const ownership = await maybeGetFactionOwnership(ctx, { kind: 'fleet', address });

function maybeGetFactionStanding(
context,
profile,
factionId,
options?): Promise<
| FactionStandingSnapshot
| undefined>;

Defined in: packages/sage/src/factions/index.ts:681

Derives and reads optional standing for one Profile/faction pair.

ParameterType
contextSageContext
profileAddress
factionIdnumber
options?ReadOptions

Promise< | FactionStandingSnapshot | undefined>

declare const ctx: SageContext;
declare const profile: Address;
const standing = await maybeGetFactionStanding(ctx, profile, 4);