WASM Playground
The dregg playground lets you experiment with tokens, proofs, and authorization directly in your browser using the WebAssembly build of the core crates.
What You Can Do
- Create cipherclerks and generate identities
- Mint and attenuate tokens interactively
- Generate STARK proofs and inspect their structure
- Verify proofs against different federation roots
- Experiment with privacy modes and see what the verifier learns
Building the WASM Package
# Build the WASM package from the workspace root
cargo build -p dregg-wasm --target wasm32-unknown-unknown --release
wasm-bindgen target/wasm32-unknown-unknown/release/dregg_wasm.wasm \
--out-dir site/pkg --target web
Extension Development
The browser extension uses the same WASM package for client-side cryptography.
See site/extension/ for the extension source.
The exported API surface is whatever #[wasm_bindgen] annotates
in wasm/src/lib.rs — generated .d.ts bindings
land next to the WASM blob in site/pkg/ after a build, so
consult the typed declarations rather than a hand-written wrapper. The
playground exercises the full API live; lift
patterns from site/playground/sections/* for an idiomatic
starting point.