- All Superinterfaces:
io.hotmoka.marshalling.api.Marshallable
public interface Prolog
extends io.hotmoka.marshalling.api.Marshallable
The prolog of a deadline.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe maximal length of the prolog, in bytes (inclusive). -
Method Summary
Modifier and TypeMethodDescriptionbooleanYields the chain identifier of the blockchain where the deadline is legal.byte[]getExtra()Application-specific extra data in the prolog.Yields the public key that must be used to sign the blocks having a deadline with this prolog.Yields the public key that must be used to sign the blocks having a deadline with this prolog, in Base58 format.Yields the public key that miners must use to sign deadlines having this prolog.Yields the public key that miners must use to sign deadlines having this prolog, in Base58 format.io.hotmoka.crypto.api.SignatureAlgorithmYields the signature algorithm that nodes must use to sign blocks having a deadline with this prolog, with the keygetPublicKeyForSigningBlocks().io.hotmoka.crypto.api.SignatureAlgorithmYields the signature algorithm that miners must use to sign deadlines having this prolog, with the keygetPublicKeyForSigningDeadlines().inthashCode()voidintoWithoutConfigurationData(io.hotmoka.marshalling.api.MarshallingContext context) Marshals this object into a given stream.toString()Methods inherited from interface io.hotmoka.marshalling.api.Marshallable
into, size, toByteArray
-
Field Details
-
MAX_PROLOG_SIZE
static final int MAX_PROLOG_SIZEThe maximal length of the prolog, in bytes (inclusive).- See Also:
-
-
Method Details
-
getChainId
String getChainId()Yields the chain identifier of the blockchain where the deadline is legal.- Returns:
- the chain identifier
-
getSignatureForBlocks
io.hotmoka.crypto.api.SignatureAlgorithm getSignatureForBlocks()Yields the signature algorithm that nodes must use to sign blocks having a deadline with this prolog, with the keygetPublicKeyForSigningBlocks().- Returns:
- the signature algorithm
-
getPublicKeyForSigningBlocks
PublicKey getPublicKeyForSigningBlocks()Yields the public key that must be used to sign the blocks having a deadline with this prolog.- Returns:
- the public key; this is guaranteed to be a valid key for
getSignatureForBlocks().
-
getPublicKeyForSigningBlocksBase58
String getPublicKeyForSigningBlocksBase58()Yields the public key that must be used to sign the blocks having a deadline with this prolog, in Base58 format.- Returns:
- the public key; this is guaranteed to be a valid key for
getSignatureForBlocks()
-
getSignatureForDeadlines
io.hotmoka.crypto.api.SignatureAlgorithm getSignatureForDeadlines()Yields the signature algorithm that miners must use to sign deadlines having this prolog, with the keygetPublicKeyForSigningDeadlines().- Returns:
- the signature algorithm
-
getPublicKeyForSigningDeadlines
PublicKey getPublicKeyForSigningDeadlines()Yields the public key that miners must use to sign deadlines having this prolog.- Returns:
- the public key; this is guaranteed to be a valid key for
getSignatureForDeadlines()
-
getPublicKeyForSigningDeadlinesBase58
String getPublicKeyForSigningDeadlinesBase58()Yields the public key that miners must use to sign deadlines having this prolog, in Base58 format.- Returns:
- the public key; this is guaranteed to be a valid key for
getSignatureForDeadlines()
-
getExtra
byte[] getExtra()Application-specific extra data in the prolog.- Returns:
- the extra data
-
toString
String toString() -
intoWithoutConfigurationData
void intoWithoutConfigurationData(io.hotmoka.marshalling.api.MarshallingContext context) throws IOException Marshals this object into a given stream. This method in general performs better than standard Java serialization, wrt the size of the marshalled data. It does not report information that can be recomputed from the configuration of the node storing this prolog.- Parameters:
context- the context holding the stream- Throws:
IOException- if this object cannot be marshalled
-
equals
-
hashCode
int hashCode()
-