Skip to content

Sadiq-Teslim/suiproof

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SuiProof: Zero-Storage Document Verification

Verify my document, but don't keep it.

Overview

SuiProof is a decentralized application (dApp) designed to solve the conflict between data verification and data privacy. It allows users to create an immutable proof of existence for any document on the Sui Blockchain without ever exposing the file contents or uploading it to a centralized server.

By leveraging Sui's object-centric architecture, SuiProof treats every verification record as a user-owned asset rather than a smart contract log. Users retain full custody of their data proofs, with the ability to manage, transfer, or revoke them.

The Problem

  • Loss of custody: Verifying a document typically means uploading it to a third party, creating a permanent copy outside the owner's control.
  • Privacy risks: Centralized storage introduces single points of failure and broad attack surfaces.
  • Indefinite persistence: Traditional blockchains store data forever, making it difficult to support limited-time attestations or "right to be forgotten" requirements.

The Solution

SuiProof implements a "hash-and-discard" architecture:

  • Local cryptography: Files are processed in the browser (or a stateless server function) to generate SHA-256 fingerprints, then immediately discarded.
  • On-chain ownership: Each hash is stored as a distinct Sui Object owned directly by the user's wallet.
  • Automated expiration: Using sui::clock, every proof carries an expiration timestamp and invalidates itself after expiry.

Technical Architecture

Frontend

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS v4
  • State: TanStack Query

Blockchain (Sui Move)

  • Network: Sui Testnet
  • Smart contract strategy:
    • Object-centric model via a DocumentProof struct with key and store abilities
    • Accurate timestamp validation using the Sui system clock object

Verification Flow

  1. Upload: User selects a document.
  2. Hash: The app generates a SHA-256 fingerprint locally.
  3. Sign: The user signs the transaction with Sui Wallet.
  4. Mint: A DocumentProof object with a time-to-live (TTL) is created on-chain.
  5. Verify: A third party re-uploads the file; the app hashes it and queries the Sui fullnode to confirm a matching, unexpired object ID.

Chain of Custody: Transferable Digital Title

SuiProof now goes beyond proving a document exists. Each DocumentProof is an owned Sui Object, so custody can move between wallets without wrapping it in an NFT or writing complex transfer code. Enable the transfer ability on the struct and the object behaves like any other asset.

User flow

  1. Mint: Alice uploads a car title or copyright. The proof shows "Current Owner: Alice" on the verification page.
  2. Transfer: Alice taps Transfer Proof, enters Bob's wallet address, and signs. The Sui Object literally moves from her wallet to Bob's.
  3. Verify again: Bob refreshes the verification page. Ownership now displays "Current Owner: Bob" with the full provenance history visible on-chain.

Why this matters

  • Turns data into assets: Documents become tradeable, transferrable rights (deeds, tickets, warranties) instead of static hashes.
  • Showcases Sui's object model: Ownership lives with the wallet, not inside a contract log—perfect for hackathon judges who want "Sui-native" ideas.
  • Solves "I have the file, but do I own it?": Anyone can confirm both authenticity and current holder in one place.

Other chains prove a document exists. SuiProof proves who owns it.

Smart Contract Deployment

  • Network: Sui Testnet
  • Package ID: 0xde8566572a488eb1cb87145ef1333e99981b711192d92cf9e84e85626bbcee47
  • Module: suiproof

Installation and Setup

Follow these steps to run the application locally.

Prerequisites

  • Node.js v18+
  • Sui Wallet browser extension

Steps

  1. Clone the repository

    git clone https://github.com/YOUR_USERNAME/suiproof.git
    cd suiproof
  2. Navigate to the frontend

    cd frontend
  3. Install dependencies

    npm install
  4. Configure environment (optional)

    The app defaults to the deployed Testnet contract. For a wallet-free mock mode, open app/page.tsx and set const MOCK_MODE = true.

  5. Run the development server

    npm run dev
  6. Access the app

    Visit http://localhost:3000 in your browser.

Future Roadmap

  • Zero-knowledge proofs: Integrate ZK-SNARKs for selective disclosure (e.g., "over 18" attestations).
  • Multi-signature support: Allow organizations to co-own proofs via Sui MultiSig wallets.
  • Mobile application: Deliver a React Native client for on-the-go verification.

License

This project is licensed under the MIT License.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors