diff --git a/cmd/loop/terms.go b/cmd/loop/terms.go index 1aeacb9..feda2d4 100644 --- a/cmd/loop/terms.go +++ b/cmd/loop/terms.go @@ -8,7 +8,6 @@ import ( "github.com/btcsuite/btcutil" "github.com/lightninglabs/loop/looprpc" - "github.com/lightninglabs/loop/swap" ) var termsCommand = cli.Command{ @@ -29,13 +28,6 @@ func terms(ctx *cli.Context) error { btcutil.Amount(terms.MinSwapAmount), btcutil.Amount(terms.MaxSwapAmount), ) - fmt.Printf("Fee: %d + %.4f %% (%d prepaid)\n", - btcutil.Amount(terms.SwapFeeBase), - swap.FeeRateAsPercentage(terms.SwapFeeRate), - btcutil.Amount(terms.PrepayAmt), - ) - - fmt.Printf("Cltv delta: %v blocks\n", terms.CltvDelta) } fmt.Println("Loop Out") diff --git a/cmd/loopd/swapclient_server.go b/cmd/loopd/swapclient_server.go index 7579cb2..30cec13 100644 --- a/cmd/loopd/swapclient_server.go +++ b/cmd/loopd/swapclient_server.go @@ -244,10 +244,6 @@ func (s *swapClientServer) LoopOutTerms(ctx context.Context, return &looprpc.TermsResponse{ MinSwapAmount: int64(terms.MinSwapAmount), MaxSwapAmount: int64(terms.MaxSwapAmount), - PrepayAmt: int64(terms.PrepayAmt), - SwapFeeBase: int64(terms.SwapFeeBase), - SwapFeeRate: int64(terms.SwapFeeRate), - CltvDelta: int32(terms.CltvDelta), }, nil } @@ -269,6 +265,7 @@ func (s *swapClientServer) LoopOutQuote(ctx context.Context, if err != nil { return nil, err } + return &looprpc.QuoteResponse{ MinerFee: int64(quote.MinerFee), PrepayAmt: int64(quote.PrepayAmount), @@ -291,9 +288,6 @@ func (s *swapClientServer) GetLoopInTerms(ctx context.Context, req *looprpc.Term return &looprpc.TermsResponse{ MinSwapAmount: int64(terms.MinSwapAmount), MaxSwapAmount: int64(terms.MaxSwapAmount), - SwapFeeBase: int64(terms.SwapFeeBase), - SwapFeeRate: int64(terms.SwapFeeRate), - CltvDelta: int32(terms.CltvDelta), }, nil } diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index bc4578e..10ab2dc 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -590,28 +590,12 @@ func (m *TermsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_TermsRequest proto.InternalMessageInfo type TermsResponse struct { - //* - //The node pubkey where the swap payment needs to be paid - //to. This can be used to test connectivity before initiating the swap. - SwapPaymentDest string `protobuf:"bytes,1,opt,name=swap_payment_dest,json=swapPaymentDest,proto3" json:"swap_payment_dest,omitempty"` - //* - //The base fee for a swap (sat) - SwapFeeBase int64 `protobuf:"varint,2,opt,name=swap_fee_base,json=swapFeeBase,proto3" json:"swap_fee_base,omitempty"` - //* - //The fee rate for a swap (parts per million) - SwapFeeRate int64 `protobuf:"varint,3,opt,name=swap_fee_rate,json=swapFeeRate,proto3" json:"swap_fee_rate,omitempty"` - //* - //Required prepay amount - PrepayAmt int64 `protobuf:"varint,4,opt,name=prepay_amt,json=prepayAmt,proto3" json:"prepay_amt,omitempty"` //* //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"` - //* - //On-chain cltv expiry delta - CltvDelta int32 `protobuf:"varint,7,opt,name=cltv_delta,json=cltvDelta,proto3" json:"cltv_delta,omitempty"` + 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:"-"` @@ -642,34 +626,6 @@ func (m *TermsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_TermsResponse proto.InternalMessageInfo -func (m *TermsResponse) GetSwapPaymentDest() string { - if m != nil { - return m.SwapPaymentDest - } - return "" -} - -func (m *TermsResponse) GetSwapFeeBase() int64 { - if m != nil { - return m.SwapFeeBase - } - return 0 -} - -func (m *TermsResponse) GetSwapFeeRate() int64 { - if m != nil { - return m.SwapFeeRate - } - return 0 -} - -func (m *TermsResponse) GetPrepayAmt() int64 { - if m != nil { - return m.PrepayAmt - } - return 0 -} - func (m *TermsResponse) GetMinSwapAmount() int64 { if m != nil { return m.MinSwapAmount @@ -684,13 +640,6 @@ func (m *TermsResponse) GetMaxSwapAmount() int64 { return 0 } -func (m *TermsResponse) GetCltvDelta() int32 { - if m != nil { - return m.CltvDelta - } - return 0 -} - type QuoteRequest struct { //* //The amount to swap in satoshis. @@ -765,7 +714,14 @@ type QuoteResponse struct { PrepayAmt int64 `protobuf:"varint,2,opt,name=prepay_amt,json=prepayAmt,proto3" json:"prepay_amt,omitempty"` //* //An estimate of the on-chain fee that needs to be paid to sweep the HTLC. - MinerFee int64 `protobuf:"varint,3,opt,name=miner_fee,json=minerFee,proto3" json:"miner_fee,omitempty"` + MinerFee int64 `protobuf:"varint,3,opt,name=miner_fee,json=minerFee,proto3" json:"miner_fee,omitempty"` + //* + //The node pubkey where the swap payment needs to be paid + //to. This can be used to test connectivity before initiating the swap. + SwapPaymentDest []byte `protobuf:"bytes,4,opt,name=swap_payment_dest,json=swapPaymentDest,proto3" json:"swap_payment_dest,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:"-"` @@ -817,6 +773,20 @@ func (m *QuoteResponse) GetMinerFee() int64 { return 0 } +func (m *QuoteResponse) GetSwapPaymentDest() []byte { + if m != nil { + return m.SwapPaymentDest + } + return nil +} + +func (m *QuoteResponse) GetCltvDelta() int32 { + if m != nil { + return m.CltvDelta + } + return 0 +} + func init() { proto.RegisterEnum("looprpc.SwapType", SwapType_name, SwapType_value) proto.RegisterEnum("looprpc.SwapState", SwapState_name, SwapState_value) @@ -834,74 +804,74 @@ func init() { func init() { proto.RegisterFile("client.proto", fileDescriptor_014de31d7ac8c57c) } var fileDescriptor_014de31d7ac8c57c = []byte{ - // 1065 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x5f, 0x73, 0xda, 0xc6, - 0x17, 0x0d, 0x02, 0x1b, 0xb8, 0x08, 0x01, 0xeb, 0xc4, 0xc6, 0xfc, 0x7e, 0x99, 0x50, 0xb5, 0x49, - 0x19, 0x3f, 0x98, 0xd6, 0x79, 0x6a, 0xdf, 0x08, 0x26, 0x31, 0x33, 0xb6, 0x71, 0x05, 0xce, 0x4c, - 0xfb, 0xa2, 0x6e, 0x60, 0xb1, 0x35, 0x23, 0xed, 0x2a, 0xd2, 0xe2, 0x3f, 0xd3, 0xe9, 0x4b, 0xbf, - 0x41, 0xa7, 0x5f, 0xa5, 0xdf, 0xa4, 0xef, 0x7d, 0xea, 0xf4, 0x73, 0x74, 0xf6, 0xae, 0x90, 0x05, - 0xc4, 0x2f, 0x79, 0xc3, 0x67, 0xcf, 0x9e, 0xbd, 0x7b, 0xef, 0x39, 0x2b, 0x83, 0x39, 0xf5, 0x3d, - 0xc6, 0xe5, 0x61, 0x18, 0x09, 0x29, 0x48, 0xd1, 0x17, 0x22, 0x8c, 0xc2, 0x69, 0xeb, 0xff, 0x57, - 0x42, 0x5c, 0xf9, 0xac, 0x4b, 0x43, 0xaf, 0x4b, 0x39, 0x17, 0x92, 0x4a, 0x4f, 0xf0, 0x58, 0xd3, - 0xec, 0xbf, 0x0d, 0xb0, 0x4e, 0x85, 0x08, 0x47, 0x0b, 0xe9, 0xb0, 0x8f, 0x0b, 0x16, 0x4b, 0x52, - 0x87, 0x3c, 0x0d, 0x64, 0x33, 0xd7, 0xce, 0x75, 0xf2, 0x8e, 0xfa, 0x49, 0x08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xb3, 0x95, 0xf0, 0x2e, 0x9b, 0x67, 0xef, 0xfd, 0xf6, 0xd7, 0x3f, - 0x7f, 0x18, 0x0d, 0xdb, 0xec, 0xde, 0x7c, 0xdb, 0x55, 0x8c, 0xae, 0x58, 0xc8, 0xef, 0x73, 0x07, - 0x64, 0x04, 0xdb, 0xfa, 0x79, 0x25, 0xbb, 0x2b, 0x92, 0xe9, 0x7b, 0xfb, 0x98, 0xe2, 0x2e, 0x2a, - 0xd6, 0xed, 0x4a, 0xaa, 0xe8, 0x71, 0x25, 0xf8, 0x1d, 0x14, 0x93, 0x67, 0x2b, 0x53, 0xe4, 0xea, - 0x43, 0xd6, 0xda, 0xd9, 0x78, 0x61, 0x16, 0xf1, 0x37, 0x39, 0xf2, 0x23, 0x98, 0xc9, 0x6d, 0x30, - 0x74, 0xe4, 0xe1, 0xe4, 0x6c, 0x2a, 0x5b, 0xbb, 0xeb, 0x70, 0x52, 0x51, 0x0b, 0x2b, 0x7a, 0x4a, - 0x48, 0xf6, 0x8e, 0x5d, 0x89, 0x52, 0x6e, 0x2a, 0x8d, 0xa6, 0xca, 0x48, 0x67, 0xcd, 0x9c, 0x91, - 0x5e, 0xf1, 0x9e, 0xdd, 0x46, 0xe9, 0x16, 0x69, 0xae, 0x48, 0x7f, 0x54, 0x9c, 0xee, 0x2f, 0x34, - 0x90, 0xbf, 0x92, 0x9f, 0xc0, 0x7a, 0xc7, 0xa4, 0xee, 0xdc, 0x67, 0x55, 0xbf, 0x8f, 0x47, 0xec, - 0x90, 0x46, 0xa6, 0x9f, 0x49, 0xf1, 0x3f, 0x67, 0xb4, 0x3f, 0xab, 0xfc, 0x17, 0xa8, 0xbd, 0x4f, - 0xf6, 0xb2, 0xda, 0x99, 0xea, 0x3f, 0x6c, 0xe3, 0x7f, 0x33, 0xaf, 0xff, 0x0b, 0x00, 0x00, 0xff, - 0xff, 0x71, 0xf8, 0xf7, 0x7c, 0x04, 0x09, 0x00, 0x00, + // 1061 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x73, 0xda, 0x46, + 0x1c, 0x8d, 0x40, 0x18, 0xf1, 0xb3, 0x90, 0xc5, 0x3a, 0x71, 0x08, 0x6d, 0x26, 0x94, 0x36, 0x29, + 0xe3, 0x83, 0x69, 0x9d, 0x53, 0x7b, 0xa3, 0x98, 0xc4, 0x78, 0x6c, 0xe3, 0x0a, 0x9c, 0x99, 0xf6, + 0xa2, 0x6e, 0x61, 0xb1, 0x35, 0x83, 0x76, 0x15, 0x69, 0xf1, 0x9f, 0xe9, 0xe4, 0xd2, 0xaf, 0xd0, + 0x4f, 0xd2, 0x99, 0x7e, 0x93, 0xde, 0x7b, 0xea, 0xf4, 0x73, 0x74, 0xf6, 0xb7, 0x42, 0x16, 0x26, + 0xbe, 0xe4, 0x66, 0x9e, 0xde, 0xbe, 0xdf, 0x1f, 0xbd, 0xb7, 0x32, 0xd8, 0x93, 0x79, 0xc0, 0xb8, + 0xdc, 0x8b, 0x62, 0x21, 0x05, 0x29, 0xcf, 0x85, 0x88, 0xe2, 0x68, 0xd2, 0xf8, 0xfc, 0x42, 0x88, + 0x8b, 0x39, 0xeb, 0xd0, 0x28, 0xe8, 0x50, 0xce, 0x85, 0xa4, 0x32, 0x10, 0x3c, 0xd1, 0xb4, 0xd6, + 0x3f, 0x05, 0x70, 0x8e, 0x85, 0x88, 0x86, 0x0b, 0xe9, 0xb1, 0xf7, 0x0b, 0x96, 0x48, 0xe2, 0x42, + 0x91, 0x86, 0xb2, 0x6e, 0x34, 0x8d, 0x76, 0xd1, 0x53, 0x7f, 0x12, 0x02, 0xe6, 0x94, 0x25, 0xb2, + 0x5e, 0x68, 0x1a, 0xed, 0x8a, 0x87, 0x7f, 0x93, 0x0e, 0x3c, 0x0e, 0xe9, 0x8d, 0x9f, 0x5c, 0xd3, + 0xc8, 0x8f, 0xc5, 0x42, 0x06, 0xfc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, 0xbb, 0x64, 0x08, 0x1b, 0xfa, + 0x56, 0x24, 0x3b, 0x2b, 0x92, 0xd9, 0x35, 0xf9, 0x90, 0xe2, 0x0e, 0x2a, 0xba, 0xad, 0xcd, 0x4c, + 0x31, 0xe0, 0x4a, 0xf0, 0x3b, 0x28, 0xa7, 0xb7, 0x4d, 0xae, 0xc9, 0xd5, 0xfb, 0xa7, 0xb1, 0xbd, + 0x76, 0x31, 0x2c, 0x92, 0x6f, 0x0c, 0xf2, 0x13, 0xd8, 0xe9, 0x34, 0x18, 0x16, 0x72, 0x57, 0x39, + 0x1f, 0xa6, 0xc6, 0xce, 0x7d, 0x38, 0xed, 0xa8, 0x81, 0x1d, 0x3d, 0x26, 0x24, 0x3f, 0x63, 0x47, + 0xa2, 0x94, 0x9f, 0x49, 0xa3, 0x3f, 0x73, 0xd2, 0xf9, 0x60, 0xe4, 0xa4, 0x57, 0x6c, 0xdc, 0x6a, + 0xa2, 0x74, 0x83, 0xd4, 0x57, 0xa4, 0xdf, 0x2b, 0x4e, 0xe7, 0x37, 0x1a, 0xca, 0x0f, 0xe4, 0x67, + 0x70, 0xde, 0x32, 0xa9, 0x37, 0xf7, 0x49, 0xdd, 0x3f, 0xc3, 0x12, 0xdb, 0xa4, 0x96, 0xdb, 0x67, + 0xda, 0xfc, 0x2f, 0x39, 0xed, 0x4f, 0x6a, 0xff, 0x05, 0x6a, 0x3f, 0x23, 0x4f, 0xf3, 0xda, 0xb9, + 0xee, 0x7f, 0xdd, 0xc0, 0x7f, 0x42, 0x5e, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x26, 0x06, 0x26, + 0x30, 0xbb, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/looprpc/client.proto b/looprpc/client.proto index 0d54f15..01e46b0 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -305,26 +305,8 @@ message TermsRequest { } message TermsResponse { - /** - The node pubkey where the swap payment needs to be paid - to. This can be used to test connectivity before initiating the swap. - */ - string swap_payment_dest = 1; - /** - The base fee for a swap (sat) - */ - int64 swap_fee_base = 2; - - /** - The fee rate for a swap (parts per million) - */ - int64 swap_fee_rate = 3; - - /** - Required prepay amount - */ - int64 prepay_amt = 4; + reserved 1,2,3,4,7; /** Minimum swap amount (sat) @@ -335,11 +317,6 @@ message TermsResponse { Maximum swap amount (sat) */ int64 max_swap_amount = 6; - - /** - On-chain cltv expiry delta - */ - int32 cltv_delta = 7; } message QuoteRequest { @@ -378,4 +355,15 @@ message QuoteResponse { An estimate of the on-chain fee that needs to be paid to sweep the HTLC. */ int64 miner_fee = 3; + + /** + The node pubkey where the swap payment needs to be paid + to. This can be used to test connectivity before initiating the swap. + */ + bytes swap_payment_dest = 4; + + /** + On-chain cltv expiry delta + */ + int32 cltv_delta = 5; } diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index 43d001b..0f76ba8 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -285,6 +285,16 @@ "type": "string", "format": "int64", "description": "*\nAn estimate of the on-chain fee that needs to be paid to sweep the HTLC." + }, + "swap_payment_dest": { + "type": "string", + "format": "byte", + "description": "*\nThe node pubkey where the swap payment needs to be paid\nto. This can be used to test connectivity before initiating the swap." + }, + "cltv_delta": { + "type": "integer", + "format": "int32", + "title": "*\nOn-chain cltv expiry delta" } } }, @@ -377,25 +387,6 @@ "looprpcTermsResponse": { "type": "object", "properties": { - "swap_payment_dest": { - "type": "string", - "description": "*\nThe node pubkey where the swap payment needs to be paid\nto. This can be used to test connectivity before initiating the swap." - }, - "swap_fee_base": { - "type": "string", - "format": "int64", - "title": "*\nThe base fee for a swap (sat)" - }, - "swap_fee_rate": { - "type": "string", - "format": "int64", - "title": "*\nThe fee rate for a swap (parts per million)" - }, - "prepay_amt": { - "type": "string", - "format": "int64", - "title": "*\nRequired prepay amount" - }, "min_swap_amount": { "type": "string", "format": "int64", @@ -405,11 +396,6 @@ "type": "string", "format": "int64", "title": "*\nMaximum swap amount (sat)" - }, - "cltv_delta": { - "type": "integer", - "format": "int32", - "title": "*\nOn-chain cltv expiry delta" } } }