code wiki / _hdl_build / nx_estate_inventory.nx
nx_estate_inventory.nx
buildroot/runtime/_hdl_build/nx_estate_inventory.nx
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
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
structs
| none |
consts
| 12 | const K_MAGIC_8192: i64 = 8192 |
| 13 | const K_MAGIC_65536: i64 = 65536 |
functions
| 15 | func 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 |
| 16 | func 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 |
| 17 | func ei_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: main |
| 18 | func 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 |
| 19 | func 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 } |
| 23 | func ei_next_segid(prefix: *u8) -> i64 |
| 29 | func ei_key(kbuf: *u8, id: *u8) -> i64 |
| 37 | func ei_id_present(buf: *u8, n: i64, id: *u8, idlen: i64) -> i64 called by 1: main |
| 51 | func main(argc: i64, argv: *i64) -> i64 |