lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.65k stars 2.07k forks source link

BIP32 HD root key, when is used to recover electrum wallet (master private key) not funds. not history #5929

Closed webdinos closed 2 years ago

webdinos commented 2 years ago

Background

I used chantools for extract root key from seed lnd wallet. When I create a new wallet from a master private key , I am seing legit addresses (instead of right segwit ones), and transactions history neither is shown.

Your environment

Steps to reproduce

Tell us how to reproduce this issue. Please provide stacktraces and links to code in question. create a electrum wallet from master private key.

Expected behaviour

It should list my btc segwit adresses, ransaction history and funds

Actual behaviour

list legit adresess, no history. no funds

Tell us what happens instead

guggero commented 2 years ago

You need to tell Electrum to use a BIP84 derivation scheme when importing the master private key. Perhaps that works automatically if chantools creates a zpriv instead of an xpriv. Also, see https://www.lightningnode.info/technicals/restorelndonchainfundsinelectrum

In any case, this isn't an lnd issue, closing.