loop/looprpc/server.proto
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.
2019-10-08 22:28:20 +02:00

101 lines
2.2 KiB
Protocol Buffer

syntax = "proto3";
import "google/api/annotations.proto";
package looprpc;
service SwapServer {
rpc LoopOutTerms(ServerLoopOutTermsRequest) returns (ServerLoopOutTerms);
rpc NewLoopOutSwap(ServerLoopOutRequest) returns (ServerLoopOutResponse);
rpc LoopOutQuote(ServerLoopOutQuoteRequest) returns (ServerLoopOutQuote);
rpc LoopInTerms(ServerLoopInTermsRequest) returns (ServerLoopInTerms);
rpc NewLoopInSwap(ServerLoopInRequest) returns (ServerLoopInResponse);
rpc LoopInQuote(ServerLoopInQuoteRequest) returns (ServerLoopInQuoteResponse);
}
message ServerLoopOutRequest {
bytes receiver_key = 1;
bytes swap_hash = 2;
uint64 amt = 3;
}
message ServerLoopOutResponse {
string swap_invoice= 1;
string prepay_invoice = 2;
bytes sender_key = 3;
int32 expiry = 4;
}
message ServerLoopOutQuoteRequest {
/// The swap amount. If zero, a quote for a maximum amt swap will be given.
uint64 amt = 1;
}
message ServerLoopOutQuote {
string swap_payment_dest = 1;
/// The total estimated swap fee given the quote amt.
int64 swap_fee = 2;
/// Deprecated, total swap fee given quote amt is calculated in swap_fee.
int64 swap_fee_rate = 3 [deprecated = true];
uint64 prepay_amt = 4;
uint64 min_swap_amount = 5 [deprecated = true];
uint64 max_swap_amount = 6 [deprecated = true];
int32 cltv_delta = 7;
}
message ServerLoopOutTermsRequest {
}
message ServerLoopOutTerms {
uint64 min_swap_amount = 1;
uint64 max_swap_amount = 2;
}
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 {
/// The swap amount. If zero, a quote for a maximum amt swap will be given.
uint64 amt = 1;
}
message ServerLoopInQuoteResponse {
int64 swap_fee = 1;
int64 swap_fee_rate = 2 [deprecated=true];
uint64 min_swap_amount = 4 [deprecated=true];
uint64 max_swap_amount = 5 [deprecated=true];
int32 cltv_delta = 6;
}
message ServerLoopInTermsRequest {
}
message ServerLoopInTerms {
uint64 min_swap_amount = 1;
uint64 max_swap_amount = 2;
}