nx_save_slot.nx
buildroot/runtime/nx_save_slot.nx
about
nx_save_slot.nx -- signed content-addressed game save format.
Composes nx_chromatin (snapshot mechanism) + nx_hash_facade (content
hash) + nx_sign_facade (signature). A save_slot holds player +
world chromatin pointers; verify roundtrip ensures the saved state
hasn't been tampered with between sessions.
Composes:
nx_chromatin -- snapshots are the substrate's canonical state-capture
nx_hash_facade -- content hash for the combined player+world bytes
nx_sign_facade -- signature over (hash + ts + save_id)
nx_vacuole -- saves can be stored in a vacuole
dependencies 5 imports · 2 importers
imports: nx_syscalls.nxnx_tier.nxnx_chromatin.nxnx_hash_facade.nxnx_sign_facade.nx
imported by: nx_game_runtime_compose_test.nxnx_save_slot_test.nx
structs
| 29 | struct NxSaveSlot |
consts
| 20 | const NX_SS_OK: nx_int = 0 |
| 21 | const NX_SS_ERR_BAD_INPUT: nx_int = 1 |
| 22 | const NX_SS_ERR_BAD_SIG: nx_int = 2 |
| 23 | const NX_SS_ERR_BAD_HASH: nx_int = 3 |
| 24 | const NX_SS_VALID: nx_int = 4 |
| 25 | const NX_SS_INVALID: nx_int = 5 |
functions
| 44 | func _hash_two_chromatins(player: *NxChromatin, world: *NxChromatin) -> nx_size |
| 57 | func nx_save_slot_create(save_id: nx_int, |
| 106 | func nx_save_slot_verify(s: *NxSaveSlot, |
| 135 | func nx_save_slot_id(s: *NxSaveSlot) -> nx_int |
| 139 | func nx_save_slot_captured_us(s: *NxSaveSlot) -> nx_size called by 1: main |
| 143 | func nx_save_slot_combined_hash(s: *NxSaveSlot) -> nx_size |