code wiki / (root) / nx_asset_prov_clock_cli_candidate_t346.nx

nx_asset_prov_clock_cli_candidate_t346.nx

buildroot/runtime/nx_asset_prov_clock_cli_candidate_t346.nx

4202 B76 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind tooltopic asset
docsdependenciesstructsconstsfunctions

about

nx_asset_prov.nx -- THE PER-ASSET PROVENANCE ROW, as a command (/compare/modding MD9, 2026-09-06). A thin caller of nx_asset_prov_lib so the command line and every export door prove the SAME verdict code. usage: nx_asset_prov row <file> <source_url> <licence_id> <origin> [jrnl=<path>] hash the file, append its row, print the verdict nx_asset_prov verdict <file> [jrnl=<path>] hash the file, print the verdict nx_asset_prov verdict-sha <sha256hex> [jrnl=<path>] the verdict for a known sha exits: 0 SHIP_OK | 2 usage | 3 REVIEW | 4 REFUSE (the reason is on the line) | 5 the file could not be read The journal defaults to knowledge/provenance/assets.jrnl; a gate passes its own. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_asset_prov_clock_candidate_t346 nx_asset_prov_clock_cli_candid

imports: nx_syscalls.nxnx_asset_prov_clock_candidate_t346.nx

imported by: nobody (leaf or entry point)

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

main ap2_usage pv_puts sys_write pv_len ap2_jrnl ap2_has_prefix sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ ap2_streq pv_hash_file sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close pv_hash_bytes sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_seed_allocated sha256_k

structs

none

consts

12const AP2_EXIT_USAGE: i64 = 2
13const AP2_EXIT_UNREADABLE: i64 = 5
14const AP2_JRNL_KEY: *u8 = "jrnl="
15const AP2_JRNL_KEY_LEN: i64 = 5

functions

17func ap2_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
18func ap2_has_prefix(s: *u8, p: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { if s[i] != p[i] { return 0 } i = i + 1 } return 1 }
called by 1: ap2_jrnl
19func ap2_usage() -> i64
called by 1: main calls 1: pv_puts
24func ap2_jrnl(argc: i64, argv: *i64) -> *u8
called by 1: main calls 1: ap2_has_prefix
33func main(argc: i64, argv: *i64) -> i64