trustee-wallet/trusteeWallet

Provide the old Sollet.io derivation paths on Solana wallet

alanjds opened this issue · 4 comments

I am trying to recover an old wallet of Sollet.io, using the 12-word seed.

The address provided by trusteeWallet does not match. I searched the github repo here and could not find where the derivationPath comes from in Solana wallets.

The ones provided by Sollet.io are:

  • m/44'/501'/0'
  • m/44'/501'/0'/0'
  • m/501'/0'/0/0
    As saw here:
    image

Could you please:

  1. Point where in the codebase is the derivationPath for Solana, so I can send a quick PR adding the missing ones?
  2. Show the derivationPath with each address in the address options list?
  3. Consider to allow the user to input the derivationPath?

please open account settings - it has option to select address

photo_2021-09-17_17-59-36

photo_2021-09-17_17-59-39

PS for now solana nodes are not ok with transaction scanner - im rechecking this after network restart crazyness

Point where in the codebase is the derivationPath for Solana, so I can send a quick PR adding the missing ones?

https://github.com/trustee-wallet/trusteeWallet/blob/master/crypto/common/ext/bip44-constants.js
but as solana initially didnt follow normal derivation - its added as hook
https://github.com/trustee-wallet/trusteeWallet/blob/master/crypto/actions/BlocksoftKeys/BlocksoftKeys.js#L218

Show the derivationPath with each address in the address options list?
Consider to allow the user to input the derivationPath?

derivation is actually not easy to understand - thats why we are not showing ones for hd addresses or ethereum account, it should be in "advanced mode" only for expirienced users

derivation is actually not easy to understand - thats why we are not showing ones for hd addresses or ethereum account, it should be in "advanced mode" only for expirienced users

Ok.

https://github.com/trustee-wallet/trusteeWallet/blob/master/crypto/common/ext/bip44-constants.js
but as solana initially didnt follow normal derivation - its added as hook
https://github.com/trustee-wallet/trusteeWallet/blob/master/crypto/actions/BlocksoftKeys/BlocksoftKeys.js#L218

I see.

So to have this 3 addresses, we have these options:

  1. change bip44-constants.js SOL entry to:
    [ ``, "SOL", "SOL" ],

and do everything SOL inside BlocksoftKeys.js. Not very clean imho.

  1. Allow multiple hex on bip44-constants.js and change SOL entry to:
    [ [`44'/501`, `501'/0`], "SOL", "SOL" ],

and this would be way cleaner, handling multiple values on the hexes here:

Is this correct?

I would go with option (2). What do you think, @Turtus?

actually it not bip44 related - its more about solana custom derivation - and it wouldnt work as simple as
[ [44'/501, 501'/0], "SOL", "SOL" ]
will be also hack over bip44

for now lets keep it as it is - i plan rebuild entire keystorage system to support our new comming browser extension and ledger like hd wallets (it took us too long to be implemented but should be)

if you will have time - i will tag you on separate key storage module for trustee ecosystem - by plan till november it will go public