ripple-unmaintained / ripple-lib-java

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

Address generation problem #91

Open dezuz opened 4 years ago

dezuz commented 4 years ago

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 commented 4 years ago

are you using ed25519 key ?

dezuz commented 4 years ago

using ed25519 key for what?

sublimator commented 4 years ago

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

sublimator commented 4 years ago

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

dezuz commented 4 years ago

thank you for link secret = saNyQrVezXdAaXGeyTXTQasWFKGbV address = rEMZv3FvBeqRdHnCdpygPMMerN1mqAhQS2

dezuz commented 4 years ago

sorry, missclick

sublimator commented 4 years ago

oh forgot about this

feel free to bump been busy

sublimator commented 4 years ago

@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?