diff --git a/lnrpc/rpc.pb.go b/lnrpc/rpc.pb.go index a403eed8..6ae700d9 100644 --- a/lnrpc/rpc.pb.go +++ b/lnrpc/rpc.pb.go @@ -13,6 +13,12 @@ It has these top-level messages: SendManyResponse NewAddressRequest NewAddressResponse + TCPListenRequest + TCPListenResponse + LNConnectRequest + LnConnectResponse + LnChatRequest + LnChatResponse */ package lnrpc @@ -72,11 +78,70 @@ func (m *NewAddressResponse) String() string { return proto.CompactTe func (*NewAddressResponse) ProtoMessage() {} func (*NewAddressResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +type TCPListenRequest struct { + Hostport string `protobuf:"bytes,1,opt,name=hostport" json:"hostport,omitempty"` +} + +func (m *TCPListenRequest) Reset() { *m = TCPListenRequest{} } +func (m *TCPListenRequest) String() string { return proto.CompactTextString(m) } +func (*TCPListenRequest) ProtoMessage() {} +func (*TCPListenRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +type TCPListenResponse struct { +} + +func (m *TCPListenResponse) Reset() { *m = TCPListenResponse{} } +func (m *TCPListenResponse) String() string { return proto.CompactTextString(m) } +func (*TCPListenResponse) ProtoMessage() {} +func (*TCPListenResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +type LNConnectRequest struct { + IdAtHost string `protobuf:"bytes,1,opt,name=idAtHost" json:"idAtHost,omitempty"` +} + +func (m *LNConnectRequest) Reset() { *m = LNConnectRequest{} } +func (m *LNConnectRequest) String() string { return proto.CompactTextString(m) } +func (*LNConnectRequest) ProtoMessage() {} +func (*LNConnectRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +type LnConnectResponse struct { + LnID []byte `protobuf:"bytes,1,opt,name=lnID,proto3" json:"lnID,omitempty"` +} + +func (m *LnConnectResponse) Reset() { *m = LnConnectResponse{} } +func (m *LnConnectResponse) String() string { return proto.CompactTextString(m) } +func (*LnConnectResponse) ProtoMessage() {} +func (*LnConnectResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } + +type LnChatRequest struct { + DestID []byte `protobuf:"bytes,1,opt,name=destID,proto3" json:"destID,omitempty"` + Msg string `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"` +} + +func (m *LnChatRequest) Reset() { *m = LnChatRequest{} } +func (m *LnChatRequest) String() string { return proto.CompactTextString(m) } +func (*LnChatRequest) ProtoMessage() {} +func (*LnChatRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } + +type LnChatResponse struct { +} + +func (m *LnChatResponse) Reset() { *m = LnChatResponse{} } +func (m *LnChatResponse) String() string { return proto.CompactTextString(m) } +func (*LnChatResponse) ProtoMessage() {} +func (*LnChatResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } + func init() { proto.RegisterType((*SendManyRequest)(nil), "lnrpc.SendManyRequest") proto.RegisterType((*SendManyResponse)(nil), "lnrpc.SendManyResponse") proto.RegisterType((*NewAddressRequest)(nil), "lnrpc.NewAddressRequest") proto.RegisterType((*NewAddressResponse)(nil), "lnrpc.NewAddressResponse") + proto.RegisterType((*TCPListenRequest)(nil), "lnrpc.TCPListenRequest") + proto.RegisterType((*TCPListenResponse)(nil), "lnrpc.TCPListenResponse") + proto.RegisterType((*LNConnectRequest)(nil), "lnrpc.LNConnectRequest") + proto.RegisterType((*LnConnectResponse)(nil), "lnrpc.LnConnectResponse") + proto.RegisterType((*LnChatRequest)(nil), "lnrpc.LnChatRequest") + proto.RegisterType((*LnChatResponse)(nil), "lnrpc.LnChatResponse") } // Reference imports to suppress errors if they are not otherwise used. @@ -88,6 +153,9 @@ var _ grpc.ClientConn type LightningClient interface { SendMany(ctx context.Context, in *SendManyRequest, opts ...grpc.CallOption) (*SendManyResponse, error) NewAddress(ctx context.Context, in *NewAddressRequest, opts ...grpc.CallOption) (*NewAddressResponse, error) + TCPListen(ctx context.Context, in *TCPListenRequest, opts ...grpc.CallOption) (*TCPListenResponse, error) + LNConnect(ctx context.Context, in *LNConnectRequest, opts ...grpc.CallOption) (*LnConnectResponse, error) + LNChat(ctx context.Context, in *LnChatRequest, opts ...grpc.CallOption) (*LnChatResponse, error) } type lightningClient struct { @@ -116,11 +184,41 @@ func (c *lightningClient) NewAddress(ctx context.Context, in *NewAddressRequest, return out, nil } +func (c *lightningClient) TCPListen(ctx context.Context, in *TCPListenRequest, opts ...grpc.CallOption) (*TCPListenResponse, error) { + out := new(TCPListenResponse) + err := grpc.Invoke(ctx, "/lnrpc.Lightning/TCPListen", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningClient) LNConnect(ctx context.Context, in *LNConnectRequest, opts ...grpc.CallOption) (*LnConnectResponse, error) { + out := new(LnConnectResponse) + err := grpc.Invoke(ctx, "/lnrpc.Lightning/LNConnect", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lightningClient) LNChat(ctx context.Context, in *LnChatRequest, opts ...grpc.CallOption) (*LnChatResponse, error) { + out := new(LnChatResponse) + err := grpc.Invoke(ctx, "/lnrpc.Lightning/LNChat", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // Server API for Lightning service type LightningServer interface { SendMany(context.Context, *SendManyRequest) (*SendManyResponse, error) NewAddress(context.Context, *NewAddressRequest) (*NewAddressResponse, error) + TCPListen(context.Context, *TCPListenRequest) (*TCPListenResponse, error) + LNConnect(context.Context, *LNConnectRequest) (*LnConnectResponse, error) + LNChat(context.Context, *LnChatRequest) (*LnChatResponse, error) } func RegisterLightningServer(s *grpc.Server, srv LightningServer) { @@ -151,6 +249,42 @@ func _Lightning_NewAddress_Handler(srv interface{}, ctx context.Context, dec fun return out, nil } +func _Lightning_TCPListen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) { + in := new(TCPListenRequest) + if err := dec(in); err != nil { + return nil, err + } + out, err := srv.(LightningServer).TCPListen(ctx, in) + if err != nil { + return nil, err + } + return out, nil +} + +func _Lightning_LNConnect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) { + in := new(LNConnectRequest) + if err := dec(in); err != nil { + return nil, err + } + out, err := srv.(LightningServer).LNConnect(ctx, in) + if err != nil { + return nil, err + } + return out, nil +} + +func _Lightning_LNChat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error) (interface{}, error) { + in := new(LnChatRequest) + if err := dec(in); err != nil { + return nil, err + } + out, err := srv.(LightningServer).LNChat(ctx, in) + if err != nil { + return nil, err + } + return out, nil +} + var _Lightning_serviceDesc = grpc.ServiceDesc{ ServiceName: "lnrpc.Lightning", HandlerType: (*LightningServer)(nil), @@ -163,26 +297,46 @@ var _Lightning_serviceDesc = grpc.ServiceDesc{ MethodName: "NewAddress", Handler: _Lightning_NewAddress_Handler, }, + { + MethodName: "TCPListen", + Handler: _Lightning_TCPListen_Handler, + }, + { + MethodName: "LNConnect", + Handler: _Lightning_LNConnect_Handler, + }, + { + MethodName: "LNChat", + Handler: _Lightning_LNChat_Handler, + }, }, Streams: []grpc.StreamDesc{}, } var fileDescriptor0 = []byte{ - // 241 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2c, 0x2a, 0x48, 0xd6, - 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xcd, 0xc9, 0x03, 0x72, 0x94, 0xda, 0x18, 0xb9, 0xf8, - 0x83, 0x53, 0xf3, 0x52, 0x7c, 0x13, 0xf3, 0x2a, 0x83, 0x52, 0x0b, 0x4b, 0x53, 0x8b, 0x4b, 0x84, - 0xec, 0xb8, 0x78, 0x1c, 0x53, 0x52, 0x8a, 0x42, 0xf2, 0x1d, 0x73, 0xf3, 0x4b, 0xf3, 0x4a, 0x24, - 0x18, 0x15, 0x98, 0x35, 0xb8, 0x8d, 0x34, 0xf4, 0xc0, 0x3a, 0xf4, 0xd0, 0x54, 0xeb, 0x21, 0x2b, - 0x75, 0xcd, 0x2b, 0x29, 0xaa, 0x94, 0x32, 0xe6, 0x12, 0xc4, 0x10, 0x14, 0xe2, 0xe6, 0x62, 0xce, - 0x4e, 0xad, 0x04, 0x9a, 0xc5, 0xa8, 0xc1, 0x29, 0xc4, 0xcb, 0xc5, 0x5a, 0x96, 0x98, 0x53, 0x9a, - 0x2a, 0xc1, 0x04, 0xe4, 0x32, 0x5b, 0x31, 0x59, 0x30, 0x2a, 0x29, 0x70, 0x09, 0x20, 0x4c, 0x2e, - 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, 0x15, 0xe2, 0xe1, 0x62, 0x29, 0xa9, 0xc8, 0x4c, 0x81, 0x68, 0x52, - 0x12, 0xe6, 0x12, 0xf4, 0x4b, 0x2d, 0x07, 0x99, 0x9c, 0x5a, 0x5c, 0x0c, 0xb5, 0x5d, 0x49, 0x95, - 0x4b, 0x08, 0x59, 0x10, 0xaa, 0x91, 0x9f, 0x8b, 0x3d, 0x11, 0x22, 0x04, 0xd1, 0x6b, 0xd4, 0xcd, - 0xc8, 0xc5, 0xe9, 0x93, 0x99, 0x9e, 0x51, 0x92, 0x97, 0x99, 0x97, 0x2e, 0x64, 0xcd, 0xc5, 0x01, - 0xb3, 0x4b, 0x48, 0x0c, 0xbb, 0xb7, 0xa4, 0xc4, 0x31, 0xc4, 0xa1, 0x66, 0x3b, 0x72, 0x71, 0x21, - 0x6c, 0x14, 0x92, 0x80, 0x2a, 0xc3, 0x70, 0x99, 0x94, 0x24, 0x16, 0x19, 0x88, 0x11, 0x49, 0x6c, - 0xe0, 0x28, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x80, 0x74, 0x7a, 0x62, 0x8f, 0x01, 0x00, - 0x00, + // 376 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x92, 0xdd, 0x4e, 0xf2, 0x30, + 0x18, 0xc7, 0x33, 0x78, 0xe1, 0x65, 0x0f, 0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 0xa4, + 0xaf, 0xa9, 0x41, 0x63, 0x49, 0x19, 0x0f, 0x68, 0xc8, 0xe5, 0x09, 0xb9, 0x54, 0xdc, 0xb5, 0x43, + 0x9d, 0xe9, 0x84, 0x12, 0x82, 0xe7, 0x3c, 0x87, 0xfa, 0x9e, 0xcd, 0x1f, 0x04, 0x9e, 0xa0, 0x67, + 0xd0, 0x73, 0x48, 0x96, 0x92, 0xf7, 0x5f, 0x91, 0xc7, 0xbb, 0x28, 0xd2, 0x32, 0x2f, 0xa1, 0x2d, + 0x22, 0x4b, 0x37, 0x6b, 0xe9, 0x40, 0xdd, 0x13, 0xcf, 0x34, 0xb0, 0x53, 0xb4, 0x66, 0x8b, 0xc8, + 0x89, 0x6a, 0x6a, 0xd0, 0x49, 0xd3, 0x71, 0xdb, 0xf0, 0xb7, 0x02, 0xaa, 0xe3, 0x2f, 0x96, 0x9c, + 0xf8, 0x64, 0x81, 0x6e, 0xa1, 0x91, 0xfa, 0x42, 0xc7, 0xfb, 0x3f, 0x8d, 0x71, 0x52, 0x9a, 0x27, + 0x17, 0xb3, 0x01, 0xa4, 0x35, 0xa4, 0x27, 0xb1, 0x92, 0x5d, 0xe3, 0x74, 0xcf, 0x4e, 0x52, 0x31, + 0x06, 0x35, 0x73, 0x85, 0xd2, 0x83, 0x8a, 0x8e, 0x0d, 0xbd, 0xbc, 0x21, 0xf9, 0x4c, 0x6b, 0xc6, + 0x17, 0x45, 0x67, 0x7c, 0xd9, 0xed, 0x15, 0xd4, 0x45, 0x5a, 0xf8, 0x41, 0x87, 0x32, 0x23, 0xe5, + 0x1a, 0x47, 0x85, 0x69, 0x8c, 0xbd, 0xd5, 0xa3, 0xbf, 0x7f, 0xf4, 0x17, 0x00, 0x00, 0xff, 0xff, + 0x77, 0x98, 0x74, 0x61, 0x0a, 0x03, 0x00, 0x00, } diff --git a/lnrpc/rpc.proto b/lnrpc/rpc.proto index 94549cdf..9f51a65a 100644 --- a/lnrpc/rpc.proto +++ b/lnrpc/rpc.proto @@ -5,9 +5,10 @@ package lnrpc; service Lightning { rpc SendMany(SendManyRequest) returns (SendManyResponse); rpc NewAddress(NewAddressRequest) returns (NewAddressResponse); - rpc TCPListen(TCPListenRequest) returns (TCPListenResponse); - rpc LNConnect(LNConnectRequest) returns (LnConnectResponse); - rpc LNChat(LnChatRequest) returns (LnChatResponse); + + rpc TCPListen(TCPListenRequest) returns (TCPListenResponse); + rpc LNConnect(LNConnectRequest) returns (LnConnectResponse); + rpc LNChat(LnChatRequest) returns (LnChatResponse); } message SendManyRequest { @@ -23,19 +24,19 @@ message NewAddressResponse { string address = 1; } -message TCPListenRequest{ +message TCPListenRequest { string hostport = 1; } message TCPListenResponse{} -message LNConnectRequest{ +message LNConnectRequest { string idAtHost = 1; } -message LnChatResponse{ +message LnConnectResponse { bytes lnID = 1; } -message LnChatRequest{ +message LnChatRequest { bytes destID = 1; string msg = 2; }