Skip to content

Latest commit

 

History

History
74 lines (49 loc) · 1.87 KB

README.md

File metadata and controls

74 lines (49 loc) · 1.87 KB

Reclaim Protocol with Nillion Starter

This project demonstrates the use of the Reclaim Protocol and Nillion to fetch data, generate zero-knowledge proofs (zkFetch), and securely store and retrieve those proofs.

Features

  • Fetches data from an external API (CoinGecko).
  • Generates zero-knowledge proofs using the Reclaim Protocol.
  • Stores proofs securely in Nillion's decentralized storage.
  • Retrieves stored proofs for further use or verification.

Prerequisites

  1. Reclaim Protocol Credentials:
  2. Nillion APP ID:

Environment Variables

Set the following variables in your .env file:

VITE_RECLAIM_APP_ID=<your-reclaim-app-id>
VITE_RECLAIM_APP_SECRET=<your-reclaim-app-secret>
VITE_NILLION_APP_ID=<your-nillion-app-id>

Getting Started

  1. Clone the Repository:
git clone https://github.com/reclaimprotocol/reclaim-nillion-starter
cd reclaim-nillion-starter
  1. Install Dependencies:
npm install
  1. Copy browser-rpc files to public dir:
npm run postinstall
  1. Run the Application:
npm run dev
  1. Access the Application: Open your browser and navigate to http://localhost:5173.

Functionality

1. Generate Proof

Click the "Generate Proof" button to:

  • Fetch data from CoinGecko's API.
  • Generate a zero-knowledge proof of the fetched data.
  • Store the proof on Nillion.

2. Retrieve Stored Proof

Click "Get your Stored Proof Data from Nillion" to:

  • Retrieve the stored proof data from Nillion.
  • Display the retrieved proof in a JSON .