case class MerkleProof[D <: Digest](leafData: LeafData, levels: Seq[(Digest, Side)])(implicit hf: CryptographicHash[D]) extends SparkzEncoding with Product with Serializable
Proof is given leaf data, leaf hash sibling and also siblings for parent nodes. Using this data, it is possible to compute nodes on the path to root hash, and the hash itself. The picture of a proof given below. In the picture, "^^" is leaf data(to compute leaf hash from), "=" values are to be computed, "*" values are to be stored.
........= Root ..... / \ .... * = ....... / \ ...... * = ......... /.\ .........* = ............ ^^
- leafData
- leaf data bytes
- levels
- levels in proof, bottom up, each level is about stored value and position of computed element (whether it is left or right to stored value)
- Alphabetic
- By Inheritance
- MerkleProof
- Serializable
- Serializable
- Product
- Equals
- SparkzEncoding
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
MerkleProof(leafData: LeafData, levels: Seq[(Digest, Side)])(implicit hf: CryptographicHash[D])
- leafData
- leaf data bytes
- levels
- levels in proof, bottom up, each level is about stored value and position of computed element (whether it is left or right to stored value)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
implicit
val
encoder: SparkzEncoder
- Definition Classes
- SparkzEncoding
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- implicit val hf: CryptographicHash[D]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val leafData: LeafData
- val levels: Seq[(Digest, Side)]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- MerkleProof → AnyRef → Any
- def valid(expectedRootHash: Digest): Boolean
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated