Skip to main content

Install the SDK

If you haven’t already, install the SDK and set up your environment
The Dryja-Poon construction enables bidirectional payment channels with revocation-based state updates.

Build the Tapscript

Funding output

2-of-2 multisig between Alice and Bob, with Ark timeout path:

To-local output (commitment transaction)

Funds belonging to the broadcaster, with revocation for punishment:

To-remote output (commitment transaction)

Funds belonging to the counterparty, immediately spendable:

The dual-path pattern

Every Lightning script gets two Taproot leaves:
The first leaf is vanilla Lightning. The second adds a CSV delay matching the Batch expiry for Ark unilateral exit. The server’s key never appears in commitment or HTLC scripts.

Script breakdown

Next steps

Lightning Channels

Full channel lifecycle on Arkade

Hashlock contract

Add hash conditions for HTLCs

Spilman channel

Simpler unidirectional channels

Deep dive

Learn about VTXOs and timelocks