OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Merkly

Merkly is a Python library for creating and working with Merkle trees. It provides functions to create leaves and roots, generate proofs, and verify proofs; it uses Keccak-256 when no hash function is supplied and supports a custom hash function.

Independent OpenViST project profile, based on linked sources.

Merkly — 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 Merkly when a Python application needs documented Merkle-tree operations, especially root and proof generation or proof verification.

Who it is for

  • Python developers building blockchain-related data utilities
  • Developers preparing Merkle roots or proofs for application workflows
  • Teams whose Python code needs to check Merkle proofs

Documented uses

  • Build a Merkle tree from input leaves and retrieve its root.
  • Generate a proof for a leaf.
  • Verify a proof against a leaf and tree.
  • Choose a custom hash function instead of the Keccak-256 default.
Before you choose

Requirements & limits

The repository is public and specifies an MIT license. Installation instructions are provided for pip and Poetry.

  • Keccak-256 is used by default if no hash function is supplied.
  • The README shows a custom hash function with the type (bytes, bytes) -> bytes.
  • The root example is described as compatible with MerkleTreeJS.
  • The README lists a Rust accelerator as alpha and Solidity and MerkleTreeJS tutorials as design-stage.

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 Merkly in a Python project

Add the library to a project using one of its documented package-manager commands.

Before you start

  • A Python project
  • pip or Poetry

Steps

  1. For pip, run the command below.

    Documented command
    pip install merkly
  2. For Poetry, run poetry add merkly.

Expected outcome

Merkly is added to the project through the selected package manager.

Guide limitations

  • These instructions cover installation only, not application integration or deployment.
Source-based practical guide

Create and verify a Merkle proof in Python

Follow the README example to generate a proof for a leaf and verify it against its tree.

Before you start

  • Merkly installed in a Python project
  • A set of leaves to place in a Merkle tree

Steps

  1. Import MerkleTree from merkly.mtree and create a tree from the leaves.

  2. Call mtree.proof('b') to obtain a proof for the example leaf.

  3. Pass the proof and raw leaf to mtree.verify(p, 'b').

Expected outcome

The documented example checks a proof for a leaf against the Merkle tree.

Guide limitations

  • The README illustrates the operation with example data; it does not provide guidance for integrating the proof into a smart contract.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
9 October 2026
Original website title
olivmath/merkly · Official homepage title · retained in its source language