incrementalquintree

v1.0.9
An incremental Merkle tree which supports 2 or 5 nodes per leaf.

An incremental Merkle tree written in Typescript and circom

This repository provides a Typescript implementation of an incremental Merkle tree which supports either 2 (binary) or 5 (quinary) leaves per node.

The original code is from the MACI project, but has been placed in its own repository and NPM package so other projects can use it.

circom circuits for zero-knowledge applications are also included. Please note that it is not possible to import .circom files from this module as the circom compiler does not yet have a way to specify custom import origins, like how solc has a --allow-paths flag.

Solidity contracts are also included.

To run all tests, first clone this repository, navigate to its root directory, and perform the following steps inside it:

  1. Run npm i
  2. In a separate terminal, run npm run circom-helper.
  3. In a separate terminal, run npm run hardhat.
  4. In a separate terminal, run npm run test.
npm i incrementalquintree

Metadata

  • MIT
  • Whatever
  • Koh Wei Jie
  • released 11/8/2021

Downloads

Maintainers