code: public static byte[] generateTransactionHash(
              RawTransaction rawTransaction, Credentials credentials) {
          byte[] signedMessage = TransactionEncoder.signMessage(rawTransaction, credentials);
          return Hash.sha3(signedMessage);
      }
docs: Utility method to provide the transaction hash for a given transaction.
  
  @param rawTransaction we wish to send
  @param credentials of the sender
  @return encoded transaction hash