SpendLedger

interface SpendLedger

Where a wallet persists SpendReceipts.

The session writes and reads through this seam; the app owns the store. The same fail-loud principle as the wallet store applies to implementations: an unreadable store must throw, never return an empty list, because an empty list resets every cap.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun append(receipt: SpendReceipt)

Records one executed spend. The session calls this after execution succeeds, never before.

Link copied to clipboard
abstract suspend fun receiptsSince(peerId: String, since: Instant): List<SpendReceipt>

Receipts for peerId with at >= since, oldest first.