public class LedgerValidationRequest extends AbstractRequest
| Constructor and Description |
|---|
LedgerValidationRequest(java.lang.String assetId,
int startAge,
int endAge,
java.lang.String entityId,
int keyVersion,
byte[] signature)
Constructs a
LedgerValidationRequest with the specified asset id, entity ID, key
version, signature of the request, and client-side proof. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this object.
|
java.lang.String |
getAssetId()
Returns the id of the asset.
|
int |
getEndAge()
Returns the age of the asset to be validated to.
|
byte[] |
getSignature()
Returns the signature of the request.
|
int |
getStartAge()
Returns the age of the asset to be validated from.
|
int |
hashCode()
Returns a hash code value for the object.
|
static byte[] |
serialize(java.lang.String assetId,
int startAge,
int endAge,
java.lang.String entityId,
int keyVersion) |
void |
validateWith(com.scalar.dl.ledger.crypto.SignatureValidator validator)
Validates if the request is not tampered.
|
getEntityId, getKeyVersionpublic LedgerValidationRequest(java.lang.String assetId,
int startAge,
int endAge,
java.lang.String entityId,
int keyVersion,
byte[] signature)
LedgerValidationRequest with the specified asset id, entity ID, key
version, signature of the request, and client-side proof.assetId - an id of an assetstartAge - an age to be validated fromendAge - an age to be validated toentityId - an entity IDkeyVersion - the version of a digital signature certificate or a HMAC secret key.signature - a signature of the requestpublic java.lang.String getAssetId()
public int getStartAge()
public int getEndAge()
public byte[] getSignature()
public int hashCode()
hashCode in class AbstractRequestpublic boolean equals(java.lang.Object o)
LedgerValidationRequest and
equals in class AbstractRequesto - an object to be tested for equalitytrue if the other object is "equal to" this object otherwise falsepublic void validateWith(com.scalar.dl.ledger.crypto.SignatureValidator validator)
validateWith in class AbstractRequestvalidator - a SignatureValidatorcom.scalar.dl.ledger.exception.SignatureException - if the request is invalid.public static byte[] serialize(java.lang.String assetId,
int startAge,
int endAge,
java.lang.String entityId,
int keyVersion)