Module @zk-kit/lazytower

LazyTower

LazyTower implementation in TypeScript.

NPM license NPM version Downloads npm bundle size (scoped) Linter eslint Code style prettier

🗣️ Chat & Support   |   📘 Docs


❗ WARNING

This library has not been audited.

🛠 Install

npm or yarn

Install the @zk-kit/lazytower package with npm:

npm i @zk-kit/lazytower --save

or yarn:

yarn add @zk-kit/lazytower

CDN

You can also load it using a script tag using unpkg:

<script src="https://unpkg.com/@zk-kit/lazytower/"></script>

or JSDelivr:

<script src="https://cdn.jsdelivr.net/npm/@zk-kit/lazytower/"></script>

📜 Usage

import { LazyTowerHashChainProofBuilder } from "@zk-kit/lazytower"
import { poseidon } from "circomlibjs" // v0.0.8

const H = 10
const W = 4
const pb = LazyTowerHashChainProofBuilder(H, W, poseidon)
for (let i = BigInt(0); i < 150; i += BigInt(1)) {
pb.add(i)
}
const index = pb.indexOf(BigInt(42))
const proof = pb.build(index)
console.log(proof)

Contacts

Developers

Index

Type Aliases

Functions