Skip to content

l-adic/snarky

Repository files navigation

Snarky

Embedded DSL for constructing zero-knowledge circuits in PureScript.

Summary

A port of the ocaml snarky DSL to PureScript, backed by arkworks for the finite field arithmetic and cryptography (using napi-rs).

Example

For a practical demonstration, refer to packages/example. This implements a simple Merkle tree-based cryptocurrency ledger with createAccount, getAccount, and transfer circuits. It showcases foundational ZK application development.

Build

make all

Test

make test

Structure

Core Libraries

  • packages/curves/ - Elliptic curve field operations (Pallas, Vesta, BN254) with Rust N-API backend
  • packages/snarky/ - Circuit DSL for building zero-knowledge circuits

Proof System Backends

  • packages/snarky-kimchi/ - o1Labs Kimchi plonk backend
  • packages/snarky-bulletproofs/ - l-adic bulletproof R1CS backend
  • packages/groth16 - arkworks Groth16 R1CS backend

Circuit Libraries

  • packages/snarky-curves/ - Elliptic curve arithmetic circuits using the DSL
  • packages/random-oracle/ Hash functions and circuits
  • packages/merkle-tree/ Merkle trees and ciruits. Supports both fixed-depth and unbounded.

Utilities

  • packages/snarky-test-utils/ - Testing utilities for circuit development
  • packages/union-find/ - Union-find data structure

Reference Implementation

  • mina/ - OCaml Snarky source (Git submodule) used as translation reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •