import type { SharedArtifactContract } from "../artifacts.js"; import type { RuntimeStore } from "../store/runtime-store.js"; import type { SharedArtifactStore } from "../store/shared-artifact-store.js"; import type { SignalStore } from "../store/signal-store.js"; import type { CandlesByAsset, ScannerLogger, SharedArtifactAccessor } from "../protocol/context.js"; import type { Instrument, ScannerId, SmMarket } from "../types.js"; import type { ClearingHouseState } from "../implementations/liquidation-watchdog.js"; import type { DslState } from "../../types/dsl/index.js"; import type { IdentityEnvelope } from "../../telemetry/identity.js"; import type { ScannerEngineLifecycle } from "./lifecycle.js"; /** Minimal active-position shape consumed by scanner contexts. */ export type ActivePosition = Record; /** Optional metadata passed to candle providers to optimize request fanout. */ export interface CandleProviderOptions { /** Scanner id requesting candle data. */ scannerId?: ScannerId; /** Preferred candidate assets pre-selected by upstream artifacts (for example prescreener). */ preferredAssets?: string[]; } /** * External data sources used by the engine for provider-backed inputs only. * Shared market intelligence is resolved separately through shared artifact bindings. */ export interface ScannerDataProviders { getInstruments?: (address: string) => Promise; getCandles?: (address: string, instruments: Instrument[], options?: CandleProviderOptions) => Promise; getOiHistory?: (address: string) => Promise>; getSmData?: (address: string) => Promise; getActivePositions?: (address: string) => Promise; getClearingHouseState?: (address: string) => Promise; getDslStatesForStrategy?: (address: string) => Promise; } /** Stores required by the scanner engine runtime. */ export interface ScannerEngineStores { runtimeStore: RuntimeStore; signalStore: SignalStore; sharedArtifactStore: SharedArtifactStore; } /** Constructor options for scanner engine orchestration. */ export interface ScannerEngineDependencies { stores: ScannerEngineStores; providers?: ScannerDataProviders; logger?: ScannerLogger; lifecycle?: ScannerEngineLifecycle; now?: () => number; /** Lazy runtime identity builder; used to stamp per-trace identity at the scanner.run seam. */ identity?: () => IdentityEnvelope; } /** Shared-artifact store accessors exposed through scanner init/run contexts. */ export declare function createSharedArtifactAccessor(address: string, scannerId: ScannerId, producedContract: SharedArtifactContract | undefined, sharedArtifactStore: SharedArtifactStore, resolveSourceScannerId: (artifactKey: string) => ScannerId | undefined): SharedArtifactAccessor; //# sourceMappingURL=data-providers.d.ts.map