The basic concept of lightning network is simple. For further understanding, express lightning network transaction flows as javascript code referring to white paper.
npm install
node flow.js
If I puck pack all transactions flows into flow.js, it will hard to read. So I divide into several branches. Please checkout.
Please checkout 'spend-RD' branch and refer to following blog post for further information.
Blog Post: Simplified code of Bitcoin Lightning Network — Spend Revocable Delivery
Please checkout 'spend-BR' branch and refer to following blog post for further information.
Blog Post: Simplified code of Bitcoin Lightning Network part2 — Spend Breach Remedy
Please checkout 'spend-HERD' branch and refer to following blog post for further information.
Blog Post: Simplified code of Bitcoin Lightning Network part3 — Spend HTLC Execution Revocable Delivery
Please checkout "spend-HBR" branch and refer to following blog post for further information.
Blog Post: Simplified code of Bitcoin Lightning Network part4 — Spend HTLC Breach Remedy