Interface Prolog

All Superinterfaces:
io.hotmoka.marshalling.api.Marshallable

public interface Prolog extends io.hotmoka.marshalling.api.Marshallable
The prolog of a deadline.
  • Field Details

    • MAX_PROLOG_SIZE

      static final int MAX_PROLOG_SIZE
      The 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 key getPublicKeyForSigningBlocks().
      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 key getPublicKeyForSigningDeadlines().
      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()
      Overrides:
      toString in class Object
    • 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

      boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      int hashCode()
      Overrides:
      hashCode in class Object