@Immutable public class AssetProofRetrievalRequest extends AbstractRequest
Constructor and Description |
---|
AssetProofRetrievalRequest(java.lang.String assetId,
int age,
java.lang.String entityId,
int keyVersion,
byte[] signature) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this object.
|
int |
getAge()
Returns the age of the asset.
|
java.lang.String |
getAssetId()
Returns the id of the asset.
|
byte[] |
getSignature()
Returns the signature of the request.
|
int |
hashCode()
Returns a hash code value for the object.
|
static byte[] |
serialize(java.lang.String assetId,
int age,
java.lang.String entityId,
int keyVersion) |
void |
validateWith(com.scalar.dl.ledger.crypto.SignatureValidator validator)
Validates if the request is not tampered.
|
getEntityId, getKeyVersion
public AssetProofRetrievalRequest(java.lang.String assetId, int age, java.lang.String entityId, int keyVersion, byte[] signature)
public java.lang.String getAssetId()
public int getAge()
public byte[] getSignature()
public int hashCode()
hashCode
in class AbstractRequest
public boolean equals(java.lang.Object o)
AbstractRequest
AbstractRequest
and
equals
in class AbstractRequest
o
- an object to be tested for equalitytrue
if the other object is "equal to" this object otherwise false
public void validateWith(com.scalar.dl.ledger.crypto.SignatureValidator validator)
validateWith
in class AbstractRequest
validator
- a SignatureValidator
com.scalar.dl.ledger.exception.SignatureException
- if the request is invalid.public static byte[] serialize(java.lang.String assetId, int age, java.lang.String entityId, int keyVersion)