The model is the reference
Formats, countries and products are described in relation to one model. Where a country distinguishes more finely, the model grows – for everyone.
librotenado/0.1 · draft
Every European country has its own e-invoices, audit files, bank statements and charts of accounts. librotenado is one harmonised model for all of it – bookings, receipts, invoices, reports and filings – with the existing formats as exact translations. Open for every vendor, free to implement.
Standards exist for the parts: EN 16931 describes an invoice, camt.053 a bank statement, SAF-T an audit extract, XBRL a financial statement. None of them describes the books as a whole. librotenado does – and treats every existing format as a translation of its model: unambiguous, reversible where the format allows, versioned and tested per country.
Formats, countries and products are described in relation to one model. Where a country distinguishes more finely, the model grows – for everyone.
An incoming e-invoice or bank statement is kept byte for byte. Translations make it usable; they never replace it.
Books are append-only events. A correction is a reversal that refers to what it corrects.
Amounts are exact decimals in any currency, never floating point. Every booking balances in every currency.
When concurrent work breaks a rule of accounting, a person decides. Nothing is merged silently.
Books are end-to-end encrypted between the people and devices that share them. Whoever relays them cannot read them.
A set of books is a growing set of immutable events. Each device chains its own events by hash and stamps them with a hybrid logical clock, so every device agrees on one order. Two copies merge by union – in any order, any number of times, with the same result. A fork, a gap or a broken link in a chain is reported, and so is a booking reversed twice: the protocol puts it on a review list instead of guessing.
Immutable, identified by their SHA-256 hash, chained per device.
An order that respects causality and stays close to real time.
Relays store and forward encrypted events; a backend is a trusted peer that can do more.
The first version specifies the base and comes with a reference library in Rust that implements it. Everything is a draft – open for discussion and changes before 1.0.
| Part | Content | State |
|---|---|---|
| 0001 | Base types – amounts, currencies, dates, accounts, bookings | implemented |
| 0002 | Events and synchronisation – hybrid logical clocks, chains, merging | implemented |
| 0003 | Canonical encoding – byte-exact, hashable by every implementation | implemented |
| 0004 | Chart of accounts – harmonised, with national charts as translations | implemented |
| 0005 | Documents – receipts and invoices, originals and translations | implemented |
| 0006 | Encryption – end-to-end for groups of people and devices | draft |
| 0007 | Filings – submissions to authorities, adapters per country | draft |
Copy, adapt and build on it – in standards documents, free projects and commercial products alike.
The reference library may be used in any software, free or proprietary.
Issues and pull requests on GitHub, signed off under the Developer Certificate of Origin – no CLA.
librotenado is published by falkOSS, a non-profit company for free software in formation in Germany. Its first implementation is the free accounting software spezado; the protocol belongs to no product and can move to an independent body later.