Class TransactionMessage.Builder

  • Enclosing interface:
    TransactionMessage

    public static class TransactionMessage.Builder
    extends Object
    Builder for the binary transaction message.
    • Method Detail

      • serviceId

        public TransactionMessage.Builder serviceId​(short serviceId)
        Sets service identifier to the transaction message.
      • transactionId

        public TransactionMessage.Builder transactionId​(short transactionId)
        Sets transaction identifier to the transaction message.
      • sign

        public TransactionMessage sign​(KeyPair keys,
                                       CryptoFunction crypto)
        Signs the message, creating a new signed binary transaction message.
        Parameters:
        keys - key pair with private and public keys. Public key is used as an author key of the message and private key is used for signing the message.
        crypto - a cryptographic function to use
        Returns:
        a new signed binary transaction message
        Throws:
        NullPointerException - if serviceId or transactionId or payload weren't set
        IllegalArgumentException - if public key has wrong size