Skip to main content

zkApp Developer Tutorials

zkApp developer tutorials are a hands-on walk-through of use cases that guide you to achieve a defined goal.

To meet other developers building zkApps with SnarkyJS, participate in the #zkapps-developers channel on Mina Protocol Discord.

Prerequisites

Each tutorial has been tested with specific versions:

  • Mina zkApp CLI

  • SnarkyJS

    SnarkyJS is automatically included when you create a project using the Mina zkApp CLI.

  • Other dependencies as noted

Install the Mina zkApp CLI

To install the Mina zkApp CLI:

$ npm install -g zkapp-cli

To confirm successful installation:

$ zk --version

Dependencies

To use the zkApp CLI and SnarkyJS, your environment requires:

  • NodeJS v16 and later (or NodeJS v14 using --experimental-wasm-threads)
  • 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:

  • MacOS Homebrew

  • Windows Chocolatey

  • Linux

    • apt, yum, and others

    On Linux, you might need to install a recent Node.js version by using NodeSource. Use deb or rpm as recommended by the Node.js project.

To verify your installed versions, use npm -v, node -v, and git -v.

Tips

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.

Useful Resources

The API Reference docs are a detailed resource that is useful after you have familiarized yourself with the basics. See the SnarkyJS Reference docs for an in-depth explanation of all the methods, properties, and interfaces available in SnarkyJS.

See the O(1) Labs blog at https://blog.o1labs.org/. For updates about SnarkyJS, see https://blog.o1labs.org/tagged/snarkyjs.