A Python library to generate merkle trees and merkle proofs.
Project description
Stakewise python realization of @openzeppelin/merkle-tree
NB! Library is not well tested and not ready for the production use
A Python library to generate merkle trees and merkle proofs.
Well suited for airdrops and similar mechanisms in combination with OpenZeppelin Contracts MerkleProof
utilities.
Quick Start
poetry install
Building a Tree
from multiproof import StandardMerkleTree
values = [
["0x1111111111111111111111111111111111111111", 5000000000000000000],
["0x2222222222222222222222222222222222222222", 2500000000000000000]
]
tree = StandardMerkleTree.of(values, ["address", "uint256"])
print('Merkle Root:', tree.root)
todos
- extend tests
- add docs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
multiproof-0.1.0.tar.gz
(7.4 kB
view hashes)
Built Distribution
Close
Hashes for multiproof-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bd289419dae41e700e91314718b618a0d581852f92a1edc4de48c429d1cb584 |
|
MD5 | 531b089ce0d44e7f9280b18ea7562c14 |
|
BLAKE2b-256 | 0b7e9ea13eccc9a92193d48270d6c26ec2a07b27ddb9c7beea0f1131de3d0e4c |