[Disclaimer: This post is posted on behalf of the team behind PolkaZK Verifier SDK, which recently won the first prize in the AssetHub Hackathon. All the credits and ownership of the project belongs to Jatin Sahijwani and Anirudh Singh Chouhan.
Edgetributor SubDAO (6 contributors including me) will be looking after the further guidance and project curation by taking care of the responsibilities like Project Management & Operations, Architecture/Design/UX reviews, DevOps and QA, etc.]
PolkaZK Verifier SDK
With just one CLI command, developers can compile Circom circuits, perform Groth16 setup, and generate all necessary artifacts (wasm, r1cs, zkey, verifier.sol). A corresponding JavaScript SDK makes it possible to verify proofs on-chain with a single function call, allowing developers to embed privacy-preserving logic into their applications seamlessly. The SDK is designed to be intuitive even for developers unfamiliar with Web3, enabling a new wave of applications powered by zero-knowledge technology.
Technology Stack
- Circom (v2) – for defining and compiling zkSNARK circuits
- SnarkJS – for Groth16 trusted setup, proof generation, and verification
- Node.js / TypeScript – for CLI tooling and SDK
- Solidity – for on-chain verifier contract generation
- PolkaVM-compatible contract framework (e.g., Ink! or EVM-compatible layer) – for verifier contract deployment
- Next.js (optional) – used in example dApps and for developer demo interfaces
Core Components & Architecture
- ZK Circuit Compiler (CLI) Compiles .circom files Generates .r1cs, .wasm, .zkey, and verifier.sol
- Proof Verifier SDK (JS/TS SDK) Provides a simple function: verifyProof(input, pathToZkey) Designed to be plug-and-play in frontend applications
- Verifier Contract Deployer (Coming soon) Will allow auto-deployment of verifier.sol to a PolkaVM-compatible chain
- Developer Tools Examples and templates for using zk circuits in age verification, identity checks, etc.
Architecture
[Circuit.circom]
↓
[zk-polka-sdk CLI]
↓
.wasm + .r1cs + .zkey + verifier.sol
↓
[verifyProof(input, path)]
↓
[Verifier Contract on PolkaVM]
Project Documentation
Core Components & Architecture
- Circom Integration: Supports compilation of user-written .circom circuits to generate .wasm, .r1cs, and zkey files.
- Trusted Setup: Utilizes Groth16 proving system with preconfigured PTAU files.
- Solidity Verifier Export: Generates a Solidity verifier contract for on-chain proof verification.
- CLI Tooling: Abstracts all complex steps into a simple CLI (npx zk-polka-sdk compile ).
- Optional Runtime: PolkaVM-ready contracts for Polkadot ecosystem (planned extension).
PoC / MVP / Prior Work
- Fully functional CLI-based zk circuit compiler and verifier.
- Successfully integrated with Next.js + Web frontend for proof generation & verification.
- Contracts deployed and tested on PolkaVM-compatible chains.
Data Models / API Specs
The SDK provides a set of utility functions to abstract the Zero Knowledge (ZK) workflow. Below are the core APIs and their expected inputs/outputs:
1. Circuit Compilation
Command:
npx zk-polka-sdk compile <path-to-your-circom-file>
Inputs:
- A .circom file path
- Outputs (stored in a folder named after the circuit):
- .r1cs
- .wasm
- circuit_final.zkey
- verifier.sol
2. Proof Generation
Programmatically generate a zk-SNARK proof using your compiled circuit and input signals. Function Signature:
generateProof(
input: Record<string, any>,
circuitPath: string
): Promise<{
proof: any;
publicSignals: string;
}>
Parameters:
- Input: An object with all private and public inputs (e.g., { birthYear: 2001 })
- CircuitPath: Relative path to the folder containing your compiled circuit
Returns:
- Proof: Groth16 proof object
- PublicSignals: Array of public output signals
3. Proof Verification
Verify a zk-SNARK proof using the associated verifier and public input. Function Signature:
verifyProof(
publicInput: Record<string, any>,
circuitPath: string
): Promise<{
isValid: boolean;
}>
Parameters:
- publicInput: Object containing only public inputs used to verify the proof (e.g., { birthYear: 2001 })
- circuitPath: Path to the compiled circuit folder
Returns:
- isValid: Boolean indicating whether the proof is valid or not
What This Project Does NOT Provide or Implement
While the SDK is designed to make ZK development easier, there are intentional limitations to set expectations clearly:
No UI tools, there is no graphical user interface; usage is CLI or JS/TS API only.
No wallet integrations, connecting to wallets or Web3 providers must be handled separately.
No frontend boilerplate, SDK is backend-focused and does not include UI templates.
No recursive proofs or plonk, only Groth16 protocol is supported.
No multi-language bindings, SDK is built for Node.js/JavaScript environments.
No Circom debugger, writing correct circuit logic is the developer’s responsibility.
No support for custom trusted setup, uses pre-generated pot12_final.ptau by default.
This SDK is built for rapid prototyping, education, and integration with PolkaVM-based verifier contracts. It is ideal for developers who want to use Zero-Knowledge proofs without diving deep into ZK cryptography.
Are there other similar projects in the Polkadot/Kusama ecosystem?
A few, but none match our SDK in usability or flexibility:
Project | Focus Area | Comparison with zk-polka-sdk |
---|---|---|
Zcloak Network | ZK Identity + DID | zk-polka-sdk is developer-centric and supports any use case |
Manta Network | zk-ID and private swaps | zk-polka-sdk offers a modular SDK, not a fixed protocol stack |
Subzero (Parity) | Experimental ZK tooling | zk-polka-sdk is production-ready and easier to integrate |
Unlike these specialized protocols, zk-polka-sdk empowers developers to build their own custom ZK logic and deploy it in minutes.
If not, why hasn’t a project like this existed?
- Most efforts have focused on protocol-specific solutions (like identity or credentials), not general-purpose SDKs
- Circom + SnarkJS, despite being powerful, are considered “too low level” for most developers
- Existing tools are heavily EVM-centric and incompatible with PolkaVM or require significant custom integration
- The Polkadot ecosystem lacked a bridge between powerful cryptography and general developer experience, until now
Are there similar projects in other ecosystems?
Yes, but zk-polka-sdk offers significant advantages:
Project | Ecosystem | Limitations | zk-polka-sdk Advantage |
---|---|---|---|
Sismo | Ethereum | Closed protocol for badges/credentials | zk-polka-sdk is open, generic, and developer-controlled |
Semaphore | Ethereum | Only supports anonymous signaling | zk-polka-sdk supports arbitrary circuit logic |
Aztec SDK | Ethereum | Requires tight coupling with Aztec L2 | zk-polka-sdk works on any chain with Solidity verifier support |
Noir/Nargo | ZK Stack | Still maturing, not Circom-compatible | zk-polka-sdk is built on battle-tested Circom + SnarkJS |
zk-polka-sdk is the first SDK to:
- Fully abstract the Circom + SnarkJS workflow
- Integrate directly with PolkaVM-based chains
- Provide a CLI and API interface usable by both frontend and backend devs
- Allow seamless deployment of Solidity verifier contracts on Polkadot-compatible infrastructure
In summary, zk-polka-sdk empowers developers to integrate privacy-preserving zero-knowledge logic in minutes. Built on Circom + SnarkJS and customized for PolkaVM, it’s the most powerful and accessible zk integration tool in the Polkadot ecosystem; and arguably, across all ecosystems.