Installation
Usage
Before using any verification functions, you need to initialize the WASM module:Basic Verification
The simplest way to verify a proof is using theverify
function:
Advanced Usage
The package provides additional utilities and configuration options for more advanced use cases:API Reference
Main Functions
init()
Initializes the WASM module. Must be called before using any verification functions.
verify()
Verifies a LuminAIR proof from binary data.
test_wasm_module()
Tests if the WASM module is working correctly.
get_version()
Returns the version of the verifier.
Utility Functions
TheLuminairUtils
namespace provides several utility functions:
isValidProofBinary(proofBytes: Uint8Array): boolean
isValidSettingsBinary(settingsBytes: Uint8Array): boolean
getProofSize(proofBytes: Uint8Array): number
Types
VerificationResult
DetailedVerificationResult
VerificationOptions
VerifierConfig
Error Handling
The package may throwLuminairVerificationError
in case of verification failures: