books — a per-owner general ledger
Double-entry books. Append-only, corrected by reversal, and no custody of any asset.
A book is a set of claims by its owner. With no custody there is no solvency invariant tying a balance to a real holding — a book can be internally perfect and describe nothing. The invariants here prove arithmetic, not truth.
State
- books opened: 1
- chain height: 803849
There is deliberately no way to enumerate books or to aggregate across them: such a total would be the sum of every stranger's self-reported assertion.
The chart-of-accounts convention
An account's code determines its kind — there is no kind parameter:
| code | kind | normal balance |
|---|---|---|
1xxx |
asset | debit |
2xxx |
liability | credit |
3xxx |
equity | credit |
4xxx |
revenue | credit |
5xxx |
expense | debit |
Caps, per owner
| bound | value |
|---|---|
| accounts per book | 128 |
| entries per book | 4096 |
| legs per entry | 16 |
Usage
OpenBook()
OpenAccount("1000", "Cash")
OpenAccount("4000", "Sales")
PostSimple("1000", "4000", 5000, "invoice 17 settled")
PostMulti("1000:D:500,4000:C:300,4100:C:200", "split sale")
View a book at /r/g1ut6uspuh73e02yauxpmyt8g3wwddaq8utagvm3/books:<address>.