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.1.tar.gz
(7.6 kB
view hashes)
Built Distribution
Close
Hashes for multiproof-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c210d0206141c51aff0da7d40bf63040ca6e407c275b5d24d7306afbe715b14 |
|
MD5 | 3043c2a5daff6195f303d0c7722e6861 |
|
BLAKE2b-256 | 8bbc4c03fa31c9d037e87db716c64e1ebb0d67a2aed94af770e161396a953a5c |