OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Solidity Merkle Trees

Solidity Merkle Trees is an Apache-2.0 Solidity library that implements verification for Merkle trees, Merkle Mountain Ranges and Merkle-Patricia Tries. Its contract interfaces verify proofs against roots and can calculate roots from Merkle multi-proof inputs.

Independent OpenViST project profile, based on linked sources.

Solidity Merkle Trees — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

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.
Before you choose

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.

Source-based practical guide

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

  1. Install the package with the command below.

    Documented command
    npm install @polytope-labs/solidity-merkle-trees
  2. Import MerkleMultiProof from @polytope-labs/solidity-merkle-trees/MerkleMultiProof.sol.

  3. 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.
Evidence and transparency

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