pub fn server_htlc_send_taproot(
payment_hash: PaymentHash,
server_pubkey: PublicKey,
user_pubkey: PublicKey,
exit_delta: BlockDelta,
htlc_expiry: BlockHeight,
) -> TaprootSpendInfoExpand description
Construct taproot spending information for a VTXO that enables outgoing Lightning payments. This relates to the crate::VtxoPolicy::ServerHtlcSend policy.
This will build a taproot with 3 clauses:
-
The keyspend path allows Alice and Server to collaborate to spend the HTLC. The Server can use this path to revoke the HTLC if payment failed
-
One leaf of the tree allows Server to spend the HTLC after the expiry, if it knows the preimage. Server can use this path if Alice tries to spend using 3rd path.
-
The other leaf allows Alice to spend the HTLC after its expiry and with a delay. Alice must use this path if the server fails to provide the preimage and refuse to revoke the HTLC. It will either force the Server to reveal the preimage (by spending using 2nd path) or give Alice her money back.