From 34365efa702517148ed1b45e55589a3ef8e2494e Mon Sep 17 00:00:00 2001 From: issue-solver-bot Date: Wed, 26 Aug 2026 16:31:20 +0000 Subject: [PATCH] fix: resolve issue #174 --- src/chains/stellar/scan.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/chains/stellar/scan.ts b/src/chains/stellar/scan.ts index 4712bff..05535dd 100644 --- a/src/chains/stellar/scan.ts +++ b/src/chains/stellar/scan.ts @@ -7,6 +7,21 @@ import type { Announcement, MatchedAnnouncement } from './types'; import { hexToBytes } from './utils'; import { pipeline } from './scanner/pipeline'; +/** + * Progress snapshot emitted during a cold scan so UIs can render honest + * progress bars instead of guessing at a spinner. + */ +export interface ScanProgress { + /** Number of ledgers scanned so far. */ + scannedLedgers: number; + /** Total ledgers to scan, when known (e.g. a bounded cold scan). */ + totalLedgers?: number; + /** Number of announcements matched so far. */ + matches: number; + /** Milliseconds elapsed since the scan started. */ + elapsedMs: number; +} + const HEX_TO_BYTE = (() => { const table = new Uint8Array(256).fill(255); const lower = '0123456789abcdef';