-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate address? #82
Comments
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);
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I saw the page RippleAPI has generateAddress.
Has somebody know how to do it by ripple-lib-java ?
The text was updated successfully, but these errors were encountered: