Open TommyYehCool opened 7 years ago
You can do it, though the API is not as clean.
I'll send you a snippet later on, busy atm, feel free to bump in 24 hrs if no response
But for now, mess around with the Seed/IKeyPair/AccountID classes :)
Hi do you have example that I can reference?
public class GenerateAddress {
public static void main(String[] args) {
Config.initBouncy();
SecureRandom random = new SecureRandom();
byte[] seedBytes = new byte[16];
random.nextBytes(seedBytes);
Seed seed = new Seed(seedBytes);
IKeyPair iKeyPair = seed.keyPair();
byte[] pub160Hash = iKeyPair.pub160Hash();
AccountID accountID = AccountID.fromBytes(pub160Hash);
System.out.println("secret= " + seed + ", address=" + accountID);
}
}
I saw the page RippleAPI has generateAddress.
Has somebody know how to do it by ripple-lib-java ?