Attributes
- Companion
- class
- Graph
-
- Supertypes
- Self type
-
MerkleTree.type
Members list
Type members
Classlikes
Attributes
- Supertypes
Attributes
- Supertypes
Value members
Concrete methods
Deserialises the Merkle tree from a list of strings. IMPORTANT: the hashes are read from the serialised format and cached in the tree – meaning the tree will never recompute the hashes even if they depend on external factors such as file system.
Deserialises the Merkle tree from a list of strings. IMPORTANT: the hashes are read from the serialised format and cached in the tree – meaning the tree will never recompute the hashes even if they depend on external factors such as file system.
This means an instance of the tree returned from this method is frozen in time and is safe to compare to another tree of same structure constructed over live data
Value parameters
- fromBytesId
-
function that produces an instance of ToBytes from its serialised ID (see ToBytes.fromStringID)
- fromHasherId
-
function that produces an instance of Hasher from its serialised ID (see Hasher.fromStringID)
- lines
-
lines of the serialised tree (without line end markers)
Attributes
Renders a given MerkleTree as a vector of strings.
Renders a given MerkleTree as a vector of strings.
This representation is purely for visualisation – for reversible serialisation use serialise
Attributes
Serialises the tree to a list of lines that can be saved to a file and read back again using the deserialise method.
Serialises the tree to a list of lines that can be saved to a file and read back again using the deserialise method.
IMPORTANT: serialisation will force the evaluation of all the hashes
Value parameters
- toBytesID
-
function to convert a ToBytes instance to a string ID (see ToBytes.toStringID)
- toHashID
-
function to convert a Hasher to a string ID (see Hasher.toStringID)
- tree
-
tree to serialise