Commit Graph

11 Commits (d29a0a88626d5603710e37b1df0f831581612946)

Author SHA1 Message Date
Carla Kirk-Cohen d29a0a8862
swap: add locking conditions to HtlcScript interface
Use of the Script() function is problematic when we introduce taproot
because our script will vary depending whether we use keyspend or a
tapleaf spend path (and on the tapleaf spent). This has not previously
been a problem for segwitv0 scripts, because they contain all of the
logical branches for each of our spend conditions in a single script.

This commit prepares for removal of the Script() function by moving
our address/pkScript/sigScript generation (which need Script()) into
each script's implementation of the HtlcScript interface so that
they have access to the script directly.
2 years ago
Carla Kirk-Cohen 1616943afe
swap: add taproot inputs to fee estimation 2 years ago
Harsha Goli d22b064e54
swap: HTLCV3 added
In this commit we add the version 3 htlc, which is implemented with
taproot script spending the two payment paths: the claim path case, and
the timeout case.
2 years ago
Carla Kirk-Cohen 9d2d5a78d4
multi: pass shared key to new htlc
TODO - our view etc functions don't have our shared key, find a good way
to get this. A possible solution is just to lazily store it so that we
don't need to call lnd/create a session every time we want to restore
it.
2 years ago
Harsha Goli 7a16e3b25d
multi: bump btcec/v2 and btcutil to new versions 2 years ago
Andras Banki-Horvath cd0a5f9f06
swap: extend swap to be able to create the V2 htlc 4 years ago
Andras Banki-Horvath 9fdd531130
swap: add HTLC script version 4 years ago
Andras Banki-Horvath 60661504a5 htlc: add string representation for HtlcOutputType enum 4 years ago
Joost Jager 753429547d
swap: fix htlc address generation
This commit fixes the generation of the htlc address. This bug didn't
affect the swap execution, because the htlc address is only used for
display to the user/caller.
5 years ago
Joost Jager 30c7d71c57
use np2wsh for loop in htlc 5 years ago
Olaoluwa Osuntokun f552bc06b1
utils: remove utils package in favor of new swap package 5 years ago