Package io.crums.util.mrkl
Class ProofStatement
java.lang.Object
io.crums.util.mrkl.ProofStatement
public class ProofStatement
extends java.lang.Object
Generates Statements derived from Merkle Proofs.
Structure
The general structure of returned statements is as follows.
- LHS. Expresses a path of hash pointers from the proof-item, to the root of the Merkle tree. The proof-item may be used as is, or may be substituted with an expression that evaluates to the proof-item (typically the hash of another byte string).
- RHS. A hex literal equal to the value of the root node in the Merkle tree. (A proof redundantly contains the root value of the tree.)
This way, the intent of such a statement is more transparent to a human reader; to validate the statement of course, a piece of software (such as provided in this library) must be used.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BRANCH_PAD
static java.lang.String
LEAF_PAD
-
Method Summary
Modifier and Type Method Description static Statement
createItemStatement(io.crums.util.mrkl.Proof proof, java.lang.CharSequence itemDef)
Creates and returns a Statement for the given proof and optional item definition itemDef.static Statement
createStatement(io.crums.util.mrkl.Proof proof)
Creates and returns a Statement for the given proof.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
LEAF_PAD
public static final java.lang.String LEAF_PAD -
BRANCH_PAD
public static final java.lang.String BRANCH_PAD
-
-
Method Details
-
createStatement
Creates and returns a Statement for the given proof. -
createItemStatement
public static Statement createItemStatement(io.crums.util.mrkl.Proof proof, java.lang.CharSequence itemDef)
-