Zeth - Zerocash on Ethereum
0.8
Reference implementation of the Zeth protocol by Clearmatics
|
Public Member Functions | |
def | __init__ (self, str filename, MerkleTreeData tree_data, int depth, ITreeHash tree_hash) |
None | save (self) |
![]() | |
def | __init__ (self, MerkleTreeData tree_data, int depth, ITreeHash tree_hash) |
int | get_num_entries (self) |
bytes | get_leaf (self, int index) |
List[bytes] | get_leaves (self) |
bytes | get_node (self, int layer_idx, int node_idx) |
Iterator[Tuple[bytes, List[bytes]]] | get_layers (self) |
bytes | get_root (self) |
None | insert (self, bytes value) |
bytes | recompute_root (self) |
Static Public Member Functions | |
PersistentMerkleTree | open (str filename, int max_num_leaves, ITreeHash tree_hash) |
![]() | |
MerkleTree | empty_with_depth (int depth, ITreeHash tree_hash) |
MerkleTree | empty_with_size (int num_leaves, ITreeHash tree_hash) |
Public Attributes | |
filename | |
![]() | |
max_num_leaves | |
depth | |
tree_data | |
num_new_leaves | |
tree_hash | |
Version of MerkleTree that also supports persistence.
Definition at line 209 of file merkle_tree.py.
def zeth.core.merkle_tree.PersistentMerkleTree.__init__ | ( | self, | |
str | filename, | ||
MerkleTreeData | tree_data, | ||
int | depth, | ||
ITreeHash | tree_hash | ||
) |
Definition at line 213 of file merkle_tree.py.
|
static |
None zeth.core.merkle_tree.PersistentMerkleTree.save | ( | self | ) |
zeth.core.merkle_tree.PersistentMerkleTree.filename |
Definition at line 215 of file merkle_tree.py.