web3j icon indicating copy to clipboard operation
web3j copied to clipboard

why mnemonic keywords are different?

Open SteadyAction opened this issue 5 years ago • 5 comments

When I use mnemonic keywords generated by web3j in Metamask, it's different. And it's also different from web3.swift library. web3.swift library and metamask works together but Web3j doesnt work...how do i fix it?

SteadyAction avatar Oct 15 '18 10:10 SteadyAction

This is to do with the configuration of how the mnemonic is used. I am no expert in this area - can you provide sample input and output for web3j and web3.swift library and I will try to reproduce.

iikirilov avatar Nov 08 '18 12:11 iikirilov

Gitter

iikirilov avatar Nov 09 '18 11:11 iikirilov

Facing the same problem, metamask seed phrase gives a different account,any help here??

razzbee avatar May 18 '19 19:05 razzbee

Bip32ECKeyPair masterKeypair = Bip32ECKeyPair.generateKeyPair(MnemonicUtils.generateSeed("XXXXXXX", null));
int[] path = {44 | HARDENED_BIT, 60 | HARDENED_BIT, 0 | HARDENED_BIT, 0,0};
Bip32ECKeyPair  x = Bip32ECKeyPair.deriveKeyPair(masterKeypair, path);
Credentials credentials = Credentials.create(x);
System.out.println(credentials.getAddress());

It would be greatly appreciated if someone could make this more obviously configurable.

iikirilov avatar May 24 '19 12:05 iikirilov

very well

jambestwick avatar Dec 01 '21 14:12 jambestwick

Assume this complete

mohamedelshami avatar Oct 21 '22 15:10 mohamedelshami