Commit Graph

45 Commits (803773bb65a5bae560151896a86bcc161c47ca9d)

Author SHA1 Message Date
carla 16111352a8
multi: add cancel swap function to execute config 3 years ago
Oliver Gugger fdbf7e95e1
client: fix double hex encoding of node pubkey 3 years ago
Oliver Gugger 27fd6b3304
multi: use aperture instead of local lsat library
Since the lsat code was copied over to aperture a while ago for other
projects to use as well, we should migrate over to that shared code
also. This will give us the recently added "remove token if payment
failed and try again" feature for free along with some other small
updates to the lsat package.
3 years ago
Elle Mouton 65fe06cec2 loopd: verify loop out amount
This commit adds validation that checks if the loop out amount specified can
be satisfied given the nodes current channel balances.
3 years ago
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.
4 years ago
Andras Banki-Horvath 9fdd531130
swap: add HTLC script version 4 years ago
Joost Jager 43323ffbe2
loopout: extend htlc expiry based on conf target 4 years ago
carla cd2b08aec6
multi: consume and log sever state updates 4 years ago
Joost Jager 1869ad670f
looprpc: expose server message to clients 4 years ago
Joost Jager 8b215edaa2
multi: create init result structs 4 years ago
Joost Jager 68012f051a
loopout: create LoopOutSwapInfo struct 4 years ago
Joost Jager 0c9fcd790e
lndclient: move to github.com/lightninglabs/lndclient 4 years ago
Joost Jager b61b886c16
loopd: group and clarify swap server parameters 4 years ago
carla 2ebbc78131
swap: add constructor for swap config 4 years ago
Joost Jager 8c544bf2ba
loopdb: store outgoing channel set
Upgrade the database schema to allow for multiple outgoing channels.
This is implemented as an on-the-fly migration leaving the old key in
place.
4 years ago
Andras Banki-Horvath f0aff9b7bd looprpc+loopin: support for native segwit htlcs
This commit extends SwapResponse and SwapStatus with np2wsh and p2wsh
htlc output addresses to support both nested and native segwit htlcs
in loop-in.

Furthermore the commit adds support for native segwith loop-in htlcs.
When the htlc is paid internally, as of this commit we'll use NP2WSH,
otherwise users are free to select whether to pay the NP2WSH or the
P2WSH htlc.
4 years ago
Andras Banki-Horvath 7a44eec36f loopin: refactor LoopIn to return struct instead of tuple 4 years ago
Joost Jager 12ae3d6a40
loopd: make maximum number of payment parts configurable 4 years ago
Joost Jager 5588876b48
loopd: extract client configuration 4 years ago
Oliver Gugger 3da09aac0e
client: use cached info to log connected node 4 years ago
Olaoluwa Osuntokun bb38cf5c79
Merge pull request #165 from wpaulino/swap-server-over-tor
loopd: add SOCKS proxy config option to dial swap server over Tor
4 years ago
Wilmer Paulino 5b732d9012
loopd: add SOCKS proxy config option to dial swap server over Tor
This allows Loop users to further improve their privacy by not revealing
their source IP address. Note that the identity of the lnd node behind
Loop can still be revealed when performing a Loop In due to the swap
server extending an off-chain HTLC to the user.

Onion addresses don't yet exist for the swap servers, but they will be
added at a later time.
4 years ago
Oliver Gugger 3dd10f14dc
client: return miner fee of -1 if fee estimation fails 4 years ago
Joost Jager 535e964ec9
loopdb: migrate loop in channel to last hop
A database field was already in place to allow channel selection for
loop in. Unfortunately this field, which contains a short channel id,
isn't easily usable for controlling the loop server payment. Because of
non-strict forwarding, it is only possible to constrain a route to a
specific last hop pubkey.

This commit converts the existing field into a pubkey field.
4 years ago
Oliver Gugger ccdbc3b21b
multi: thread new config values through client 4 years ago
Johan T. Halseth d5c9a66c60
swap_server_client: call server with SwapPublicationDeadline set 4 years ago
Oliver Gugger 1650f3a18d
client+lsat: specify global timeout 4 years ago
Oliver Gugger 47bf510bd8
loopd: add RPC method to list tokens 4 years ago
Oliver Gugger 8cecae501c
lsat: add unary interceptor and simple store 4 years ago
Oliver Gugger 49cbe9aa63
loopd: add swap server TLS cert path
We need the ability to connect to a swap server that uses
a self-signed certificate. The LSAT proxy cannot proxy insecure
gRPC requests since they don't conform to the HTTP 1.1 standard.
Therefore the LSAT proxy fill only serve TLS connections.
This means, we need the TLS path option to specify the certificate
the test environment LSAT proxy uses.
4 years ago
Oliver Gugger b574e344ea
multi: add persistent logger 5 years ago
Oliver Gugger 69f2af9fdc
loop+cmd: extract types into swap module 5 years ago
Oliver Gugger 36838cf7f4
multi: fix most obvious linter errors 5 years ago
Johan T. Halseth 0023d1a0da
looprpc: update to new server protos
We update to new set of server protos where new Terms calls are added.
Here static information will be returned from the server.

We no longer have a feebase+feerate, but get a final fee directly
returned by the server.
5 years ago
Oliver Gugger 489ab5620e
loopd: receive external HTLC flag in loop in quote request 5 years ago
Joost Jager ecd36b921c
multi: base sweep fee estimate on actually used address type 5 years ago
Wilmer Paulino 47321ba4a4
loop: use default confirmation target for htlc sweep after expiry delta
In this commit, we introduce a delta from the on-chain HTLC's
expiration. Since clients are now able to specify a confirmation target
for the HTLC sweep, it's possible that the sweep doesn't confirm within
the intended target in the event of an increasing demand for block
space. Once the delta from the HTLC's expiration is reached, we'll begin
to use the default sweep confirmation target when sweeping the HTLC,
which should provide a timely confirmation. This is needed because if
the preimage has already been revealed, then we need to make sure we
sweep the HTLC before the server does.
5 years ago
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.
5 years ago
Joost Jager 7f9ab312fb
loopd: fix nil ptr derefence for monitor
Reason for the crash was an unpopulated HtlcAddress field.
5 years ago
Joost Jager 30c7d71c57
use np2wsh for loop in htlc 5 years ago
Joost Jager 2e48ead6d6
loopd: loop in from external address
Allow user to specify that htlc will be published by an external source.
In that case no internal htlc tx will be published.

To facilitate sending to the htlc address, the swap initiation response
is extended with that address.
5 years ago
Joost Jager 3e960b8b54
multi: loop in swap 5 years ago
Joost Jager 9a1b60b4be
multi: always supply chain params when decoding addresses 5 years ago
Olaoluwa Osuntokun 94f347e673
multi: finalize rename from uncharge to loop out 5 years ago
Olaoluwa Osuntokun 908d82acdb
loop: extract code from client package into new loop primary package 5 years ago