# Lightning Network

This is a collaborative effort to create some teaching materials about the Lightning Network. Eventually all information provided and articles should be written on this wiki for a start we can of course just link to articles.
There is a list of potential videos to be created on the talk page. Feel free to take over responsibility for a video or add ideas to the list. You could also erase videos from the list if you think we wouldn't need them.
We start with a loose collection of links.

## Tutorials for end users
### setting up a lightning node
#### c-lighting

* c-lightning install docs
* Run your own mainnet Lightning Node
* Bitcoin — Setup your own ⚡lightning ⚡ node on mainnet!
* How to Set Up a Lightning Network Node
* Harnessing Lightning For Instant Bitcoin Transacting — A Tutorial
* How to build your own portable plug-in Lightning node!
* Ride the Lightning How to use the Lightning Network on the Bitcoin Mainnet

#### eclair

* ACINQ Eclair install documentation
* Setting up Lightning with an Eclair Node from Acinq (on Bitcoin testnet) on a Windows machine
* Eclair How to setup LN node on Windows 10
* REDACTED Bitcointalk links trigger spam filter

#### lighting peach

* Lightning Peach Wallet install documentation

#### lit

* LIT source and install documentation

#### lnd

* LND install documentation
* Detailed guide to installing LND and Bitcoind on Ubuntu 16.04 LTS for Mainnet
* Stadicus guides for setting up node on Raspberry Pi or Odroid device
* Setup a lightning network node for Litecoin on a Mac
* Setting up and Testing LND with the Testnet Lightning Faucet - January 2017 old!
* Create a C# Console app from scratch

#### ptarmigan

* ptarmigan install document

### securing a lightning node

* firewalling?
* before.rules for ufw?

## Materials for developers
### Lightning-rfc BOLT

* https://github.com/lightningnetwork/lightning-rfc
* White-Paper: http://lightning.network/lightning-network-paper.pdf
* Presentation explaining Construction of Payment Channels (via Revocable Sequence Maturity Contracts) and Construction of the Network (via Hashed Time Locked Contracts): File:Examining_the_lightning_network_on_a_protocol_level.pdf

### c-lightning

* source code: https://github.com/ElementsProject/lightning
* python API Client: https://github.com/ElementsProject/lightning/tree/master/contrib/pylightning
* Installation Guide: https://github.com/ElementsProject/lightning/blob/master/doc/INSTALL.md
* Documentation for Developers: https://github.com/ElementsProject/lightning/blob/master/doc/HACKING.md
* Mailinglist: https://lists.ozlabs.org/listinfo/c-lightning
* irc: http://webchat.freenode.net/?channels=%23c-lightning

### lnd

* LND source code
* LND Overview and Developer Guide
* LND Lightning Tutorial
* Become a contributor to the Lightning Dev Site
* How to fork, clone and submit pull requests for changes, to LND
* Contribution guidelines for LND

### rust lightning

* Lightning rust library, 10% usable

### Technical reads

* Understanding the Lightning Network Part 1 Building a Bidirectional Bitcoin Payment Channel
* Understanding the Lightning Network Part 2 Creating the Network
* Understanding the Lightning Network Part 3 Completing the Puzzle and Closing the Channel

## Teaching materials

* a really good starting point is the Lightning Network Article on the Bitcoin Wiki
* Obviously the first Place we should look at is the Wikiversity Category Lightning Network
* Wikimedia commons has an archive of openly licensed talks and graphics about the lightning network
* There is also the Lightning Network Wikipedia article
* Lightning Resources page
* Understanding Lightning Network using an Abacus and possibly useful video
If none of those help you can ask questions and tag them with lightning network over at bitcoin.stackexchange.com

## Other curated information sources

* Awesome list of LN resources

# Hack A Lapp/Introduction to Bitcoins Lightning Network App Development
## Lessons

* install pylightning module
* invoke an Remote Procedure Call to your c-lightning node in a python code base
* create an invoice for your customer
* work with the listinvoices method
* understand that invoices have a status
* access data from a specific invoice
* find a specific invoice with its payment hash
* Check if a specific invoice has been paid
* change the response to the customer depending on the payment status of the invoice

## Discussion

* C-Lightning with python
** Ask your customer to pay with bitcoins lightning network by creating a lightning invoice
** Check which payments have been received
** Check if your customer has paid the invoice