examples/cubic: the minimal Groth16 reference example.examples/sumproduct: a tiny two-public-signal example for sum and product relations.examples/mimc: native and in-circuit MiMC aligned acrossBN254andBLS12-381.examples/merkle: MiMC-based Merkle inclusion proof.examples/eddsa:BLS12-381EdDSA signature verification.examples/commitments: no commitment, one commitment, and two commitments in one readable package.examples/recursion: explicit Groth16 and PLONK recursion examples, split by backend and curve pairing.internal/curves,internal/proving,internal/nativehash,internal/snarkjs: small internal helpers used across examples.
go test ./...
go test -tags snarkjs ./examples/... -run SnarkJS -count=1
go test -tags recursion -short ./examples/recursion/...
npm testFor full recursion runs timing commands, see examples/recursion/README.md.
npm test regenerates snarkjs-compatible artifacts and runs a fast smoke test that checks the exported JSON shape. Full cryptographic snarkjs.verify is available separately:
npm run test:snarkjs:fullThat full verification path is intentionally opt-in because snarkjs.verify on exported gnark Groth16 artifacts is very slow in practice, especially on Windows.
- Regular examples default to
BN254andBLS12-381where the circuit supports both curves. - Recursion keeps the real pairings explicit:
BN254 in BN254for emulated-field education,BLS12-377 in BW6-761for the efficient 2-chain case, and PLONK variants separately. - Public signals for snarkjs export come from gnark's
publicWitnessorder rather than hand-written vectors.