MerkleTree

sealed class MerkleTree

Creation and verification of a Merkle tree for a WireTransaction.

See: https://en.wikipedia.org/wiki/Merkle_tree

Transaction is split into following blocks: inputs, attachments' refs, outputs, commands, notary, signers, tx type, time-window. Merkle Tree is kept in a recursive data structure. Building is done bottom up, from all leaves' hashes. If number of leaves is not a power of two, the tree is padded with zero hashes.

Inheritors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Leaf(val hash: SecureHash) : MerkleTree
Link copied to clipboard
data class Node(val hash: SecureHash, val left: MerkleTree, val right: MerkleTree) : MerkleTree

Properties

Link copied to clipboard
abstract val hash: SecureHash