looprpc: add server cancelation rpc to server.proto

pull/378/head
carla 3 years ago
parent 0a8e037e61
commit 71501ef2e8
No known key found for this signature in database
GPG Key ID: 4CA7FE54A6213C91

@ -39,13 +39,17 @@ const (
// invoice so that the server can perform a multi-path probe. // invoice so that the server can perform a multi-path probe.
ProtocolVersionMultiLoopIn ProtocolVersion = 6 ProtocolVersionMultiLoopIn ProtocolVersion = 6
// ProtocolVersionLoopOutCancel indicates that the client supports
// canceling loop out swaps.
ProtocolVersionLoopOutCancel = 7
// ProtocolVersionUnrecorded is set for swaps were created before we // ProtocolVersionUnrecorded is set for swaps were created before we
// started saving protocol version with swaps. // started saving protocol version with swaps.
ProtocolVersionUnrecorded ProtocolVersion = math.MaxUint32 ProtocolVersionUnrecorded ProtocolVersion = math.MaxUint32
// CurrentRPCProtocolVersion defines the version of the RPC protocol // CurrentRPCProtocolVersion defines the version of the RPC protocol
// that is currently supported by the loop client. // that is currently supported by the loop client.
CurrentRPCProtocolVersion = looprpc.ProtocolVersion_MULTI_LOOP_IN CurrentRPCProtocolVersion = looprpc.ProtocolVersion_LOOP_OUT_CANCEL
// CurrentInternalProtocolVersion defines the RPC current protocol in // CurrentInternalProtocolVersion defines the RPC current protocol in
// the internal representation. // the internal representation.
@ -81,6 +85,9 @@ func (p ProtocolVersion) String() string {
case ProtocolVersionHtlcV2: case ProtocolVersionHtlcV2:
return "HTLC V2" return "HTLC V2"
case ProtocolVersionLoopOutCancel:
return "Loop Out Cancel"
default: default:
return "Unknown" return "Unknown"
} }

@ -21,6 +21,7 @@ func TestProtocolVersionSanity(t *testing.T) {
ProtocolVersionUserExpiryLoopOut, ProtocolVersionUserExpiryLoopOut,
ProtocolVersionHtlcV2, ProtocolVersionHtlcV2,
ProtocolVersionMultiLoopIn, ProtocolVersionMultiLoopIn,
ProtocolVersionLoopOutCancel,
} }
rpcVersions := [...]looprpc.ProtocolVersion{ rpcVersions := [...]looprpc.ProtocolVersion{
@ -31,6 +32,7 @@ func TestProtocolVersionSanity(t *testing.T) {
looprpc.ProtocolVersion_USER_EXPIRY_LOOP_OUT, looprpc.ProtocolVersion_USER_EXPIRY_LOOP_OUT,
looprpc.ProtocolVersion_HTLC_V2, looprpc.ProtocolVersion_HTLC_V2,
looprpc.ProtocolVersion_MULTI_LOOP_IN, looprpc.ProtocolVersion_MULTI_LOOP_IN,
looprpc.ProtocolVersion_LOOP_OUT_CANCEL,
} }
require.Equal(t, len(versions), len(rpcVersions)) require.Equal(t, len(versions), len(rpcVersions))

@ -54,6 +54,8 @@ const (
// The client creates a probe invoice so that the server can perform a // The client creates a probe invoice so that the server can perform a
// multi-path probe. // multi-path probe.
ProtocolVersion_MULTI_LOOP_IN ProtocolVersion = 6 ProtocolVersion_MULTI_LOOP_IN ProtocolVersion = 6
// The client supports loop out swap cancelation.
ProtocolVersion_LOOP_OUT_CANCEL ProtocolVersion = 7
) )
var ProtocolVersion_name = map[int32]string{ var ProtocolVersion_name = map[int32]string{
@ -64,6 +66,7 @@ var ProtocolVersion_name = map[int32]string{
4: "USER_EXPIRY_LOOP_OUT", 4: "USER_EXPIRY_LOOP_OUT",
5: "HTLC_V2", 5: "HTLC_V2",
6: "MULTI_LOOP_IN", 6: "MULTI_LOOP_IN",
7: "LOOP_OUT_CANCEL",
} }
var ProtocolVersion_value = map[string]int32{ var ProtocolVersion_value = map[string]int32{
@ -74,6 +77,7 @@ var ProtocolVersion_value = map[string]int32{
"USER_EXPIRY_LOOP_OUT": 4, "USER_EXPIRY_LOOP_OUT": 4,
"HTLC_V2": 5, "HTLC_V2": 5,
"MULTI_LOOP_IN": 6, "MULTI_LOOP_IN": 6,
"LOOP_OUT_CANCEL": 7,
} }
func (x ProtocolVersion) String() string { func (x ProtocolVersion) String() string {
@ -163,6 +167,92 @@ func (ServerSwapState) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{1} return fileDescriptor_ad098daeda4239f7, []int{1}
} }
type RoutePaymentType int32
const (
// No reason, used to distinguish from the default value.
RoutePaymentType_UNKNOWN RoutePaymentType = 0
// Prepay route indicates that the swap was canceled because the client
// could not find a route to the server for the prepay.
RoutePaymentType_PREPAY_ROUTE RoutePaymentType = 1
// Invoice route indicates that the swap was canceled because the client
// could not find a route to the server for the swap invoice.
RoutePaymentType_INVOICE_ROUTE RoutePaymentType = 2
)
var RoutePaymentType_name = map[int32]string{
0: "UNKNOWN",
1: "PREPAY_ROUTE",
2: "INVOICE_ROUTE",
}
var RoutePaymentType_value = map[string]int32{
"UNKNOWN": 0,
"PREPAY_ROUTE": 1,
"INVOICE_ROUTE": 2,
}
func (x RoutePaymentType) String() string {
return proto.EnumName(RoutePaymentType_name, int32(x))
}
func (RoutePaymentType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{2}
}
// PaymentFailureReason describes the reason that a payment failed. These
// values are copied directly from lnd.
type PaymentFailureReason int32
const (
//
//Payment isn't failed (yet).
PaymentFailureReason_FAILURE_REASON_NONE PaymentFailureReason = 0
//
//There are more routes to try, but the payment timeout was exceeded.
PaymentFailureReason_FAILURE_REASON_TIMEOUT PaymentFailureReason = 1
//
//All possible routes were tried and failed permanently. Or were no
//routes to the destination at all.
PaymentFailureReason_FAILURE_REASON_NO_ROUTE PaymentFailureReason = 2
//
//A non-recoverable error has occured.
PaymentFailureReason_FAILURE_REASON_ERROR PaymentFailureReason = 3
//
//Payment details incorrect (unknown hash, invalid amt or
//invalid final cltv delta)
PaymentFailureReason_FAILURE_REASON_INCORRECT_PAYMENT_DETAILS PaymentFailureReason = 4
//
//Insufficient local balance.
PaymentFailureReason_FAILURE_REASON_INSUFFICIENT_BALANCE PaymentFailureReason = 5
)
var PaymentFailureReason_name = map[int32]string{
0: "FAILURE_REASON_NONE",
1: "FAILURE_REASON_TIMEOUT",
2: "FAILURE_REASON_NO_ROUTE",
3: "FAILURE_REASON_ERROR",
4: "FAILURE_REASON_INCORRECT_PAYMENT_DETAILS",
5: "FAILURE_REASON_INSUFFICIENT_BALANCE",
}
var PaymentFailureReason_value = map[string]int32{
"FAILURE_REASON_NONE": 0,
"FAILURE_REASON_TIMEOUT": 1,
"FAILURE_REASON_NO_ROUTE": 2,
"FAILURE_REASON_ERROR": 3,
"FAILURE_REASON_INCORRECT_PAYMENT_DETAILS": 4,
"FAILURE_REASON_INSUFFICIENT_BALANCE": 5,
}
func (x PaymentFailureReason) String() string {
return proto.EnumName(PaymentFailureReason_name, int32(x))
}
func (PaymentFailureReason) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{3}
}
type ServerLoopOutRequest struct { type ServerLoopOutRequest struct {
ReceiverKey []byte `protobuf:"bytes,1,opt,name=receiver_key,json=receiverKey,proto3" json:"receiver_key,omitempty"` ReceiverKey []byte `protobuf:"bytes,1,opt,name=receiver_key,json=receiverKey,proto3" json:"receiver_key,omitempty"`
SwapHash []byte `protobuf:"bytes,2,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` SwapHash []byte `protobuf:"bytes,2,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"`
@ -1207,9 +1297,236 @@ func (m *SubscribeLoopInUpdatesResponse) GetState() ServerSwapState {
return ServerSwapState_INITIATED return ServerSwapState_INITIATED
} }
type RouteCancel struct {
// The type of the payment that failed.
RouteType RoutePaymentType `protobuf:"varint,1,opt,name=route_type,json=routeType,proto3,enum=looprpc.RoutePaymentType" json:"route_type,omitempty"`
// The htlcs that the client tried to pay the server with, if any.
Attempts []*HtlcAttempt `protobuf:"bytes,2,rep,name=attempts,proto3" json:"attempts,omitempty"`
// The reason that the payment failed.
Failure PaymentFailureReason `protobuf:"varint,3,opt,name=failure,proto3,enum=looprpc.PaymentFailureReason" json:"failure,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RouteCancel) Reset() { *m = RouteCancel{} }
func (m *RouteCancel) String() string { return proto.CompactTextString(m) }
func (*RouteCancel) ProtoMessage() {}
func (*RouteCancel) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{17}
}
func (m *RouteCancel) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RouteCancel.Unmarshal(m, b)
}
func (m *RouteCancel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RouteCancel.Marshal(b, m, deterministic)
}
func (m *RouteCancel) XXX_Merge(src proto.Message) {
xxx_messageInfo_RouteCancel.Merge(m, src)
}
func (m *RouteCancel) XXX_Size() int {
return xxx_messageInfo_RouteCancel.Size(m)
}
func (m *RouteCancel) XXX_DiscardUnknown() {
xxx_messageInfo_RouteCancel.DiscardUnknown(m)
}
var xxx_messageInfo_RouteCancel proto.InternalMessageInfo
func (m *RouteCancel) GetRouteType() RoutePaymentType {
if m != nil {
return m.RouteType
}
return RoutePaymentType_UNKNOWN
}
func (m *RouteCancel) GetAttempts() []*HtlcAttempt {
if m != nil {
return m.Attempts
}
return nil
}
func (m *RouteCancel) GetFailure() PaymentFailureReason {
if m != nil {
return m.Failure
}
return PaymentFailureReason_FAILURE_REASON_NONE
}
type HtlcAttempt struct {
// The number of hops from the htlc's failure hop that it needed to take
// to reach the server's node.
RemainingHops uint32 `protobuf:"varint,1,opt,name=remaining_hops,json=remainingHops,proto3" json:"remaining_hops,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *HtlcAttempt) Reset() { *m = HtlcAttempt{} }
func (m *HtlcAttempt) String() string { return proto.CompactTextString(m) }
func (*HtlcAttempt) ProtoMessage() {}
func (*HtlcAttempt) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{18}
}
func (m *HtlcAttempt) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HtlcAttempt.Unmarshal(m, b)
}
func (m *HtlcAttempt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_HtlcAttempt.Marshal(b, m, deterministic)
}
func (m *HtlcAttempt) XXX_Merge(src proto.Message) {
xxx_messageInfo_HtlcAttempt.Merge(m, src)
}
func (m *HtlcAttempt) XXX_Size() int {
return xxx_messageInfo_HtlcAttempt.Size(m)
}
func (m *HtlcAttempt) XXX_DiscardUnknown() {
xxx_messageInfo_HtlcAttempt.DiscardUnknown(m)
}
var xxx_messageInfo_HtlcAttempt proto.InternalMessageInfo
func (m *HtlcAttempt) GetRemainingHops() uint32 {
if m != nil {
return m.RemainingHops
}
return 0
}
type CancelLoopOutSwapRequest struct {
// The protocol version that the client adheres to.
ProtocolVersion ProtocolVersion `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3,enum=looprpc.ProtocolVersion" json:"protocol_version,omitempty"`
// The swap hash.
SwapHash []byte `protobuf:"bytes,2,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"`
// The payment address for the swap invoice, used to ensure that only the
// swap owner can cancel the payment.
PaymentAddress []byte `protobuf:"bytes,3,opt,name=payment_address,json=paymentAddress,proto3" json:"payment_address,omitempty"`
// Additional information about the swap cancelation.
//
// Types that are valid to be assigned to CancelInfo:
// *CancelLoopOutSwapRequest_RouteCancel
CancelInfo isCancelLoopOutSwapRequest_CancelInfo `protobuf_oneof:"cancel_info"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CancelLoopOutSwapRequest) Reset() { *m = CancelLoopOutSwapRequest{} }
func (m *CancelLoopOutSwapRequest) String() string { return proto.CompactTextString(m) }
func (*CancelLoopOutSwapRequest) ProtoMessage() {}
func (*CancelLoopOutSwapRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{19}
}
func (m *CancelLoopOutSwapRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelLoopOutSwapRequest.Unmarshal(m, b)
}
func (m *CancelLoopOutSwapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CancelLoopOutSwapRequest.Marshal(b, m, deterministic)
}
func (m *CancelLoopOutSwapRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CancelLoopOutSwapRequest.Merge(m, src)
}
func (m *CancelLoopOutSwapRequest) XXX_Size() int {
return xxx_messageInfo_CancelLoopOutSwapRequest.Size(m)
}
func (m *CancelLoopOutSwapRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CancelLoopOutSwapRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CancelLoopOutSwapRequest proto.InternalMessageInfo
func (m *CancelLoopOutSwapRequest) GetProtocolVersion() ProtocolVersion {
if m != nil {
return m.ProtocolVersion
}
return ProtocolVersion_LEGACY
}
func (m *CancelLoopOutSwapRequest) GetSwapHash() []byte {
if m != nil {
return m.SwapHash
}
return nil
}
func (m *CancelLoopOutSwapRequest) GetPaymentAddress() []byte {
if m != nil {
return m.PaymentAddress
}
return nil
}
type isCancelLoopOutSwapRequest_CancelInfo interface {
isCancelLoopOutSwapRequest_CancelInfo()
}
type CancelLoopOutSwapRequest_RouteCancel struct {
RouteCancel *RouteCancel `protobuf:"bytes,5,opt,name=route_cancel,json=routeCancel,proto3,oneof"`
}
func (*CancelLoopOutSwapRequest_RouteCancel) isCancelLoopOutSwapRequest_CancelInfo() {}
func (m *CancelLoopOutSwapRequest) GetCancelInfo() isCancelLoopOutSwapRequest_CancelInfo {
if m != nil {
return m.CancelInfo
}
return nil
}
func (m *CancelLoopOutSwapRequest) GetRouteCancel() *RouteCancel {
if x, ok := m.GetCancelInfo().(*CancelLoopOutSwapRequest_RouteCancel); ok {
return x.RouteCancel
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*CancelLoopOutSwapRequest) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*CancelLoopOutSwapRequest_RouteCancel)(nil),
}
}
type CancelLoopOutSwapResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CancelLoopOutSwapResponse) Reset() { *m = CancelLoopOutSwapResponse{} }
func (m *CancelLoopOutSwapResponse) String() string { return proto.CompactTextString(m) }
func (*CancelLoopOutSwapResponse) ProtoMessage() {}
func (*CancelLoopOutSwapResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ad098daeda4239f7, []int{20}
}
func (m *CancelLoopOutSwapResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelLoopOutSwapResponse.Unmarshal(m, b)
}
func (m *CancelLoopOutSwapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CancelLoopOutSwapResponse.Marshal(b, m, deterministic)
}
func (m *CancelLoopOutSwapResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_CancelLoopOutSwapResponse.Merge(m, src)
}
func (m *CancelLoopOutSwapResponse) XXX_Size() int {
return xxx_messageInfo_CancelLoopOutSwapResponse.Size(m)
}
func (m *CancelLoopOutSwapResponse) XXX_DiscardUnknown() {
xxx_messageInfo_CancelLoopOutSwapResponse.DiscardUnknown(m)
}
var xxx_messageInfo_CancelLoopOutSwapResponse proto.InternalMessageInfo
func init() { func init() {
proto.RegisterEnum("looprpc.ProtocolVersion", ProtocolVersion_name, ProtocolVersion_value) proto.RegisterEnum("looprpc.ProtocolVersion", ProtocolVersion_name, ProtocolVersion_value)
proto.RegisterEnum("looprpc.ServerSwapState", ServerSwapState_name, ServerSwapState_value) proto.RegisterEnum("looprpc.ServerSwapState", ServerSwapState_name, ServerSwapState_value)
proto.RegisterEnum("looprpc.RoutePaymentType", RoutePaymentType_name, RoutePaymentType_value)
proto.RegisterEnum("looprpc.PaymentFailureReason", PaymentFailureReason_name, PaymentFailureReason_value)
proto.RegisterType((*ServerLoopOutRequest)(nil), "looprpc.ServerLoopOutRequest") proto.RegisterType((*ServerLoopOutRequest)(nil), "looprpc.ServerLoopOutRequest")
proto.RegisterType((*ServerLoopOutResponse)(nil), "looprpc.ServerLoopOutResponse") proto.RegisterType((*ServerLoopOutResponse)(nil), "looprpc.ServerLoopOutResponse")
proto.RegisterType((*ServerLoopOutQuoteRequest)(nil), "looprpc.ServerLoopOutQuoteRequest") proto.RegisterType((*ServerLoopOutQuoteRequest)(nil), "looprpc.ServerLoopOutQuoteRequest")
@ -1227,96 +1544,122 @@ func init() {
proto.RegisterType((*SubscribeUpdatesRequest)(nil), "looprpc.SubscribeUpdatesRequest") proto.RegisterType((*SubscribeUpdatesRequest)(nil), "looprpc.SubscribeUpdatesRequest")
proto.RegisterType((*SubscribeLoopOutUpdatesResponse)(nil), "looprpc.SubscribeLoopOutUpdatesResponse") proto.RegisterType((*SubscribeLoopOutUpdatesResponse)(nil), "looprpc.SubscribeLoopOutUpdatesResponse")
proto.RegisterType((*SubscribeLoopInUpdatesResponse)(nil), "looprpc.SubscribeLoopInUpdatesResponse") proto.RegisterType((*SubscribeLoopInUpdatesResponse)(nil), "looprpc.SubscribeLoopInUpdatesResponse")
proto.RegisterType((*RouteCancel)(nil), "looprpc.RouteCancel")
proto.RegisterType((*HtlcAttempt)(nil), "looprpc.HtlcAttempt")
proto.RegisterType((*CancelLoopOutSwapRequest)(nil), "looprpc.CancelLoopOutSwapRequest")
proto.RegisterType((*CancelLoopOutSwapResponse)(nil), "looprpc.CancelLoopOutSwapResponse")
} }
func init() { proto.RegisterFile("server.proto", fileDescriptor_ad098daeda4239f7) } func init() { proto.RegisterFile("server.proto", fileDescriptor_ad098daeda4239f7) }
var fileDescriptor_ad098daeda4239f7 = []byte{ var fileDescriptor_ad098daeda4239f7 = []byte{
// 1336 bytes of a gzipped FileDescriptorProto // 1695 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x73, 0xda, 0x46, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x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xbc, 0xf8,
0xe5, 0xd3, 0xee, 0xae, 0x23, 0x8a, 0x9f, 0x27, 0xaf, 0x24, 0x44, 0xe0, 0x41, 0xf1, 0x6b, 0xe2,
0x0b, 0xe2, 0xbc, 0x28, 0x8e, 0xb3, 0xf6, 0x20, 0x79, 0x25, 0xa1, 0xdf, 0xc2, 0xee, 0xda, 0x15,
0x93, 0xe1, 0xea, 0xba, 0xfb, 0x36, 0xc3, 0xd5, 0xb5, 0x37, 0xd4, 0xc9, 0x26, 0xbb, 0x5f, 0x7f,
0xf6, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x54, 0x28, 0x45, 0x23, 0x8b, 0x13, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -1340,6 +1683,7 @@ type SwapServerClient interface {
LoopInQuote(ctx context.Context, in *ServerLoopInQuoteRequest, opts ...grpc.CallOption) (*ServerLoopInQuoteResponse, error) LoopInQuote(ctx context.Context, in *ServerLoopInQuoteRequest, opts ...grpc.CallOption) (*ServerLoopInQuoteResponse, error)
SubscribeLoopOutUpdates(ctx context.Context, in *SubscribeUpdatesRequest, opts ...grpc.CallOption) (SwapServer_SubscribeLoopOutUpdatesClient, error) SubscribeLoopOutUpdates(ctx context.Context, in *SubscribeUpdatesRequest, opts ...grpc.CallOption) (SwapServer_SubscribeLoopOutUpdatesClient, error)
SubscribeLoopInUpdates(ctx context.Context, in *SubscribeUpdatesRequest, opts ...grpc.CallOption) (SwapServer_SubscribeLoopInUpdatesClient, error) SubscribeLoopInUpdates(ctx context.Context, in *SubscribeUpdatesRequest, opts ...grpc.CallOption) (SwapServer_SubscribeLoopInUpdatesClient, error)
CancelLoopOutSwap(ctx context.Context, in *CancelLoopOutSwapRequest, opts ...grpc.CallOption) (*CancelLoopOutSwapResponse, error)
} }
type swapServerClient struct { type swapServerClient struct {
@ -1477,6 +1821,15 @@ func (x *swapServerSubscribeLoopInUpdatesClient) Recv() (*SubscribeLoopInUpdates
return m, nil return m, nil
} }
func (c *swapServerClient) CancelLoopOutSwap(ctx context.Context, in *CancelLoopOutSwapRequest, opts ...grpc.CallOption) (*CancelLoopOutSwapResponse, error) {
out := new(CancelLoopOutSwapResponse)
err := c.cc.Invoke(ctx, "/looprpc.SwapServer/CancelLoopOutSwap", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SwapServerServer is the server API for SwapServer service. // SwapServerServer is the server API for SwapServer service.
type SwapServerServer interface { type SwapServerServer interface {
LoopOutTerms(context.Context, *ServerLoopOutTermsRequest) (*ServerLoopOutTerms, error) LoopOutTerms(context.Context, *ServerLoopOutTermsRequest) (*ServerLoopOutTerms, error)
@ -1488,6 +1841,7 @@ type SwapServerServer interface {
LoopInQuote(context.Context, *ServerLoopInQuoteRequest) (*ServerLoopInQuoteResponse, error) LoopInQuote(context.Context, *ServerLoopInQuoteRequest) (*ServerLoopInQuoteResponse, error)
SubscribeLoopOutUpdates(*SubscribeUpdatesRequest, SwapServer_SubscribeLoopOutUpdatesServer) error SubscribeLoopOutUpdates(*SubscribeUpdatesRequest, SwapServer_SubscribeLoopOutUpdatesServer) error
SubscribeLoopInUpdates(*SubscribeUpdatesRequest, SwapServer_SubscribeLoopInUpdatesServer) error SubscribeLoopInUpdates(*SubscribeUpdatesRequest, SwapServer_SubscribeLoopInUpdatesServer) error
CancelLoopOutSwap(context.Context, *CancelLoopOutSwapRequest) (*CancelLoopOutSwapResponse, error)
} }
// UnimplementedSwapServerServer can be embedded to have forward compatible implementations. // UnimplementedSwapServerServer can be embedded to have forward compatible implementations.
@ -1521,6 +1875,9 @@ func (*UnimplementedSwapServerServer) SubscribeLoopOutUpdates(req *SubscribeUpda
func (*UnimplementedSwapServerServer) SubscribeLoopInUpdates(req *SubscribeUpdatesRequest, srv SwapServer_SubscribeLoopInUpdatesServer) error { func (*UnimplementedSwapServerServer) SubscribeLoopInUpdates(req *SubscribeUpdatesRequest, srv SwapServer_SubscribeLoopInUpdatesServer) error {
return status.Errorf(codes.Unimplemented, "method SubscribeLoopInUpdates not implemented") return status.Errorf(codes.Unimplemented, "method SubscribeLoopInUpdates not implemented")
} }
func (*UnimplementedSwapServerServer) CancelLoopOutSwap(ctx context.Context, req *CancelLoopOutSwapRequest) (*CancelLoopOutSwapResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CancelLoopOutSwap not implemented")
}
func RegisterSwapServerServer(s *grpc.Server, srv SwapServerServer) { func RegisterSwapServerServer(s *grpc.Server, srv SwapServerServer) {
s.RegisterService(&_SwapServer_serviceDesc, srv) s.RegisterService(&_SwapServer_serviceDesc, srv)
@ -1694,6 +2051,24 @@ func (x *swapServerSubscribeLoopInUpdatesServer) Send(m *SubscribeLoopInUpdatesR
return x.ServerStream.SendMsg(m) return x.ServerStream.SendMsg(m)
} }
func _SwapServer_CancelLoopOutSwap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CancelLoopOutSwapRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SwapServerServer).CancelLoopOutSwap(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/looprpc.SwapServer/CancelLoopOutSwap",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SwapServerServer).CancelLoopOutSwap(ctx, req.(*CancelLoopOutSwapRequest))
}
return interceptor(ctx, in, info, handler)
}
var _SwapServer_serviceDesc = grpc.ServiceDesc{ var _SwapServer_serviceDesc = grpc.ServiceDesc{
ServiceName: "looprpc.SwapServer", ServiceName: "looprpc.SwapServer",
HandlerType: (*SwapServerServer)(nil), HandlerType: (*SwapServerServer)(nil),
@ -1726,6 +2101,10 @@ var _SwapServer_serviceDesc = grpc.ServiceDesc{
MethodName: "LoopInQuote", MethodName: "LoopInQuote",
Handler: _SwapServer_LoopInQuote_Handler, Handler: _SwapServer_LoopInQuote_Handler,
}, },
{
MethodName: "CancelLoopOutSwap",
Handler: _SwapServer_CancelLoopOutSwap_Handler,
},
}, },
Streams: []grpc.StreamDesc{ Streams: []grpc.StreamDesc{
{ {

@ -26,6 +26,9 @@ service SwapServer {
rpc SubscribeLoopInUpdates (SubscribeUpdatesRequest) rpc SubscribeLoopInUpdates (SubscribeUpdatesRequest)
returns (stream SubscribeLoopInUpdatesResponse); returns (stream SubscribeLoopInUpdatesResponse);
rpc CancelLoopOutSwap(CancelLoopOutSwapRequest)
returns (CancelLoopOutSwapResponse);
} }
/** /**
@ -64,6 +67,9 @@ enum ProtocolVersion {
// The client creates a probe invoice so that the server can perform a // The client creates a probe invoice so that the server can perform a
// multi-path probe. // multi-path probe.
MULTI_LOOP_IN = 6; MULTI_LOOP_IN = 6;
// The client supports loop out swap cancelation.
LOOP_OUT_CANCEL = 7;
} }
message ServerLoopOutRequest { message ServerLoopOutRequest {
@ -309,3 +315,88 @@ message SubscribeLoopInUpdatesResponse{
// The swap's current state. // The swap's current state.
ServerSwapState state = 2; ServerSwapState state = 2;
} }
enum RoutePaymentType {
// No reason, used to distinguish from the default value.
UNKNOWN = 0;
// Prepay route indicates that the swap was canceled because the client
// could not find a route to the server for the prepay.
PREPAY_ROUTE = 1;
// Invoice route indicates that the swap was canceled because the client
// could not find a route to the server for the swap invoice.
INVOICE_ROUTE = 2;
}
// PaymentFailureReason describes the reason that a payment failed. These
// values are copied directly from lnd.
enum PaymentFailureReason {
/*
Payment isn't failed (yet).
*/
FAILURE_REASON_NONE = 0;
/*
There are more routes to try, but the payment timeout was exceeded.
*/
FAILURE_REASON_TIMEOUT = 1;
/*
All possible routes were tried and failed permanently. Or were no
routes to the destination at all.
*/
FAILURE_REASON_NO_ROUTE = 2;
/*
A non-recoverable error has occured.
*/
FAILURE_REASON_ERROR = 3;
/*
Payment details incorrect (unknown hash, invalid amt or
invalid final cltv delta)
*/
FAILURE_REASON_INCORRECT_PAYMENT_DETAILS = 4;
/*
Insufficient local balance.
*/
FAILURE_REASON_INSUFFICIENT_BALANCE = 5;
}
message RouteCancel {
// The type of the payment that failed.
RoutePaymentType route_type = 1;
// The htlcs that the client tried to pay the server with, if any.
repeated HtlcAttempt attempts = 2;
// The reason that the payment failed.
PaymentFailureReason failure = 3;
}
message HtlcAttempt {
// The number of hops from the htlc's failure hop that it needed to take
// to reach the server's node.
uint32 remaining_hops = 1;
}
message CancelLoopOutSwapRequest {
// The protocol version that the client adheres to.
ProtocolVersion protocol_version = 1;
// The swap hash.
bytes swap_hash = 2;
// The payment address for the swap invoice, used to ensure that only the
// swap owner can cancel the payment.
bytes payment_address = 3;
// Additional information about the swap cancelation.
oneof cancel_info {
RouteCancel route_cancel = 5;
}
}
message CancelLoopOutSwapResponse{}

Loading…
Cancel
Save