code wiki / (root) / nx_cap_mint_gate.nx

nx_cap_mint_gate.nx

buildroot/runtime/nx_cap_mint_gate.nx

3117 B45 linesdepth 9pulls 12 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 capt_slen cm_mint cm_streq_n capt_issue capt_payload capt_catb capt_catn signed_cookie_sign sc_sign_bytes sys_mmap hmac_sha256 sys_mmap ↻ sha256_digest sha256_init sha256_update sha256_final b64_encode b64_enc_char mg_expect gw ↻ gn sys_write ↻ sys_mmap ↻ capt_verify capt_mac_ok sc_sign_bytes ↻ capt_allows gn ↻

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