Interface TransactionMessage


public interface TransactionMessage
An Exonum transaction message.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Interface Description
    static class  TransactionMessage.Builder
    Builder for the binary transaction message.
  • Method Summary

    Modifier and Type Method Description
    static TransactionMessage.Builder builder()
    Creates a new builder for the transaction message.
    static TransactionMessage fromBytes​(byte[] bytes)
    Creates the transaction message from the given bytes array.
    PublicKey getAuthor()
    Returns a public key of the author of the transaction message.
    com.google.protobuf.ByteString getPayload()
    Returns the payload containing the serialized transaction parameters.
    int getServiceId()
    Returns the numeric identifier of the service instance this message belongs to.
    byte[] getSignature()
    Returns the Ed25519 signature over this binary message.
    int getTransactionId()
    Returns the transaction type identifier which is unique within the service.
    HashCode hash()
    Returns the SHA-256 hash of this message.
    byte[] toBytes()
    Returns the transaction message in binary format.
  • Method Details

    • getAuthor

      PublicKey getAuthor()
      Returns a public key of the author of the transaction message.
    • getServiceId

      int getServiceId()
      Returns the numeric identifier of the service instance this message belongs to.
    • getTransactionId

      int getTransactionId()
      Returns the transaction type identifier which is unique within the service.
    • getPayload

      com.google.protobuf.ByteString getPayload()
      Returns the payload containing the serialized transaction parameters.
    • hash

      HashCode hash()
      Returns the SHA-256 hash of this message.

      Please note that the hash is not necessarily calculated over the whole message binary representation; the algorithm is defined in the signed message.

    • getSignature

      byte[] getSignature()
      Returns the Ed25519 signature over this binary message.

      The signature is not guaranteed to be valid and must be verified against the signer’s public key.

      See Also:
      CryptoFunctions.ed25519()
    • toBytes

      byte[] toBytes()
      Returns the transaction message in binary format.
    • builder

      static TransactionMessage.Builder builder()
      Creates a new builder for the transaction message.
    • fromBytes

      static TransactionMessage fromBytes​(byte[] bytes)
      Creates the transaction message from the given bytes array.