Module io.hotmoka.node.api
Package io.hotmoka.node.api.requests
Interface SignedTransactionRequest<R extends TransactionResponse>
- Type Parameters:
R- the type of the response expected for this request
- All Superinterfaces:
io.hotmoka.marshalling.api.Marshallable,TransactionRequest<R>
- All Known Subinterfaces:
ConstructorCallTransactionRequest,InstanceMethodCallTransactionRequest,JarStoreTransactionRequest,StaticMethodCallTransactionRequest
public interface SignedTransactionRequest<R extends TransactionResponse>
extends TransactionRequest<R>
A request signed with a signature of its caller.
-
Method Summary
Modifier and TypeMethodDescriptionYields the caller that signs the transaction request.Yields the chain identifier where this request can be executed, to forbid transaction replay across chains.byte[]Yields the signature of the request.voidintoWithoutSignature(io.hotmoka.marshalling.api.MarshallingContext context) Marshals this object into a given stream.byte[]Marshals this object into a byte array, without taking its signature into account.Methods inherited from interface io.hotmoka.marshalling.api.Marshallable
into, size, toByteArrayMethods inherited from interface io.hotmoka.node.api.requests.TransactionRequest
equals, hashCode, toString
-
Method Details
-
getCaller
StorageReference getCaller()Yields the caller that signs the transaction request.- Returns:
- the caller
-
getChainId
String getChainId()Yields the chain identifier where this request can be executed, to forbid transaction replay across chains.- Returns:
- the chain identifier
-
getSignature
byte[] getSignature()Yields the signature of the request. This must be the signature of its byte representation (excluding the signature itself) with the private key of the caller, or otherwise the signature is illegal and the request will be rejected.- Returns:
- the signature
-
intoWithoutSignature
Marshals this object into a given stream. The difference withMarshallable.into(MarshallingContext)is that the signature is not marshalled into the stream.- Parameters:
context- the context holding the stream- Throws:
IOException- if this object cannot be marshalled
-
toByteArrayWithoutSignature
byte[] toByteArrayWithoutSignature()Marshals this object into a byte array, without taking its signature into account.- Returns:
- the byte array resulting from marshalling this object
-