IncrementalMerkleTree

scalus.crypto.tree.IncrementalMerkleTree
See theIncrementalMerkleTree companion class

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def depthForSize(n: Int): Int

Compute the minimum depth needed to hold n elements.

Compute the minimum depth needed to hold n elements.

Attributes

def empty(depth: Int): IncrementalMerkleTree

Create an empty tree with the given depth.

Create an empty tree with the given depth.

Attributes

def fromKeys(keys: IndexedSeq[ByteString]): IncrementalMerkleTree

Build a tree from a sequence of keys. Builds efficiently by filling leaves and computing branch hashes bottom-up.

Build a tree from a sequence of keys. Builds efficiently by filling leaves and computing branch hashes bottom-up.

Attributes

def fromKeys(keys: IndexedSeq[ByteString], depth: Int): IncrementalMerkleTree