Practical overview
When it fits
Use it when a Solidity contract needs to check supplied Merkle, MMR or supported trie proof data against a root, or calculate a root from Merkle multi-proof inputs.
Who it is for
- Solidity developers adding proof verification to smart contracts
- Teams working with Ethereum or Substrate/Polkadot trie proofs
- Developers handling single- or multi-leaf Merkle proofs or MMR membership proofs
Documented uses
- Verify Merkle multi-proofs for selected leaves, including in unbalanced trees.
- Check MMR membership proofs in contract code.
- Verify Ethereum receipt, transaction or state trie proofs.
- Verify Substrate/Polkadot trie proofs, including child storage proofs.
Requirements & limits
The repository is public and lists an Apache-2.0 license. The README documents installation through npm.
- Merkle tree multi-proofs support balanced and unbalanced trees.
- The multi-proof interface uses zero-based leaf indices and a flat array of sibling hashes.
- MMR verification proves membership but is not positionally binding; applications needing index binding must include the index in the leaf hash.
- The README lists Ethereum and Substrate/Polkadot trie support and marks NEAR unsupported.
- The documented Solidity example uses version 0.8.20 or later.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install the Solidity library and add a multi-proof verifier
Add the documented Merkle multi-proof verification interface to a Solidity contract.
Before you start
- A Solidity project
- Solidity 0.8.20 or later, as used in the README example
- npm
Steps
Install the package with the command below.
npm install @polytope-labs/solidity-merkle-treesImport
MerkleMultiProoffrom@polytope-labs/solidity-merkle-trees/MerkleMultiProof.sol.Add a contract function that passes the root, proof hashes, indexed leaves and leaf count to
MerkleMultiProof.VerifyProof.
Expected outcome
A contract function using the library's multi-proof verifier and returning its boolean result.
Guide limitations
- The example requires leaf indices and hashes, a flat array of sibling hashes, and the total leaf count.
- The README's Rust proof-generation and conversion example uses rs-merkle; it does not document proof generation as part of the Solidity package.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 13 October 2026
- Original website title
- polytope-labs/solidity-merkle-trees · Official homepage title · retained in its source language

