2
0
mirror of https://github.com/lightninglabs/loop synced 2024-11-04 06:00:21 +00:00
Commit Graph

24 Commits

Author SHA1 Message Date
George Tsagkarelis
b43fa11cc1
utils: add htlc & swap related helpers 2024-01-23 20:38:08 +02:00
Andras Banki-Horvath
a8dd2dca07
loop: correct htlc script version for very old swaps 2023-04-20 08:12:09 +02:00
Andras Banki-Horvath
cd91f90ed2
loop: use MuSig2 1.0 scheme for the new MuSig2 swaps 2023-03-20 20:08:43 +01:00
Andras Banki-Horvath
da4bcbea10
loopdb: refactor the SwapContract to hold all HTLC keys
This commit adds a new struct to hold all HTLC keys and refactors the
SwapContract which is used by both loopin and loopout swaps to use this
new struct. The newly added internal keys will for now hold the script
keys to keep everything equivalent but are already stored and read back
if the protocol version is set to MuSig2.
2023-03-20 20:08:43 +01:00
Andras Banki-Horvath
e8cfe4cea9
swap: pass in MuSig2 version when creating taproot HTLCs
This commit adds the MuSig2 version as an input parameter when creating
Taproot htlcs. This will allow us to create both old and new MuSig2
Taproot HTLCs correctly.
2023-02-06 20:46:03 +01:00
sputn1ck
4baf88c414
multi: fix linter issues
This commit fixes outstanding linter issues, that we're not found by
running `make lint` locally. The linter issues were found by running
`docker run -v $(pwd):/build loop-tools golangci-lint run --whole-files`

I added the `revive` to the excludes as it would be to much of a
refactor and IMO seems unneccesary. E.g.
`interface.go:222:6: exported: type name will be used as
loop.LoopInTerms by other packages, and that stutters; consider
 calling this InTerms (revive)`. I think `loop.LoopInTerms` is fine.
2022-12-15 18:08:38 +01:00
Andras Banki-Horvath
bdb4b773ed
swap: refactor htlc construction to allow passing of internal keys
This commit is a refactor of how we construct htlcs to make it possible
to pass in internal keys for the sender and receiver when creating P2TR
htlcs. Furthermore the commit also cleans up constructors to not pass in
script versions and output types to make the code more readable.
2022-11-30 18:16:44 +01:00
Andras Banki-Horvath
88956455b4
multi: completely remove support for NP2WSH htlcs
This commit removes all code related to NP2WSH htlcs. These were
historically used when segwit adoption was very sporadic and are not
used anywhere anymore. Some historical swaps stored in the DB may be
listed with incorrect htlc adresses from here on.
2022-11-04 17:14:53 +01:00
Andras Banki-Horvath
901a935514
loopin: enable p2tr htlcs without keyspend 2022-06-30 16:59:55 +02:00
Andras Banki-Horvath
9b37d744a0
multi: add ProtocolVersion_HTLC_V3 2022-06-30 16:59:54 +02:00
Andras Banki-Horvath
9610becebd
multi: add the aggregate internal pubkey to the v3 htlc 2022-06-09 10:20:16 +02:00
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.
2022-04-22 11:36:09 -04:00
Andras Banki-Horvath
133f3cac5f multi: integrate the new htlc v2 scripts to loop in/out
This commit bumps the current protocol version and integrates htlc v2
with loop in/out for new swaps, while keeping htlc v1 for any pending
swaps with previous protocol versions.
2020-09-09 19:54:01 +02:00
Andras Banki-Horvath
9fdd531130
swap: add HTLC script version 2020-08-27 16:21:47 +02:00
Joost Jager
0c9fcd790e
lndclient: move to github.com/lightninglabs/lndclient 2020-06-18 14:27:52 +02:00
carla
2ebbc78131
swap: add constructor for swap config 2020-06-08 12:53:07 +02:00
Andras Banki-Horvath
b2b0bad951 loopin+loopout: move htlc out of swapKit
This commit moves htlc out of swapkit in preparation of adding separate
p2wsh and np2wsh htlcs to loop-in swaps.
2020-05-04 23:18:14 +02:00
Oliver Gugger
b574e344ea
multi: add persistent logger 2019-10-28 17:09:23 +01:00
Oliver Gugger
69f2af9fdc
loop+cmd: extract types into swap module 2019-10-09 16:14:06 +02:00
Joost Jager
6efa62347b
multi: store swap cost in database 2019-05-20 13:57:18 +02:00
Joost Jager
1b306ad425
loopdb: replace swap state enum by state data object
This commits lays down the foundation in the database for adding more
persistent state data to swaps.
2019-05-20 13:57:09 +02:00
Joost Jager
30c7d71c57
use np2wsh for loop in htlc 2019-04-04 15:49:02 +02:00
Olaoluwa Osuntokun
94f347e673
multi: finalize rename from uncharge to loop out 2019-03-06 20:34:04 -08:00
Olaoluwa Osuntokun
908d82acdb
loop: extract code from client package into new loop primary package 2019-03-06 20:34:01 -08:00