scanning
Interfaces
Section titled “Interfaces”CharacterScanningStateSnapshot
Section titled “CharacterScanningStateSnapshot”Defined in: packages/sage/src/scanning/index.ts:149
Focused read-only scanning projection of one derived Character.
Example
Section titled “Example”declare const state: CharacterScanningStateSnapshot;console.log(state.dataRunnerXp.level, state.modifiers.power.value);Properties
Section titled “Properties”character
Section titled “character”readonly character: EntityRef<"character">;Defined in: packages/sage/src/scanning/index.ts:151
dataRunnerXp
Section titled “dataRunnerXp”readonly dataRunnerXp: CharacterXpCategoryData & { sequenceId: number;};Defined in: packages/sage/src/scanning/index.ts:153
Type Declaration
Section titled “Type Declaration”sequenceId
Section titled “sequenceId”readonly sequenceId: number;readonly kind: "characterScanningState";Defined in: packages/sage/src/scanning/index.ts:150
modifiers
Section titled “modifiers”readonly modifiers: { cooldown: ScanFixedValueData; power: ScanFixedValueData; sequenceId: number;};Defined in: packages/sage/src/scanning/index.ts:156
cooldown
Section titled “cooldown”readonly cooldown: ScanFixedValueData;readonly power: ScanFixedValueData;sequenceId
Section titled “sequenceId”readonly sequenceId: number;profile
Section titled “profile”readonly profile: EntityRef<"profile">;Defined in: packages/sage/src/scanning/index.ts:152
researchTagIds
Section titled “researchTagIds”readonly researchTagIds: readonly number[];Defined in: packages/sage/src/scanning/index.ts:161
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/scanning/index.ts:162
Returns
Section titled “Returns”unknown
FleetScanningStateSnapshot
Section titled “FleetScanningStateSnapshot”Defined in: packages/sage/src/scanning/index.ts:128
Focused read-only scanning projection of one Fleet.
Example
Section titled “Example”declare const state: FleetScanningStateSnapshot;console.log(state.stats.power, state.cooldownEndsAtUnixSeconds);Properties
Section titled “Properties”cooldownEndsAtUnixSeconds
Section titled “cooldownEndsAtUnixSeconds”readonly cooldownEndsAtUnixSeconds: bigint;Defined in: packages/sage/src/scanning/index.ts:132
readonly fleet: EntityRef<"fleet">;Defined in: packages/sage/src/scanning/index.ts:130
readonly kind: "fleetScanningState";Defined in: packages/sage/src/scanning/index.ts:129
ownerProfile
Section titled “ownerProfile”readonly ownerProfile: EntityRef<"profile">;Defined in: packages/sage/src/scanning/index.ts:131
readonly stats: { bonus: number; cooldownSeconds: number; cost: number; power: number;};Defined in: packages/sage/src/scanning/index.ts:133
readonly bonus: number;cooldownSeconds
Section titled “cooldownSeconds”readonly cooldownSeconds: number;readonly cost: number;readonly power: number;Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/scanning/index.ts:139
Returns
Section titled “Returns”unknown
ScanPatternCost
Section titled “ScanPatternCost”Defined in: packages/sage/src/scanning/index.ts:75
One cargo-backed scan cost.
Example
Section titled “Example”declare const cost: ScanPatternCost;console.log(cost.cargo.name, cost.multiplier.value);Properties
Section titled “Properties”readonly cargo: CargoDefinitionSummary;Defined in: packages/sage/src/scanning/index.ts:76
multiplier
Section titled “multiplier”readonly multiplier: ScanFixedValueData;Defined in: packages/sage/src/scanning/index.ts:77
ScanPatternLootOutcome
Section titled “ScanPatternLootOutcome”Defined in: packages/sage/src/scanning/index.ts:87
One cargo-backed scan outcome and its research-tag requirements.
Example
Section titled “Example”declare const outcome: ScanPatternLootOutcome;console.log(outcome.output.name, outcome.researchRequirementTagIds);Properties
Section titled “Properties”output
Section titled “output”readonly output: CargoDefinitionSummary;Defined in: packages/sage/src/scanning/index.ts:88
outputAmountRaw
Section titled “outputAmountRaw”readonly outputAmountRaw: bigint;Defined in: packages/sage/src/scanning/index.ts:89
researchRequirementTagIds
Section titled “researchRequirementTagIds”readonly researchRequirementTagIds: readonly number[];Defined in: packages/sage/src/scanning/index.ts:93
rollWeight
Section titled “rollWeight”readonly rollWeight: ScanFixedValueData;Defined in: packages/sage/src/scanning/index.ts:91
threshold
Section titled “threshold”readonly threshold: ScanFixedValueData;Defined in: packages/sage/src/scanning/index.ts:90
xpValue
Section titled “xpValue”readonly xpValue: ScanFixedValueData;Defined in: packages/sage/src/scanning/index.ts:92
ScanPatternSnapshot
Section titled “ScanPatternSnapshot”Defined in: packages/sage/src/scanning/index.ts:103
Immutable, definition-resolved ScanPattern catalog entry.
Example
Section titled “Example”declare const pattern: ScanPatternSnapshot;console.log(pattern.name, pattern.loot.length);Properties
Section titled “Properties”address
Section titled “address”readonly address: Address;Defined in: packages/sage/src/scanning/index.ts:105
blankWeight
Section titled “blankWeight”readonly blankWeight: ScanFixedValueData;Defined in: packages/sage/src/scanning/index.ts:112
blankXpValue
Section titled “blankXpValue”readonly blankXpValue: ScanFixedValueData;Defined in: packages/sage/src/scanning/index.ts:113
readonly bump: number;Defined in: packages/sage/src/scanning/index.ts:107
cooldownMultiplier
Section titled “cooldownMultiplier”readonly cooldownMultiplier: ScanFixedValueData;Defined in: packages/sage/src/scanning/index.ts:111
readonly costs: readonly ScanPatternCost[];Defined in: packages/sage/src/scanning/index.ts:115
readonly game: EntityRef<"game">;Defined in: packages/sage/src/scanning/index.ts:110
readonly id: number;Defined in: packages/sage/src/scanning/index.ts:108
readonly kind: "scanPattern";Defined in: packages/sage/src/scanning/index.ts:104
readonly loot: readonly ScanPatternLootOutcome[];Defined in: packages/sage/src/scanning/index.ts:116
readonly name: string;Defined in: packages/sage/src/scanning/index.ts:109
noiseMaps
Section titled “noiseMaps”readonly noiseMaps: readonly ScanNoiseMapData[];Defined in: packages/sage/src/scanning/index.ts:117
status
Section titled “status”readonly status: "active" | "draft";Defined in: packages/sage/src/scanning/index.ts:114
version
Section titled “version”readonly version: number;Defined in: packages/sage/src/scanning/index.ts:106
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): unknown;Defined in: packages/sage/src/scanning/index.ts:118
Returns
Section titled “Returns”unknown
Type Aliases
Section titled “Type Aliases”ScanCooldownState
Section titled “ScanCooldownState”type ScanCooldownState = | { kind: "ready";} | { kind: "cooldown"; remainingSeconds: bigint;};Defined in: packages/sage/src/scanning/index.ts:175
Pure Fleet cooldown state at one explicit Unix timestamp.
Example
Section titled “Example”declare const fleet: FleetScanningStateSnapshot;const state: ScanCooldownState = deriveScanCooldownState( fleet, 1_700_000_000n,);ScanFixedValue
Section titled “ScanFixedValue”type ScanFixedValue = ScanFixedValueData;Defined in: packages/sage/src/scanning/index.ts:46
Fixed-point scanning value with exact raw storage.
Example
Section titled “Example”const value: ScanFixedValue = { raw: 65_536n, value: 1 };ScanNoiseMap
Section titled “ScanNoiseMap”type ScanNoiseMap = ScanNoiseMapData;Defined in: packages/sage/src/scanning/index.ts:55
One translated noise-map row used by a ScanPattern.
Example
Section titled “Example”declare const noise: ScanNoiseMap;console.log(noise.seedOffset, noise.weight.value);ScanPatternDiscoveryOptions
Section titled “ScanPatternDiscoveryOptions”type ScanPatternDiscoveryOptions = Omit<DiscoveryRequest, "filters" | "strategy">;Defined in: packages/sage/src/scanning/index.ts:63
Options supported by targeted ScanPattern catalog discovery.
Example
Section titled “Example”const options: ScanPatternDiscoveryOptions = { commitment: 'confirmed' };Functions
Section titled “Functions”deriveScanCooldownState()
Section titled “deriveScanCooldownState()”function deriveScanCooldownState(fleet, atUnixSeconds): ScanCooldownState;Defined in: packages/sage/src/scanning/index.ts:478
Derives whether a Fleet scan cooldown is ready at an explicit timestamp.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
fleet | FleetScanningStateSnapshot |
atUnixSeconds | bigint |
Returns
Section titled “Returns”Example
Section titled “Example”declare const fleet: FleetScanningStateSnapshot;const state = deriveScanCooldownState(fleet, 1_700_000_000n);getCharacterScanningState()
Section titled “getCharacterScanningState()”function getCharacterScanningState( context, profile,options?): Promise<CharacterScanningStateSnapshot>;Defined in: packages/sage/src/scanning/index.ts:418
Derives one Character from Profile and returns focused scanning progression.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
profile | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<CharacterScanningStateSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;declare const profile: Address;const state = await getCharacterScanningState(ctx, profile);getFleetScanningState()
Section titled “getFleetScanningState()”function getFleetScanningState( context, address,options?): Promise<FleetScanningStateSnapshot>;Defined in: packages/sage/src/scanning/index.ts:366
Reads one Fleet and returns only its translated scanning state.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
address | Address |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<FleetScanningStateSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;declare const fleet: Address;const state = await getFleetScanningState(ctx, fleet);getScanPattern()
Section titled “getScanPattern()”function getScanPattern( context, patternId,options?): Promise<ScanPatternSnapshot>;Defined in: packages/sage/src/scanning/index.ts:284
Derives and reads one required ScanPattern for the configured Game.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
patternId | number |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<ScanPatternSnapshot>
Example
Section titled “Example”declare const ctx: SageContext;const pattern = await getScanPattern(ctx, 2);getScanPatterns()
Section titled “getScanPatterns()”function getScanPatterns(context, options?): Promise<readonly ScanPatternSnapshot[]>;Defined in: packages/sage/src/scanning/index.ts:344
Discovers the configured Game’s ScanPattern catalog with targeted filters.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
options? | ScanPatternDiscoveryOptions |
Returns
Section titled “Returns”Promise<readonly ScanPatternSnapshot[]>
Example
Section titled “Example”declare const ctx: SageContext;const patterns = await getScanPatterns(ctx);maybeGetScanPattern()
Section titled “maybeGetScanPattern()”function maybeGetScanPattern( context, patternId, options?): Promise< | ScanPatternSnapshot| undefined>;Defined in: packages/sage/src/scanning/index.ts:314
Derives and reads one optional ScanPattern for the configured Game.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | SageContext |
patternId | number |
options? | ReadOptions |
Returns
Section titled “Returns”Promise<
| ScanPatternSnapshot
| undefined>
Example
Section titled “Example”declare const ctx: SageContext;const pattern = await maybeGetScanPattern(ctx, 2);