Skip to content
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

Address generation problem #91

Open
dezuz opened this issue Jan 14, 2020 · 8 comments
Open

Address generation problem #91

dezuz opened this issue Jan 14, 2020 · 8 comments

Comments

@dezuz
Copy link

dezuz commented Jan 14, 2020

In previous issues you wrote a code example how to create wallet address

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);
    }
}

But address is not correct, can you write a new example?

@sublimator
Copy link
Contributor

sublimator commented Jan 14, 2020 via email

@dezuz
Copy link
Author

dezuz commented Jan 14, 2020

using ed25519 key for what?

@sublimator
Copy link
Contributor

Can you show me a secret= . / . address= . you think is wrong ?

@sublimator
Copy link
Contributor

Also, this is more up-to-date (by a lot ):
https://github.com/sublimator/ripple-lib-java

@dezuz
Copy link
Author

dezuz commented Jan 14, 2020

thank you for link
secret = saNyQrVezXdAaXGeyTXTQasWFKGbV
address = rEMZv3FvBeqRdHnCdpygPMMerN1mqAhQS2

@dezuz dezuz closed this as completed Jan 14, 2020
@dezuz dezuz reopened this Jan 14, 2020
@dezuz
Copy link
Author

dezuz commented Jan 14, 2020

sorry, missclick

@sublimator
Copy link
Contributor

sublimator commented Jan 15, 2020 via email

@sublimator
Copy link
Contributor

@dezuz
Finally looked at this
I checked your secret and the address generated by rippled over at
https://github.com/sublimator/ripple-lib-java
It seems working?
Maybe this old fork isn't working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants