Rulvar API reference / @rulvar/rulvar / repairLedgerFromJournal
Function: repairLedgerFromJournal()
ts
function repairLedgerFromJournal(entries, priceUsd?): RepairLedger;Defined in: packages/core/dist/index.d.ts
Folds the workflow-wide repair ledger from a journal (RV4002). Pure over the entries, so the acceptance envelope's live aggregate (computed from the run's own snapshot at assembly) and a post-hoc fold over the persisted journal agree by construction on every count and row identity; wireRef/costUsd enrich rows exactly when the asynchronous billing lane covered them.
Parameters
| Parameter | Type |
|---|---|
entries | readonly JournalEntry[] |
priceUsd? | (servedBy, usage) => number | undefined |