code wiki / _hdl_build / nx_url_get.nx

nx_url_get.nx

buildroot/runtime/_hdl_build/nx_url_get.nx

3014 B67 linesdepth 22pulls 130 transitivereach 0 importersview sourcekind tooltopic url
docsdependenciesstructsconstsfunctions

about

nx_url_get.nx -- the sovereign FETCH-VERIFY CLI that was missing from the live-publish loop. A thin, reusable wrapper over nx_fetch_staged (validated TLS-1.3 HTTPS GET + redirect-follow + chunked decode, the same stack the researcher fetches with) so EVERY publish can prove itself: fetch the live URL back, report the byte count, and (optionally) confirm a content marker is present -- which is stronger than a bare 200, because it proves the LIVE bytes are OUR page, not an error/placeholder. Closes the verify leg of the emit -> push -> VERIFY loop (the "live as we work, no hand-waving" standard). usage: nx_url_get <https-url> [expected-substring-marker] prints: FETCH OK url=<u> bytes=<n> [+ VERIFIED marker present | WARN marker NOT found] exit: 0 ok (and marker present if given) / 1 fetch failed / 2 fetched but marker absent / 3 usage Sovereign: nx_fetch_unit (nx_https_get stack: our DNS + TLS-1.3 + X.509 trust) + nx_syscalls. No curl. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_fetch_unit.nx nx_syscalls.nx nx_url_get.nx

imports: nx_fetch_unit.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 sys_write sys_exit sys_mmap nx_fetch_staged trust_store_alloc sys_mmap ↻ nx_pem_trust_load_file sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_pem_trust_load nx_str_len _pem_find nx_str_len ↻ sys_mmap ↻ b64_decode b64_grab b64_dec_char x509_parse sys_mmap ↻ asn1_cursor_init asn1_expect_tag sys_mmap ↻ asn1_read_tlv_header asn1_read_length x509_read_tlv sys_mmap ↻ asn1_expect_tag ↻ x509_read_alg_id sys_mmap ↻ asn1_expect_tag ↻ trust_store_add sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real

structs

none

consts

none

functions

14func ug_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: ug_wug_find
15func ug_w(s: *u8) -> i64 { sys_write(1, s, ug_len(s)); return 0 }
called by 1: main calls 2: sys_writeug_len
16func ug_wn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
27func ug_find(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: ug_len
41func main(argc: i64, argv: *i64) -> i64