Skip to main content
# pymerkletools
[![PyPI version](https://badge.fury.io/py/merkletools.svg)](https://badge.fury.io/py/merkletools)
[![Build Status](https://travis-ci.org/aliciawyy/pymerkletools.svg?branch=master)](https://travis-ci.org/aliciawyy/pymerkletools)
[![codecov](https://codecov.io/gh/aliciawyy/pymerkletools/branch/master/graph/badge.svg)](https://codecov.io/gh/aliciawyy/pymerkletools)
[![Maintainability](https://api.codeclimate.com/v1/badges/cfa9766c9537f10f72f1/maintainability)](https://codeclimate.com/github/aliciawyy/pymerkletools/maintainability)

This project is adapted from the [pymerkletools](https://github.com/aliciawyy/pymerkletools) of Tierion.

It includes a `MerkleTree` class for creating Merkle trees, generating merkle proofs, and verification of merkle proofs.

## Installation

```
pip install pymerkletree
```

## Examples

The source code is simple by itself and examples can be found in the folder `demo`.

## Notes

### About tree generation

1. Internally, leaves are stored as `bytearray`. When the tree is built, it is
generated by hashing together the `bytearray` values.
2. Lonely leaf nodes are promoted to the next level up, as depicted below.

ROOT=Hash(H+E)
/ \
/ \
H=Hash(F+G) E
/ \ \
/ \ \
F=Hash(A+B) G=Hash(C+D) E
/ \ / \ \
/ \ / \ \
A B C D E


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymerkletree-1.0.5.tar.gz (5.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pymerkletree-1.0.5-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

pymerkletree-1.0.5-py2-none-any.whl (5.5 kB view details)

Uploaded Python 2

File details

Details for the file pymerkletree-1.0.5.tar.gz.

File metadata

  • Download URL: pymerkletree-1.0.5.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pymerkletree-1.0.5.tar.gz
Algorithm Hash digest
SHA256 3b4a581874f6f36f8151e985352ee70ed38b3908fca1ef19346153587b80559b
MD5 a3bdbad0add60b0d7b29d96bb54b3f5d
BLAKE2b-256 89f6c4048a47854aeb74740d50454452016d5fced5bdf81ae143f8ac7c1b5d09

See more details on using hashes here.

File details

Details for the file pymerkletree-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for pymerkletree-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d9ab024ad845b0718ea5c3c3afb466459a3224025cd7e168b788900ec497d314
MD5 c69ef90f63aec434814751ccfbdf41e4
BLAKE2b-256 763989bebecbb13e02e537bbb1df1a6359b2a6f7ae92965a38a09a6b488523f6

See more details on using hashes here.

File details

Details for the file pymerkletree-1.0.5-py2-none-any.whl.

File metadata

File hashes

Hashes for pymerkletree-1.0.5-py2-none-any.whl
Algorithm Hash digest
SHA256 46331dcc4f01fe87d598aeb306ce228fb85fbbebc06a7ad9a5fa36f71c64b76b
MD5 74b5079f7539582cce6894158c998510
BLAKE2b-256 6abec8fd7ec6e594aeb1f8049c91cd980fdd5d9d07026548bf3a2cb04732bdd0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page