merkle

package merkle

Members list

Type members

Classlikes

class Builder(hasher: Hasher)

Helpers for construction of MerkleTree instances

Helpers for construction of MerkleTree instances

Attributes

Supertypes
class Object
trait Matchable
class Any
sealed trait DiffTree extends Product, Serializable

A DiffTree is a data structured produced by comparing two MerkleTree instances with a similar structure. This tree does not necessarily cover every node and leaf present in either of the original MerkleTree instances – the focus is on the differences.

A DiffTree is a data structured produced by comparing two MerkleTree instances with a similar structure. This tree does not necessarily cover every node and leaf present in either of the original MerkleTree instances – the focus is on the differences.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class DLeaf
class DNode
object DiffTree

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
DiffTree.type
class Err(msg: String, cause: Throwable = ...) extends Exception

Attributes

Companion
object
Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
object Err

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Err.type
trait Hasher

A hasher is used to compute the hash of a MerkleTree node.

A hasher is used to compute the hash of a MerkleTree node.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Hasher

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Hasher.type
sealed abstract class MerkleTree

A Merkle tree is a data structure which consists of leaves – that hash their data contents according to user-provided procedure and data interpretation, and nodes – which hash the hashes of their subtrees.

A Merkle tree is a data structure which consists of leaves – that hash their data contents according to user-provided procedure and data interpretation, and nodes – which hash the hashes of their subtrees.

This allows for fast comparison between two trees, as we only need to compared the root node hashes

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Leaf
class Node
object MerkleTree

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
MerkleTree.type
sealed trait Result[+A] extends Product, Serializable

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class Fail
class Ok[A]
object Result

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Result.type
abstract class ToBytes[+A] extends Product, Serializable

A mechanism to control how the hashable data is produced from user-provided data. For example, we might use Paths in our tree construction, but when hashing them we don't want to treat them as strings, but rather read the file contents and hash those instead.

A mechanism to control how the hashable data is produced from user-provided data. For example, we might use Paths in our tree construction, but when hashing them we don't want to treat them as strings, but rather read the file contents and hash those instead.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object Arr
object FileContents
object FileMtime
object Str
object TreeMtime
object ToBytes

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
ToBytes.type