class

MerkleTree::Stream

Inherits Reference < Object

Constructors

new(leaf : MerkleTree::Node, Nil | Array(MerkleTree::Node) -> Slice(UInt8), parent : MerkleTree::Node, MerkleTree::Node -> Slice(UInt8), roots : Array(MerkleTree::Node) = [] of Node)

Create a new MerkleTreeStream instance

Source

Instance methods

blocks
Source
leaf

Pass data through a hash function

Source
next(data : Bytes, nodes : Array(Node) = [] of Node) : Array(Node)

Pass a string buffer through the flat-tree hash functions, and write the result back out to "nodes"

Source
parent

Pass hashes through a hash function

Source
roots
Source