@Test public void testSignMessage() { byte[] signedMessage = TransactionEncoder.signMessage( createEtherTransaction(), SampleKeys.CREDENTIALS); String hexMessage = Numeric.toHexString(signedMessage); assertThat(hexMessage, is("0xf86080010a840add5355933932323333373230333" + "63835343737353830378001a0dd9316183231a788f6" + "1b8797d8f91abac283159ad343eb19a09e048616c9a" + "fb7a01c9bf41469e6bdffd8e39c350c053c5b311cde" + "df481caea071fa43682afc1472")); }
public static byte[] signMessage(RawTransaction rawTransaction, Credentials credentials) { byte[] encodedTransaction = encode(rawTransaction); Sign.SignatureData signatureData = Sign.signMessage( encodedTransaction, credentials.getEcKeyPair()); return encode(rawTransaction, signatureData); }
TransactionEncoder { public static byte[] signMessage(RawTransaction rawTransaction, Credentials credentials) { byte[] encodedTransaction = encode(rawTransaction); Sign.SignatureData signatureData = Sign.signMessage( encodedTransaction, credentials.getEcKeyPair()); return encode(rawTransaction, signatureData); } }
TransactionEncoder { public static byte[] signMessage(RawTransaction rawTransaction, Credentials credentials) { byte[] encodedTransaction = encode(rawTransaction); Sign.SignatureData signatureData = Sign.signMessage( encodedTransaction, credentials.getEcKeyPair()); return encode(rawTransaction, signatureData); }  }
TransactionEncoder { public static byte[] signMessage(RawTransaction rawTransaction, Credentials credentials) { byte[] encodedTransaction = encode(rawTransaction); Sign.SignatureData signatureData = Sign.signMessage( encodedTransaction, credentials.getEcKeyPair()); return encode(rawTransaction, signatureData); }  static byte[] signMessage(RawTransaction rawTransaction, Credentials credentials); static byte[] signMessage(
            RawTransaction rawTransaction, byte chainId, Credentials credentials); static Sign.SignatureData createEip155SignatureData(
            Sign.SignatureData signatureData, byte chainId); static byte[] encode(RawTransaction rawTransaction); static byte[] encode(RawTransaction rawTransaction, byte chainId); }
TransactionEncoder { public static byte[] signMessage(RawTransaction rawTransaction, Credentials credentials) { byte[] encodedTransaction = encode(rawTransaction); Sign.SignatureData signatureData = Sign.signMessage( encodedTransaction, credentials.getEcKeyPair()); return encode(rawTransaction, signatureData); }  static byte[] signMessage(RawTransaction rawTransaction, Credentials credentials); static byte[] signMessage(
            RawTransaction rawTransaction, byte chainId, Credentials credentials); static Sign.SignatureData createEip155SignatureData(
            Sign.SignatureData signatureData, byte chainId); static byte[] encode(RawTransaction rawTransaction); static byte[] encode(RawTransaction rawTransaction, byte chainId);  }