Skip to main content
You’re viewing an old version of the Arkade contracts documentation. Go to Your first contract for the current version.
In a Spilman channel, Alice locks funds once and pays Bob in many small steps. Each step is a fully signed transaction that pays Bob more than the one before. Nothing reaches the operator until Bob closes the channel with the latest step. The code uses arkProvider, indexerProvider, serverPubkey, exitTimelock, serverUnrollScript, and hex from Set Up Your Project. Bob must close before refundAt. After that time, Alice can take back the whole channel through the refund path.

Build the channel

Alice opens the channel by sending its capacity to this address.

Pay Bob

Each payment builds a transaction that splits the channel between Bob and Alice. Alice signs the transaction and its checkpoint, then sends both to Bob. Bob countersigns and keeps only the latest state. Alice never gets Bob’s signature, so she cannot submit an older state that pays Bob less.

Close the channel

Bob submits the latest state. The operator returns the checkpoint with its signature, and Bob adds the signatures he already holds.