|
|
3 часов назад | |
|---|---|---|
| .. | ||
| adr | 1 час назад | |
| examples | 1 час назад | |
| README.md | 1 час назад | |
| SUMMARY.md | 1 час назад | |
| accounting-mapping.md | 1 час назад | |
| accounts.md | 1 час назад | |
| architecture.md | 1 час назад | |
| changelog.md | 2 недель назад | |
| crates.md | 1 час назад | |
| glossary.md | 1 час назад | |
| inflight.md | 1 час назад | |
| journaling.md | 1 час назад | |
| pending-states.md | 1 час назад | |
| storage-schema.md | 1 час назад | |
| transfers.md | 1 час назад | |
kuatia (kuatiʼa) is Guaraní for paper, document, writing.
An append-only, auditable, multi-asset UTXO-style ledger library in Rust.
Kuatia models value as postings: signed amounts of one asset, where exactly
one account owns each posting. A transfer atomically consumes the postings that
exist and creates new ones. Per-asset conservation holds over every transfer:
sum(consumed) == sum(created). Double-entry bookkeeping gives the same safety
guarantee as Σ debits = Σ credits, and Kuatia states it over signed postings.
There is no mutable balance field, so an account's balance is always the sum of
its live postings.
A committed transfer is a journal entry. A transfer with several movements is a compound entry: one balanced event that touches many accounts. It can also touch many assets, because each asset balances on its own. The append-only transfer log is the accounting journal. A replay of that log reconstructs every balance, so the ledger is auditable by construction.
Concepts covers the model: the architecture and the reason for its shape, accounts, transfers with the resolve algorithm, and inflight holds.
Examples are worked cases: overdraft and the
shortfall posting, a currency exchange, and a retail
point of sale. The runnable
programs start with cargo run.
Accounting maps the model onto practice. It does so both as journaling and as a term-by-term mapping from classical double-entry.
Reference is the crate reference, the SQL storage schema and the glossary, which defines every term.
Decisions is the ADR log. It holds every significant, hard-to-reverse design decision, with the options that it rejected and the reason for each. Nobody edits an ADR to reverse a decision. A later ADR supersedes it.