librotenado/0.1 · draft

An open protocol for accounting data in Europe

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.

One model, many translations

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.

  • E-invoicesEN 16931 · Peppol · XRechnung · ZUGFeRD
  • National systemsKSeF · SdI · VERI*FACTU · …
  • Bank statementsISO 20022 camt.053
librotenadoone model
  • Audit filesSAF-T and national variants
  • Financial statementsXBRL · E-Bilanz · ESEF
  • Charts of accountsnational charts as views

Principles

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.

The original stays the receipt

An incoming e-invoice or bank statement is kept byte for byte. Translations make it usable; they never replace it.

Nothing is overwritten

Books are append-only events. A correction is a reversal that refers to what it corrects.

Money is exact

Amounts are exact decimals in any currency, never floating point. Every booking balances in every currency.

Conflicts are visible

When concurrent work breaks a rule of accounting, a person decides. Nothing is merged silently.

Private by design

Books are end-to-end encrypted between the people and devices that share them. Whoever relays them cannot read them.

Built for synchronisation

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.

Events

Immutable, identified by their SHA-256 hash, chained per device.

Hybrid logical clocks

An order that respects causality and stays close to real time.

Relays and backends

Relays store and forward encrypted events; a backend is a trusted peer that can do more.

Status: version 0.1

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.

PartContentState
0001Base types – amounts, currencies, dates, accounts, bookingsimplemented
0002Events and synchronisation – hybrid logical clocks, chains, mergingimplemented
0003Canonical encoding – byte-exact, hashable by every implementationimplemented
0004Chart of accounts – harmonised, with national charts as translationsimplemented
0005Documents – receipts and invoices, originals and translationsimplemented
0006Encryption – end-to-end for groups of people and devicesdraft
0007Filings – submissions to authorities, adapters per countrydraft

Open for everyone

Specification: CC BY 4.0

Copy, adapt and build on it – in standards documents, free projects and commercial products alike.

Library: MIT

The reference library may be used in any software, free or proprietary.

Contribute

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.