2
0
mirror of https://github.com/lightninglabs/loop synced 2024-11-08 01:10:29 +00:00
Commit Graph

92 Commits

Author SHA1 Message Date
sputn1ck
be9ca71bf2
loopd: convert unix millisecond timestamps to seconds 2023-08-08 08:42:16 +02:00
George Tsagkarelis
921f4d06e7
multi: integrate initiator string to various calls 2023-07-28 14:43:18 +03:00
Slyghtning
ca933f843c
loopd: xpub support for loop out 2023-07-27 13:51:53 +02:00
sputn1ck
ca032b1f1d
multi: expose l402 id in grpc interface
This commit adds an additional field to the tokens in order to fetch the
relevant l402 ids for the users tokens.
2023-06-22 17:55:47 +02:00
sputn1ck
becc8a38d8
multi: use context in loopdb call
This commit adds a context to our loopdb interface, which we should use
in the sqlite migration.
2023-06-19 12:28:32 +02:00
George Tsagkarelis
a48924a664
liquidity: get autoloop flag directly from params
Previously we would exclusively pass the autoloop boolean to multiple
functions while they had directly access to the manager's parameters.
With this commit we remove this explicit flag from the various function
interfaces and retrieve the value directly from the parameters.
2023-05-29 13:24:16 +03:00
Slyghtning
043f780198 loopd: adding getInfo rpc call 2023-05-24 17:50:24 +02:00
George Tsagkarelis
aca6428b0e
liquidity+loopd: move last budget refresh to parameters 2023-03-16 02:10:32 +02:00
George Tsagkarelis
b025b9ae37
multi: add recurring autoloop budget 2023-02-22 19:48:03 +02:00
George Tsagkarelis
fa0393b331
multi: add OutAddr parameter for autoloop loop out 2022-12-16 12:02:46 +02: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
sputn1ck
0f924b36cd
multi: bump lndclient and lnd version to latest
Co-authored-by: Oliver Gugger <gugger@gmail.com>
2022-07-07 17:28:22 +02:00
Andras Banki-Horvath
391ef57ea3
loopout: enable p2tr without keyspend 2022-06-30 16:59:55 +02:00
Andras Banki-Horvath
901a935514
loopin: enable p2tr htlcs without keyspend 2022-06-30 16:59:55 +02:00
sputn1ck
1df6685653
looprpc: fix suggestswaps response
This commit fixes the SuggestSwaps rpc call. Previously, when multiple
DisqualifiedPeers were provided, all pubkeys would be the same.
2022-06-08 12:09:02 +02:00
yyforyongyu
8217ee31c3
liquidity+loopd: refactor SetParameters to take a rpc request
This commit refactors the method `manager.SetParameters` to take a
`SetLiquidityParamsRequest`. As we'll see in the following commit, this
will enable us saving the params to disk more easily.
2022-06-07 19:19:52 +08:00
sputn1ck
ece0f76e7f
loop: update listswaps api 2022-05-31 16:26:55 +02:00
Yong
e98d813885
Merge pull request #495 from sputn1ck/check_p2pk_dest
loopout: reject P2PK addresses
2022-05-25 00:10:22 +08:00
sputn1ck
ce596468e9
loopout: reject unsupported address formats
This commit adds a check to reject unsupported address
formats such as P2PK or P2TR addresses
2022-05-20 10:22:11 +02:00
sputn1ck
a1271fee40
multi: fix linter issues 2022-05-20 10:16:46 +02:00
sputn1ck
f0bf9302cc
make: dockerize linter 2022-05-20 10:16:42 +02:00
Harsha Goli
7a16e3b25d
multi: bump btcec/v2 and btcutil to new versions 2022-03-25 11:00:16 +01:00
carla
16799838f7
multi: surface loop in parameters on rpc 2021-12-15 09:11:46 +02:00
carla
4689040333
multi: surface suggested loop in swap on rpc 2021-12-15 09:10:28 +02:00
carla
213f5c7c8b
loopd: alias server rpc import with looprpc
Packages importing loopd can't import 2x looprpc packages (in the
form of swapserverrpc and looprpc). To get around this, we alias
each import with a different name, updating the server in this
commit.
2021-12-14 11:35:30 +02:00
carla
996b5e43ab
loopd: alias client rpc import with clientrpc
Packages importing loopd can't import 2x looprpc packages (in the
form of swapserverrpc and looprpc). To get around this, we alias
each import with a different name, starting with the client in this
commit.
2021-12-13 15:28:38 +02:00
carla
dad103530f
multi: move server proto files to their own directory
Protobuf does not allow naming conflicts for files within the same
process, because all proto messages register themselves in a global
registry.

This is problematic because the server's itests import the client's
looprpc package to make rpc queries to the loopd client, thus importing
duplicate common.proto and server.proto from the client's looprc package
(since they're both in there as well).

This change moves the server's proto files into their own directory so
that they are not imported when we want to use the client's files. We
cannot change the package name for the server, because that would be
a breaking change (the package name is included in URIS). Fortunately,
we have the go_package option which allows us to place generated files
in a different location.
2021-12-13 13:56:40 +02:00
Harsha Goli
f1a7d8fb49
multi: pass private, routehints from loopcli - loopd - loop server
This commit passes routehints all the way from when/if the user passes
them from the cli all the way to the backend loop server. If private is
used, this commit passes that boolean down to different stages, where it
is then converted into routehints.

main: add --private and --route_hints to quote

Adds --private and --route_hints flags to quote cli
2021-12-07 21:04:07 -05:00
carla
91a90968d0
multi: surface swap type on rpc 2021-11-30 13:18:28 +02:00
carla
25b8d20f75
liquidity: add type to rules
In preparation for adding loop in swaps, we relate liquidity rules
to a specific type of swap that we want to dispatch. This allows us
to use a single rule format for multiple swap types.
2021-11-30 13:18:27 +02:00
carla
cca5926263
multi: bump lndclient to v0.12.0-13
To allow code with more up-to-date dependencies to import loop, we
bump our lndclient version. The minimum loop version remains 11.1
since we're not using any new apis.
2021-10-24 10:22:30 +02:00
Andras Banki-Horvath
0e7ed91d5d
loop: integrate the probe api with loop-in quote
In this commit we add a call to the new probe endpoint directly into the
loop-in quote call. Furthermore we add an option to include private
channels in the loopin swap payment request. This is also useful for when
users quote/probe directly using the client API and specify hop hints.
2021-07-30 13:22:12 +02:00
Andras Banki-Horvath
f786aaa016
loop: add support for the probe API 2021-07-30 13:22:12 +02:00
Oliver Gugger
a7fff0ac2f
multi: update lnd master with grpc-gateway upgrade
To make loop work with the latest lnd version inside of LiT, we need
to upgrade the grpc-gateway library to the same v2 version here too.
2021-07-29 17:02:06 +02:00
Oliver Gugger
803773bb65
loop+loopd: fix linter after re-generating protos
Apparently re-generating the protos caused the linter to pick up on
fields that are now deprecated. We need to fix that with a few comments.
2021-07-14 17:21:54 +02:00
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.
2021-03-17 10:12:30 +02:00
Carla Kirk-Cohen
d6db6184f3
Merge pull request #348 from yyforyongyu/344-loop-quote
looprpc: add verbose resp in loop quote
2021-03-11 21:23:05 +02:00
Carla Kirk-Cohen
4d9d398b23
Merge pull request #349 from ellemouton/validate-dest-addr-network
loopd: verify that dest addr is for correct chain
2021-03-09 09:18:35 +02:00
Elle Mouton
5399e60554 loopd: verify that dest addr is for correct chain
This commit adds verification to the loop out request to ensure that the
formatting of the specified destination address matches the network that
lnd is running on.
2021-03-08 11:41:54 +02:00
Elle Mouton
5c34dd1177 loopd: refactor loop out request validation
This commit moves loop out request validation for labels and
confirmation targets into its own function for the purpose of easy
testing and also to make the additions of future request validation easy
to add and test.
2021-03-08 11:40:42 +02:00
yyforyongyu
c4d46a24a0
looprpc: add conf_target to loop in/out quote resp 2021-03-08 02:23:25 +08:00
carla
90561f8ac7
multi: add fee percentage to rpc 2021-03-04 10:14:52 +02:00
carla
dd1a2de731
multi: add flat fee percentage to autoloop 2021-03-04 10:14:37 +02:00
carla
c778124718
liquidity: move fees behind interface 2021-03-04 10:14:35 +02:00
carla
b9aae4f8f9
loop: add peer rules to set rule command 2021-02-17 14:12:56 +02:00
carla
949e76bb2a
looprpc: add peer level rules to rpc 2021-02-17 10:56:32 +02:00
carla
22bd4cabb4
looprpc: add disqualified channels to suggest swaps response 2021-02-08 09:39:03 +02:00
carla
7c4d71b175
liquidity: add reasons for autoloops not executing 2021-02-08 09:39:02 +02:00
carla
7ba1821696
liquidity: fail suggest swaps when no rules are set
In an effort to surface more information about why autoloop is not
executing, we add an error when suggest swaps is called with no rules.
In other cases we can surface a reason enum with each rule that is set,
but in the case where we have no rules, there are no results to
accompany with reasons.
2021-02-08 09:38:23 +02:00
carla
71ace95ac8
loop: rename autoloop specific parameters 2021-02-03 08:54:48 +02:00