2019-03-06 20:13:50 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
|
2019-03-06 23:53:17 +00:00
|
|
|
package looprpc;
|
2019-03-06 20:13:50 +00:00
|
|
|
|
2019-03-06 23:53:17 +00:00
|
|
|
option go_package = "github.com/lightninglabs/loop/looprpc";
|
2019-03-06 20:13:50 +00:00
|
|
|
|
|
|
|
service SwapServer {
|
2019-03-07 02:24:29 +00:00
|
|
|
rpc NewLoopOutSwap(ServerLoopOutRequest) returns (ServerLoopOutResponse);
|
2019-03-06 20:13:50 +00:00
|
|
|
|
2019-03-07 02:24:29 +00:00
|
|
|
rpc LoopOutQuote(ServerLoopOutQuoteRequest) returns (ServerLoopOutQuote);
|
2019-03-12 15:10:37 +00:00
|
|
|
|
|
|
|
rpc NewLoopInSwap(ServerLoopInRequest) returns (ServerLoopInResponse);
|
|
|
|
|
|
|
|
rpc LoopInQuote(ServerLoopInQuoteRequest) returns (ServerLoopInQuoteResponse);
|
2019-03-06 20:13:50 +00:00
|
|
|
}
|
|
|
|
|
2019-03-07 02:24:29 +00:00
|
|
|
message ServerLoopOutRequest {
|
2019-03-06 20:13:50 +00:00
|
|
|
bytes receiver_key = 1;
|
2019-03-07 02:24:29 +00:00
|
|
|
|
2019-03-06 20:13:50 +00:00
|
|
|
bytes swap_hash = 2;
|
2019-03-07 02:24:29 +00:00
|
|
|
|
2019-03-06 20:13:50 +00:00
|
|
|
uint64 amt = 3;
|
|
|
|
}
|
|
|
|
|
2019-03-07 02:24:29 +00:00
|
|
|
message ServerLoopOutResponse {
|
2019-03-06 20:13:50 +00:00
|
|
|
string swap_invoice= 1;
|
2019-03-07 02:24:29 +00:00
|
|
|
|
2019-03-06 20:13:50 +00:00
|
|
|
string prepay_invoice = 2;
|
2019-03-07 02:24:29 +00:00
|
|
|
|
2019-03-06 20:13:50 +00:00
|
|
|
bytes sender_key = 3;
|
2019-03-07 02:24:29 +00:00
|
|
|
|
2019-03-06 20:13:50 +00:00
|
|
|
int32 expiry = 4;
|
|
|
|
}
|
|
|
|
|
2019-03-07 02:24:29 +00:00
|
|
|
message ServerLoopOutQuoteRequest {
|
2019-03-06 20:13:50 +00:00
|
|
|
}
|
|
|
|
|
2019-03-07 02:24:29 +00:00
|
|
|
message ServerLoopOutQuote {
|
2019-03-06 20:13:50 +00:00
|
|
|
string swap_payment_dest = 1;
|
2019-03-07 02:24:29 +00:00
|
|
|
|
2019-03-06 20:13:50 +00:00
|
|
|
int64 swap_fee_base = 2;
|
2019-03-07 02:24:29 +00:00
|
|
|
|
2019-03-06 20:13:50 +00:00
|
|
|
int64 swap_fee_rate = 3;
|
2019-03-07 02:24:29 +00:00
|
|
|
|
2019-03-06 20:13:50 +00:00
|
|
|
uint64 prepay_amt = 4;
|
2019-03-07 02:24:29 +00:00
|
|
|
|
2019-03-06 20:13:50 +00:00
|
|
|
uint64 min_swap_amount = 5;
|
2019-03-07 02:24:29 +00:00
|
|
|
|
2019-03-06 20:13:50 +00:00
|
|
|
uint64 max_swap_amount = 6;
|
2019-03-07 02:24:29 +00:00
|
|
|
|
2019-03-06 20:13:50 +00:00
|
|
|
int32 cltv_delta = 7;
|
|
|
|
}
|
2019-03-12 15:10:37 +00:00
|
|
|
|
|
|
|
message ServerLoopInRequest {
|
|
|
|
bytes sender_key = 1;
|
|
|
|
bytes swap_hash = 2;
|
|
|
|
uint64 amt = 3;
|
|
|
|
string swap_invoice = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ServerLoopInResponse {
|
|
|
|
bytes receiver_key = 1;
|
|
|
|
int32 expiry = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ServerLoopInQuoteRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message ServerLoopInQuoteResponse {
|
|
|
|
int64 swap_fee_base = 1;
|
|
|
|
int64 swap_fee_rate = 2;
|
|
|
|
uint64 min_swap_amount = 4;
|
|
|
|
uint64 max_swap_amount = 5;
|
|
|
|
int32 cltv_delta = 6;
|
|
|
|
}
|