C 8d321e451f Let a caller say which day an entry takes effect 3 days ago
..
src 8d321e451f Let a caller say which day an entry takes effect 3 days ago
tests 2e22e01d71 Retire the reservation model and the API shapes it left behind 4 days ago
Cargo.toml 7e7cfde94d Introduce Kuatia, an append-only, auditable multi-asset ledger 4 months ago
README.md 2e22e01d71 Retire the reservation model and the API shapes it left behind 4 days ago

README.md

kuatia-storage

Storage abstraction for the kuatia ledger.

Defines the Store trait (composed of seven sub-traits), provides an in-memory implementation for tests, and exports a store_tests! conformance macro that any backend can use to validate its implementation.

Sub-traits

Trait Purpose
AccountStore Account creation and version reads
PostingStore Posting reads and the live balance
TransferStore Committed transfer reads and queries
CommitStore The atomic commit boundary: commit_envelope / commit_transition (ADR-0023)
EventStore Append-only ledger event log (idempotent on a per-transfer dedup key)
BookStore Book (transfer policy scope) persistence
BalanceProjectionStore Append-only balance cache points (ADR-0019)

Every posting and account-version write goes through CommitStore, which applies a whole transfer or a whole transition in one transaction and re-checks double-spend, freeze/close, and the overdraft floor inside it. A backend has no other way to change a posting, so no caller can leave half a transfer applied.

Store is a blanket trait: any type implementing the sub-traits is a Store.

Conformance testing

use kuatia_storage::mem_store::InMemoryStore;

async fn new_store() -> InMemoryStore { InMemoryStore::new() }
kuatia_storage::store_tests!(new_store);

This generates a test for every Store method, run against any backend.