pull down to refresh

Welcome to Programming Lightning - an educational resource that teaches developers and technically-inclined individuals how the Lightning Network works by coding important pieces of the protocol from scratch.

Inspired by Programming Bitcoin, this course provides hands-on, protocol-level learning to help you deeply understand Lightning's inner workings, preparing you to contribute to Lightning implementations, protocol design, or application development.

If you really want to 1-up your lightning network knowledge and are willing to try a little coding, this might be a good next step.

Intro to Payment Channels is the first module of the larger Programming Lightning course. It guides students through building a simple off-chain wallet and Lightning payment channel from scratch using Rust and the rust-bitcoin library.

By the end of this course, your implementation will pass some of the major BOLT 3 test vectors, meaning you will have successfully implemented functionality such as:
  • Key derivation
  • Obscured commitment numbers
  • HTLC second-stage transactions (success and timeout)
  • Revocation mechanisms

Looks like they made the course with Replit in mind:

The course is optimized for Replit, where each Repl comes with Bitcoin Core running in the background. This allows you to easily generate Lightning transactions, broadcast them, and decode raw transactions as you complete exercises.

Launch on Replit →