Skip to content

mbcse/lensmint-camera

Repository files navigation

📷 LensMint - Web3 Camera with Proof of Memory & ZK Verification

LensMint Logo License Blockchain ZK Proofs

A Web3 camera system that solves real problems for creators: prove photos are authentic (not AI-generated), create proof of attendance at events, preserve memories with verified blockchain records, and easily mint NFTs for others (attendees, people in photos).

GalleryFeaturesHow It WorksArchitectureInstallationHardware


📸 Gallery

🖼️ Logo

LensMint Logo

🔧 Hardware Components

Component 1 Component 2 Component 3
Component 4 Component 5 Component 6
Component 7

💻 Backend Screenshots

Backend Screenshot 1
Screenshot 1
Backend Screenshot 2
Screenshot 2
Backend Screenshot 3
Screenshot 3
Backend Screenshot 4
Screenshot 4
Backend Screenshot 5
Screenshot 5
Backend Screenshot 6
Screenshot 6
Backend Screenshot 7
Screenshot 7
Backend Screenshot 8
Screenshot 8
Backend Screenshot 9
Screenshot 9

📷 Physical Camera Final Images

Camera Image 1 Camera Image 2 Camera Image 3
Camera Image 4 Camera Image 5 Camera Image 6
Camera Image 7 Camera Image 8 Camera Image 9
Camera Image 10 Camera Image 11 Camera Image 12
Camera Image 13

🎯 Vision: Solving Real Problems for Creators

LensMint is a Web3 camera system that solves critical problems facing content creators, wildlife photographers, and event organizers. We provide cryptographic proof of authenticity, enable automatic monetization through tagging, create proof of attendance at events, preserve memories with verified blockchain records, and easily mint NFTs for others.

Core Innovation: Proof of Authenticity + Creator Monetization

Every photo captured solves real problems:

  • 🔍 Prove It's Real: Cryptographic proof images aren't AI-generated or manipulated
  • 💰 Tag for Payment: Tag people in images to automatically distribute royalties
  • 🎫 Proof of Attendance: Verify who was at events, easy minting for attendees
  • ⛓️ Blockchain-Verified: Smart contracts validate device identity and image integrity
  • 💾 Permanent Ownership: Filecoin storage ensures content lasts forever
  • 🎨 Auto-Monetization: Automatic NFT creation enables direct creator payments

💡 Our Solution: Proof of Authenticity + Creator Monetization

LensMint solves these real problems with blockchain technology:

🔐 Proof of Authenticity

  • Zero-Knowledge Proofs (vlayer): Generate cryptographic proofs that images are real, not AI-generated or manipulated
  • Hardware-Based Identity: Each camera has unique cryptographic identity - proves which device captured the image
  • RISC Zero Verification: On-chain verification of authenticity proofs using RISC Zero verifier contracts
  • Immutable Timestamps: Blockchain timestamps prove exactly when images were captured
  • Device Metadata: Cryptographic proof of camera model, location, and capture conditions

💰 Creator Monetization & Tagging

  • Automatic NFT Minting: Every photo becomes an NFT - creators own their content
  • Tag-Based Payments: Tag people in images to automatically distribute royalties
  • Direct Payments: Receive payments directly via smart contracts, no middlemen
  • Usage Tracking: Blockchain tracks every use of your images for automatic royalty distribution
  • Revenue Sharing: Smart contracts automatically split payments between tagged creators

🎫 Proof of Attendance & Memory

  • Proof of Attendance: Verify who was present at events using blockchain verification
  • Proof of Memory: Cryptographic proof that important moments were captured
  • Easy Minting for Others: Mint NFTs for event attendees or people in photos with QR codes
  • Verified Presence: On-chain verification of attendance at events
  • Memory Preservation: Permanent blockchain records of important moments

💾 Permanent Storage & Ownership

  • Filecoin Storage: Images stored permanently on decentralized network
  • True Ownership: NFTs prove you own the original content
  • No Platform Lock-in: Your content lives on blockchain, not platforms
  • Censorship-Resistant: No one can delete your content from Filecoin

✨ Features

📸 Camera Features

  • Live Preview: Real-time camera feed with 30 FPS preview
  • High-Quality Capture: 1920x1080 photo resolution with rotation support
  • Video Recording: H.264 video recording with configurable duration
  • Digital Zoom: 1x to 4x zoom with smooth controls
  • Gallery View: Browse captured photos and videos with thumbnail grid
  • Touch-Optimized UI: Designed for 3.5" touchscreen displays

🔐 Security & Identity

  • Hardware Identity: Unique cryptographic key derived from device hardware
  • Image Signing: Every photo is cryptographically signed with device key
  • Device Registration: On-chain device registry ensures only authorized cameras can mint
  • Camera ID: Unique camera hardware identifier for provenance tracking

🌐 Web3 & Blockchain Features

  • Zero-Knowledge Proofs: Generate ZK proofs using vlayer from external metadata APIs
  • RISC Zero Verification: On-chain ZK proof verification via RISC Zero verifier contracts
  • Automatic NFT Minting: ERC-1155 tokens auto-minted with device-signed metadata
  • Filecoin Persistent Storage: Permanent decentralized storage on Filecoin network
  • Proof of Memory: Cryptographic proof that memories were captured by verified devices
  • Blockchain Verification: Smart contracts verify device authenticity and image integrity
  • Claim-Based Distribution: QR code system for seamless NFT claiming
  • On-Chain Provenance: Complete immutable history tracked on blockchain

🎨 User Experience

  • Battery Monitoring: Real-time battery level display
  • Status Indicators: Visual feedback for upload, minting, and claim status
  • Offline Support: Queue system for offline captures
  • Auto-Start: Kiosk mode launches automatically on boot
  • Gallery Management: View, delete, and manage captured media

🔄 How It Works

1. Photo Capture Flow

┌─────────────┐
│    User     │
└──────┬──────┘
       │ Press Photo Button
       ▼
┌──────────────────┐
│   Camera App     │
│  (hardware-camera │
│      -app)       │
└──────┬───────────┘
       │ 1. Capture Image
       │ 2. Sign with Hardware Key
       │ 3. POST /api/images/upload
       ▼
┌──────────────────────────┐
│ Hardware Web3 Service    │
│ (hardware-web3-service)  │
└──────┬───────────────────┘
       │ Upload Image
       ▼
┌─────────────┐
│  Filecoin   │
└──────┬──────┘
       │ Return Image CID
       ▼
┌──────────────────────────┐
│ Hardware Web3 Service    │
└──────┬───────────────────┘
       │ Upload Metadata
       ▼
┌─────────────┐
│  Filecoin   │
└──────┬──────┘
       │ Return Metadata CID
       ▼
┌──────────────────────────┐
│ Hardware Web3 Service    │
└──────┬───────────────────┘
       │ Create Claim
       ▼
┌──────────────────────────┐
│  LensMint Public Server │
│ (lensmint-public-server) │
└──────┬───────────────────┘
       │ Return QR Code URL
       ▼
┌──────────────────┐
│   Camera App     │
└──────┬───────────┘
       │ Display QR Code
       ▼
┌─────────────┐
│    User     │
└──────┬──────┘
       │ Scan QR & Enter Wallet
       ▼
┌──────────────────────────┐
│  LensMint Public Server │
└──────┬───────────────────┘
       │ Store Address
       │ (Camera App polls)
       │ Return Address
       ▼
┌──────────────────┐
│   Camera App     │
└──────┬───────────┘
       │ Trigger Minting
       ▼
┌──────────────────────────┐
│ Hardware Web3 Service    │
└──────┬───────────────────┘
       │ Mint NFT (device → user)
       ▼
┌─────────────┐
│  Blockchain │
└──────┬──────┘
       │ Return Token ID
       ▼
┌──────────────────────────┐
│ Hardware Web3 Service    │
└──────┬───────────────────┘
       │ Mark Complete
       ▼
┌──────────────────────────┐
│  LensMint Public Server │
└──────┬───────────────────┘
       │
       ▼
┌──────────────────┐
│   Camera App     │
│   Show Success   │
└──────────────────┘

2. Device Registration Flow

┌─────────────────────────────┐
│   Raspberry Pi Device      │
│  (hardware-camera-app)      │
└────────────┬────────────────┘
             │
             │ 1. Generate Hardware Identity
             │ 2. Extract Camera ID
             │ 3. POST /api/device/ensure-registered
             ▼
┌──────────────────────────────┐
│ Hardware Web3 Service        │
│ (hardware-web3-service)      │
└────────────┬─────────────────┘
             │ Check Registration Status
             ▼
┌──────────────────────────────┐
│      Blockchain              │
│  (DeviceRegistry Contract)   │
└────────────┬─────────────────┘
             │
    ┌────────┴────────┐
    │                 │
    ▼                 ▼
┌─────────┐    ┌──────────────┐
│ Not     │    │ Not          │
│Registered│   │ Activated    │
└────┬────┘    └──────┬───────┘
     │                │
     │ Register       │ Activate
     │ Device         │ Device
     ▼                ▼
┌──────────────────────────────┐
│      Blockchain              │
│  Returns: Registration TX    │
│  Returns: Activation TX      │
└────────────┬─────────────────┘
             │ Registration Complete
             ▼
┌──────────────────────────────┐
│ Hardware Web3 Service        │
└────────────┬─────────────────┘
             │ Success Response
             ▼
┌─────────────────────────────┐
│   Raspberry Pi Device       │
│   Device Ready!             │
└─────────────────────────────┘

3. Claim-Based Minting Flow

┌─────────────────┐
│ Photo Captured  │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Upload to       │
│ Filecoin        │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Get Image CID   │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Create Claim    │
│ (Public Server) │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Generate QR     │
│ Code            │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Display QR on   │
│ Screen          │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ User Scans QR   │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ User Enters     │
│ Wallet Address  │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Public Server   │
│ Stores Address  │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Camera App      │
│ Polls for       │
│ Address         │
└────────┬────────┘
         │
         ▼
    ┌─────────┐
    │ Address │
    │Received?│
    └────┬────┘
         │
    ┌────┴────┐
    │         │
    │ No      │ Yes
    │         │
    ▼         ▼
┌──────┐  ┌──────────────────────┐
│ Poll │  │ Hardware Web3 Service│
│Again │  │ Mints NFT            │
└──┬───┘  └──────────┬─────────────┘
   │                 │
   └────────┬────────┘
            │
            ▼
    ┌───────────────┐
    │ Device → User │
    │ Transfer      │
    └───────┬───────┘
            │
            ▼
    ┌───────────────┐
    │ Update Status │
    └───────┬───────┘
            │
            ▼
    ┌───────────────┐
    │ Show Success  │
    └───────────────┘

🏗️ Technical Architecture

System Overview

┌─────────────────────────────────────────────────────────────┐
│                    Raspberry Pi 4                          │
│                                                             │
│  ┌──────────────────┐    ┌──────────────────┐            │
│  │ Hardware Camera  │    │ Hardware Identity│            │
│  │ App              │◄───│ Cryptographic    │            │
│  │ Python/Kivy      │    │ Keys             │            │
│  └────────┬─────────┘    └──────────────────┘            │
│           │                                                │
│           │ Capture    ┌──────────────────┐               │
│           ├───────────►│ Camera Module    │               │
│           │            │ Picamera2       │               │
│           │            └──────────────────┘               │
│           │                                                │
│           │ Display    ┌──────────────────┐               │
│           └───────────►│ Touchscreen      │               │
│                        │ Display 3.5"    │               │
│                        └──────────────────┘               │
└───────────┼───────────────────────────────────────────────┘
            │
            │ HTTP API
            ▼
┌─────────────────────────────────────────────────────────────┐
│              Hardware Web3 Service                         │
│              (hardware-web3-service)                        │
│                                                             │
│  ┌──────────────────┐    ┌──────────────────┐            │
│  │ Hardware Web3    │    │ Filecoin Service │            │
│  │ Service          │───►│ Synapse SDK      │            │
│  │ Node.js/Express  │    └────────┬──────────┘            │
│  └────────┬─────────┘            │                        │
│           │                       │                        │
│           │ Mint NFTs   ┌─────────▼──────────┐            │
│           ├────────────►│ Web3 Service      │            │
│           │             │ Ethers.js         │            │
│           │             └─────────┬──────────┘            │
│           │                       │                        │
│           │ Store Data  ┌─────────▼──────────┐            │
│           ├────────────►│ Database Service   │            │
│           │             │ SQLite            │            │
│           │             └───────────────────┘            │
│           │                                                │
│           │ Create Claims                                 │
│           └───────────────────┐                          │
└───────────────────────────────┼───────────────────────────┘
                                │
                                ▼
┌─────────────────────────────────────────────────────────────┐
│                  External Services                          │
│                                                             │
│  ┌──────────────────────┐    ┌──────────────────────┐   │
│  │ LensMint Public      │    │ Filecoin Network     │   │
│  │ Server               │    │ Decentralized       │   │
│  │ (lensmint-public-    │    │ Storage              │   │
│  │  server)             │    └──────────────────────┘   │
│  │ Node.js              │                                │
│  └──────────┬───────────┘                                │
│             │                                              │
│             │ QR Codes                                     │
│             └──────────────┐                              │
│                            │                              │
│  ┌─────────────────────────▼──────────┐                 │
│  │ Ethereum Sepolia                   │                 │
│  │ Smart Contracts                    │                 │
│  │ - DeviceRegistry                   │                 │
│  │ - LensMintERC1155                   │                 │
│  │ - LensMintVerifier                 │                 │
│  └─────────────────────────────────────┘                 │
└─────────────────────────────────────────────────────────────┘

Component Architecture

┌─────────────────────────────────────────────────────────────┐
│                    Frontend Layer                           │
│                                                             │
│  ┌──────────────────┐  ┌──────────────┐  ┌──────────────┐ │
│  │ Hardware Camera  │  │ Gallery View │  │ QR Code     │ │
│  │ App              │  │              │  │ Display     │ │
│  └────────┬─────────┘  └──────┬───────┘  └──────┬───────┘ │
│           │                    │                  │         │
└───────────┼────────────────────┼──────────────────┼─────────┘
            │                    │                  │
            ▼                    ▼                  ▼
┌─────────────────────────────────────────────────────────────┐
│                      API Layer                               │
│                                                             │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐     │
│  │ Image Upload │  │ Device       │  │ Claim        │     │
│  │ API          │  │ Registration │  │ Management   │     │
│  └──────┬───────┘  │ API          │  │ API          │     │
│         │          └──────┬───────┘  └──────┬───────┘     │
│         │                 │                 │             │
│         │                 │          ┌───────▼───────┐     │
│         │                 │          │ Status API  │     │
│         │                 │          └──────────────┘     │
└─────────┼─────────────────┼───────────────────────────────┘
          │                 │
          ▼                 ▼
┌─────────────────────────────────────────────────────────────┐
│                    Service Layer                            │
│                                                             │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐     │
│  │ Filecoin     │  │ Web3 Service │  │ Database     │     │
│  │ Service      │  │              │  │ Service      │     │
│  └──────┬───────┘  └──────┬───────┘  └──────┬───────┘     │
│         │                 │                 │             │
│         │          ┌───────▼───────┐         │             │
│         │          │ Claim Client  │         │             │
│         │          └───────────────┘         │             │
└─────────┼─────────────────┼─────────────────┼─────────────┘
          │                 │                 │
          ▼                 ▼                 ▼
┌─────────────────────────────────────────────────────────────┐
│                    Storage Layer                            │
│                                                             │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐     │
│  │ Filecoin     │  │ SQLite       │  │ Local File   │     │
│  │ Network      │  │ Database     │  │ System       │     │
│  └──────────────┘  └──────────────┘  └──────────────┘     │
└─────────────────────────────────────────────────────────────┘
          │
          │
          ▼
┌─────────────────────────────────────────────────────────────┐
│                  Blockchain Layer                           │
│                                                             │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐     │
│  │ DeviceRegistry│  │ LensMint    │  │ LensMint     │     │
│  │ Contract      │  │ ERC1155     │  │ Verifier     │     │
│  │               │  │ Contract    │  │ Contract     │     │
│  └──────────────┘  └──────────────┘  └──────────────┘     │
└─────────────────────────────────────────────────────────────┘

Data Flow

┌─────────────────┐
│ Photo Captured  │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Sign with       │
│ Hardware Key    │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Compute SHA256  │
│ Hash            │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Upload to       │
│ Hardware Web3   │
│ Service         │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Upload to       │
│ Filecoin        │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Get Image CID   │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Create Metadata │
│ JSON            │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Upload Metadata │
│ to Filecoin     │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Get Metadata    │
│ CID             │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Create Claim    │
│ Record          │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Generate QR     │
│ Code            │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Display QR on   │
│ Screen           │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Wait for User   │
│ Claim           │
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│ Poll Public     │
│ Server          │
└────────┬────────┘
         │
         ▼
    ┌─────────┐
    │ Address │
    │Available│
    └────┬────┘
         │
    ┌────┴────┐
    │         │
    │ No      │ Yes
    │         │
    ▼         ▼
┌──────┐  ┌─────────────────┐
│ Poll │  │ Mint NFT on     │
│Again │  │ Blockchain      │
└──┬───┘  └────────┬─────────┘
   │               │
   └───────┬───────┘
           │
           ▼
   ┌───────────────┐
   │ Transfer to   │
   │ User Wallet   │
   └───────┬───────┘
           │
           ▼
   ┌───────────────┐
   │ Mark Claim    │
   │ Complete      │
   └───────┬───────┘
           │
           ▼
   ┌───────────────┐
   │     Done      │
   └───────────────┘

🚀 Installation

Prerequisites

  • Raspberry Pi 4 (2GB+ RAM recommended)
  • Raspberry Pi OS (Bullseye or later)
  • Camera Module (v1/v2/v3 or USB camera)
  • 3.5" Touchscreen Display
  • MicroSD Card (16GB+)
  • Internet connection

Step 1: Clone Repository

cd ~
git clone <repository-url> lensmint
cd lensmint

Step 2: Install System Dependencies

# Update system
sudo apt update && sudo apt upgrade -y

# Install Node.js 18+
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs

# Install Python dependencies
sudo apt install -y python3-pip python3-venv python3-dev

# Install camera dependencies
sudo apt install -y picamera2 python3-picamera2

# Install Kivy dependencies
sudo apt install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev \
    libsdl2-ttf-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev \
    zlib1g-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev

# Install build tools
sudo apt install -y build-essential cmake git

Step 3: Install Python Dependencies

cd hardware-camera-app
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
pip install kivy[base] pillow numpy opencv-python requests qrcode[pil]

Step 4: Install Hardware Web3 Service Dependencies

cd ../hardware-web3-service
npm install

Step 5: Install Public Server Dependencies

cd ../lensmint-public-server
npm install

Step 6: Configure Environment Variables

Create .env files in hardware-web3-service and lensmint-public-server directories with your configuration settings.

For Privy Integration (Owner Portal):

  • Add to hardware-web3-service/.env:
    PRIVY_APP_ID=your-privy-app-id
    PRIVY_APP_SECRET=your-privy-app-secret
    
  • Add to owner-portal/.env:
    VITE_PRIVY_APP_ID=your-privy-app-id
    VITE_BACKEND_URL=http://localhost:5000
    

Step 7: Initialize Hardware Identity

cd hardware-camera-app
python3 hardware_identity.py

Step 8: Start Services

sudo npm install -g pm2

cd hardware-web3-service
pm2 start server.js --name lensmint-hardware-web3-service

cd ../lensmint-public-server
pm2 start server.js --name lensmint-public-server

pm2 save
pm2 startup

Step 9: Start Camera App

cd hardware-camera-app
source venv/bin/activate
python3 raspberry_pi_camera_app.py

Step 10: Start Owner Portal (Optional)

For owner wallet management with Privy integration:

cd owner-portal
npm install
npm run dev

The owner portal will be available at http://localhost:3000. This allows the owner to:

  • Login with Privy (wallet, email, or SMS)
  • Setup session signers for backend transaction signing
  • Mint NFTs with automatic gas sponsorship

See PRIVY_SETUP.md for detailed Privy configuration.

Step 11: Setup Auto-Start (Optional)

Create a systemd service or add to autostart:

# Create service file
sudo nano /etc/systemd/system/lensmint.service
[Unit]
Description=LensMint Camera App
After=network.target

[Service]
Type=simple
User=pi
WorkingDirectory=/home/pi/lensmint/hardware-camera-app
Environment="PATH=/home/pi/lensmint/hardware-camera-app/venv/bin:/usr/local/bin:/usr/bin:/bin"
ExecStart=/home/pi/lensmint/hardware-camera-app/venv/bin/python3 /home/pi/lensmint/hardware-camera-app/raspberry_pi_camera_app.py
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

Enable and start:

sudo systemctl enable lensmint.service
sudo systemctl start lensmint.service

💻 Hardware Requirements

Minimum Requirements

Component Specification
Raspberry Pi Raspberry Pi 4 Model B (2GB+ RAM)
Camera Raspberry Pi Camera Module v1/v2/v3 or USB camera
Display 3.5" Touchscreen Display (320x240 or higher)
Storage MicroSD Card (16GB+, Class 10)
Power 5V 3A USB-C Power Supply
Network WiFi or Ethernet connection

Recommended Setup

Component Recommendation
Raspberry Pi Raspberry Pi 4 Model B (4GB RAM)
Camera Raspberry Pi Camera Module v3
Display Waveshare 3.5" HDMI LCD Touchscreen
Storage MicroSD Card (32GB+, Class 10, A1)
Power UPS HAT for battery backup
Cooling Heat sinks and fan for extended use

Optional Components

  • UPS HAT: For battery-powered operation
  • GPS Module: For location metadata
  • External Storage: USB drive for additional storage
  • Case: Protective case for outdoor use

Hardware Setup Diagram

┌─────────────────────────────────────────────────────────────┐
│                    Raspberry Pi 4                           │
│                                                             │
│  ┌─────────────────────────────────────────────────────┐  │
│  │                  Main Board                         │  │
│  │                                                      │  │
│  │  ┌──────────┐  ┌──────────┐  ┌──────────┐          │  │
│  │  │ GPIO     │  │ USB      │  │ HDMI    │          │  │
│  │  │ Pins     │  │ Ports    │  │ Port    │          │  │
│  │  └────┬─────┘  └──────────┘  └────┬─────┘          │  │
│  │       │                           │                 │  │
│  │  ┌────▼───────────────────────────▼─────┐          │  │
│  │  │ Camera Connector                     │          │  │
│  │  └──────────────────────────────────────┘          │  │
│  │                                                      │  │
│  │  ┌──────────────────────────────────────┐          │  │
│  │  │ SD Card Slot                         │          │  │
│  │  └──────────────────────────────────────┘          │  │
│  └─────────────────────────────────────────────────────┘  │
└───────────┬───────────┬───────────┬───────────┬───────────┘
            │           │           │           │
            │           │           │           │ Ribbon Cable
            │           │           │           │
            │           │           │           ▼
            │           │           │    ┌──────────────┐
            │           │           │    │ Camera       │
            │           │           │    │ Module       │
            │           │           │    │ (v1/v2/v3)   │
            │           │           │    └──────────────┘
            │           │           │
            │           │           │ HDMI + USB
            │           │           │
            │           │           ▼
            │           │    ┌──────────────┐
            │           │    │ Touchscreen │
            │           │    │ Display     │
            │           │    │ 3.5"        │
            │           │    └──────────────┘
            │           │
            │           │ GPIO
            │           │
            │           ▼
            │    ┌──────────────┐
            │    │ UPS HAT      │
            │    │ (Optional)   │
            │    └──────────────┘
            │
            │ SD Card
            │
            ▼
    ┌──────────────┐
    │ MicroSD Card │
    │ (16GB+)      │
    └──────────────┘

            │
            │ Power
            ▼
┌──────────────────┐
│ 5V 3A Power      │
│ Supply           │
└──────────────────┘

🎯 Real-World Use Cases

1. Wildlife Photography & Media

Problem: Need to prove wildlife photos are authentic, not staged or AI-generated Solution:

  • Cryptographic proof of capture device and timestamp
  • ZK proofs verify authenticity without exposing location data
  • NFTs enable direct monetization from media outlets
  • Permanent storage ensures photos can't be lost

Example: National Geographic photographer captures rare wildlife - media outlets can verify authenticity before purchasing, photographer gets paid directly via NFT sales

2. Content Creator Monetization

Problem: Creators lose 30-50% to platforms, can't track usage, hard to get paid Solution:

  • Automatic NFT minting gives creators ownership
  • Tag people in images for automatic revenue sharing
  • Smart contracts track usage and distribute payments
  • Direct payments, no middlemen

Example: Photographer tags models in fashion shoot - when image is used commercially, smart contract automatically splits payment between photographer and models

3. News & Journalism

Problem: Can't prove photos are real vs. AI-generated deepfakes Solution:

  • Hardware-based proof of capture device
  • ZK proofs verify authenticity without exposing sources
  • Blockchain timestamps prove when events occurred
  • Immutable record prevents manipulation

Example: Journalist captures breaking news - blockchain proof verifies it's real, not AI-generated, protecting journalism integrity

4. Proof of Attendance at Events

Problem: Can't prove who was actually at events, hard to mint NFTs for attendees Solution:

  • Proof of attendance via blockchain verification
  • Easy minting for event attendees
  • Verified presence records
  • QR code system for claiming attendance NFTs

Example: Conference organizer captures group photo - attendees scan QR code to claim their proof of attendance NFT, permanently recorded on blockchain

5. Memory Preservation & Minting

Problem: Important moments aren't permanently recorded, hard to mint NFTs for others Solution:

  • Proof of memory for captured moments
  • Easy minting for people in photos
  • Permanent blockchain records
  • Verified memory preservation

Example: Wedding photographer captures moments - guests can easily claim their memory NFTs, creating permanent proof of attendance and shared memories

6. Scientific Documentation

Problem: Need tamper-proof proof of research documentation Solution:

  • Cryptographic proof of capture device and conditions
  • Immutable timestamps prove when research occurred
  • Permanent storage ensures data can't be lost
  • On-chain provenance for peer review

Example: Field researcher documents rare species - blockchain proof verifies authenticity for scientific publication


🔧 Technical Stack

Frontend (Hardware Camera App)

  • Python 3.9+: Core language
  • Kivy 2.1+: UI framework
  • Picamera2: Camera interface
  • NumPy/OpenCV: Image processing
  • Requests: HTTP client

Hardware Web3 Service

  • Node.js 18+: Runtime
  • Express.js: Web framework
  • Ethers.js: Blockchain interaction
  • SQLite: Database
  • Multer: File upload handling

Blockchain

  • Ethereum Sepolia: Testnet
  • Solidity: Smart contracts
  • Foundry: Development framework
  • OpenZeppelin: Contract libraries

Storage

  • Filecoin: Decentralized storage
  • Synapse SDK: Filecoin integration
  • IPFS: Content addressing

📊 Smart Contracts

DeviceRegistry.sol

  • Registers authorized camera devices
  • Stores device metadata (address, camera ID, model)
  • Manages device activation status

LensMintERC1155.sol

  • ERC-1155 NFT contract for multi-token standard
  • Device-only minting for originals
  • Public minting for editions
  • Transfer functionality

LensMintVerifier.sol

  • Zero-Knowledge Proof Verification: RISC Zero verifier for ZK proof validation
  • Device Authenticity: Verifies device identity from ZK proof data
  • Image Hash Verification: Validates image integrity from external metadata
  • On-Chain Proof Validation: Trustless verification of vlayer-generated proofs

🔐 Security Features

  • Hardware-based Keys: Cryptographic keys derived from device hardware
  • Image Signing: Every photo is cryptographically signed
  • On-Chain Verification: Smart contracts verify device authenticity
  • Private Key Protection: Keys stored securely, never exposed
  • Tamper-Proof Metadata: Immutable metadata on blockchain

📈 Performance

  • Photo Capture: < 2 seconds
  • Filecoin Upload: 5-15 seconds (depends on network)
  • NFT Minting: 10-30 seconds (depends on gas)
  • QR Code Generation: < 1 second
  • Memory Usage: ~300-400MB total

🙏 Acknowledgments

Built with:


Made with ❤️ for the Web3 community

⬆ Back to Top

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors