code wiki / _hdl_build / nx_estate_inventory.nx

nx_estate_inventory.nx

buildroot/runtime/_hdl_build/nx_estate_inventory.nx

10091 B177 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic estate
docsdependenciesstructsconstsfunctions

about

nx_estate_inventory.nx -- FIRST RUNG of the Nishi Office/Storage suite for andelinwest: a NEVER-LOSE, audit-trailed estate INVENTORY (the will's assets/beneficiaries) on the sovereign append-only content- addressed store (nx_seg_store). Why this reduces EXECUTOR CONFLICT: the store is APPEND-ONLY IMMUTABLE -- every edit is a NEW version and OLD versions are never destroyed (the ADDITIVE law), commits are crash-safe (temp+rename), and reads return ONE authoritative current value. So the executor + heirs get a single, tamper-evident source of truth WITH a complete change history, instead of scattered disputable copies. nx_estate_inventory put <prefix> <asset_id> <description> <value> <beneficiary> nx_estate_inventory get <prefix> <asset_id> nx_estate_inventory history <prefix> <asset_id> (the full audit trail = every version, oldest->newest) prefix = a store path prefix, e.g. knowledge/store/estate-andelinwest-CLIENT- license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_seg_store.nx nx_estate_inventory.nx

imports: nx_seg_store.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main ei_puts ei_streq ei_key ei_cat ei_cat ↻ ei_next_segid ss_manifest ss_manifest_file sys_mmap ss_cat ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ss_begin ss_begin_cap sys_mmap ↻ ss_add ss_add2 ss_w32 ss_len ss_get sys_mmap ↻ ss_scan sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn sys_mmap ↻ ss_cat ↻ ss_readall ↻ sys_munmap ss_scan_seglist ss_len ↻ sys_mmap ↻ ss_cat ↻ ss_readall ↻ ss_r32

structs

none

consts

12const K_MAGIC_8192: i64 = 8192
13const K_MAGIC_65536: i64 = 65536

functions

15func ei_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main
16func ei_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 }
called by 1: main
17func ei_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: main
18func ei_streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while a[i]!=(0 as u8){ if a[i]!=b[i]{return 0} i=i+1 } if b[i]!=(0 as u8){return 0} return 1 }
called by 1: main
19func ei_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ dst[off+i]=s[i]; i=i+1 } return off+i }
called by 2: ei_keymain
23func ei_next_segid(prefix: *u8) -> i64
called by 1: main calls 1: ss_manifest
29func ei_key(kbuf: *u8, id: *u8) -> i64
called by 1: main calls 1: ei_cat
37func ei_id_present(buf: *u8, n: i64, id: *u8, idlen: i64) -> i64
called by 1: main
51func main(argc: i64, argv: *i64) -> i64