VerifyButton
, which provides a beautiful, interactive interface for verifying proofs.
Demo App
Installation
Setup
1. Import Styles
Import the component styles in your main CSS file or component:2. Configure Build System
Next.js Configuration
Create or update yournext.config.js
:
3. Tailwind CSS Setup (Recommended)
The component is built with Tailwind CSS. Add our components to your content paths:Basic Usage
Component API
VerifyButton Props
Prop | Type | Required | Description |
---|---|---|---|
proofPath | string | Yes | Path to the proof binary file |
settingsPath | string | Yes | Path to the settings binary file |
title | string | No | Custom title for the verification modal |
buttonText | string | No | Custom text for the verify button |
author | string | No | Name of the model/proof author |
modelDescription | string | No | Description of the AI model |
authorUrl | string | No | URL to the author’s website/profile |
className | string | No | Additional CSS classes for the button |
Advanced Usage
Custom Styling
The component can be customized using Tailwind classes or your own CSS:Multiple Instances
You can use multiple verification buttons for different models:Dark Mode Support
The component automatically supports dark mode when thedark
class is present on the HTML element:
File Requirements
Your proof and settings files must be accessible via HTTP. Place them in your public directory:Error Handling
The component handles common errors gracefully:- File not found errors
- CORS issues
- Invalid file formats
- Verification failures
Browser Support
- Chrome/Edge 88+
- Firefox 78+
- Safari 14+
- Requires WebAssembly support
Troubleshooting
Component Styling Issues
- Verify CSS import:
import '@gizatech/luminair-react/styles.css'
- Check Tailwind configuration
- Ensure CSS variables are properly defined
Verification Failures
- Check browser console for errors
- Verify file paths are correct
- Ensure files are valid LuminAIR proof files
- Check network requests in browser dev tools
Build Issues
- Verify build configuration (Next.js, webpack, etc.)
- Check WASM support is properly configured
- Ensure all dependencies are installed
- Try clearing build cache and node_modules