InMemoryTreasuryLedgerStore

In-memory implementation of TreasuryLedgerStore. Default for tests and for the testkit module. Production deployments swap in a SQL-backed store (separate module — out of scope for Phase 1).

Thread-safe via an internal Mutex; entries are kept per-correlation so update is O(1).

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open suspend override fun append(entry: TreasuryLedgerEntry)
Link copied to clipboard
open suspend override fun entries(domainId: DomainId, chainId: String? = null): List<TreasuryLedgerEntry>
Link copied to clipboard
open suspend override fun get(correlationId: String): TreasuryLedgerEntry?
Link copied to clipboard
open suspend override fun spentSince(domainId: DomainId, chainId: String, since: Instant): TokenAmount
Link copied to clipboard
open suspend override fun update(correlationId: String, status: SettlementStatus, actualFee: TokenAmount, txHash: String?)