Zondax / ledger-polkadot

Polkadot app for Ledger Nano S and X
Apache License 2.0
67 stars 32 forks source link

Importing ledger account into Polkadot vault #213

Open Daanvdplas opened 5 months ago

Daanvdplas commented 5 months ago

Hello, I am trying to import my ledger polkadot address into my Polkadot vault but I'm having a hard time deriving the right path and resulting to the correct address. There is also little to be found except the standard m/44'/354'/account'/0'/0'

:link: zboto Link

ftheirs commented 5 months ago

Hey @Daanvdplas, I think that you'll find useful this issue

Daanvdplas commented 5 months ago

No, I still don't know now how to manually create the derivation path to import my ledger created address into my Polkadot vault.

Daanvdplas commented 4 months ago

Please explain

ftheirs commented 4 months ago

@Daanvdplas, I think the other account looks really suspicious. Please be cautious. I strongly advise against doing this. The mnemonic should not be placed anywhere with an internet connection.

Have you check this code? https://github.com/jacogr/substrate-ledger-ed25519/blob/main/index.js

You'll need to set your mnemonic and then you can configure the derivation path here. https://github.com/jacogr/substrate-ledger-ed25519/blob/2d6d0e8c4f07597160cbfcf913d37fa2b2143fba/index.js#L35

You can check with the testing mnemonic first: https://github.com/Zondax/ledger-polkadot/blob/9d06c78f7ec1c096d2bccae863e932fbddde5a37/tests_zemu/tests/common.ts#L5

Daanvdplas commented 4 months ago

@ftheirs could you confirm that this is the way?

ftheirs commented 4 months ago

I haven't checked that on my end but that tool was developed by Jaco from PolkadotJS and we also have some tests for key derivation over here: https://github.com/Zondax/ledger-substrate-js/blob/main/tests/key_derivation.test.ts

Daanvdplas commented 4 months ago

I will have a look this weekend, will not try the other stuff because I also think it looks suspicious