What is Nostr?
Cyph3rp9nk
npub1lnm…rrnt
2023-03-11 09:23:19

Cyph3rp9nk on Nostr: Howto restore onchain funds in Start9 LND Yesterday I found myself in a critical ...

Howto restore onchain funds in Start9 LND

Yesterday I found myself in a critical situation with my LND node (Start9), for some reason I don't know wallet.db seemed not to synchronize the changes in chain and this prevented me from being able to get the onchain funds out of the closed channels.

This is easy if you have the 24 words and you can restore in another wallet LND, but Start9 does not provide the 24 words, they understand that with the copy of wallet.db and channel.db is enough.

I am sorry to tell you that it is not enough, you must enable the 24 words to be able to withdraw funds onchain in cases where the file is corrupted, don't be stubborn, your backup system is not perfect.

That said, I tell you how I solved it.

Download chantools:

https://github.com/guggero/chantools

Stop your LND node.

Go to the directory where LND is installed in /embassy-data/package-data/volumes.

Find wallet.db and pwd.dat, the latter is the password for wallet.db.

Create a scritp containing the following:

#!/bin/bash
Export WALLET_PASSWORD = $(cat pwd.dat)
chantools walletinfo --walletdb=wallet.db -withrootkey

The script has to be done because pwd.dat contains characters that cannot be copied, so you pass the content to a variable that chantools is able to read.

Once you run the script you will have your HD bip32 root key that you can import into sparrow.

You will be able to see all your onchain balance under the corresponding segwit and taproot bypass patches:

Segwit m/84'/0'/0'
Taproot m/86'/0'/0'

Check both, for some reason some addresses go to segwit and some to taproot.
Author Public Key
npub1lnms53w04qt742qnhxag5d6awy7nz6055flnmjkr6jg39hm86dlq7arrnt