Commit Graph

20 Commits (master)

Author SHA1 Message Date
Andras Banki-Horvath 8d21042432
sweeper: fix formatting and update error 1 year ago
Andras Banki-Horvath ebd44ab4c2
sweep: fix sweep fee estimation for p2tr outputs 1 year ago
Andras Banki-Horvath f8da106338
loopout: use psbt when obtaining the MuSig2 signature
In this commit we deprecate the sighash field from the
MuSig2SignSweepReq request in favour of using a psbt serialized sweep
transaction instead. This way the sever gains full transparency about
client sweep requests and can assemble the sighash to sign on its own.
2 years ago
Andras Banki-Horvath 82b58e5c0e
loopout: attempt cooperative musig2 sweep
This commit adds optional cooperative musig2 sweep by calling the server
to create a partial signature for the sweep if we'd otherwise be allowed
to spend the htlc. If the cooperative musig2 spend fails, we always fall
back to use the scriptpath spend.
2 years ago
Andras Banki-Horvath c9bc10ef76
sweep: fill sign method when script spending a taproot htlc 2 years ago
Carla Kirk-Cohen c7ef4297c0
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 d5952f1202
multi: bump all dependency to use lnd 0.15.0-beta.rc4
This commit bumps all dependencies to be in line with what's required
for the current release candidate of lnd 0.15.0-beta.
2 years ago
Harsha Goli dec6dd7e70
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
Harsha Goli 7a16e3b25d
multi: bump btcec/v2 and btcutil to new versions 2 years ago
Oliver Gugger b7e5c0b449
sweep: always send signed output's pk script
Fixes #457.
The SignOutputRaw RPC is normally too lenient when it comes to fields
not being set, which is why this used to work previously. But with lnd
in remote signing mode, we need all the extra meta information available
on an input being signed for, so we actually need the pk script being
set.
Loop fully works with a remote signing lnd backend pair after applying
this fix.
2 years ago
Andras Banki-Horvath 71a7dec649
sweeper: set sequence to be able to sweep htlc v2 utxo 4 years ago
Andras Banki-Horvath cd0a5f9f06
swap: extend swap to be able to create the V2 htlc 4 years ago
carla 435238ac03
mutli: bump lndclient version
We need the newer version of lndclient to get our synced to chain
state. This requires changes to our test mock, so it is separated
into a different commit. Since lndclient is expanding to be used in
projects other than loop, the client interface is embedded in our
mock rather than implementing functions we do not need. Functions that
we already use in tests are updated accordingly.

Note that while this commit bumps us to a version of lndclient that
defaults to requiring lnd 0.11, we do not bump our required version
yet because we are not using any new endpoints.
4 years ago
Joost Jager 0c9fcd790e
lndclient: move to github.com/lightninglabs/lndclient 4 years ago
Oliver Gugger 36838cf7f4
multi: fix most obvious linter errors 5 years ago
Joost Jager ecd36b921c
multi: base sweep fee estimate on actually used address type 5 years ago
Joost Jager 30c7d71c57
use np2wsh for loop in htlc 5 years ago
Olaoluwa Osuntokun 94f347e673
multi: finalize rename from uncharge to loop out 5 years ago
Olaoluwa Osuntokun a770e3d7c1
loop: update all import paths to public repo 5 years ago
Joost Jager 21fcd8d94e
Lightning Loop initial version 5 years ago