Skip to content

Address generation problem #91

@dezuz

Description

@dezuz

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions