Expand description
§QSSM Core — Proving Engine
The canonical Rust + WASM package for the QSSM truth engine.
Re-exports the 5 façade functions from qssm-api and provides
#[wasm_bindgen] bindings so browsers and JS runtimes can call them.
§Rust usage
use qssm_core::{compile, commit, prove, verify, open};
let blueprint = compile("age-gate-21").unwrap();
let commitment = commit(b"my-secret", &[1u8; 32]);
let claim = br#"{"claim":{"age_years":25}}"#;
let proof = prove(claim, &[1u8; 32], &blueprint).unwrap();
assert!(verify(&proof, &blueprint));
assert_eq!(open(b"my-secret", &[1u8; 32]), commitment);Functions§
- commit
- The Envelope. Locks a secret without revealing it.
- compile
- The Blueprint. Resolves a built-in template ID or raw template JSON and harvests entropy to produce an opaque byte-array blueprint.
- open
- The Simple Reveal. Reconstructs the commitment from
(secret, salt). - prove
- The Proof Generator. Creates a ZK proof (byte array) that the secret satisfies the blueprint’s rules.
- verify
- The Truth Checker. Validates a proof byte array against a blueprint.