code wiki / _hdl_build / nx_pub_reader_receipt.nx

nx_pub_reader_receipt.nx

buildroot/runtime/_hdl_build/nx_pub_reader_receipt.nx

6997 B105 linesdepth 10pulls 17 transitivereach 0 importersview sourcekind tooltopic pub
docsdependenciesstructsconstsfunctions

about

nx_pub_reader_receipt.nx -- get a SIGNED, VERIFIABLE DEPLOYMENT RECEIPT from the Nishi Publisher for the reader/shelf artifacts (operator 2026-06-21: "pass to the nishi publisher and get a receipt it deployed"). USES the publisher's existing S-class receipt system (nx_pub_receipt: Ed25519-signed, non-repudiable, DSN status, return-and-report) -- does NOT rebuild it. For each artifact the publisher already promoted to the reader liveroot, this: (1) re-hashes the LIVE bytes (sha256), (2) cross-checks that sha against the publisher's verify-then-promote LEDGER record, (3) rcpt_emit's a SIGNED "PUBLISHED" receipt keyed by content-sha+dest, (4) rcpt_query's it back (the return loop), (5) rcpt_verify_line checks the Ed25519 signature (non-repudiation). Durable signed receipts -> knowledge/publish/reader-receipts.tsv. expect_exit: 0 license_tier: ORIGINAL LEAN imports (operator: "keep going" -- the 926KB organ hit an nx_cc big-organ compile-fail; this needs only sha256 + a ledger read, NOT the whole publisher pipeline, so drop nx_publisher = much smaller asm, compiles):

dependencies 4 imports · 0 importers

nx_sha256.nx nx_pub_receipt.nx nx_ed25519_signature.nx nx_syscalls.nx nx_pub_reader_receipt.nx

imports: nx_sha256.nxnx_pub_receipt.nxnx_ed25519_signature.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main r_w sys_write sys_mmap ed25519_pub_from_priv sys_mmap ↻ ed25519_sha512 sys_mmap ↻ sha512_init sha512_update sha512_blk_set_byte blk_get_i64 blk_set_i64 sha512_compress sys_mmap ↻ blk_get_i64 ↻ sha512_gamma0 rotr64_v shr64_v sha512_gamma1 rotr64_v ↻ shr64_v ↻ sha512_sigma1 rotr64_v ↻ sha512_ch sha512_k sha512_sigma0 rotr64_v ↻ sha512_maj sha512_final sha512_blk_set_byte ↻ sha512_compress ↻ ge_p3_alloc sys_mmap ↻ fe_alloc nx_scratch nx_scratch_init sys_mmap ↻ nx_scratch_oom sys_write ↻

structs

none

consts

none

functions

16func r_w(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 3: r_nreceipt_formain calls 1: sys_write
17func r_n(v: i64) -> i64 { var m: i64=v; if m<0{r_w("-" as *u8);m=0-m} let t:*u8=sys_mmap(24); 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; let o:*u8=sys_mmap(24); while i<k{o[i]=t[k-1-i];i=i+1} sys_write(1,o,k); return 0 }
18func r_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
19func r_hexeq(a: *u8, b: *u8) -> i64 { var i: i64=0; while 1==1 { if a[i]!=b[i] {return 0} if a[i]==(0 as u8) {return 1} i=i+1 } return 1 }
called by 1: receipt_for
22func sha_hex(path: *u8, outhex: *u8) -> i64
32func ledger_sha(ledpath: *u8, dest: *u8, outsha: *u8) -> i64
57func receipt_for(rcptfile: *u8, priv: *u8, pub: *u8, ledger: *u8, dest: *u8, livepath: *u8, now: i64) -> i64
75func main() -> i64