Logistiki.Ledger.Beancount (logistiki v0.1.0)

Copy Markdown View Source

The Beancount ledger backend — the accounting oracle.

Uses beancount_ex as the executable accounting specification. On execute_journal/2 the journal is mapped to Beancount directives and verified with Beancount.check/1 before being persisted. Projections (balance, statement, trial_balance) are computed from Logistiki's own persisted postings via Logistiki.Projections.ProjectionEngine, so the simulation and Beancount backends agree by construction. The oracle value of Beancount is exercised by verify_ledger/1 and the regression test suite, which compare Beancount-derived balances against Logistiki's.

Beancount-specific structs do not leak into the public API.

Summary

Functions

Returns Beancount balances for all posted journals (oracle projection).

Renders all posted journals to a Beancount ledger and verifies it with Beancount.check/1. Used by the regression suite to exercise the oracle.

Functions

oracle_balances(opts \\ [])

(since 0.1.0)

Returns Beancount balances for all posted journals (oracle projection).

verify_ledger(opts \\ [])

(since 0.1.0)

Renders all posted journals to a Beancount ledger and verifies it with Beancount.check/1. Used by the regression suite to exercise the oracle.