blockcypher / java-client

Java SDK for BlockCypher
Apache License 2.0
40 stars 56 forks source link

ETH Transection issue #12

Closed pervez8ktt closed 6 years ago

pervez8ktt commented 6 years ago

When we generate new address endpoint for ETH we will not receive "wif" key. Then how will we make transaction with java-client as

// WIF Format of your private Key String myPrivateKey = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";

myPrivateKey must be in wif format.

pervez8ktt commented 6 years ago

I have found the solution for eth and beth transactions

Just replace

SignUtils.signWithBase58KeyWithPubKey(unsignedTx, myPrivateKey);

with

SignUtils.signWithHexKeyWithPubKey(unsignedTx, myPrivateKey);

and use eth or beth private key instead of wif.