Skip to content

tak1827/lightning-network-tx-flow

Repository files navigation

Lightning Network Transaction Flow

The basic concept of lightning network is simple. For further understanding, express lightning network transaction flows as javascript code referring to white paper.

Get started

Run install command

npm install

Execute flow

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.

Spend Revocable Delivery

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

Spend Breach Remedy

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

Spend HTLC Execution Revocable Delivery

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

Spend HTLC Breach Remedy

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

alt Fig13+14 of white paper

About

Transaction flow of Bitcoin lightning network.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published