Skip to main content
LuminAIR Web is a WebAssembly-based verifier that allows you to verify LuminAIR proofs directly in the browser. This package provides a high-performance, secure way to verify proofs without needing a backend server.

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 the verify 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

The LuminairUtils 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 throw LuminairVerificationError in case of verification failures:
It’s recommended to wrap verification calls in try-catch blocks to handle potential errors gracefully: