Skip to content

PathWithLeaf

ratranqu edited this page Apr 7, 2021 · 2 revisions

PathWithLeaf

public struct PathWithLeaf<Node: NodeProtocol>: CustomStringConvertible, Codable

Inheritance

Codable, CustomStringConvertible

Nested Type Aliases

Hash

public typealias Hash = Node.Hasher.Hash

Properties

description

var description: String

Methods

verify(_:)

verify checks that the leaf node's hash + the inner nodes merkle-izes to the given root. If it returns an error, it means the leafHash or the PathToLeaf is incorrect.

public func verify(_ root: Node) throws -> Bool

computeRootHash()

public func computeRootHash() -> Hash