@Test public void testEip155Transaction() { Credentials credentials = Credentials.create( "0x4646464646464646464646464646464646464646464646464646464646464646"); assertThat(TransactionEncoder.signMessage( createEip155RawTransaction(), (byte) 1, credentials), is(Numeric.hexStringToByteArray("f877098504a817c80082520894353535" + "353535353535353535353535353535353593313" + "0303030303030303030303030303030303080" + "0aa080f800b1b9cbd6a09d063f7f4857aa271" + "ffd34bedd7cbc65ec672f7c21f16798a017ac" + "2005fccd66cd6743d7cdde2cc47b75cee987e" + "161f7f0815d6e0accf24009"))); }
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);  }