mirror of
https://github.com/privacy-scaling-explorations/zk-kit.git
synced 2026-01-11 07:18:05 -05:00
LazyTower
LazyTower implementation in TypeScript.
❗ 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
- e-mail : lcamel@gmail.com
- github : @LCamel
- website : https://www.facebook.com/LCamel