code wiki / (root) / nx_cap_mint_gate.nx

nx_cap_mint_gate.nx

buildroot/runtime/nx_cap_mint_gate.nx

3125 B45 linesdepth 9pulls 13 transitivereach 0 importersview sourcekind gate/prooftopic cap
docsdependenciesstructsconstsfunctions

about

nx_cap_mint_gate.nx -- proves the root minter cm_mint (a) issues a capability that grants exactly the listed tools and DENIES others (least authority carried through the mint), (b) supports "*" (grant-all), and -- the hardening added 2026-07-07 -- (c) FAILS CLOSED when handed the forgeable baked placeholder secret, so a production token can never be signed with a secret that is public in the source. Mirrors nx_cap_token_gate; drives the pure core in-process with a real (non-placeholder) test key. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_cap_mint.nx nx_gate.nx nx_cap_mint_gate.nx

imports: nx_cap_mint.nxnx_gate.nx

imported by: nobody (leaf or entry point)

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

main gw sys_write cm_mint cm_streq_n capt_issue capt_issue_capacity capt_decimal_bytes capt_issue_workspace_bytes capt_issue_capacity ↻ sc_sign_workspace_bytes sc_sign_prefix_bytes hmac_sha256_workspace_byte sha256_workspace_bytes capt_issue_workspace capt_issue_capacity ↻ capt_issue_workspace_bytes ↻ capt_payload capt_catb capt_catn signed_cookie_sign_workspa sc_workspace_valid sc_sign_workspace_bytes ↻ sc_sign_bytes_workspace sc_workspace_valid ↻ sc_sign_prefix_bytes ↻ hmac_sha256_workspace b64_encode mg_expect gw ↻ gn sys_write ↻ sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give

structs

none

consts

none

functions

9func mg_expect(actual: i64, expected: i64, pass: *i64, tot: *i64, label: *u8) -> i64
called by 1: main calls 2: gwgn
16func main() -> i64