-
Notifications
You must be signed in to change notification settings - Fork 57
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
Misleading HD derivation path in UI #7
Comments
I also thought about whether I should use the path starting with m. However, I decided to use the same as the Ledger Nano javascript library. I wanted to match the development specs of Ledger Nano and Keystation in our web wallet. If you have any better opinions, please let me know. https://github.com/Zondax/ledger-cosmos-js/blob/master/tests/basic.ispec.js#L29 |
I don't care much about the The main problem is The comment The way the Ledger lib communicates with the Ledger app is really an implementation detail of Ledger and nothing that should be communicated to the user. |
I see. I will discuss with our team member how to handle this. Thank you 😃 |
By the way, CosmJS can do this for you: import { pathToString, Slip10RawIndex } from "@cosmjs/crypto";
const path = [
Slip10RawIndex.hardened(44),
Slip10RawIndex.hardened(118),
Slip10RawIndex.hardened(0),
Slip10RawIndex.normal(0),
Slip10RawIndex.normal(6),
];
console.log(pathToString(path)); // m/44'/118'/0'/0/6 |
I will remove auto harden function. Users will be able to use the HD path as is. I'll add the parameter &version=2 to avoid confusion for existing users. |
Hello everyone! I just tested keystation together with https://wallet.cosmostation.io/
I was very confused about the HD derivation path that is used. For Cosmos Hub, the path should be
m/44'/118'/0'/0/0
, so some of the components are hardened, some are not. In the UI it simply shows44/118/0/0/0
, which indicatiates a path with 5 non-hardened components is used.But the address derivation is correct (e.g. menmonic
economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone
leads to addresscosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6
, which ism/44'/118'/0'/0/0
and compatible with Cosmos SDK and CosmJS).It would be nice if the UI was more precise about the derivation, which is critical for interoperability as well as privacy.
The text was updated successfully, but these errors were encountered: