Commit Graph

73 Commits (c8666caf2044534a0d7d00fa10650e1fba2355ab)

Author SHA1 Message Date
Oliver Gugger 617964e25f
loopd: allow loopd to be used as external subserver
When loopd runs in the same process as lnd (in LiT), it hooks itself
into lnd's RPC server as an external subserver. But because the user
should still be able to use the default loop macaroon, the loop daemon
must be able to validate its own macaroons as lnd's macaroon service
doesn't know the root key for it.
4 years ago
Oliver Gugger 751c70e6c7
loopd: add macaroon authentication to the daemon's server connection
To secure access to loop's RPC server, we add a macaroon authentication
service and its gRPC interceptors to the daemon's server connection.
4 years ago
Oliver Gugger ff17553f3b
mod+loopd: update to lnd 0.11.1
We update to the newest version of lnd so we can use the updated
macaroon service.
NOTE: This is a compile time dependency update only, no RPC level update
is required.
4 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
Oliver Gugger a8d93bec6a
loopd: add TLS to the daemon's server connection 4 years ago
Oliver Gugger 17e0165d4c
loopd: add TLS config to listenerCfg struct
As a preparation to be able to listen on a TLS enabled listener, we add
a TLS config parameter to the listener setup functions.
4 years ago
carla 6b93c70b8a
looprpc: add swap suggestions endpoint 4 years ago
carla 340766fbb5
liquidity: add swap suggestions endpoint to manager 4 years ago
carla 6fcbf54c02
looprpc: add get and set liquidity parameters endpoints 4 years ago
carla ce10cc7959
liquidity: add manager with updatable parameters 4 years ago
Andras Banki-Horvath 9fdd531130
swap: add HTLC script version 4 years ago
carla ed04120a1a
loopd: set network in default config path 4 years ago
carla d229a1a607
config: add default network value 4 years ago
Carla Kirk-Cohen 048a365e02
Merge pull request #267 from carlaKC/215-readyonstart
loopd: wait for lnd to be synced before starting
4 years ago
carla b4e4d5c73d
loopd: block until lnd is synced to chain 4 years ago
carla d7150d5556
loopd: add data, loop and config options 4 years ago
carla 852f459391
multi: add htlc confirmations parameter to client loop out request 4 years ago
carla 8da0ea6048
looprpc: add label to swap creation and display in list swaps 4 years ago
carla a9849bb317
multi: add failure reason to swap client server
To provide more information about swaps, we add a failure reason field
to our swaps. We do not extend our existing state enum to remain
backwards compatible.
4 years ago
Joost Jager 43323ffbe2
loopout: extend htlc expiry based on conf target 4 years ago
Joost Jager e72d998e78
loopout: show expiry range in terms 4 years ago
Joost Jager 8d1ec50fa7
looprpc: split quote message 4 years ago
Joost Jager 24099aa4f9
looprpc: split terms message 4 years ago
Joost Jager 1869ad670f
looprpc: expose server message to clients 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 83f25c98a3
loopd: return missing p2wsh loop out address 4 years ago
Joost Jager b61b886c16
loopd: group and clarify swap server parameters 4 years ago
Oliver Gugger c2e513ecd0
loopd: remove short flags to avoid collision 4 years ago
Oliver Gugger 74b3580e01
loopd+cmd/loopd: rename main Start function to Run 4 years ago
Oliver Gugger 774a44fac1
loopd: add StartAsSubserver method and started flag 4 years ago
Oliver Gugger 506d0c2257
loopd: refactor into Start/Stop methods 4 years ago
Oliver Gugger 215e5b99d6
loopd: extract daemon into struct 4 years ago
Oliver Gugger e696a38ec8
loopd: export Config struct 4 years ago
Oliver Gugger 5f70a05463
loopd: export DefaultConfig 4 years ago
Joost Jager ccec719423
looprpc: add outgoing channel set restriction
Expose the new channel set restriction on the loopd client rpc.
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
Joost Jager c62acd5b85
lndclient: add outgoing channel set restriction
Expose the channel set restriction that was introduced in LND 0.10.1 on
the proxy object.
4 years ago
Andras Banki-Horvath 936bb851f2 loopin: fix htlc address in LoopIn SwapResponse 4 years ago
Joost Jager 27a2b1a775
loopd: fix setting of max parts 4 years ago
Andras Banki-Horvath 0aa978bd09 loopin: modify internally published htlc to use p2wsh 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 62f654eef1 client: make ListSwaps thread safe 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 ad4e1e971e
loopd: check lnd version and subservers 4 years ago
Oliver Gugger a8e6118cfb
loopd+lndclient: extract config parameters into struct 4 years ago
carla fc99c8b320
multi: add confirmation target to loop in 4 years ago
carla f726fc2bc8
loopd: add missing zero case to validateConfTarget
Update validate function to return default target for zero value
confirmation targets, as indicated by the comment. This change
introduces a behaviour change for direct rpc calls to loopd (ie,
those not made by the loop cli tool). Previously, these calls
would fail and indicate that the conf target must be > 2, now
they will succeed with the default conf target. The loop cli
tool is unaffected because we already set the default value.

When clients upgrade from a previous version of loopd which did
not have this check, preexisting loops will be unaffected, because
loop ins had the default of 6 confirmations set, and loop outs with
<2 conf target would not have been created.
4 years ago