Skip to main content

Module config

Module config 

Source
Expand description

The CLI’s persisted projection-config knob (TP8 self-transfer fee treatment + lot method), stored in a cli_config(key,value) table inside the vault DB. It is a projection input parameter, not ledger state (NFR6): the event log remains the sole source of truth; this only selects a swappable rule. TP8 default is (c), USER-MANDATED — never default to (b).

Structs§

CliConfig
Session-wide projection configuration loaded from the vault’s cli_config table.

Functions§

init_config_table
Create the cli_config key-value side-table if it does not exist. M2: CREATE TABLE IF NOT EXISTS makes this idempotent — safe to call on any vault (old, new, or restored from snapshot). Called by Session::create; also called at the top of read_config as a defensive ensure-table-then-read guard.
read_config
Read the persisted config, falling back to the (c)+FIFO default for any unset key (so a freshly created vault, or a future-added key, reads as the safe default).
set_fee_treatment
Persist the TP8 fee treatment. Both (c) and (b) are writable; (b) is opt-in only. The application enforces (c) as the default — callers must explicitly pass TreatmentB to opt in.
set_pre2025_method
Persist the pre-2025 lot identification method and its attestation flag.
set_pseudo_reconcile
Persist the pseudo-reconcile mode flag (sub-project 2). reconcile pseudo on|off.