Commit Graph

3 Commits (deb235a12689ce2dbd314a949b2ac60c48f44731)

Author SHA1 Message Date
Carla Kirk-Cohen deb235a126
multi: default to P2TR for loop out 2 years ago
Carla Kirk-Cohen 84c3ef0402
multi: update sweeping to allow different sighashes and claim scripts
Taproot spends require a different sighash, so we update our HtlcScript
interface to provide the appropriate sighash when sweeping. We also add
distinct Timeout/Success Script functions to allow for tapleaf spends
which have different locking scripts for different paths. Note that the
timeout and success paths will be the same for segwit v0 htlcs, because
it has a single branched script containing all spend paths.

In future iterations, this differentiation of claim scripts can also
be used to use musig2 to collaboratively keyspend P2TR htlcs with the
server. This script can be expressed as PriorityScript (because we'll
try to keyspend as a priority, and then fall back to a tap leaf spend).
As we've done here, segwit v0 spends would just return their single
script for PriorityScript, and the claim would be no different from
our other claims.
2 years ago
Oliver Gugger ca9ec4cfe7
looprpc: generate JSON/WASM client stubs 3 years ago