code wiki / (root) / nx_rights_ledger_store.nx

nx_rights_ledger_store.nx

buildroot/runtime/nx_rights_ledger_store.nx

1836 B43 linesdepth 3pulls 4 transitivereach 1 importersview sourcekind librarytopic rights
docsdependenciesstructsconstsfunctions

about

nx_rights_ledger_store.nx -- RUNG 2: durability for the rights ledger. Persists the ledger through nx_seg_store (append-only, crash-safe temp-> rename commit) so a license SURVIVES a restart on the NAS. The snapshot value is the raw contiguous row buffer (the row count is derived from the value length, so no header is needed); each save is a NEW immutable segment -> ss_scan_all over "rights:snapshot" is the full audit history. HONEST scope: this is a whole-ledger snapshot under one key. Per-row content-addressed records (a canon_cid CID per license) + key-level history = rung 2b (flagged, NOT a silent cap). license_tier: ORIGINAL

dependencies 3 imports · 1 importers

nx_syscalls.nx nx_rights_ledger.nx nx_seg_store.nx nx_rights_ledger_store.nx nx_rights_ledger_store_gate.nx

imports: nx_syscalls.nxnx_rights_ledger.nxnx_seg_store.nx

imported by: nx_rights_ledger_store_gate.nx

structs

none

consts

none

functions

19func nx_rights_save(l: *NxRightsLedger, prefix: *u8, segid: i64) -> i64
called by 1: main calls 3: ss_beginss_addss_commit
28func nx_rights_load(prefix: *u8) -> *NxRightsLedger