Nodo lightning che utilizza l'implementazione https://github.com/lightningnetwork/lnd.
Tramite link docker compose puo' collegarsi a lightningd per aprire canali:
- docker exec -ti lnd bash
- lncli -n regtest walletbalance
- lncli -n regtest newaddress p2wkh
- (da hansel o gretel) bitcoin-cli generatetoaddress 101 {address 3.}
- (dal browser dell'host) aprire http://localhost:9737/#/node e copiare la pubkey
- lncli -n regtest connect {pubkey 5.}@lightningd:9735
- lncli -n regtest openchannel {pubkey 5.} 100000
- (dal browser dell'host) aprire http://localhost:9737/#/channels si vedra' il canale in stato "opening"
- (da hansel o gretel) bitcoin-cli generatetoaddress 6 $(bitcoin-cli getnewaddress)
- (dal browser dell'host) aprire http://localhost:9737/#/channels si vedra' il canale in stato "active"
Se si vuole connettere electrum a questo nodo LN
- docker exec -ti lnd bash
- lncli -n regtest getinfo | jq '.identity_pubkey'
- in electrum dal tab "Channels" cliccare "Open Channel"
- come "Remote node ID" inserire {pubkey 2.}@127.0.0.1:19735
Attualmente ln-cli non supporta config da file quindi il -n regtest va sempre specificato: lightningnetwork/lnd#533.