Lightning Channel Explorer
Step-by-step walkthrough of a Lightning channel between Alice and Bob: key/basepoint setup, channel opening, commitment updates, revocation, force-close/cheat scenarios, and channel close paths using Bitcoin transactions.
Step 1: Generate Alice/Bob Keys, Addresses, and Basepoints
Create static key material for each peer: node key, funding key, and LN basepoints (payment, delayed-payment, revocation, HTLC), plus first per-commitment point.
Step 2: Open 2 BTC Channel (Alice 1 BTC + Bob 1 BTC)
Show BOLT-like opening flow (open_channel, accept_channel, funding_created, funding_signed, channel_ready), funding transaction, and initial commitment transactions for both sides.
Step 3: Update State (Alice Pays Bob 0.2 BTC)
Update balances to new commitment state, derive new per-commitment keys/scripts, and show revocation exchange that invalidates the previous state.
Step 4: Choose Next Action (Update / Force Close / Cheat)
Apply selected path and show exact state transition and on-chain consequence. Force-close and cheat paths close the channel immediately.
Step 5: Next Update (Bob Pays Alice 0.5 BTC)
If channel remains open, produce next commitment state and revocations for payment Bob -> Alice 0.5 BTC.
Step 6: Choose Channel Close Method
Close channel using selected method and show final closing/commitment transaction path on Bitcoin.