
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
@zk-kit/incremental-merkle-tree
Advanced tools
Incremental Merkle tree implementation in TypeScript.
Install the @zk-kit/incremental-merkle-tree package with npm:
npm i @zk-kit/incremental-merkle-tree --save
or yarn:
yarn add @zk-kit/incremental-merkle-tree
You can also load it using a script tag using unpkg:
<script src="https://unpkg.com/@zk-kit/incremental-merkle-tree/"></script>
or JSDelivr:
<script src="https://cdn.jsdelivr.net/npm/@zk-kit/incremental-merkle-tree/"></script>
# new IncrementalMerkleTree(hash: HashFunction, depth: number, zero: Node, arity: number): IncrementalMerkleTree
import { IncrementalMerkleTree } from "@zk-kit/incremental-merkle-tree"
import { poseidon } from "circomlibjs" // v0.0.8
const tree = new IncrementalMerkleTree(poseidon, 16, BigInt(0), 2) // Binary tree.
# insert(leaf: Node)
tree.insert(BigInt(1))
# delete(index: number)
tree.delete(0)
# indexOf(leaf: Node): number
tree.insert(BigInt(2))
const index = tree.indexOf(BigInt(2))
# createProof(index: number): Proof
const proof = tree.createProof(1)
# verifyProof(proof: Proof): boolean
console.log(tree.verifyProof(proof)) // true
FAQs
Incremental Merkle tree implementation in TypeScript.
The npm package @zk-kit/incremental-merkle-tree receives a total of 1,847 weekly downloads. As such, @zk-kit/incremental-merkle-tree popularity was classified as popular.
We found that @zk-kit/incremental-merkle-tree demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.