Skip to content

RangeProof

ratranqu edited this page Apr 7, 2021 · 2 revisions

RangeProof

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

Inheritance

Codable, CustomStringConvertible

Nested Type Aliases

Hash

public typealias Hash = Node.Hasher.Hash

Hasher

public typealias Hasher = Node.Hasher

Key

public typealias Key = Node.Key

Value

public typealias Value = Node.Value

Initializers

init(leftPath:innerNodes:leaves:)

public init(leftPath: PathToLeaf<Node>, innerNodes: [PathToLeaf<Node>] = [], leaves: [ProofLeafNode<Node>])

init(from:)

public init(from decoder: Decoder) throws

Properties

description

var description: String

leftPath

var leftPath: PathToLeaf<Node>

innerNodes

var innerNodes: [PathToLeaf<Node>]

leaves

var leaves: [ProofLeafNode<Node>]

rootHash

var rootHash: Hash!

treeEnd

var treeEnd: Bool

keys

var keys: [Key]

leftIndex

var leftIndex: Int64

Methods

encode(to:)

public func encode(to encoder: Encoder) throws

verifyItem(_:_:_:)

public func verifyItem(_ rootHash: Hash, _ key: Key, _ value: Value) throws

verifyAbsence(_:_:)

public func verifyAbsence(_ rootHash: Hash, _ key: Key) throws

verify(_:)

public func verify(_ rootHash: Hash) -> Bool