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.
- 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.
- Reclaim Protocol Credentials:
- Obtain an
APP_ID
andAPP_SECRET
from the Reclaim Dashboard.
- Obtain an
- Nillion APP ID:
- Get Nillion APP ID for storing and retrieving data.
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>
- Clone the Repository:
git clone https://github.com/reclaimprotocol/reclaim-nillion-starter
cd reclaim-nillion-starter
- Install Dependencies:
npm install
- Copy browser-rpc files to public dir:
npm run postinstall
- Run the Application:
npm run dev
- Access the Application:
Open your browser and navigate to
http://localhost:5173
.
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.
Click "Get your Stored Proof Data from Nillion" to:
- Retrieve the stored proof data from Nillion.
- Display the retrieved proof in a JSON .