Feature 06 — WASM + API Modes
Two ways to prove.
One verified truth.
Different campaigns have different requirements. A financial services client needs proof generation to never leave the user's device. An e-commerce client needs the fastest possible verification at scale. HashVex supports both — with the same backend, the same dashboard, the same trust model.
Mode 01 — API
Server-Side Proof
The proof is generated on HashVex's backend. The browser sends the conversion data, the server generates the ZK proof, verifies it, and records the result. Fast, lightweight, works on any device.
Proof time: ~30 seconds server-side
Browser payload: minimal JSON
Best for: high-volume campaigns, e-commerce
Privacy: data sent to server for proving
Mode 02 — WASM
Browser-Side Proof
The Halo 2 ZK circuit runs directly in the user's browser via WebAssembly. The proof is generated locally and never transmitted. Only the proof itself — not the input data — is sent for verification.
Proof time: ~30 seconds in browser
WASM bundle: ~10MB (cached after first load)
Best for: financial services, healthcare, legal
Privacy: input data never leaves the device
Mode comparison
Input data leaves browser
Yes
Never
Proof generation location
Server
Browser
Browser bundle size
Minimal
~10MB WASM
Works on low-end devices
Yes
Slower
Verification endpoint
Same
Same
Dashboard output
Identical
Identical
Same output. Different path.
Regardless of which mode is used, the output is identical — a verified conversion record in your dashboard with a cryptographic nullifier, campaign attribution, and timestamp. Your clients don't need to choose between speed and privacy. They choose based on their compliance requirements, and both choices produce the same ground truth.
// Both modes produce the same result:
{
"success": true,
"verified": true,
"nullifier_hex": "df0a52bd2fd647b3...",
"campaign_id": 1001,
"timestamp": "2026-05-03T15:24:06.059Z"
}
Your rules.
Your proof.
Switch modes with a single config line. No code changes, no new infrastructure, no re-integration. The same snippet that works in API mode works in WASM mode — it's one parameter change.