-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Ethereum-type derivation paths #773
Comments
No. It only does the Substrate style. (Which is not compatible with Ethereum at all) |
Do you have an idea of the amount of work and complexity it would take to support that? |
Implement bip-44, basically. The big issue I have with this is that I'm trying to get rid on not-frequently-used stuff, so generally not happy to just reach for JS libs and get it and all it's dependencies. The only complexity is that Substrate always uses suri, so in the case of Ethereum the string (before stripping) won't be full compliant, i.e. seed (There is a use for bip-44 style derivation in the case of eg. Ledger as well, where ed keys are derived that way, even though it supports Polkadot/Kusama) |
I'm quite happy to do this on the apps UI first, with hdkey libs (none specific preferred), before adding it here. So my concern with the crypto libs is stuff like this - https://github.com/cryptocoinjs/hdkey/blob/master/package.json#L39 - it actually took ages to get secp256k1 our and deduped (so elliptic is not used here only), both are absolutely massive. So would suggest -
It will also be less complex, just pull in libs and be done with it. |
Hi @jacogr , |
It is not on the to-do-immediately list, so not a priority to get done. I have taken some looks at some of the derivations libs out there and it pulls in the wide whole world of dependencies in all cases I have seen. So atm have no clean, light solution for this - which is needed if it as to go into common. |
I'd be happy to get your suggestion on what should be done here and what library you suggest and maybe @joelamouche will work to have it implemented. It is not an urgent matter but it feels weird being able to use the private key and not the mnemonic for our chain. |
So HDKey, aka https://github.com/cryptocoinjs/hdkey/blob/master/lib/hdkey.js, is actually a good candidate - and the guys are solid. So if we can extract the derive (which links to deriveChild) from that and make it work with the keyring, it can work. (Out of the box they really all focus on their keypair types, which is not compatible.) So basically, my approach would be -
I don't believe it is major, but don't see much of another option without some serious hacks. The above approach is very lightweight. |
Will look at the comments, I have only peeked in at the code, sorry about that. |
Cool thanks |
done in #894 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query. |
In
common/packages/keyring/src/keyring.ts
there is a comment :
FIXME Need to support Ethereum-type derivation paths
Is this fixed yet? Are derivation path working for ethereum? If yes, what is the format?
Thanks in advance @jacogr
The text was updated successfully, but these errors were encountered: