shlogg · Early preview
Uratmangun @uratmangun

Building Private Apps On Mina Protocol With O1js And Zk-SNARKs

Built a private zkApp on Mina Protocol using O1js, a TypeScript library for building zk-SNARK circuits. Updated a number with constraints and deployed to testnet.

Zero-knowledge applications (zkApps) enable privacy-preserving decentralized apps on Mina Protocol. This tutorial uses O1js (formerly SnarkyJS), a TypeScript library for building zk-SNARK circuits, to create a simple zkApp.


  
  
  Prerequisites

Basic knowledge of TypeScript/JavaScript.
Node.js (v18+ recommended).
Familiarity with Mina Protocol concepts (e.g., zk-SNARKs).
Terminal/CLI proficiency.



  
  
  1. Environment Setup

  
  
  Install Dependencies


npm install -g zkapp-cli # Mina zkApp CLI tool
npm install -g typescript ts-node # TypeScript tools...