Skip to content
#0874
Sqlite

The midnight balance report lists what it cannot vouch for

The regulator wants balances as they stood at 00:00 UTC on the first, and an attestation that the export is complete. The second part is where most exports lie by omission.

GET /api/v1/sqlite/kv?db=ledger.db&prefix=balance:&at_timestamp=1788220800 reconstructs the listing from the KV store's operation log, as it was at that second. The envelope carries more than rows. has_gaps says whether anything was skipped. gap_keys names the keys whose history was written with history=false. candidate_truncated flags a scan that hit its cap, so you narrow the prefix and run again.

The tokenized-card keys you deliberately keep out of history appear by name in gap_keys, not as a silent absence. The report states its own blind spots, in the same response as the numbers.

Completeness stopped being a claim the exporter makes and became a field the storage returns.