From 24099aa4f97b2a270d7f0f5526d929644a8ca73b Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Tue, 14 Jul 2020 15:13:55 +0200 Subject: [PATCH 1/2] looprpc: split terms message --- cmd/loop/terms.go | 18 +- loopd/swapclient_server.go | 10 +- looprpc/client.pb.go | 318 +++++++++++++++++++++--------------- looprpc/client.proto | 21 ++- looprpc/client.swagger.json | 49 ++++-- 5 files changed, 252 insertions(+), 164 deletions(-) diff --git a/cmd/loop/terms.go b/cmd/loop/terms.go index feda2d4..db0199f 100644 --- a/cmd/loop/terms.go +++ b/cmd/loop/terms.go @@ -4,10 +4,9 @@ import ( "context" "fmt" - "github.com/urfave/cli" - "github.com/btcsuite/btcutil" "github.com/lightninglabs/loop/looprpc" + "github.com/urfave/cli" ) var termsCommand = cli.Command{ @@ -23,10 +22,9 @@ func terms(ctx *cli.Context) error { } defer cleanup() - printTerms := func(terms *looprpc.TermsResponse) { + printAmountRange := func(min, max int64) { fmt.Printf("Amount: %d - %d\n", - btcutil.Amount(terms.MinSwapAmount), - btcutil.Amount(terms.MaxSwapAmount), + btcutil.Amount(min), btcutil.Amount(max), ) } @@ -37,7 +35,10 @@ func terms(ctx *cli.Context) error { if err != nil { fmt.Println(err) } else { - printTerms(loopOutTerms) + printAmountRange( + loopOutTerms.MinSwapAmount, + loopOutTerms.MaxSwapAmount, + ) } fmt.Println() @@ -50,7 +51,10 @@ func terms(ctx *cli.Context) error { if err != nil { fmt.Println(err) } else { - printTerms(loopInTerms) + printAmountRange( + loopInTerms.MinSwapAmount, + loopInTerms.MaxSwapAmount, + ) } return nil diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 0059107..065b264 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -328,7 +328,7 @@ func (s *swapClientServer) SwapInfo(_ context.Context, // LoopOutTerms returns the terms that the server enforces for loop out swaps. func (s *swapClientServer) LoopOutTerms(ctx context.Context, - req *looprpc.TermsRequest) (*looprpc.TermsResponse, error) { + req *looprpc.TermsRequest) (*looprpc.OutTermsResponse, error) { log.Infof("Loop out terms request received") @@ -338,7 +338,7 @@ func (s *swapClientServer) LoopOutTerms(ctx context.Context, return nil, err } - return &looprpc.TermsResponse{ + return &looprpc.OutTermsResponse{ MinSwapAmount: int64(terms.MinSwapAmount), MaxSwapAmount: int64(terms.MaxSwapAmount), }, nil @@ -376,8 +376,8 @@ func (s *swapClientServer) LoopOutQuote(ctx context.Context, } // GetTerms returns the terms that the server enforces for swaps. -func (s *swapClientServer) GetLoopInTerms(ctx context.Context, req *looprpc.TermsRequest) ( - *looprpc.TermsResponse, error) { +func (s *swapClientServer) GetLoopInTerms(ctx context.Context, + req *looprpc.TermsRequest) (*looprpc.InTermsResponse, error) { log.Infof("Loop in terms request received") @@ -387,7 +387,7 @@ func (s *swapClientServer) GetLoopInTerms(ctx context.Context, req *looprpc.Term return nil, err } - return &looprpc.TermsResponse{ + return &looprpc.InTermsResponse{ MinSwapAmount: int64(terms.MinSwapAmount), MaxSwapAmount: int64(terms.MaxSwapAmount), }, nil diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index 2036d94..4f1ec3f 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -833,7 +833,7 @@ func (m *TermsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_TermsRequest proto.InternalMessageInfo -type TermsResponse struct { +type InTermsResponse struct { //* //Minimum swap amount (sat) MinSwapAmount int64 `protobuf:"varint,5,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"` @@ -845,39 +845,90 @@ type TermsResponse struct { XXX_sizecache int32 `json:"-"` } -func (m *TermsResponse) Reset() { *m = TermsResponse{} } -func (m *TermsResponse) String() string { return proto.CompactTextString(m) } -func (*TermsResponse) ProtoMessage() {} -func (*TermsResponse) Descriptor() ([]byte, []int) { +func (m *InTermsResponse) Reset() { *m = InTermsResponse{} } +func (m *InTermsResponse) String() string { return proto.CompactTextString(m) } +func (*InTermsResponse) ProtoMessage() {} +func (*InTermsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_014de31d7ac8c57c, []int{9} } -func (m *TermsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TermsResponse.Unmarshal(m, b) +func (m *InTermsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InTermsResponse.Unmarshal(m, b) } -func (m *TermsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TermsResponse.Marshal(b, m, deterministic) +func (m *InTermsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InTermsResponse.Marshal(b, m, deterministic) } -func (m *TermsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TermsResponse.Merge(m, src) +func (m *InTermsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_InTermsResponse.Merge(m, src) } -func (m *TermsResponse) XXX_Size() int { - return xxx_messageInfo_TermsResponse.Size(m) +func (m *InTermsResponse) XXX_Size() int { + return xxx_messageInfo_InTermsResponse.Size(m) } -func (m *TermsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TermsResponse.DiscardUnknown(m) +func (m *InTermsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_InTermsResponse.DiscardUnknown(m) } -var xxx_messageInfo_TermsResponse proto.InternalMessageInfo +var xxx_messageInfo_InTermsResponse proto.InternalMessageInfo -func (m *TermsResponse) GetMinSwapAmount() int64 { +func (m *InTermsResponse) GetMinSwapAmount() int64 { if m != nil { return m.MinSwapAmount } return 0 } -func (m *TermsResponse) GetMaxSwapAmount() int64 { +func (m *InTermsResponse) GetMaxSwapAmount() int64 { + if m != nil { + return m.MaxSwapAmount + } + return 0 +} + +type OutTermsResponse struct { + //* + //Minimum swap amount (sat) + MinSwapAmount int64 `protobuf:"varint,5,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"` + //* + //Maximum swap amount (sat) + MaxSwapAmount int64 `protobuf:"varint,6,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OutTermsResponse) Reset() { *m = OutTermsResponse{} } +func (m *OutTermsResponse) String() string { return proto.CompactTextString(m) } +func (*OutTermsResponse) ProtoMessage() {} +func (*OutTermsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_014de31d7ac8c57c, []int{10} +} + +func (m *OutTermsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OutTermsResponse.Unmarshal(m, b) +} +func (m *OutTermsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OutTermsResponse.Marshal(b, m, deterministic) +} +func (m *OutTermsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_OutTermsResponse.Merge(m, src) +} +func (m *OutTermsResponse) XXX_Size() int { + return xxx_messageInfo_OutTermsResponse.Size(m) +} +func (m *OutTermsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_OutTermsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_OutTermsResponse proto.InternalMessageInfo + +func (m *OutTermsResponse) GetMinSwapAmount() int64 { + if m != nil { + return m.MinSwapAmount + } + return 0 +} + +func (m *OutTermsResponse) GetMaxSwapAmount() int64 { if m != nil { return m.MaxSwapAmount } @@ -914,7 +965,7 @@ func (m *QuoteRequest) Reset() { *m = QuoteRequest{} } func (m *QuoteRequest) String() string { return proto.CompactTextString(m) } func (*QuoteRequest) ProtoMessage() {} func (*QuoteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_014de31d7ac8c57c, []int{10} + return fileDescriptor_014de31d7ac8c57c, []int{11} } func (m *QuoteRequest) XXX_Unmarshal(b []byte) error { @@ -995,7 +1046,7 @@ func (m *QuoteResponse) Reset() { *m = QuoteResponse{} } func (m *QuoteResponse) String() string { return proto.CompactTextString(m) } func (*QuoteResponse) ProtoMessage() {} func (*QuoteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_014de31d7ac8c57c, []int{11} + return fileDescriptor_014de31d7ac8c57c, []int{12} } func (m *QuoteResponse) XXX_Unmarshal(b []byte) error { @@ -1061,7 +1112,7 @@ func (m *TokensRequest) Reset() { *m = TokensRequest{} } func (m *TokensRequest) String() string { return proto.CompactTextString(m) } func (*TokensRequest) ProtoMessage() {} func (*TokensRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_014de31d7ac8c57c, []int{12} + return fileDescriptor_014de31d7ac8c57c, []int{13} } func (m *TokensRequest) XXX_Unmarshal(b []byte) error { @@ -1095,7 +1146,7 @@ func (m *TokensResponse) Reset() { *m = TokensResponse{} } func (m *TokensResponse) String() string { return proto.CompactTextString(m) } func (*TokensResponse) ProtoMessage() {} func (*TokensResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_014de31d7ac8c57c, []int{13} + return fileDescriptor_014de31d7ac8c57c, []int{14} } func (m *TokensResponse) XXX_Unmarshal(b []byte) error { @@ -1160,7 +1211,7 @@ func (m *LsatToken) Reset() { *m = LsatToken{} } func (m *LsatToken) String() string { return proto.CompactTextString(m) } func (*LsatToken) ProtoMessage() {} func (*LsatToken) Descriptor() ([]byte, []int) { - return fileDescriptor_014de31d7ac8c57c, []int{14} + return fileDescriptor_014de31d7ac8c57c, []int{15} } func (m *LsatToken) XXX_Unmarshal(b []byte) error { @@ -1249,7 +1300,8 @@ func init() { proto.RegisterType((*ListSwapsResponse)(nil), "looprpc.ListSwapsResponse") proto.RegisterType((*SwapInfoRequest)(nil), "looprpc.SwapInfoRequest") proto.RegisterType((*TermsRequest)(nil), "looprpc.TermsRequest") - proto.RegisterType((*TermsResponse)(nil), "looprpc.TermsResponse") + proto.RegisterType((*InTermsResponse)(nil), "looprpc.InTermsResponse") + proto.RegisterType((*OutTermsResponse)(nil), "looprpc.OutTermsResponse") proto.RegisterType((*QuoteRequest)(nil), "looprpc.QuoteRequest") proto.RegisterType((*QuoteResponse)(nil), "looprpc.QuoteResponse") proto.RegisterType((*TokensRequest)(nil), "looprpc.TokensRequest") @@ -1260,104 +1312,106 @@ func init() { func init() { proto.RegisterFile("client.proto", fileDescriptor_014de31d7ac8c57c) } var fileDescriptor_014de31d7ac8c57c = []byte{ - // 1549 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcd, 0x72, 0xdb, 0xb6, - 0x16, 0x0e, 0xf5, 0xaf, 0x23, 0x8a, 0xa2, 0xe0, 0xc4, 0x96, 0x75, 0x6f, 0x26, 0x0a, 0xef, 0x4d, - 0xab, 0x78, 0x32, 0x56, 0xe3, 0xac, 0x9a, 0xe9, 0x74, 0xc6, 0x91, 0x95, 0x58, 0x1e, 0xff, 0xa8, - 0x94, 0x9c, 0x99, 0x64, 0xc3, 0xc2, 0x22, 0x6c, 0x71, 0x2a, 0x12, 0x0c, 0x01, 0xc5, 0xf6, 0x64, - 0xb2, 0xe9, 0x2b, 0xf4, 0x0d, 0xfa, 0x06, 0x5d, 0xf7, 0x0d, 0xba, 0xeb, 0xf4, 0x01, 0xba, 0xe9, - 0xa6, 0xfb, 0x3e, 0x40, 0x07, 0x00, 0x45, 0x51, 0xfe, 0xc9, 0x22, 0x3b, 0xf1, 0xc3, 0x87, 0x0f, - 0x07, 0xe7, 0x1c, 0x7c, 0x80, 0x40, 0x1f, 0x4f, 0x3d, 0x12, 0xf0, 0xcd, 0x30, 0xa2, 0x9c, 0xa2, - 0xe2, 0x94, 0xd2, 0x30, 0x0a, 0xc7, 0xcd, 0xff, 0x9e, 0x51, 0x7a, 0x36, 0x25, 0x1d, 0x1c, 0x7a, - 0x1d, 0x1c, 0x04, 0x94, 0x63, 0xee, 0xd1, 0x80, 0x29, 0x9a, 0xf5, 0x5b, 0x16, 0x8c, 0x7d, 0x4a, - 0xc3, 0xa3, 0x19, 0xb7, 0xc9, 0xbb, 0x19, 0x61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, - 0x42, 0x67, 0x4c, 0x83, 0x53, 0x87, 0xe3, 0xe8, 0x8c, 0xf0, 0x46, 0xb9, 0xa5, 0xb5, 0xf3, 0x76, - 0x4d, 0x0e, 0x74, 0x69, 0x70, 0x3a, 0x92, 0x30, 0x7a, 0x0e, 0xeb, 0x72, 0xb7, 0xe1, 0xec, 0x64, - 0xea, 0x8d, 0x65, 0xad, 0x1c, 0x97, 0x60, 0x77, 0xea, 0x05, 0xa4, 0x01, 0x22, 0x1c, 0x7b, 0x4d, - 0x10, 0x06, 0x8b, 0xf1, 0x9d, 0x78, 0xd8, 0xfa, 0x5d, 0x83, 0xaa, 0x28, 0x66, 0x3f, 0xb8, 0xbd, - 0x96, 0x57, 0x33, 0x9a, 0xb9, 0x96, 0xd1, 0x6b, 0xb9, 0xca, 0x5e, 0xcf, 0xd5, 0x3a, 0x94, 0xa6, - 0x98, 0x71, 0x67, 0x42, 0x43, 0x59, 0x3e, 0xdd, 0x2e, 0x8a, 0xef, 0x5d, 0x1a, 0xa2, 0xff, 0x41, - 0x95, 0x5c, 0x70, 0x12, 0x05, 0x78, 0xea, 0x4c, 0xf8, 0x74, 0x2c, 0x6b, 0x56, 0xb2, 0xf5, 0x39, - 0xb8, 0xcb, 0xa7, 0x63, 0xd4, 0x06, 0x53, 0x8c, 0x2d, 0x25, 0xa4, 0x20, 0x13, 0x62, 0x08, 0x7c, - 0x91, 0x0f, 0xeb, 0x6f, 0x0d, 0x74, 0xd9, 0x49, 0x84, 0x85, 0x34, 0x60, 0x04, 0x21, 0xc8, 0x78, - 0xae, 0xdc, 0x51, 0x59, 0x16, 0x26, 0xe3, 0xb9, 0x22, 0x1c, 0xcf, 0x75, 0x4e, 0x2e, 0x39, 0x61, - 0x32, 0x5a, 0xdd, 0x2e, 0x7a, 0xee, 0x0b, 0xf1, 0x89, 0x1e, 0x81, 0x2e, 0x57, 0xc2, 0xae, 0x1b, - 0x11, 0xc6, 0x54, 0x0f, 0xcb, 0x89, 0x15, 0x81,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x2a, 0x63, 0xca, - 0xb8, 0xa3, 0x0a, 0x24, 0x7d, 0x20, 0x6b, 0x83, 0x80, 0x86, 0x12, 0x41, 0x0f, 0x41, 0x97, 0x04, - 0x1a, 0x8c, 0x27, 0xd8, 0x0b, 0xe4, 0x71, 0xce, 0xda, 0x72, 0xd2, 0x91, 0x82, 0xc4, 0x49, 0x50, - 0x94, 0xd3, 0x53, 0xc5, 0x01, 0xe5, 0x4c, 0x92, 0x13, 0x63, 0x16, 0x02, 0x73, 0xdf, 0x63, 0x5c, - 0x24, 0x96, 0xcd, 0xab, 0xfe, 0x2d, 0xd4, 0x53, 0x58, 0xdc, 0xf7, 0x8f, 0x21, 0x2f, 0x0e, 0x2d, - 0x6b, 0x68, 0xad, 0x6c, 0xbb, 0xb2, 0xb5, 0x72, 0xad, 0x26, 0x33, 0x66, 0x2b, 0x86, 0xf5, 0x10, - 0x6a, 0x02, 0xec, 0x07, 0xa7, 0x74, 0x6e, 0x04, 0x46, 0x72, 0x6a, 0x74, 0xd1, 0x23, 0x96, 0x01, - 0xfa, 0x88, 0x44, 0x7e, 0xb2, 0xe4, 0x47, 0xa8, 0xc6, 0xdf, 0xf1, 0x72, 0x5f, 0x40, 0xcd, 0xf7, - 0x02, 0xe5, 0x13, 0xd8, 0xa7, 0xb3, 0x80, 0xc7, 0x85, 0xad, 0xfa, 0x5e, 0x20, 0xd4, 0xb7, 0x25, - 0x28, 0x79, 0x73, 0x3f, 0x89, 0x79, 0x85, 0x98, 0xa7, 0x2c, 0x45, 0xf1, 0xf6, 0x72, 0x25, 0xcd, - 0xcc, 0xec, 0xe5, 0x4a, 0x19, 0x33, 0xbb, 0x97, 0x2b, 0x65, 0xcd, 0xdc, 0x5e, 0xae, 0x94, 0x33, - 0xf3, 0x7b, 0xb9, 0x52, 0xd1, 0x2c, 0x59, 0x3f, 0x6b, 0xa0, 0x7f, 0x37, 0xa3, 0x9c, 0xdc, 0x6e, - 0x5c, 0xb2, 0x22, 0x0b, 0xb7, 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, 0x2e, 0x4d, 0x67, 0xbc, 0xc3, 0xa5, 0x94, 0x93, - 0x48, 0x4b, 0x7f, 0x4b, 0x49, 0xa7, 0x4d, 0x39, 0x25, 0xbd, 0x64, 0x83, 0x56, 0x4b, 0x4a, 0x37, - 0x51, 0x63, 0x49, 0xfa, 0x9d, 0xe0, 0x74, 0x3e, 0x60, 0x9f, 0x7f, 0x44, 0x6f, 0xc1, 0x78, 0x45, - 0xb8, 0x2a, 0xf6, 0x67, 0x45, 0xbf, 0x2e, 0x97, 0x58, 0x41, 0xf5, 0x54, 0x0b, 0xc4, 0xc1, 0x7f, - 0x9f, 0xd2, 0xfe, 0xac, 0xf0, 0x1f, 0x48, 0xed, 0x75, 0xb4, 0x96, 0xd6, 0x4e, 0x47, 0xff, 0x06, - 0xaa, 0x62, 0x85, 0xb9, 0xef, 0xb1, 0x54, 0xff, 0x2e, 0x99, 0x6b, 0x73, 0xed, 0x1a, 0xbe, 0x7c, - 0x26, 0x50, 0x4d, 0x2e, 0xc1, 0x30, 0xef, 0x28, 0x43, 0x3d, 0x29, 0xc8, 0xbf, 0x61, 0xcf, 0xfe, - 0x0d, 0x00, 0x00, 0xff, 0xff, 0xba, 0x8f, 0xd4, 0xd8, 0xbd, 0x0d, 0x00, 0x00, + // 1570 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcd, 0x6e, 0xdb, 0xca, + 0x15, 0x0e, 0xf5, 0xaf, 0x23, 0x8a, 0xa2, 0xc6, 0x89, 0x2d, 0xab, 0x0d, 0xa2, 0xb0, 0x4d, 0xab, + 0x18, 0x81, 0xd5, 0x38, 0xab, 0x06, 0x45, 0x01, 0x47, 0x56, 0x62, 0x19, 0xb6, 0xa5, 0x52, 0x72, + 0x80, 0x16, 0x05, 0xd8, 0xb1, 0x38, 0xb6, 0x88, 0x8a, 0x1c, 0x86, 0x33, 0x8a, 0x6d, 0x04,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 0x51, 0x7c, 0x1f, 0xd3, + 0x10, 0xfd, 0x0c, 0xaa, 0xe4, 0x96, 0x93, 0x28, 0xc0, 0x33, 0x67, 0xca, 0x67, 0x13, 0x59, 0xb3, + 0x92, 0xad, 0x2f, 0xc0, 0x63, 0x3e, 0x9b, 0xa0, 0x36, 0x98, 0x62, 0x6c, 0x25, 0x21, 0x05, 0x99, + 0x10, 0x43, 0xe0, 0xcb, 0x7c, 0x58, 0xdf, 0x6a, 0xa0, 0xcb, 0x4e, 0x22, 0x2c, 0xa4, 0x01, 0x23, + 0x08, 0x41, 0xc6, 0x73, 0xe5, 0x8e, 0xca, 0xb2, 0x30, 0x19, 0xcf, 0x15, 0xe1, 0x78, 0xae, 0x73, + 0x79, 0xc7, 0x09, 0x93, 0xd1, 0xea, 0x76, 0xd1, 0x73, 0xdf, 0x89, 0x4f, 0xf4, 0x02, 0x74, 0xb9, + 0x12, 0x76, 0xdd, 0x88, 0x30, 0xa6, 0x7a, 0x58, 0x4e, 0xac, 0x08, 0xfc, 0x50, 0xc1, 0x68, 0x1f, + 0xb6, 0xd2, 0x34, 0x27, 0x08, 0x0f, 0x6e, 0xd8, 0x54, 0xee, 0xad, 0x6c, 0xd7, 0x53, 0xcc, 0x73, + 0x39, 0x80, 0x5e, 0x01, 0x5a, 0xe1, 0x2b, 0x7a, 0x5e, 0xd2, 0xcd, 0x14, 0x7d, 0x28, 0xd9, 0x2f, + 0xc0, 0x60, 0x24, 0xfa, 0x4c, 0x22, 0xc7, 0x27, 0x8c, 0xe1, 0x6b, 0x22, 0x37, 0x5b, 0xb6, 0xab, + 0x0a, 0x3d, 0x53, 0xa0, 0x65, 0x82, 0x71, 0x46, 0x03, 0x8f, 0xd3, 0x28, 0xae, 0x9f, 0xf5, 0xff, + 0x2c, 0x80, 0xd8, 0xfd, 0x88, 0x63, 0x3e, 0x67, 0x1b, 0x8f, 0xa6, 0xc8, 0x46, 0xe6, 0xc1, 0x6c, + 0x54, 0xd6, 0xb3, 0x91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 0x01, 0x26, 0x33, 0xfe, 0xd9, 0x71, 0xc9, 0x8c, 0x63, 0x59, 0xa2, 0xbc, 0x5d, + 0x16, 0xc8, 0x91, 0x00, 0xac, 0x1a, 0x54, 0xc7, 0xf4, 0xcf, 0x24, 0x48, 0xba, 0xed, 0x37, 0x60, + 0x2c, 0x80, 0x78, 0x13, 0x7b, 0x50, 0xe0, 0x12, 0x89, 0xdb, 0x7b, 0x69, 0x39, 0xa7, 0x0c, 0x73, + 0x49, 0xb6, 0x63, 0x86, 0xf5, 0xef, 0x0c, 0x94, 0x13, 0x54, 0x64, 0xfc, 0x12, 0x33, 0xe2, 0xf8, + 0x78, 0x82, 0x23, 0x4a, 0x83, 0xb8, 0xc9, 0x75, 0x01, 0x9e, 0xc5, 0x98, 0x38, 0xad, 0x8b, 0x7d, + 0x4c, 0x31, 0x9b, 0xca, 0x54, 0xe8, 0x76, 0x25, 0xc6, 0x8e, 0x31, 0x9b, 0xa2, 0x97, 0x60, 0x2e, + 0x28, 0x61, 0x44, 0x3c, 0x5f, 0xb8, 0xb4, 0xba, 0x4b, 0x6a, 0x31, 0x3e, 0x8c, 0x61, 0xe1, 0x65, + 0xaa, 0xcb, 0x9c, 0x10, 0x7b, 0xae, 0xe3, 0x33, 0xcc, 0xe3, 0x47, 0x8c, 0xa1, 0xf0, 0x21, 0xf6, + 0xdc, 0x33, 0x86, 0x39, 0x7a, 0x0d, 0x4f, 0x52, 0x2f, 0x9d, 0x14, 0x5d, 0xb5, 0x31, 0x8a, 0x92, + 0xa7, 0x4e, 0x32, 0xe5, 0x39, 0xe8, 0xc2, 0x1c, 0x9d, 0x49, 0x44, 0x30, 0x27, 0x6e, 0xdc, 0xc8, + 0x15, 0x81, 0x75, 0x15, 0x84, 0x1a, 0x50, 0x24, 0xb7, 0xa1, 0x17, 0x11, 0x57, 0x9a, 0x63, 0xc9, + 0x5e, 0x7c, 0x8a, 0xc9, 0x8c, 0xd3, 0x08, 0x5f, 0x13, 0x27, 0xc0, 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 0x1e, 0xaa, 0x62, 0x85, 0x85, 0xf9, 0xb1, 0x54, 0x13, 0xaf, 0x38, 0x6c, + 0x73, 0xe7, 0x1e, 0xbe, 0x7a, 0x30, 0x50, 0x4d, 0x2e, 0xc1, 0x30, 0xef, 0x28, 0x57, 0xbd, 0x2c, + 0xc8, 0x3f, 0x84, 0x6f, 0xbe, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x3d, 0x7d, 0xf8, 0x47, 0x0e, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1396,14 +1450,14 @@ type SwapClientClient interface { SwapInfo(ctx context.Context, in *SwapInfoRequest, opts ...grpc.CallOption) (*SwapStatus, error) //* loop: `terms` //LoopOutTerms returns the terms that the server enforces for a loop out swap. - LoopOutTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*TermsResponse, error) + LoopOutTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*OutTermsResponse, error) //* loop: `quote` //LoopOutQuote returns a quote for a loop out swap with the provided //parameters. LoopOutQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*QuoteResponse, error) //* loop: `terms` //GetTerms returns the terms that the server enforces for swaps. - GetLoopInTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*TermsResponse, error) + GetLoopInTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*InTermsResponse, error) //* loop: `quote` //GetQuote returns a quote for a swap with the provided parameters. GetLoopInQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*QuoteResponse, error) @@ -1488,8 +1542,8 @@ func (c *swapClientClient) SwapInfo(ctx context.Context, in *SwapInfoRequest, op return out, nil } -func (c *swapClientClient) LoopOutTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*TermsResponse, error) { - out := new(TermsResponse) +func (c *swapClientClient) LoopOutTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*OutTermsResponse, error) { + out := new(OutTermsResponse) err := c.cc.Invoke(ctx, "/looprpc.SwapClient/LoopOutTerms", in, out, opts...) if err != nil { return nil, err @@ -1506,8 +1560,8 @@ func (c *swapClientClient) LoopOutQuote(ctx context.Context, in *QuoteRequest, o return out, nil } -func (c *swapClientClient) GetLoopInTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*TermsResponse, error) { - out := new(TermsResponse) +func (c *swapClientClient) GetLoopInTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*InTermsResponse, error) { + out := new(InTermsResponse) err := c.cc.Invoke(ctx, "/looprpc.SwapClient/GetLoopInTerms", in, out, opts...) if err != nil { return nil, err @@ -1559,14 +1613,14 @@ type SwapClientServer interface { SwapInfo(context.Context, *SwapInfoRequest) (*SwapStatus, error) //* loop: `terms` //LoopOutTerms returns the terms that the server enforces for a loop out swap. - LoopOutTerms(context.Context, *TermsRequest) (*TermsResponse, error) + LoopOutTerms(context.Context, *TermsRequest) (*OutTermsResponse, error) //* loop: `quote` //LoopOutQuote returns a quote for a loop out swap with the provided //parameters. LoopOutQuote(context.Context, *QuoteRequest) (*QuoteResponse, error) //* loop: `terms` //GetTerms returns the terms that the server enforces for swaps. - GetLoopInTerms(context.Context, *TermsRequest) (*TermsResponse, error) + GetLoopInTerms(context.Context, *TermsRequest) (*InTermsResponse, error) //* loop: `quote` //GetQuote returns a quote for a swap with the provided parameters. GetLoopInQuote(context.Context, *QuoteRequest) (*QuoteResponse, error) @@ -1594,13 +1648,13 @@ func (*UnimplementedSwapClientServer) ListSwaps(ctx context.Context, req *ListSw func (*UnimplementedSwapClientServer) SwapInfo(ctx context.Context, req *SwapInfoRequest) (*SwapStatus, error) { return nil, status.Errorf(codes.Unimplemented, "method SwapInfo not implemented") } -func (*UnimplementedSwapClientServer) LoopOutTerms(ctx context.Context, req *TermsRequest) (*TermsResponse, error) { +func (*UnimplementedSwapClientServer) LoopOutTerms(ctx context.Context, req *TermsRequest) (*OutTermsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LoopOutTerms not implemented") } func (*UnimplementedSwapClientServer) LoopOutQuote(ctx context.Context, req *QuoteRequest) (*QuoteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LoopOutQuote not implemented") } -func (*UnimplementedSwapClientServer) GetLoopInTerms(ctx context.Context, req *TermsRequest) (*TermsResponse, error) { +func (*UnimplementedSwapClientServer) GetLoopInTerms(ctx context.Context, req *TermsRequest) (*InTermsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLoopInTerms not implemented") } func (*UnimplementedSwapClientServer) GetLoopInQuote(ctx context.Context, req *QuoteRequest) (*QuoteResponse, error) { diff --git a/looprpc/client.proto b/looprpc/client.proto index 1c3b333..86e842d 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -62,7 +62,7 @@ service SwapClient { /** loop: `terms` LoopOutTerms returns the terms that the server enforces for a loop out swap. */ - rpc LoopOutTerms (TermsRequest) returns (TermsResponse) { + rpc LoopOutTerms (TermsRequest) returns (OutTermsResponse) { option (google.api.http) = { get: "/v1/loop/out/terms" }; @@ -81,7 +81,7 @@ service SwapClient { /** loop: `terms` GetTerms returns the terms that the server enforces for swaps. */ - rpc GetLoopInTerms (TermsRequest) returns (TermsResponse) { + rpc GetLoopInTerms (TermsRequest) returns (InTermsResponse) { option (google.api.http) = { get: "/v1/loop/in/terms" }; @@ -419,7 +419,22 @@ message SwapInfoRequest { message TermsRequest { } -message TermsResponse { +message InTermsResponse { + + reserved 1, 2, 3, 4, 7; + + /** + Minimum swap amount (sat) + */ + int64 min_swap_amount = 5; + + /** + Maximum swap amount (sat) + */ + int64 max_swap_amount = 6; +} + +message OutTermsResponse { reserved 1, 2, 3, 4, 7; diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index 4bea07e..fb8032f 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -109,7 +109,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/looprpcTermsResponse" + "$ref": "#/definitions/looprpcInTermsResponse" } }, "default": { @@ -222,7 +222,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/looprpcTermsResponse" + "$ref": "#/definitions/looprpcOutTermsResponse" } }, "default": { @@ -318,6 +318,21 @@ } }, "definitions": { + "looprpcInTermsResponse": { + "type": "object", + "properties": { + "min_swap_amount": { + "type": "string", + "format": "int64", + "title": "*\nMinimum swap amount (sat)" + }, + "max_swap_amount": { + "type": "string", + "format": "int64", + "title": "*\nMaximum swap amount (sat)" + } + } + }, "looprpcListSwapsResponse": { "type": "object", "properties": { @@ -471,6 +486,21 @@ } } }, + "looprpcOutTermsResponse": { + "type": "object", + "properties": { + "min_swap_amount": { + "type": "string", + "format": "int64", + "title": "*\nMinimum swap amount (sat)" + }, + "max_swap_amount": { + "type": "string", + "format": "int64", + "title": "*\nMaximum swap amount (sat)" + } + } + }, "looprpcQuoteResponse": { "type": "object", "properties": { @@ -617,21 +647,6 @@ "default": "LOOP_OUT", "title": "- LOOP_OUT: LOOP_OUT indicates an loop out swap (off-chain to on-chain)\n - LOOP_IN: LOOP_IN indicates a loop in swap (on-chain to off-chain)" }, - "looprpcTermsResponse": { - "type": "object", - "properties": { - "min_swap_amount": { - "type": "string", - "format": "int64", - "title": "*\nMinimum swap amount (sat)" - }, - "max_swap_amount": { - "type": "string", - "format": "int64", - "title": "*\nMaximum swap amount (sat)" - } - } - }, "looprpcTokensResponse": { "type": "object", "properties": { From 8d1ec50fa7a623d21d25432adcaa7a23ee5ed818 Mon Sep 17 00:00:00 2001 From: Joost Jager Date: Tue, 14 Jul 2020 15:20:37 +0200 Subject: [PATCH 2/2] looprpc: split quote message --- cmd/loop/loopin.go | 21 +-- cmd/loop/loopout.go | 16 +- cmd/loop/main.go | 125 ++++++++----- cmd/loop/quote.go | 2 +- loopd/swapclient_server.go | 18 +- looprpc/client.pb.go | 361 +++++++++++++++++++++--------------- looprpc/client.proto | 45 +++-- looprpc/client.swagger.json | 64 ++++--- 8 files changed, 387 insertions(+), 265 deletions(-) diff --git a/cmd/loop/loopin.go b/cmd/loop/loopin.go index 25cac98..3f454de 100644 --- a/cmd/loop/loopin.go +++ b/cmd/loop/loopin.go @@ -7,7 +7,6 @@ import ( "github.com/btcsuite/btcutil" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/looprpc" - "github.com/lightninglabs/loop/swap" "github.com/lightningnetwork/lnd/routing/route" "github.com/urfave/cli" ) @@ -111,17 +110,18 @@ func loopIn(ctx *cli.Context) error { // HTLC. If the wallet doesn't have enough funds to create this TX, we // know it won't have enough to pay the real transaction either. It // makes sense to abort the loop in this case. - if !external && quote.MinerFee == int64(loop.MinerFeeEstimationFailed) { + if !external && quote.HtlcPublishFeeSat == + int64(loop.MinerFeeEstimationFailed) { + return fmt.Errorf("miner fee estimation not " + "possible, lnd has insufficient funds to " + "create a sample transaction for selected " + "amount") } - limits := getInLimits(amt, quote) - err = displayLimits( - swap.TypeIn, amt, btcutil.Amount(quote.MinerFee), limits, - external, "", + limits := getInLimits(quote) + err = displayInLimits( + amt, btcutil.Amount(quote.HtlcPublishFeeSat), limits, external, ) if err != nil { return err @@ -165,12 +165,3 @@ func loopIn(ctx *cli.Context) error { return nil } - -func getInLimits(amt btcutil.Amount, quote *looprpc.QuoteResponse) *limits { - return &limits{ - // Apply a multiplier to the estimated miner fee, to not get - // the swap canceled because fees increased in the mean time. - maxMinerFee: btcutil.Amount(quote.MinerFee) * 3, - maxSwapFee: btcutil.Amount(quote.SwapFee), - } -} diff --git a/cmd/loop/loopout.go b/cmd/loop/loopout.go index 9033ee2..59ac01b 100644 --- a/cmd/loop/loopout.go +++ b/cmd/loop/loopout.go @@ -10,7 +10,6 @@ import ( "github.com/btcsuite/btcutil" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/looprpc" - "github.com/lightninglabs/loop/swap" "github.com/urfave/cli" ) @@ -148,16 +147,15 @@ func loopOut(ctx *cli.Context) error { defaultSwapWaitTime) } - limits := getLimits(amt, quote) + limits := getOutLimits(amt, quote) // If configured, use the specified maximum swap routing fee. if ctx.IsSet("max_swap_routing_fee") { - *limits.maxSwapRoutingFee = btcutil.Amount( + limits.maxSwapRoutingFee = btcutil.Amount( ctx.Int64("max_swap_routing_fee"), ) } - err = displayLimits( - swap.TypeOut, amt, btcutil.Amount(quote.MinerFee), limits, - false, warning, + err = displayOutLimits( + amt, btcutil.Amount(quote.HtlcSweepFeeSat), limits, warning, ) if err != nil { return err @@ -167,10 +165,10 @@ func loopOut(ctx *cli.Context) error { Amt: int64(amt), Dest: destAddr, MaxMinerFee: int64(limits.maxMinerFee), - MaxPrepayAmt: int64(*limits.maxPrepayAmt), + MaxPrepayAmt: int64(limits.maxPrepayAmt), MaxSwapFee: int64(limits.maxSwapFee), - MaxPrepayRoutingFee: int64(*limits.maxPrepayRoutingFee), - MaxSwapRoutingFee: int64(*limits.maxSwapRoutingFee), + MaxPrepayRoutingFee: int64(limits.maxPrepayRoutingFee), + MaxSwapRoutingFee: int64(limits.maxSwapRoutingFee), OutgoingChanSet: outgoingChanSet, SweepConfTarget: sweepConfTarget, SwapPublicationDeadline: uint64(swapDeadline.Unix()), diff --git a/cmd/loop/main.go b/cmd/loop/main.go index 2baec3e..731aa97 100644 --- a/cmd/loop/main.go +++ b/cmd/loop/main.go @@ -136,59 +136,65 @@ func getMaxRoutingFee(amt btcutil.Amount) btcutil.Amount { return swap.CalcFee(amt, maxRoutingFeeBase, maxRoutingFeeRate) } -type limits struct { - maxSwapRoutingFee *btcutil.Amount - maxPrepayRoutingFee *btcutil.Amount +type inLimits struct { + maxMinerFee btcutil.Amount + maxSwapFee btcutil.Amount +} + +func getInLimits(quote *looprpc.InQuoteResponse) *inLimits { + return &inLimits{ + // Apply a multiplier to the estimated miner fee, to not get + // the swap canceled because fees increased in the mean time. + maxMinerFee: btcutil.Amount(quote.HtlcPublishFeeSat) * 3, + maxSwapFee: btcutil.Amount(quote.SwapFeeSat), + } +} + +type outLimits struct { + maxSwapRoutingFee btcutil.Amount + maxPrepayRoutingFee btcutil.Amount maxMinerFee btcutil.Amount maxSwapFee btcutil.Amount - maxPrepayAmt *btcutil.Amount + maxPrepayAmt btcutil.Amount } -func getLimits(amt btcutil.Amount, quote *looprpc.QuoteResponse) *limits { +func getOutLimits(amt btcutil.Amount, + quote *looprpc.OutQuoteResponse) *outLimits { + maxSwapRoutingFee := getMaxRoutingFee(amt) maxPrepayRoutingFee := getMaxRoutingFee(btcutil.Amount( - quote.PrepayAmt, + quote.PrepayAmtSat, )) - maxPrepayAmt := btcutil.Amount(quote.PrepayAmt) + maxPrepayAmt := btcutil.Amount(quote.PrepayAmtSat) - return &limits{ - maxSwapRoutingFee: &maxSwapRoutingFee, - maxPrepayRoutingFee: &maxPrepayRoutingFee, + return &outLimits{ + maxSwapRoutingFee: maxSwapRoutingFee, + maxPrepayRoutingFee: maxPrepayRoutingFee, // Apply a multiplier to the estimated miner fee, to not get // the swap canceled because fees increased in the mean time. - maxMinerFee: btcutil.Amount(quote.MinerFee) * 100, + maxMinerFee: btcutil.Amount(quote.HtlcSweepFeeSat) * 100, - maxSwapFee: btcutil.Amount(quote.SwapFee), - maxPrepayAmt: &maxPrepayAmt, + maxSwapFee: btcutil.Amount(quote.SwapFeeSat), + maxPrepayAmt: maxPrepayAmt, } } -func displayLimits(swapType swap.Type, amt, minerFees btcutil.Amount, l *limits, - externalHtlc bool, warning string) error { +func displayInLimits(amt, minerFees btcutil.Amount, l *inLimits, + externalHtlc bool) error { totalSuccessMax := l.maxMinerFee + l.maxSwapFee - if l.maxSwapRoutingFee != nil { - totalSuccessMax += *l.maxSwapRoutingFee - } - if l.maxPrepayRoutingFee != nil { - totalSuccessMax += *l.maxPrepayRoutingFee - } - if swapType == swap.TypeIn && externalHtlc { + if externalHtlc { fmt.Printf("On-chain fee for external loop in is not " + "included.\nSufficient fees will need to be paid " + "when constructing the transaction in the external " + "wallet.\n\n") } - fmt.Printf("Max swap fees for %d sat Loop %v: %d sat\n", amt, swapType, + fmt.Printf("Max swap fees for %d sat Loop %v: %d sat\n", amt, swap.TypeIn, totalSuccessMax) - if warning != "" { - fmt.Println(warning) - } - fmt.Printf("CONTINUE SWAP? (y/n), expand fee detail (x): ") var answer string @@ -201,32 +207,55 @@ func displayLimits(swapType swap.Type, amt, minerFees btcutil.Amount, l *limits, fmt.Println() f := "%-36s %d sat\n" - switch swapType { - case swap.TypeOut: - fmt.Printf(f, "Estimated on-chain sweep fee:", + if !externalHtlc { + fmt.Printf(f, "Estimated on-chain HTLC fee:", minerFees) - fmt.Printf(f, "Max on-chain sweep fee:", l.maxMinerFee) - - case swap.TypeIn: - if !externalHtlc { - fmt.Printf(f, "Estimated on-chain HTLC fee:", - minerFees) - } } - if l.maxSwapRoutingFee != nil { - fmt.Printf(f, "Max off-chain swap routing fee:", - *l.maxSwapRoutingFee) - } + fmt.Printf(f, "Max swap fee:", l.maxSwapFee) - if l.maxPrepayAmt != nil { - fmt.Printf(f, "Max no show penalty (prepay):", - *l.maxPrepayAmt) - } - if l.maxPrepayRoutingFee != nil { - fmt.Printf(f, "Max off-chain prepay routing fee:", - *l.maxPrepayRoutingFee) + fmt.Printf("CONTINUE SWAP? (y/n): ") + fmt.Scanln(&answer) + if answer == "y" { + return nil } + } + + return errors.New("swap canceled") +} + +func displayOutLimits(amt, minerFees btcutil.Amount, l *outLimits, + warning string) error { + + totalSuccessMax := l.maxMinerFee + l.maxSwapFee + l.maxSwapRoutingFee + + l.maxPrepayRoutingFee + + fmt.Printf("Max swap fees for %d sat Loop %v: %d sat\n", amt, swap.TypeOut, + totalSuccessMax) + + if warning != "" { + fmt.Println(warning) + } + + fmt.Printf("CONTINUE SWAP? (y/n), expand fee detail (x): ") + + var answer string + fmt.Scanln(&answer) + + switch answer { + case "y": + return nil + case "x": + fmt.Println() + f := "%-36s %d sat\n" + + fmt.Printf(f, "Estimated on-chain sweep fee:", minerFees) + fmt.Printf(f, "Max on-chain sweep fee:", l.maxMinerFee) + fmt.Printf(f, "Max off-chain swap routing fee:", + l.maxSwapRoutingFee) + fmt.Printf(f, "Max no show penalty (prepay):", l.maxPrepayAmt) + fmt.Printf(f, "Max off-chain prepay routing fee:", + l.maxPrepayRoutingFee) fmt.Printf(f, "Max swap fee:", l.maxSwapFee) fmt.Printf("CONTINUE SWAP? (y/n): ") diff --git a/cmd/loop/quote.go b/cmd/loop/quote.go index 6c917ef..b63bac9 100644 --- a/cmd/loop/quote.go +++ b/cmd/loop/quote.go @@ -59,7 +59,7 @@ func quoteIn(ctx *cli.Context) error { // HTLC. If the wallet doesn't have enough funds to create this TX, we // don't want to fail the quote. But the user should still be informed // why the fee shows as -1. - if quoteResp.MinerFee == int64(loop.MinerFeeEstimationFailed) { + if quoteResp.HtlcPublishFeeSat == int64(loop.MinerFeeEstimationFailed) { _, _ = fmt.Fprintf(os.Stderr, "Warning: Miner fee estimation "+ "not possible, lnd has insufficient funds to "+ "create a sample transaction for selected "+ diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 065b264..a02c619 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -347,7 +347,7 @@ func (s *swapClientServer) LoopOutTerms(ctx context.Context, // LoopOutQuote returns a quote for a loop out swap with the provided // parameters. func (s *swapClientServer) LoopOutQuote(ctx context.Context, - req *looprpc.QuoteRequest) (*looprpc.QuoteResponse, error) { + req *looprpc.QuoteRequest) (*looprpc.OutQuoteResponse, error) { confTarget, err := validateConfTarget( req.ConfTarget, loop.DefaultSweepConfTarget, @@ -366,10 +366,10 @@ func (s *swapClientServer) LoopOutQuote(ctx context.Context, return nil, err } - return &looprpc.QuoteResponse{ - MinerFee: int64(quote.MinerFee), - PrepayAmt: int64(quote.PrepayAmount), - SwapFee: int64(quote.SwapFee), + return &looprpc.OutQuoteResponse{ + HtlcSweepFeeSat: int64(quote.MinerFee), + PrepayAmtSat: int64(quote.PrepayAmount), + SwapFeeSat: int64(quote.SwapFee), SwapPaymentDest: quote.SwapPaymentDest[:], CltvDelta: quote.CltvDelta, }, nil @@ -395,7 +395,7 @@ func (s *swapClientServer) GetLoopInTerms(ctx context.Context, // GetQuote returns a quote for a swap with the provided parameters. func (s *swapClientServer) GetLoopInQuote(ctx context.Context, - req *looprpc.QuoteRequest) (*looprpc.QuoteResponse, error) { + req *looprpc.QuoteRequest) (*looprpc.InQuoteResponse, error) { log.Infof("Loop in quote request received") @@ -414,9 +414,9 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context, if err != nil { return nil, err } - return &looprpc.QuoteResponse{ - MinerFee: int64(quote.MinerFee), - SwapFee: int64(quote.SwapFee), + return &looprpc.InQuoteResponse{ + HtlcPublishFeeSat: int64(quote.MinerFee), + SwapFeeSat: int64(quote.SwapFee), }, nil } diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index 4f1ec3f..d4a20ee 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -1014,22 +1014,83 @@ func (m *QuoteRequest) GetSwapPublicationDeadline() uint64 { return 0 } -type QuoteResponse struct { +type InQuoteResponse struct { //* //The fee that the swap server is charging for the swap. - SwapFee int64 `protobuf:"varint,1,opt,name=swap_fee,json=swapFee,proto3" json:"swap_fee,omitempty"` + SwapFeeSat int64 `protobuf:"varint,1,opt,name=swap_fee_sat,json=swapFeeSat,proto3" json:"swap_fee_sat,omitempty"` + // + //An estimate of the on-chain fee that needs to be paid to publish the HTLC + //If a miner fee of 0 is returned, it means the external_htlc flag was set for + //a loop in and the fee estimation was skipped. If a miner fee of -1 is + //returned, it means lnd's wallet tried to estimate the fee but was unable to + //create a sample estimation transaction because not enough funds are + //available. An information message should be shown to the user in this case. + HtlcPublishFeeSat int64 `protobuf:"varint,3,opt,name=htlc_publish_fee_sat,json=htlcPublishFeeSat,proto3" json:"htlc_publish_fee_sat,omitempty"` + //* + //On-chain cltv expiry delta + CltvDelta int32 `protobuf:"varint,5,opt,name=cltv_delta,json=cltvDelta,proto3" json:"cltv_delta,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InQuoteResponse) Reset() { *m = InQuoteResponse{} } +func (m *InQuoteResponse) String() string { return proto.CompactTextString(m) } +func (*InQuoteResponse) ProtoMessage() {} +func (*InQuoteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_014de31d7ac8c57c, []int{12} +} + +func (m *InQuoteResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InQuoteResponse.Unmarshal(m, b) +} +func (m *InQuoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InQuoteResponse.Marshal(b, m, deterministic) +} +func (m *InQuoteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_InQuoteResponse.Merge(m, src) +} +func (m *InQuoteResponse) XXX_Size() int { + return xxx_messageInfo_InQuoteResponse.Size(m) +} +func (m *InQuoteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_InQuoteResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_InQuoteResponse proto.InternalMessageInfo + +func (m *InQuoteResponse) GetSwapFeeSat() int64 { + if m != nil { + return m.SwapFeeSat + } + return 0 +} + +func (m *InQuoteResponse) GetHtlcPublishFeeSat() int64 { + if m != nil { + return m.HtlcPublishFeeSat + } + return 0 +} + +func (m *InQuoteResponse) GetCltvDelta() int32 { + if m != nil { + return m.CltvDelta + } + return 0 +} + +type OutQuoteResponse struct { + //* + //The fee that the swap server is charging for the swap. + SwapFeeSat int64 `protobuf:"varint,1,opt,name=swap_fee_sat,json=swapFeeSat,proto3" json:"swap_fee_sat,omitempty"` //* //The part of the swap fee that is requested as a prepayment. - PrepayAmt int64 `protobuf:"varint,2,opt,name=prepay_amt,json=prepayAmt,proto3" json:"prepay_amt,omitempty"` + PrepayAmtSat int64 `protobuf:"varint,2,opt,name=prepay_amt_sat,json=prepayAmtSat,proto3" json:"prepay_amt_sat,omitempty"` //* //An estimate of the on-chain fee that needs to be paid to sweep the HTLC for - //a loop out or to pay to the HTLC for loop in. If a miner fee of 0 is - //returned, it means the external_htlc flag was set for a loop in and the fee - //estimation was skipped. If a miner fee of -1 is returned, it means lnd's - //wallet tried to estimate the fee but was unable to create a sample - //estimation transaction because not enough funds are available. An - //information message should be shown to the user in this case. - MinerFee int64 `protobuf:"varint,3,opt,name=miner_fee,json=minerFee,proto3" json:"miner_fee,omitempty"` + //a loop out. + HtlcSweepFeeSat int64 `protobuf:"varint,3,opt,name=htlc_sweep_fee_sat,json=htlcSweepFeeSat,proto3" json:"htlc_sweep_fee_sat,omitempty"` //* //The node pubkey where the swap payment needs to be paid //to. This can be used to test connectivity before initiating the swap. @@ -1042,60 +1103,60 @@ type QuoteResponse struct { XXX_sizecache int32 `json:"-"` } -func (m *QuoteResponse) Reset() { *m = QuoteResponse{} } -func (m *QuoteResponse) String() string { return proto.CompactTextString(m) } -func (*QuoteResponse) ProtoMessage() {} -func (*QuoteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_014de31d7ac8c57c, []int{12} +func (m *OutQuoteResponse) Reset() { *m = OutQuoteResponse{} } +func (m *OutQuoteResponse) String() string { return proto.CompactTextString(m) } +func (*OutQuoteResponse) ProtoMessage() {} +func (*OutQuoteResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_014de31d7ac8c57c, []int{13} } -func (m *QuoteResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_QuoteResponse.Unmarshal(m, b) +func (m *OutQuoteResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OutQuoteResponse.Unmarshal(m, b) } -func (m *QuoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_QuoteResponse.Marshal(b, m, deterministic) +func (m *OutQuoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OutQuoteResponse.Marshal(b, m, deterministic) } -func (m *QuoteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QuoteResponse.Merge(m, src) +func (m *OutQuoteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_OutQuoteResponse.Merge(m, src) } -func (m *QuoteResponse) XXX_Size() int { - return xxx_messageInfo_QuoteResponse.Size(m) +func (m *OutQuoteResponse) XXX_Size() int { + return xxx_messageInfo_OutQuoteResponse.Size(m) } -func (m *QuoteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QuoteResponse.DiscardUnknown(m) +func (m *OutQuoteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_OutQuoteResponse.DiscardUnknown(m) } -var xxx_messageInfo_QuoteResponse proto.InternalMessageInfo +var xxx_messageInfo_OutQuoteResponse proto.InternalMessageInfo -func (m *QuoteResponse) GetSwapFee() int64 { +func (m *OutQuoteResponse) GetSwapFeeSat() int64 { if m != nil { - return m.SwapFee + return m.SwapFeeSat } return 0 } -func (m *QuoteResponse) GetPrepayAmt() int64 { +func (m *OutQuoteResponse) GetPrepayAmtSat() int64 { if m != nil { - return m.PrepayAmt + return m.PrepayAmtSat } return 0 } -func (m *QuoteResponse) GetMinerFee() int64 { +func (m *OutQuoteResponse) GetHtlcSweepFeeSat() int64 { if m != nil { - return m.MinerFee + return m.HtlcSweepFeeSat } return 0 } -func (m *QuoteResponse) GetSwapPaymentDest() []byte { +func (m *OutQuoteResponse) GetSwapPaymentDest() []byte { if m != nil { return m.SwapPaymentDest } return nil } -func (m *QuoteResponse) GetCltvDelta() int32 { +func (m *OutQuoteResponse) GetCltvDelta() int32 { if m != nil { return m.CltvDelta } @@ -1112,7 +1173,7 @@ func (m *TokensRequest) Reset() { *m = TokensRequest{} } func (m *TokensRequest) String() string { return proto.CompactTextString(m) } func (*TokensRequest) ProtoMessage() {} func (*TokensRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_014de31d7ac8c57c, []int{13} + return fileDescriptor_014de31d7ac8c57c, []int{14} } func (m *TokensRequest) XXX_Unmarshal(b []byte) error { @@ -1146,7 +1207,7 @@ func (m *TokensResponse) Reset() { *m = TokensResponse{} } func (m *TokensResponse) String() string { return proto.CompactTextString(m) } func (*TokensResponse) ProtoMessage() {} func (*TokensResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_014de31d7ac8c57c, []int{14} + return fileDescriptor_014de31d7ac8c57c, []int{15} } func (m *TokensResponse) XXX_Unmarshal(b []byte) error { @@ -1211,7 +1272,7 @@ func (m *LsatToken) Reset() { *m = LsatToken{} } func (m *LsatToken) String() string { return proto.CompactTextString(m) } func (*LsatToken) ProtoMessage() {} func (*LsatToken) Descriptor() ([]byte, []int) { - return fileDescriptor_014de31d7ac8c57c, []int{15} + return fileDescriptor_014de31d7ac8c57c, []int{16} } func (m *LsatToken) XXX_Unmarshal(b []byte) error { @@ -1303,7 +1364,8 @@ func init() { proto.RegisterType((*InTermsResponse)(nil), "looprpc.InTermsResponse") proto.RegisterType((*OutTermsResponse)(nil), "looprpc.OutTermsResponse") proto.RegisterType((*QuoteRequest)(nil), "looprpc.QuoteRequest") - proto.RegisterType((*QuoteResponse)(nil), "looprpc.QuoteResponse") + proto.RegisterType((*InQuoteResponse)(nil), "looprpc.InQuoteResponse") + proto.RegisterType((*OutQuoteResponse)(nil), "looprpc.OutQuoteResponse") proto.RegisterType((*TokensRequest)(nil), "looprpc.TokensRequest") proto.RegisterType((*TokensResponse)(nil), "looprpc.TokensResponse") proto.RegisterType((*LsatToken)(nil), "looprpc.LsatToken") @@ -1312,106 +1374,109 @@ func init() { func init() { proto.RegisterFile("client.proto", fileDescriptor_014de31d7ac8c57c) } var fileDescriptor_014de31d7ac8c57c = []byte{ - // 1570 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcd, 0x6e, 0xdb, 0xca, - 0x15, 0x0e, 0xf5, 0xaf, 0x23, 0x8a, 0xa2, 0xc6, 0x89, 0x2d, 0xab, 0x0d, 0xa2, 0xb0, 0x4d, 0xab, - 0x18, 0x81, 0xd5, 0x38, 0xab, 0x06, 0x45, 0x01,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78, 0x79, 0x69, 0x89, - 0x20, 0xf1, 0x9d, 0x4f, 0x02, 0xee, 0xc8, 0x17, 0x80, 0xf2, 0xfa, 0x9a, 0x0c, 0x4e, 0xe1, 0x47, - 0x22, 0x51, 0x4f, 0x01, 0x26, 0x33, 0xfe, 0xd9, 0x71, 0xc9, 0x8c, 0x63, 0x59, 0xa2, 0xbc, 0x5d, - 0x16, 0xc8, 0x91, 0x00, 0xac, 0x1a, 0x54, 0xc7, 0xf4, 0xcf, 0x24, 0x48, 0xba, 0xed, 0x37, 0x60, - 0x2c, 0x80, 0x78, 0x13, 0x7b, 0x50, 0xe0, 0x12, 0x89, 0xdb, 0x7b, 0x69, 0x39, 0xa7, 0x0c, 0x73, - 0x49, 0xb6, 0x63, 0x86, 0xf5, 0xef, 0x0c, 0x94, 0x13, 0x54, 0x64, 0xfc, 0x12, 0x33, 0xe2, 0xf8, - 0x78, 0x82, 0x23, 0x4a, 0x83, 0xb8, 0xc9, 0x75, 0x01, 0x9e, 0xc5, 0x98, 0x38, 0xad, 0x8b, 0x7d, - 0x4c, 0x31, 0x9b, 0xca, 0x54, 0xe8, 0x76, 0x25, 0xc6, 0x8e, 0x31, 0x9b, 0xa2, 0x97, 0x60, 0x2e, - 0x28, 0x61, 0x44, 0x3c, 0x5f, 0xb8, 0xb4, 0xba, 0x4b, 0x6a, 0x31, 0x3e, 0x8c, 0x61, 0xe1, 0x65, - 0xaa, 0xcb, 0x9c, 0x10, 0x7b, 0xae, 0xe3, 0x33, 0xcc, 0xe3, 0x47, 0x8c, 0xa1, 0xf0, 0x21, 0xf6, - 0xdc, 0x33, 0x86, 0x39, 0x7a, 0x0d, 0x4f, 0x52, 0x2f, 0x9d, 0x14, 0x5d, 0xb5, 0x31, 0x8a, 0x92, - 0xa7, 0x4e, 0x32, 0xe5, 0x39, 0xe8, 0xc2, 0x1c, 0x9d, 0x49, 0x44, 0x30, 0x27, 0x6e, 0xdc, 0xc8, - 0x15, 0x81, 0x75, 0x15, 0x84,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 0xaa, 0xa7, - 0xfa, 0x20, 0x0e, 0xff, 0x4f, 0x29, 0xf5, 0x1f, 0xb4, 0x81, 0x67, 0x52, 0x7b, 0x17, 0xed, 0xa4, - 0xb5, 0xd3, 0xf1, 0xff, 0x1e, 0xaa, 0x62, 0x85, 0x85, 0xf9, 0xb1, 0x54, 0x13, 0xaf, 0x38, 0x6c, - 0x73, 0xe7, 0x1e, 0xbe, 0x7a, 0x30, 0x50, 0x4d, 0x2e, 0xc1, 0x30, 0xef, 0x28, 0x57, 0xbd, 0x2c, - 0xc8, 0x3f, 0x84, 0x6f, 0xbe, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x3d, 0x7d, 0xf8, 0x47, 0x0e, - 0x00, 0x00, + // 1619 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xdd, 0x6e, 0x23, 0x49, + 0x15, 0xde, 0xf6, 0x4f, 0x6c, 0x1f, 0xb7, 0xdb, 0x9d, 0xca, 0xce, 0xc4, 0xb1, 0x40, 0xeb, 0x69, + 0x76, 0x20, 0x1b, 0x56, 0x63, 0x36, 0x7b, 0xc5, 0x0a, 0x21, 0x65, 0x12, 0xef, 0xc6, 0x51, 0x7e, + 0x4c, 0xdb, 0x59, 0x09, 0x84, 0xd4, 0xaa, 0xb8, 0x2b, 0x71, 0x0b, 0x77, 0x57, 0x6f, 0x57, 0x79, + 0x26, 0xd1, 0x08, 0x81, 0x78, 0x01, 0x2e, 0x78, 0x03, 0x5e, 0x83, 0x37, 0xe0, 0x0e, 0x78, 0x00, + 0x6e, 0xb8, 0xe1, 0x25, 0x10, 0xaa, 0x53, 0xdd, 0xed, 0xee, 0xfc, 0x49, 0x5c, 0x71, 0xe7, 0xfe, + 0xea, 0xab, 0x53, 0xe7, 0xa7, 0xce, 0x77, 0xca, 0x60, 0xce, 0x97, 0x01, 0x8b, 0xe4, 0x9b, 0x38, + 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x7e, 0x09, 0x1d, 0x75, 0x46, 0xa6, 0x80, 0xa2, 0x70, 0x93, 0x4b, 0x32, + 0xdb, 0xdf, 0x7e, 0x80, 0x97, 0xbb, 0x83, 0x74, 0xf1, 0x08, 0x41, 0xe5, 0x50, 0x4b, 0xeb, 0xd5, + 0x06, 0xfe, 0x91, 0xfd, 0xf2, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x3e, 0x0d, 0x16, 0xff, + 0x0e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1454,13 +1519,13 @@ type SwapClientClient interface { //* loop: `quote` //LoopOutQuote returns a quote for a loop out swap with the provided //parameters. - LoopOutQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*QuoteResponse, error) + LoopOutQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*OutQuoteResponse, error) //* loop: `terms` //GetTerms returns the terms that the server enforces for swaps. GetLoopInTerms(ctx context.Context, in *TermsRequest, opts ...grpc.CallOption) (*InTermsResponse, error) //* loop: `quote` //GetQuote returns a quote for a swap with the provided parameters. - GetLoopInQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*QuoteResponse, error) + GetLoopInQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*InQuoteResponse, error) //* loop: `listauth` //GetLsatTokens returns all LSAT tokens the daemon ever paid for. GetLsatTokens(ctx context.Context, in *TokensRequest, opts ...grpc.CallOption) (*TokensResponse, error) @@ -1551,8 +1616,8 @@ func (c *swapClientClient) LoopOutTerms(ctx context.Context, in *TermsRequest, o return out, nil } -func (c *swapClientClient) LoopOutQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*QuoteResponse, error) { - out := new(QuoteResponse) +func (c *swapClientClient) LoopOutQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*OutQuoteResponse, error) { + out := new(OutQuoteResponse) err := c.cc.Invoke(ctx, "/looprpc.SwapClient/LoopOutQuote", in, out, opts...) if err != nil { return nil, err @@ -1569,8 +1634,8 @@ func (c *swapClientClient) GetLoopInTerms(ctx context.Context, in *TermsRequest, return out, nil } -func (c *swapClientClient) GetLoopInQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*QuoteResponse, error) { - out := new(QuoteResponse) +func (c *swapClientClient) GetLoopInQuote(ctx context.Context, in *QuoteRequest, opts ...grpc.CallOption) (*InQuoteResponse, error) { + out := new(InQuoteResponse) err := c.cc.Invoke(ctx, "/looprpc.SwapClient/GetLoopInQuote", in, out, opts...) if err != nil { return nil, err @@ -1617,13 +1682,13 @@ type SwapClientServer interface { //* loop: `quote` //LoopOutQuote returns a quote for a loop out swap with the provided //parameters. - LoopOutQuote(context.Context, *QuoteRequest) (*QuoteResponse, error) + LoopOutQuote(context.Context, *QuoteRequest) (*OutQuoteResponse, error) //* loop: `terms` //GetTerms returns the terms that the server enforces for swaps. GetLoopInTerms(context.Context, *TermsRequest) (*InTermsResponse, error) //* loop: `quote` //GetQuote returns a quote for a swap with the provided parameters. - GetLoopInQuote(context.Context, *QuoteRequest) (*QuoteResponse, error) + GetLoopInQuote(context.Context, *QuoteRequest) (*InQuoteResponse, error) //* loop: `listauth` //GetLsatTokens returns all LSAT tokens the daemon ever paid for. GetLsatTokens(context.Context, *TokensRequest) (*TokensResponse, error) @@ -1651,13 +1716,13 @@ func (*UnimplementedSwapClientServer) SwapInfo(ctx context.Context, req *SwapInf func (*UnimplementedSwapClientServer) LoopOutTerms(ctx context.Context, req *TermsRequest) (*OutTermsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LoopOutTerms not implemented") } -func (*UnimplementedSwapClientServer) LoopOutQuote(ctx context.Context, req *QuoteRequest) (*QuoteResponse, error) { +func (*UnimplementedSwapClientServer) LoopOutQuote(ctx context.Context, req *QuoteRequest) (*OutQuoteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LoopOutQuote not implemented") } func (*UnimplementedSwapClientServer) GetLoopInTerms(ctx context.Context, req *TermsRequest) (*InTermsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLoopInTerms not implemented") } -func (*UnimplementedSwapClientServer) GetLoopInQuote(ctx context.Context, req *QuoteRequest) (*QuoteResponse, error) { +func (*UnimplementedSwapClientServer) GetLoopInQuote(ctx context.Context, req *QuoteRequest) (*InQuoteResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLoopInQuote not implemented") } func (*UnimplementedSwapClientServer) GetLsatTokens(ctx context.Context, req *TokensRequest) (*TokensResponse, error) { diff --git a/looprpc/client.proto b/looprpc/client.proto index 86e842d..d30707a 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -72,7 +72,7 @@ service SwapClient { LoopOutQuote returns a quote for a loop out swap with the provided parameters. */ - rpc LoopOutQuote (QuoteRequest) returns (QuoteResponse) { + rpc LoopOutQuote (QuoteRequest) returns (OutQuoteResponse) { option (google.api.http) = { get: "/v1/loop/out/quote/{amt}" }; @@ -90,7 +90,7 @@ service SwapClient { /** loop: `quote` GetQuote returns a quote for a swap with the provided parameters. */ - rpc GetLoopInQuote (QuoteRequest) returns (QuoteResponse) { + rpc GetLoopInQuote (QuoteRequest) returns (InQuoteResponse) { option (google.api.http) = { get: "/v1/loop/in/quote/{amt}" }; @@ -479,27 +479,46 @@ message QuoteRequest { uint64 swap_publication_deadline = 4; } -message QuoteResponse { +message InQuoteResponse { + reserved 2, 4; + + /** + The fee that the swap server is charging for the swap. + */ + int64 swap_fee_sat = 1; + + /* + An estimate of the on-chain fee that needs to be paid to publish the HTLC + If a miner fee of 0 is returned, it means the external_htlc flag was set for + a loop in and the fee estimation was skipped. If a miner fee of -1 is + returned, it means lnd's wallet tried to estimate the fee but was unable to + create a sample estimation transaction because not enough funds are + available. An information message should be shown to the user in this case. + */ + int64 htlc_publish_fee_sat = 3; + + /** + On-chain cltv expiry delta + */ + int32 cltv_delta = 5; +} + +message OutQuoteResponse { /** The fee that the swap server is charging for the swap. */ - int64 swap_fee = 1; + int64 swap_fee_sat = 1; /** The part of the swap fee that is requested as a prepayment. */ - int64 prepay_amt = 2; + int64 prepay_amt_sat = 2; /** An estimate of the on-chain fee that needs to be paid to sweep the HTLC for - a loop out or to pay to the HTLC for loop in. If a miner fee of 0 is - returned, it means the external_htlc flag was set for a loop in and the fee - estimation was skipped. If a miner fee of -1 is returned, it means lnd's - wallet tried to estimate the fee but was unable to create a sample - estimation transaction because not enough funds are available. An - information message should be shown to the user in this case. - */ - int64 miner_fee = 3; + a loop out. + */ + int64 htlc_sweep_fee_sat = 3; /** The node pubkey where the swap payment needs to be paid diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index fb8032f..214ec87 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -52,7 +52,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/looprpcQuoteResponse" + "$ref": "#/definitions/looprpcInQuoteResponse" } }, "default": { @@ -165,7 +165,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/looprpcQuoteResponse" + "$ref": "#/definitions/looprpcOutQuoteResponse" } }, "default": { @@ -318,6 +318,26 @@ } }, "definitions": { + "looprpcInQuoteResponse": { + "type": "object", + "properties": { + "swap_fee_sat": { + "type": "string", + "format": "int64", + "description": "*\nThe fee that the swap server is charging for the swap." + }, + "htlc_publish_fee_sat": { + "type": "string", + "format": "int64", + "description": "An estimate of the on-chain fee that needs to be paid to publish the HTLC\nIf a miner fee of 0 is returned, it means the external_htlc flag was set for\na loop in and the fee estimation was skipped. If a miner fee of -1 is\nreturned, it means lnd's wallet tried to estimate the fee but was unable to\ncreate a sample estimation transaction because not enough funds are\navailable. An information message should be shown to the user in this case." + }, + "cltv_delta": { + "type": "integer", + "format": "int32", + "title": "*\nOn-chain cltv expiry delta" + } + } + }, "looprpcInTermsResponse": { "type": "object", "properties": { @@ -486,38 +506,23 @@ } } }, - "looprpcOutTermsResponse": { - "type": "object", - "properties": { - "min_swap_amount": { - "type": "string", - "format": "int64", - "title": "*\nMinimum swap amount (sat)" - }, - "max_swap_amount": { - "type": "string", - "format": "int64", - "title": "*\nMaximum swap amount (sat)" - } - } - }, - "looprpcQuoteResponse": { + "looprpcOutQuoteResponse": { "type": "object", "properties": { - "swap_fee": { + "swap_fee_sat": { "type": "string", "format": "int64", "description": "*\nThe fee that the swap server is charging for the swap." }, - "prepay_amt": { + "prepay_amt_sat": { "type": "string", "format": "int64", "description": "*\nThe part of the swap fee that is requested as a prepayment." }, - "miner_fee": { + "htlc_sweep_fee_sat": { "type": "string", "format": "int64", - "description": "*\nAn estimate of the on-chain fee that needs to be paid to sweep the HTLC for\na loop out or to pay to the HTLC for loop in. If a miner fee of 0 is\nreturned, it means the external_htlc flag was set for a loop in and the fee\nestimation was skipped. If a miner fee of -1 is returned, it means lnd's\nwallet tried to estimate the fee but was unable to create a sample\nestimation transaction because not enough funds are available. An\ninformation message should be shown to the user in this case." + "description": "*\nAn estimate of the on-chain fee that needs to be paid to sweep the HTLC for\na loop out." }, "swap_payment_dest": { "type": "string", @@ -531,6 +536,21 @@ } } }, + "looprpcOutTermsResponse": { + "type": "object", + "properties": { + "min_swap_amount": { + "type": "string", + "format": "int64", + "title": "*\nMinimum swap amount (sat)" + }, + "max_swap_amount": { + "type": "string", + "format": "int64", + "title": "*\nMaximum swap amount (sat)" + } + } + }, "looprpcSwapResponse": { "type": "object", "properties": {