This section explains how to install the ZKAP development environment, including the SDK, core libraries, and tooling required to build encrypted frames, generate proofs, and interact with the ZKAP Validator.
ZKAP is designed to integrate easily with existing blockchain applications.
You do not need a new blockchain, VM, or specialized infrastructure — the SDK works directly in Node.js or any agent runtime.
1. System Requirements
To develop with ZKAP, you need:
Node.js (v18+ recommended)
A compatible ZK proof backend (Groth16, Plonk, Halo2, or STARK-based)
A running blockchain RPC endpoint (local or public)
Access to the ZKAP circuits and proving keys
Optional tools:
Docker (for isolated environments)
Circom or other custom ZK circuit compilers
WebAssembly support if generating proofs client-side
2. Install the ZKAP TypeScript SDK
The ZKAP SDK provides utilities for:
generating anonymous identities
encoding and encrypting payloads
generating zero-knowledge proofs
submitting frames to the validator contract
decrypting anonymous events
Install via npm:
or Yarn:
or pnpm:
Once installed, you can import the SDK:
3. Install a ZK Proof Backend
Depending on your environment, you will need a proof generation backend.
Option A — Groth16 (fastest, lowest cost)
Option B — Plonk
Option C — Halo2 or STARKs
Implemented via native bindings or WASM depending on the project.
The SDK can be configured to use any of these.
4. Install the ZKAP Validator Contract Package
If developing in Solidity:
This package includes:
It can be imported into Hardhat, Foundry, or any EVM framework.
For EVM developers:
Foundry (Forge/Anvil for testing)
Ethers.js or Viem for RPC calls
Typescript for SDK integration
For Agent developers:
Event listeners or task schedulers
For ZK developers:
Circom / Noir / Halo2 compiler
SnarkJS or Plonk toolkits
6. Setting up a Local Development Environment
Step 1: Clone or install the SDK
Step 2: Install your chosen ZK backend
Step 3: Download proving keys (if required)
Step 4: Deploy the ZKAP Validator contract locally
Step 5: Configure your app to listen to validator events
Step 6: Begin sending encrypted frames for testing
A typical dev environment uses:
Anvil (Foundry) as a local EVM node
The ZKAP Validator deployed to Anvil
The SDK generating frames and proofs against that network
7. Example Project Setup
Write a simple script to generate and submit a frame:
8. Troubleshooting Common Issues
Proof generation slow → enable WASM backend
Invalid proof error → mismatch between circuit + proving key
Contract rejects frame → nullifier already used
Expiry validation failed → expiry too low
Decryption fails → incorrect application key setup
The SDK provides detailed error messages to help with debugging.