⚡
Lightning Node Management
🇺🇸 English
🇺🇸 English
  • Contents
  • Lightning basics
  • Create inbound liquidity
  • Create outbound liquidity
  • Comparison table of software implementations
  • Comparison table of lightning channel markets
  • Node Types
    • Merchant
    • Spending
    • Routing
  • Advanced Tools
    • lnd.conf example
    • Advanced and automated fee settings
    • Set up an LND watchtower and connect a client
    • Methods to create a balanced channel with a trusted peer
    • Pool usage notes
    • Bos Score
  • Technicals
    • Connecting to a lightning node remotely
    • High onchain fee environment
    • Compact the LND database (channel.db)
    • Manage the LND onchain funds in Electrum Wallet
  • Recovery
    • Resources for LND
    • Resources for Core Lightning
  • Privacy
    • Resources on Lightning privacy
    • VPN tunnels
  • Hardware deployment
    • Hardware recommendations
    • RaspiBolt
    • RaspiBlitz
      • charge-lnd
      • Balance of Satoshis Telegram Bot
      • LND updates
      • Bitcoin Core updates
      • VPN and firewall setup
    • TrueNAS (FreeBSD) node
      • aliases
      • Balance of Satoshis
      • Lightning Terminal
      • Circuitbreaker
      • LNtop
      • LND notes
      • stream-lnd-htlcs
      • Suez
      • Tailscale
      • Connect Zeus
  • Donate
    • Donations
Powered by GitBook
On this page
  • Restore the onchain funds from an LND wallet in Electrum Wallet
  • Open https://guggero.github.io/cryptography-toolkit/#!/aezeed
  • Open https://iancoleman.io/bip39/
  • Open Electrum Wallet
  • Import the onchain part of the LND wallet to Electrum Wallet
  • Open https://guggero.github.io/cryptography-toolkit/#!/aezeed
  • Open https://iancoleman.io/bip39/

Was this helpful?

Edit on GitHub
  1. Technicals

Manage the LND onchain funds in Electrum Wallet

PreviousCompact the LND database (channel.db)NextResources for LND

Last updated 1 year ago

Was this helpful?

  • To create the master public keys (display the YPUB / ZPUB of the LND onchain wallet) to monitor and build transactions externally now you can use the command:

    lncli wallet accounts list --name default
  • To sign an a PSBT:

    lncli wallet psbt finalize --funded_psbt "base64_encoded_PSBT"
  • Broadcast a transaction with LND:

    lncli wallet publishtx "tx_hex"
  • Follow the discussion for more details in: https://github.com/raspiblitz/raspiblitz/issues/2192

Restore the onchain funds from an LND wallet in Electrum Wallet

Only do this if you understand the process. Never enter secrets into online webpages. Avoid browser windows with extensions. The Tor Browser is a good start (aim to use it offline).

Requires:

  • LND 24 words seed (+ passphrase if used)

  • useful to know the funded addresses

  • use a dedicated, secure operating system eg.

  • save online pages to disk and open in a new browser window

Open

  • under Decode mnemonic

    enter the 24 words seed (+ passphrase if used)

  • copy the HD node root key base58

  • enter the HD node root key base58 to BIP32 Root Key

  • under Derivation Path

    • Select the tab BIP84 for bc1.. addresses.

    • Select BIP49 for 3.. addresses.

  • Copy the private keys for the known or all addresses (Account Extended Private Key).

Open Electrum Wallet

When importing the private keys use the prefix:

  • p2wpkh: before the private keys of bc1... addresses

  • p2wpkh-p2sh: before the private keys of 3... addresses

Done. Once the Electrum Server finished scanning the funds should appear.

Import the onchain part of the LND wallet to Electrum Wallet

This is not a recommended way to manage the funds from the LND wallet, it is better be used as watch-only. Restoring from the seed in Electrum does not affect the offchain funds in channels. There is no guarantee that the change outputs from Electrum will appear in LND and vice versa.

Only do this if you understand the process. Never enter secrets into online webpages. Avoid browser windows with extensions. The Tor Browser is a good start (aim to use it offline).

Requires:

  • LND 24 words seed (+ passphrase if used)

  • save online pages to disk and open in a new browser window

  • under Decode mnemonic

    enter the 24 words seed (+ passphrase if used)

  • copy the HD node root key base58 for BTC (Bitcoin, Native SegWit, BIP84) or BTC (Bitcoin, SegWit, BIP49)

  • enter the HD node root key base58 to BIP32 Root Key

  • under Derivation Path

    • Select the tab BIP84 for bc1.. addresses.

    • Select BIP49 for 3.. addresses.

  • Import the Account Extended Private Key to Electrum for a hot wallet (not recommended).

Showing the use of:

showrootkey

This command converts the 24 word lnd aezeed phrase and password to the BIP32 HD root key that is used as the rootkey parameter in other commands of this tool.

Example command:

chantools showrootkey

Convert the xpub to zpub with this small python script:

Open

Follow:

use a dedicated, secure operating system eg.

Open

Open

Import the Account Extended Public key to Electrum for a watch only wallet. See:

Alternatively watch this video:

Tails
https://guggero.github.io/cryptography-toolkit/#!/aezeed
https://iancoleman.io/bip39/
https://bitcoinelectrum.com/importing-your-private-keys-into-electrum/
Tails
https://guggero.github.io/cryptography-toolkit/#!/aezeed
https://iancoleman.io/bip39/
https://bitcoinelectrum.com/creating-a-watch-only-wallet/
https://light-tube.eu/?latest=Latest&search=How+to+import+your+lighting+wallet+into+Electrum
https://github.com/guggero/chantools
https://gist.github.com/freenancial/d82fec076c13158fd34d1c4300b2b300