11syntax = "proto3" ;
22
3- import "google/api/annotations.proto" ;
4-
53package looprpc ;
64
75/*
@@ -15,25 +13,15 @@ service SwapClient {
1513 point onwards, progress can be tracked via the SwapStatus stream that is
1614 returned from Monitor().
1715 */
18- rpc LoopOut (LoopOutRequest ) returns (SwapResponse ) {
19- option (google.api.http ) = {
20- post : "/v1/loop/out"
21- body : "*"
22- };
23- }
16+ rpc LoopOut (LoopOutRequest ) returns (SwapResponse );
2417
2518 /* loop: `in`
2619 LoopIn initiates a loop in swap with the given parameters. The call
2720 returns after the swap has been set up with the swap server. From that
2821 point onwards, progress can be tracked via the SwapStatus stream
2922 that is returned from Monitor().
3023 */
31- rpc LoopIn (LoopInRequest ) returns (SwapResponse ) {
32- option (google.api.http ) = {
33- post : "/v1/loop/in"
34- body : "*"
35- };
36- }
24+ rpc LoopIn (LoopInRequest ) returns (SwapResponse );
3725
3826 /* loop: `monitor`
3927 Monitor will return a stream of swap updates for currently active swaps.
@@ -44,102 +32,63 @@ service SwapClient {
4432 ListSwaps returns a list of all currently known swaps and their current
4533 status.
4634 */
47- rpc ListSwaps (ListSwapsRequest ) returns (ListSwapsResponse ) {
48- option (google.api.http ) = {
49- get : "/v1/loop/swaps"
50- };
51- }
35+ rpc ListSwaps (ListSwapsRequest ) returns (ListSwapsResponse );
5236
5337 /* loop: `swapinfo`
5438 SwapInfo returns all known details about a single swap.
5539 */
56- rpc SwapInfo (SwapInfoRequest ) returns (SwapStatus ) {
57- option (google.api.http ) = {
58- get : "/v1/loop/swap/{id}"
59- };
60- }
40+ rpc SwapInfo (SwapInfoRequest ) returns (SwapStatus );
6141
6242 /* loop: `terms`
6343 LoopOutTerms returns the terms that the server enforces for a loop out swap.
6444 */
65- rpc LoopOutTerms (TermsRequest ) returns (OutTermsResponse ) {
66- option (google.api.http ) = {
67- get : "/v1/loop/out/terms"
68- };
69- }
45+ rpc LoopOutTerms (TermsRequest ) returns (OutTermsResponse );
7046
7147 /* loop: `quote`
7248 LoopOutQuote returns a quote for a loop out swap with the provided
7349 parameters.
7450 */
75- rpc LoopOutQuote (QuoteRequest ) returns (OutQuoteResponse ) {
76- option (google.api.http ) = {
77- get : "/v1/loop/out/quote/{amt}"
78- };
79- }
51+ rpc LoopOutQuote (QuoteRequest ) returns (OutQuoteResponse );
8052
8153 /* loop: `terms`
8254 GetTerms returns the terms that the server enforces for swaps.
8355 */
84- rpc GetLoopInTerms (TermsRequest ) returns (InTermsResponse ) {
85- option (google.api.http ) = {
86- get : "/v1/loop/in/terms"
87- };
88- }
56+ rpc GetLoopInTerms (TermsRequest ) returns (InTermsResponse );
8957
9058 /* loop: `quote`
9159 GetQuote returns a quote for a swap with the provided parameters.
9260 */
93- rpc GetLoopInQuote (QuoteRequest ) returns (InQuoteResponse ) {
94- option (google.api.http ) = {
95- get : "/v1/loop/in/quote/{amt}"
96- };
97- }
61+ rpc GetLoopInQuote (QuoteRequest ) returns (InQuoteResponse );
9862
9963 /* loop: `listauth`
10064 GetLsatTokens returns all LSAT tokens the daemon ever paid for.
10165 */
102- rpc GetLsatTokens (TokensRequest ) returns (TokensResponse ) {
103- option (google.api.http ) = {
104- get : "/v1/lsat/tokens"
105- };
106- }
66+ rpc GetLsatTokens (TokensRequest ) returns (TokensResponse );
10767
10868 /*
10969 GetLiquidityParams gets the parameters that the daemon's liquidity manager
11070 is currently configured with. This may be nil if nothing is configured.
11171 [EXPERIMENTAL]: endpoint is subject to change.
11272 */
113- rpc GetLiquidityParams (GetLiquidityParamsRequest ) returns (LiquidityParameters ) {
114- option (google.api.http ) = {
115- get : "/v1/liquidity/params"
116- };
117- }
73+ rpc GetLiquidityParams (GetLiquidityParamsRequest )
74+ returns (LiquidityParameters );
11875
11976 /*
12077 SetLiquidityParams sets a new set of parameters for the daemon's liquidity
12178 manager. Note that the full set of parameters must be provided, because
12279 this call fully overwrites our existing parameters.
12380 [EXPERIMENTAL]: endpoint is subject to change.
12481 */
125- rpc SetLiquidityParams (SetLiquidityParamsRequest ) returns (SetLiquidityParamsResponse ) {
126- option (google.api.http ) = {
127- post : "/v1/liquidity/params"
128- body : "*"
129- };
130- }
82+ rpc SetLiquidityParams (SetLiquidityParamsRequest )
83+ returns (SetLiquidityParamsResponse );
13184
13285 /*
13386 SuggestSwaps returns a list of recommended swaps based on the current
13487 state of your node's channels and it's liquidity manager parameters.
13588 Note that only loop out suggestions are currently supported.
13689 [EXPERIMENTAL]: endpoint is subject to change.
13790 */
138- rpc SuggestSwaps (SuggestSwapsRequest ) returns (SuggestSwapsResponse ) {
139- option (google.api.http ) = {
140- get : "/v1/auto/suggest"
141- };
142- }
91+ rpc SuggestSwaps (SuggestSwapsRequest ) returns (SuggestSwapsResponse );
14392}
14493
14594message LoopOutRequest {
0 commit comments