zkApp Developer Tutorials
zkApp developer tutorials are a hands-on walk-through of use cases that guide you to achieve a defined goal.
o1js, fka. SnarkyJS, is a TypeScript (TS) library for writing general-purpose zk programs and writing zk smart contracts for Mina.
To meet other developers building zkApps with o1js, participate in the #zkapps-developers channel on Mina Protocol Discord.
Each tutorial has been tested with the latest versions:
o1js is automatically included when you create a project using the zkApp CLI.
Other dependencies as noted.
Install the zkApp CLI
To install the zkApp CLI:
$ npm install -g zkapp-cli
To confirm successful installation:
$ zk --version
To use the zkApp CLI and o1js, your environment requires:
- NodeJS v16 and later (or NodeJS v14 using
- NPM v6 and later
- Git v2 and later
Use a package manager to install the required versions and upgrade older versions if needed. Package managers for the supported environments are:
- apt, yum, and others
To verify your installed versions, use
node -v, and
The full source code for tutorials is provided in the examples/zkapps/ directory on GitHub. While you're there, give the
/docs2 repository a star so that other zk developers can learn to build a zkApp!
Line numbers are provided for convenience. To prevent copying line numbers and command prompts as shown in the tutorials, use the copy code to clipboard button that appears at the top right of the snippet box when you hover over it.
The API Reference docs are a detailed resource that is useful after you have familiarized yourself with the basics. See the o1js Reference docs for an in-depth explanation of all the methods, properties, and interfaces available in o1js.
If you're just getting started, watch these step-by-step zkApp Explainer Videos that go over how to get started building zkApps. Each tutorial includes a link to the corresponding video. While you're on the Mina Foundation YouTube channel, select Subscribe so that new videos will show in your Subscriptions feed.