Payment Channels
Payment channels are peer to peer channels that can be used to exchange information, money and more.
Properties
Payment channels have the following properties:
- Payment channels can be opened and closed arbitrarily
- You do not need do an on-chain transaction to open a payment channel (but you can have one)
- Payment channels can be private or public
- You can have many peers in a channel
- You can add and remove peers from a channel
- Payment channels are data conduits
- On-chain payments close channels
Connecting and using payment channels
- User peer connects to provider peer via known endpoint
- Provider gives peer new endpoint (can be CGA) and Tx template
- User peer completes TX by adding funding inputs
- Provider supplies data and information to access next item (e.g. movie frames)
- Peers keep track of channel state using Sequence
Example - Streaming Movie
The following goes through the sequence of opening, using and closing a payment channel for the purposes of serving streamed content.