Skip to main content

Setup

The Blueprint SDK provides a simple way to generate and verify zero-knowledge proofs from emails.

Installation

To get started with the SDK, the first step is to install it using your preferred package manager:

npm install @zk-email/sdk

Usage

Download Sample Email

You can download a sample email file to test the SDK:

Generate Proof

import zkeSDK from "@zk-email/sdk";
import fs from "fs/promises";

async function main() {
const sdk = zkeSDK();

// Get blueprint from the registry
const blueprint = await sdk.getBlueprint("Bisht13/SuccinctZKResidencyInvite@v1");
const prover = blueprint.createProver();

// Read email file
const eml = await fs.readFile("residency.EML", "utf-8");

// Generate proof
const proof = await prover.generateProof(eml);
const { proofData, publicData } = proof.getProofData();

console.log("Proof:", proofData);
console.log("Public data:", publicData);
}

main();

Repository Templates

We have provided a GitHub repo with working examples from this guide, showcasing different implementations, including Node.js, Next.js, Vite with Vanilla JS, and Deno.

These templates help you get started quickly with the Blueprint SDK.