Toniq-Labs / stoic-wallet

MIT License
47 stars 32 forks source link

Wrong mnemonic to account mappings #1

Closed qalqi closed 3 years ago

qalqi commented 3 years ago

For mnemonic harvest three supply energy trust barely tide enroll planet guide evidence title

dfinity/Keysmith generates an account with the address 2a8a2e713251d4b9c555f243932e4846918c79afb53aa8847d35eb357a79498b

where as stoic wallet generates account with address dabccf5ca238b6a347fc105a1bc0af9bbdd3f96a09341cdd7790ecb3c6dc65b0


https://github.com/dfinity/keysmith

stephenandrews commented 3 years ago

Thanks - this wasn't intended to work with keysmith, but we can look at getting this to work.

qalqi commented 3 years ago

need to use 'ecdsa' private key from on derived child private key using this function https://github.com/dfinity/keysmith/blob/73bcfe2f1f5e8588be9104ed728b9d481296f3b2/crypto/crypto.go#L46 to generate right slip44 address for ICP

stephenandrews commented 3 years ago

Can keysmith export a private key in like hex format or something?

qalqi commented 3 years ago

Keysmith takes mnemonic as input, generates offline wallet, can export in pem format

stephenandrews commented 3 years ago

Hm ok thanks, I'll set it up and get it working. That might be the better way, importing the .pem file

stephenandrews commented 3 years ago

We have added support to import keysmith keys by uploading the generated PEM file - this maps correctly now. Will be available in the next release