public class Proof extends Object
| Constructor and Description |
|---|
Proof(ByzCoinProto.Proof p)
Creates a new proof given a protobuf-representation.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getContractID() |
DarcId |
getDarcID() |
Instance |
getInstance() |
byte[] |
getKey() |
SkipBlock |
getLatest()
accessor for the skipblock assocaited with this proof.
|
byte[] |
getValue() |
List<byte[]> |
getValues() |
boolean |
isByzCoinProof() |
boolean |
isContract(String expected) |
boolean |
isContract(String expected,
SkipblockId id)
Checks if the proof is valid and of type expected.
|
boolean |
matches() |
ByzCoinProto.Proof |
toProto()
Get the protobuf representation of the proof.
|
boolean |
verify(SkipblockId id)
Verifies the proof with regard to the root id.
|
public Proof(ByzCoinProto.Proof p)
p - the protobuf-representation of the proofpublic Instance getInstance() throws CothorityNotFoundException
CothorityNotFoundException - if the requested instance cannot be foundpublic ByzCoinProto.Proof toProto()
public SkipBlock getLatest()
public boolean verify(SkipblockId id) throws CothorityException
id - the skipblock to verifyCothorityException - if something goes wrongpublic boolean matches()
public byte[] getKey()
public List<byte[]> getValues()
public byte[] getValue()
public String getContractID()
public DarcId getDarcID() throws CothorityCryptoException
CothorityCryptoException - if there's a problem with the cryptographypublic boolean isByzCoinProof()
public boolean isContract(String expected)
expected - the string of the expected contract.public boolean isContract(String expected, SkipblockId id) throws CothorityException
expected - the expected contractIdid - the Byzcoin id to verify the proof againstCothorityException - if something goes wrongCopyright © 2018. All rights reserved.