/** * Build {@link DslClosedEvent} payloads from a full {@link DslState} snapshot at close time. */ import type { DslClosedEvent, DslEventSource, DslState } from "../../types/dsl/index.js"; export interface BuildDslClosedEventOptions { reason: string; closeReason: string; timestamp: string; /** The monitor tick emitting the close; omitted by a caller that has no tick in hand. */ tickId?: string; /** * Which side produced this transition: our own monitor tick, or a relay of one the backend made. * Omitted by a caller that cannot attribute the close. It does NOT say whose stop was protecting * the position — a close our poll detected is `runtime` even when the backend placed the stop * that fired. The preceding `dsl.sl_updated` answers that. */ source?: DslEventSource; /** * The backend's own stamp of when it acted, on a backend-sourced close. Loosely typed because it * reaches this builder from a wire payload; anything but a non-empty string drops out, and it * drops out on its own — a stamp we cannot use never costs the source beside it. */ backendEventAt?: unknown; } /** * Maps archived/live state to the bus `dsl.closed` payload (including fields for notification formatting * and deferred trade-history enrichment). */ export declare function buildDslClosedEventFromState(state: DslState, opts: BuildDslClosedEventOptions): DslClosedEvent; //# sourceMappingURL=build-closed-event.d.ts.map