simolus3 / web3dart

Ethereum library, written in Dart.
MIT License
445 stars 274 forks source link

Incorrect keystore. #7

Open lhalcyon opened 6 years ago

lhalcyon commented 6 years ago

Here is the situation; I get the data below: mnemonic -> seed -> extendedBase58 -> m/44'/60'/0'/0/0 child private key . and I check these values on iancoleman , values are correct. Then I use web3dart create Credentials and Wallet while I get the incorrect public key ,address ,and Keystore. May Someone tell me where the possible wrongs lie ?

lhalcyon commented 6 years ago

I've got the Credentials with correct private key and public key in BigInt type. But when I convert them to hex string , I 'll get the wrong public key. And the keystore generated by API Wallet.toJson is incorrect, cuz imToken toast 'incorrect keystore' when imported !

simolus3 commented 6 years ago

I don't fully understand what you're trying to do: Import the wallet via the mnemonic and the derivation path? Because this library doesn't support any of that. I can only import and export v3 wallet files (also called on Keystore / JSON File on MyEtherWallet).

lhalcyon commented 6 years ago

em, I 've figured out that. The keystore lacks of address ! . I've add the code ,then import success in imToken .

simolus3 commented 6 years ago

Huh, that is weird. On the docs for that wallet format, is says that including the address was unnecessary and compromised privacy.

lhalcyon commented 6 years ago

never mind :) . I'm doing BIP32 ,39 44 on my own and I try to have web3dart in my project.

lhalcyon commented 6 years ago

I suppose imToken team check strictly?

lhalcyon commented 6 years ago

It seems web3j ,web3swift both need check address

eddywm commented 6 years ago

Just out of curiosity @lhalcyon, what are you going to do with that format when the mnemonic word list is already a portable format for most wallets.