Skip to content

reclaimprotocol/zkfetch-nestjs-example

zkfetch - nest js - starter repo

This NestJS application integrates with the Reclaim Protocol (zkFetch) to generate zero-knowledge proofs for coingecko api

Prerequisites

  1. Node.js and npm installed
  2. A Reclaim Protocol account (get your credentials from https://dev.reclaimprotocol.org/)

Setup Instructions

1. Install Dependencies

Run the following commands to install dependencies and download circuits:

npm install
npm run download:circuits

2. Environment Configuration

Create a .env file in the root directory with your Reclaim credentials:

# Reclaim Protocol Configuration
APP_ID=your_app_id_here
APP_SECRET=your_app_secret_here

# Server Configuration
PORT=8080

Important: Replace your_app_id_here and your_app_secret_here with your actual Reclaim Protocol credentials from the Reclaim Dashboard.

3. Running the Application

Development Mode

npm run start:dev

Production Mode

npm run build
npm run start:prod

API Endpoints

GET /

Returns a greeting message: gm gm! api is running

GET /generateProof

Generates a zero-knowledge proof for Ethereum price data from CoinGecko API.

Response:

{
  "transformedProof": "...",
  "proof": "..."
}

Dependencies

  • @reclaimprotocol/zk-fetch: For generating zero-knowledge proofs
  • @reclaimprotocol/js-sdk: For proof verification and transformation
  • dotenv: For environment variable management
  • @nestjs/*: NestJS framework components

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published