@Immutable public class ContractsListingRequest extends AbstractRequest
Constructor and Description |
---|
ContractsListingRequest(java.lang.String contractId,
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.
|
java.util.Optional<java.lang.String> |
getContractId()
Returns the contract id of the request.
|
byte[] |
getSignature()
Returns the signature of the request.
|
int |
hashCode()
Returns a hash code value for the object.
|
static byte[] |
serialize(java.util.Optional<java.lang.String> contractId,
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 ContractsListingRequest(java.lang.String contractId, java.lang.String entityId, int keyVersion, byte[] signature)
public java.util.Optional<java.lang.String> getContractId()
public byte[] getSignature()
public int hashCode()
hashCode
in class AbstractRequest
public boolean equals(java.lang.Object o)
ContractsListingRequest
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.util.Optional<java.lang.String> contractId, java.lang.String entityId, int keyVersion)