Skip to main content

Module logical

Module logical 

Source
Expand description

Pure, DB-free logical→physical transaction lowering.

This module is the single source of truth for the from→to FX math used by every client surface (CLI, TUI, web) and the upcoming B2b RPC native. No database calls, no async.

Structs§

LogicalSplit
A from→to exchange; to_amount is required iff from_commodity != to_commodity.
PhysicalSplit
One physical ledger entry.
PriceRow
One price-table row linking two physical splits.

Functions§

lower_logical_split
Lower one logical split to two physical splits and an optional price row.
lower_logical_transaction
Lower a non-empty slice of logical splits into physical splits and price rows.