public interface ITransaction
The interface ITransaction represents a transaction in a blockchain system.

This interface defines methods for getting and setting various attributes of a blockchain transaction, such as the hash, sender's hash, signable data, signature, text, and timestamp.

  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Gets the hash of the transaction.
    byte[]
    Gets the hash of the sender.
    byte[]
    Gets the data that can be signed in the transaction.
    byte[]
    Gets the signature of the transaction.
    Gets the textual data of the transaction.
    long
    Gets the timestamp of when the transaction was created.
    void
    setHash(byte[] hash)
    Sets the hash of the transaction.
    void
    setSenderHash(byte[] senderHash)
    Sets the hash of the sender.
    void
    setSignature(byte[] signature)
    Sets the signature of the transaction.
    void
    Sets the textual data of the transaction.
    void
    setTimestamp(long timestamp)
    Sets the timestamp of when the transaction was created.
  • Method Details

    • getHash

      byte[] getHash()
      Gets the hash of the transaction.
      Returns:
      the hash as a byte array
    • setHash

      void setHash(byte[] hash)
      Sets the hash of the transaction.
      Parameters:
      hash - the hash to set, as a byte array
    • getSenderHash

      byte[] getSenderHash()
      Gets the hash of the sender.
      Returns:
      the sender's hash as a byte array
    • setSenderHash

      void setSenderHash(byte[] senderHash)
      Sets the hash of the sender.
      Parameters:
      senderHash - the sender's hash to set, as a byte array
    • getSignableData

      byte[] getSignableData()
      Gets the data that can be signed in the transaction.
      Returns:
      the signable data as a byte array
    • getSignature

      byte[] getSignature()
      Gets the signature of the transaction.
      Returns:
      the signature as a byte array
    • setSignature

      void setSignature(byte[] signature)
      Sets the signature of the transaction.
      Parameters:
      signature - the signature to set, as a byte array
    • getText

      String getText()
      Gets the textual data of the transaction.
      Returns:
      the text as a String
    • setText

      void setText(String text)
      Sets the textual data of the transaction.
      Parameters:
      text - the text to set, as a String
    • getTimestamp

      long getTimestamp()
      Gets the timestamp of when the transaction was created.
      Returns:
      the timestamp as a long value
    • setTimestamp

      void setTimestamp(long timestamp)
      Sets the timestamp of when the transaction was created.
      Parameters:
      timestamp - the timestamp to set, as a long value