@ethproofs/zkdtvm-wasm-stark-verifier
v0.1.3
Published
WebAssembly bindings for the zkDTVM STARK verifier - verify STARK proofs in browsers and Node.js
Maintainers
Readme
zkDTVM Wasm Stark Verifier
WebAssembly bindings for the zkDTVM STARK verifier.
Overview
This module provides WebAssembly bindings for the zkDTVM STARK verifier, enabling proof verification to run directly in both web browsers and Node.js environments.
Usage
Installation
npm install @ethproofs/zkdtvm-wasm-stark-verifierReact Integration
import init, { main, verify_stark } from '@ethproofs/zkdtvm-wasm-stark-verifier';
await init(); // Initialize WASM (if needed)
main(); // Initialize panic hook
// Verify a proof
const isValid = verify_stark(proofBytes, vkBytes);Node.js Usage
const { main, verify_stark } = require('@ethproofs/zkdtvm-wasm-stark-verifier');
// The Node.js version initializes automatically
main(); // Initialize panic hook
const result = verify_stark(proofBytes, vkBytes);Testing
Node.js Example
npm run test:nodeThis runs the Node.js example that loads proof and verification key files from the filesystem and verifies them.
Browser Example
npm testThis starts a local HTTP server with a browser example that demonstrates:
- Loading the WASM module in a browser environment
- File upload interface for proof and verification key files
- Interactive STARK proof verification
- Performance metrics and detailed logging
- Error handling and user feedback
Note: The browser example requires files to be served over HTTP due to WASM CORS restrictions. The included server script handles this automatically.
