# Lightning Network

![https://explorer.acinq.co/](/files/-MXxZVgfPYDjt5HVg21q)

### Containers out of the box del playground

#### LND / lnd (Go)

* linguaggio Golang
* repo ufficiale <https://github.com/lightningnetwork/lnd>
* playground [docker-compose config](https://github.com/bitcoin-dalla-teoria-alla-pratica/bitcoin-in-action-playground/blob/master/docker-compose.yml#L105-L128)
* playground [README.md](https://github.com/bitcoin-dalla-teoria-alla-pratica/bitcoin-in-action-playground/blob/master/lnd/README.md)

Nel [README.md](https://github.com/bitcoin-dalla-teoria-alla-pratica/bitcoin-in-action-playground/tree/master/lnd) si trovano le istruzioni per aprire un canale fra questo nodo LN e lightningd e per collegare Electrum a questo nodo LN.

#### c-lightning / lightningd (C)

* repo ufficiale <https://github.com/ElementsProject/lightning>
* playground [docker-compose config](https://github.com/bitcoin-dalla-teoria-alla-pratica/bitcoin-in-action-playground/blob/master/docker-compose.yml#L90-L104)
* playground [README.md](https://github.com/bitcoin-dalla-teoria-alla-pratica/bitcoin-in-action-playground/blob/master/lightningd/README.md)

Assieme al nodo LN abbiamo attivato anche Spark wallet disponibile tramite il link qui di fianco sulla sx "Lightning Network Spark wallet".

#### ACINQ / eclair (Scala)

* repo ufficiale <https://github.com/ACINQ/eclair>
* playground docker-compose config #TODO
* playground README.md #TODO

### Aprire un canale fra Electrum e c-lightning

> Si ringrazia [@massmux](https://twitter.com/massmux) per aver suggerito questo use case

Aprire un browser sulla macchina locale:

* aprire <http://localhost:9737/#/node>\
  user: fulmine, password: fulmine;
* copiare il "Node address";

da [Electrum](/minare-il-primo-blocco-bitcoin/electrum-desktop.md) lanciato come [precedentemente descritto](/minare-il-primo-blocco-bitcoin/electrum-desktop.md) (fare attenzione al pallino verde che dimostri che il sistema è collegato alla regtest), fare i seguenti passi:

* in electrum dalla tab "Channels" fare "Open Channel";
* come Remote Node ID inserire {node address copiato precedentemente}@127.0.0.1:9735

il risultato è il seguente (dopo l'apertura di un canale).

![](/files/-MXxWZ9MoTnZEjFk6oxe)

{% hint style="info" %}
**NB**: ricordarsi di minare almeno 6 blocchi per ottenere le necessarie conferme alla apertura del canale.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://playground.bitcoininaction.com/lightning-network.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
