2
0
mirror of https://github.com/lightninglabs/loop synced 2024-11-11 13:11:12 +00:00
loop/looprpc/server.proto
2019-03-28 11:56:49 +01:00

77 lines
1.4 KiB
Protocol Buffer

syntax = "proto3";
import "google/api/annotations.proto";
package looprpc;
option go_package = "github.com/lightninglabs/loop/looprpc";
service SwapServer {
rpc NewLoopOutSwap(ServerLoopOutRequest) returns (ServerLoopOutResponse);
rpc LoopOutQuote(ServerLoopOutQuoteRequest) returns (ServerLoopOutQuote);
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 {
}
message ServerLoopOutQuote {
string swap_payment_dest = 1;
int64 swap_fee_base = 2;
int64 swap_fee_rate = 3;
uint64 prepay_amt = 4;
uint64 min_swap_amount = 5;
uint64 max_swap_amount = 6;
int32 cltv_delta = 7;
}
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;
}