MerkleTree

scalus.crypto.tree.MerkleTree
See theMerkleTree companion class
object MerkleTree

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
MerkleTree.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 fromElements(elements: IndexedSeq[ByteString]): MerkleTree

Build a static Merkle tree from a sequence of elements.

Build a static Merkle tree from a sequence of elements.

Elements are hashed into leaf slots, padded to the next power-of-2 with empty hashes, and internal nodes are computed bottom-up.

Attributes