ripple-unmaintained / ripple-lib-java

Java version of ripple-lib (work in progress)
ISC License
126 stars 109 forks source link

use privatekey to sign trans #88

Open xbcq opened 6 years ago

xbcq commented 6 years ago

hi,the java lib can not sign using derived key using bip39 or bip32? So in java lib,how to use private key and send the amount ,

APshenkin commented 6 years ago

@xbcq It's possible. You have to get private and public keys for address Then:

K256KeyPair ecPair = new K256KeyPair(new BigInteger(privateKey, 16), new BigInteger(publicKey, 16))

// sign transaction
SignedTransaction signed = payment.sign(ecPair)