2

Is there any Ethereum HD wallet java library? I find a popular java library on Github, web3j, which doesn't support HD wallet yet.

0

BitcoinJ does support HD wallet: BitcoinJ HD wallet RestoreFromSeed

0

You can achieve that mixing bitcoinj and web3j:

String seedCode = "yard impulse luxury drive today throw farm pepper survey wreck glass federal";

// BitcoinJ
DeterministicSeed seed = new DeterministicSeed(seedCode, null, "", 1409478661L);
DeterministicKeyChain chain = DeterministicKeyChain.builder().seed(seed).build();
List<ChildNumber> keyPath = HDUtils.parsePath("M/44H/60H/0H/0/0");
DeterministicKey key = chain.getKeyByPath(keyPath, true);
BigInteger privKey = key.getPrivKey();

// Web3j
Credentials credentials = Credentials.create(privKey.toString(16));
System.out.println(credentials.getAddress());

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.