github.com/decred/dcrlnd@v0.7.6/lnrpc/stateservice.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.31.0
     4  // 	protoc        v3.4.0
     5  // source: stateservice.proto
     6  
     7  package lnrpc
     8  
     9  import (
    10  	context "context"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    15  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    16  	reflect "reflect"
    17  	sync "sync"
    18  )
    19  
    20  const (
    21  	// Verify that this generated code is sufficiently up-to-date.
    22  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    23  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    24  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    25  )
    26  
    27  type WalletState int32
    28  
    29  const (
    30  	WalletState_NON_EXISTING WalletState = 0
    31  	WalletState_LOCKED       WalletState = 1
    32  	WalletState_UNLOCKED     WalletState = 2
    33  	WalletState_RPC_ACTIVE   WalletState = 3
    34  	// SERVER_ACTIVE means that the lnd server is ready to accept calls.
    35  	WalletState_SERVER_ACTIVE    WalletState = 4
    36  	WalletState_WAITING_TO_START WalletState = 255
    37  )
    38  
    39  // Enum value maps for WalletState.
    40  var (
    41  	WalletState_name = map[int32]string{
    42  		0:   "NON_EXISTING",
    43  		1:   "LOCKED",
    44  		2:   "UNLOCKED",
    45  		3:   "RPC_ACTIVE",
    46  		4:   "SERVER_ACTIVE",
    47  		255: "WAITING_TO_START",
    48  	}
    49  	WalletState_value = map[string]int32{
    50  		"NON_EXISTING":     0,
    51  		"LOCKED":           1,
    52  		"UNLOCKED":         2,
    53  		"RPC_ACTIVE":       3,
    54  		"SERVER_ACTIVE":    4,
    55  		"WAITING_TO_START": 255,
    56  	}
    57  )
    58  
    59  func (x WalletState) Enum() *WalletState {
    60  	p := new(WalletState)
    61  	*p = x
    62  	return p
    63  }
    64  
    65  func (x WalletState) String() string {
    66  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    67  }
    68  
    69  func (WalletState) Descriptor() protoreflect.EnumDescriptor {
    70  	return file_stateservice_proto_enumTypes[0].Descriptor()
    71  }
    72  
    73  func (WalletState) Type() protoreflect.EnumType {
    74  	return &file_stateservice_proto_enumTypes[0]
    75  }
    76  
    77  func (x WalletState) Number() protoreflect.EnumNumber {
    78  	return protoreflect.EnumNumber(x)
    79  }
    80  
    81  // Deprecated: Use WalletState.Descriptor instead.
    82  func (WalletState) EnumDescriptor() ([]byte, []int) {
    83  	return file_stateservice_proto_rawDescGZIP(), []int{0}
    84  }
    85  
    86  type SubscribeStateRequest struct {
    87  	state         protoimpl.MessageState
    88  	sizeCache     protoimpl.SizeCache
    89  	unknownFields protoimpl.UnknownFields
    90  }
    91  
    92  func (x *SubscribeStateRequest) Reset() {
    93  	*x = SubscribeStateRequest{}
    94  	if protoimpl.UnsafeEnabled {
    95  		mi := &file_stateservice_proto_msgTypes[0]
    96  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    97  		ms.StoreMessageInfo(mi)
    98  	}
    99  }
   100  
   101  func (x *SubscribeStateRequest) String() string {
   102  	return protoimpl.X.MessageStringOf(x)
   103  }
   104  
   105  func (*SubscribeStateRequest) ProtoMessage() {}
   106  
   107  func (x *SubscribeStateRequest) ProtoReflect() protoreflect.Message {
   108  	mi := &file_stateservice_proto_msgTypes[0]
   109  	if protoimpl.UnsafeEnabled && x != nil {
   110  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   111  		if ms.LoadMessageInfo() == nil {
   112  			ms.StoreMessageInfo(mi)
   113  		}
   114  		return ms
   115  	}
   116  	return mi.MessageOf(x)
   117  }
   118  
   119  // Deprecated: Use SubscribeStateRequest.ProtoReflect.Descriptor instead.
   120  func (*SubscribeStateRequest) Descriptor() ([]byte, []int) {
   121  	return file_stateservice_proto_rawDescGZIP(), []int{0}
   122  }
   123  
   124  type SubscribeStateResponse struct {
   125  	state         protoimpl.MessageState
   126  	sizeCache     protoimpl.SizeCache
   127  	unknownFields protoimpl.UnknownFields
   128  
   129  	State WalletState `protobuf:"varint,1,opt,name=state,proto3,enum=lnrpc.WalletState" json:"state,omitempty"`
   130  }
   131  
   132  func (x *SubscribeStateResponse) Reset() {
   133  	*x = SubscribeStateResponse{}
   134  	if protoimpl.UnsafeEnabled {
   135  		mi := &file_stateservice_proto_msgTypes[1]
   136  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   137  		ms.StoreMessageInfo(mi)
   138  	}
   139  }
   140  
   141  func (x *SubscribeStateResponse) String() string {
   142  	return protoimpl.X.MessageStringOf(x)
   143  }
   144  
   145  func (*SubscribeStateResponse) ProtoMessage() {}
   146  
   147  func (x *SubscribeStateResponse) ProtoReflect() protoreflect.Message {
   148  	mi := &file_stateservice_proto_msgTypes[1]
   149  	if protoimpl.UnsafeEnabled && x != nil {
   150  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   151  		if ms.LoadMessageInfo() == nil {
   152  			ms.StoreMessageInfo(mi)
   153  		}
   154  		return ms
   155  	}
   156  	return mi.MessageOf(x)
   157  }
   158  
   159  // Deprecated: Use SubscribeStateResponse.ProtoReflect.Descriptor instead.
   160  func (*SubscribeStateResponse) Descriptor() ([]byte, []int) {
   161  	return file_stateservice_proto_rawDescGZIP(), []int{1}
   162  }
   163  
   164  func (x *SubscribeStateResponse) GetState() WalletState {
   165  	if x != nil {
   166  		return x.State
   167  	}
   168  	return WalletState_NON_EXISTING
   169  }
   170  
   171  type GetStateRequest struct {
   172  	state         protoimpl.MessageState
   173  	sizeCache     protoimpl.SizeCache
   174  	unknownFields protoimpl.UnknownFields
   175  }
   176  
   177  func (x *GetStateRequest) Reset() {
   178  	*x = GetStateRequest{}
   179  	if protoimpl.UnsafeEnabled {
   180  		mi := &file_stateservice_proto_msgTypes[2]
   181  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   182  		ms.StoreMessageInfo(mi)
   183  	}
   184  }
   185  
   186  func (x *GetStateRequest) String() string {
   187  	return protoimpl.X.MessageStringOf(x)
   188  }
   189  
   190  func (*GetStateRequest) ProtoMessage() {}
   191  
   192  func (x *GetStateRequest) ProtoReflect() protoreflect.Message {
   193  	mi := &file_stateservice_proto_msgTypes[2]
   194  	if protoimpl.UnsafeEnabled && x != nil {
   195  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   196  		if ms.LoadMessageInfo() == nil {
   197  			ms.StoreMessageInfo(mi)
   198  		}
   199  		return ms
   200  	}
   201  	return mi.MessageOf(x)
   202  }
   203  
   204  // Deprecated: Use GetStateRequest.ProtoReflect.Descriptor instead.
   205  func (*GetStateRequest) Descriptor() ([]byte, []int) {
   206  	return file_stateservice_proto_rawDescGZIP(), []int{2}
   207  }
   208  
   209  type GetStateResponse struct {
   210  	state         protoimpl.MessageState
   211  	sizeCache     protoimpl.SizeCache
   212  	unknownFields protoimpl.UnknownFields
   213  
   214  	State WalletState `protobuf:"varint,1,opt,name=state,proto3,enum=lnrpc.WalletState" json:"state,omitempty"`
   215  }
   216  
   217  func (x *GetStateResponse) Reset() {
   218  	*x = GetStateResponse{}
   219  	if protoimpl.UnsafeEnabled {
   220  		mi := &file_stateservice_proto_msgTypes[3]
   221  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   222  		ms.StoreMessageInfo(mi)
   223  	}
   224  }
   225  
   226  func (x *GetStateResponse) String() string {
   227  	return protoimpl.X.MessageStringOf(x)
   228  }
   229  
   230  func (*GetStateResponse) ProtoMessage() {}
   231  
   232  func (x *GetStateResponse) ProtoReflect() protoreflect.Message {
   233  	mi := &file_stateservice_proto_msgTypes[3]
   234  	if protoimpl.UnsafeEnabled && x != nil {
   235  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   236  		if ms.LoadMessageInfo() == nil {
   237  			ms.StoreMessageInfo(mi)
   238  		}
   239  		return ms
   240  	}
   241  	return mi.MessageOf(x)
   242  }
   243  
   244  // Deprecated: Use GetStateResponse.ProtoReflect.Descriptor instead.
   245  func (*GetStateResponse) Descriptor() ([]byte, []int) {
   246  	return file_stateservice_proto_rawDescGZIP(), []int{3}
   247  }
   248  
   249  func (x *GetStateResponse) GetState() WalletState {
   250  	if x != nil {
   251  		return x.State
   252  	}
   253  	return WalletState_NON_EXISTING
   254  }
   255  
   256  var File_stateservice_proto protoreflect.FileDescriptor
   257  
   258  var file_stateservice_proto_rawDesc = []byte{
   259  	0x0a, 0x12, 0x73, 0x74, 0x61, 0x74, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70,
   260  	0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x22, 0x17, 0x0a, 0x15, 0x53,
   261  	0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
   262  	0x75, 0x65, 0x73, 0x74, 0x22, 0x42, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
   263  	0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28,
   264  	0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e,
   265  	0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74,
   266  	0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53,
   267  	0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3c, 0x0a, 0x10, 0x47,
   268  	0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
   269  	0x28, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12,
   270  	0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x74, 0x61,
   271  	0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2a, 0x73, 0x0a, 0x0b, 0x57, 0x61, 0x6c,
   272  	0x6c, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x4f, 0x4e, 0x5f,
   273  	0x45, 0x58, 0x49, 0x53, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x4f,
   274  	0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b,
   275  	0x45, 0x44, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x50, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x49,
   276  	0x56, 0x45, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x41,
   277  	0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x10, 0x57, 0x41, 0x49, 0x54, 0x49,
   278  	0x4e, 0x47, 0x5f, 0x54, 0x4f, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10, 0xff, 0x01, 0x32, 0x95,
   279  	0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x73,
   280  	0x63, 0x72, 0x69, 0x62, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x6c, 0x6e, 0x72,
   281  	0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x53, 0x74, 0x61, 0x74,
   282  	0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63,
   283  	0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52,
   284  	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x3b, 0x0a, 0x08, 0x47, 0x65, 0x74,
   285  	0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65,
   286  	0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e,
   287  	0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65,
   288  	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x20, 0x5a, 0x1e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
   289  	0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x63, 0x72, 0x65, 0x64, 0x2f, 0x64, 0x63, 0x72, 0x6c,
   290  	0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   291  }
   292  
   293  var (
   294  	file_stateservice_proto_rawDescOnce sync.Once
   295  	file_stateservice_proto_rawDescData = file_stateservice_proto_rawDesc
   296  )
   297  
   298  func file_stateservice_proto_rawDescGZIP() []byte {
   299  	file_stateservice_proto_rawDescOnce.Do(func() {
   300  		file_stateservice_proto_rawDescData = protoimpl.X.CompressGZIP(file_stateservice_proto_rawDescData)
   301  	})
   302  	return file_stateservice_proto_rawDescData
   303  }
   304  
   305  var file_stateservice_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
   306  var file_stateservice_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
   307  var file_stateservice_proto_goTypes = []interface{}{
   308  	(WalletState)(0),               // 0: lnrpc.WalletState
   309  	(*SubscribeStateRequest)(nil),  // 1: lnrpc.SubscribeStateRequest
   310  	(*SubscribeStateResponse)(nil), // 2: lnrpc.SubscribeStateResponse
   311  	(*GetStateRequest)(nil),        // 3: lnrpc.GetStateRequest
   312  	(*GetStateResponse)(nil),       // 4: lnrpc.GetStateResponse
   313  }
   314  var file_stateservice_proto_depIdxs = []int32{
   315  	0, // 0: lnrpc.SubscribeStateResponse.state:type_name -> lnrpc.WalletState
   316  	0, // 1: lnrpc.GetStateResponse.state:type_name -> lnrpc.WalletState
   317  	1, // 2: lnrpc.State.SubscribeState:input_type -> lnrpc.SubscribeStateRequest
   318  	3, // 3: lnrpc.State.GetState:input_type -> lnrpc.GetStateRequest
   319  	2, // 4: lnrpc.State.SubscribeState:output_type -> lnrpc.SubscribeStateResponse
   320  	4, // 5: lnrpc.State.GetState:output_type -> lnrpc.GetStateResponse
   321  	4, // [4:6] is the sub-list for method output_type
   322  	2, // [2:4] is the sub-list for method input_type
   323  	2, // [2:2] is the sub-list for extension type_name
   324  	2, // [2:2] is the sub-list for extension extendee
   325  	0, // [0:2] is the sub-list for field type_name
   326  }
   327  
   328  func init() { file_stateservice_proto_init() }
   329  func file_stateservice_proto_init() {
   330  	if File_stateservice_proto != nil {
   331  		return
   332  	}
   333  	if !protoimpl.UnsafeEnabled {
   334  		file_stateservice_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   335  			switch v := v.(*SubscribeStateRequest); i {
   336  			case 0:
   337  				return &v.state
   338  			case 1:
   339  				return &v.sizeCache
   340  			case 2:
   341  				return &v.unknownFields
   342  			default:
   343  				return nil
   344  			}
   345  		}
   346  		file_stateservice_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   347  			switch v := v.(*SubscribeStateResponse); i {
   348  			case 0:
   349  				return &v.state
   350  			case 1:
   351  				return &v.sizeCache
   352  			case 2:
   353  				return &v.unknownFields
   354  			default:
   355  				return nil
   356  			}
   357  		}
   358  		file_stateservice_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
   359  			switch v := v.(*GetStateRequest); i {
   360  			case 0:
   361  				return &v.state
   362  			case 1:
   363  				return &v.sizeCache
   364  			case 2:
   365  				return &v.unknownFields
   366  			default:
   367  				return nil
   368  			}
   369  		}
   370  		file_stateservice_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
   371  			switch v := v.(*GetStateResponse); i {
   372  			case 0:
   373  				return &v.state
   374  			case 1:
   375  				return &v.sizeCache
   376  			case 2:
   377  				return &v.unknownFields
   378  			default:
   379  				return nil
   380  			}
   381  		}
   382  	}
   383  	type x struct{}
   384  	out := protoimpl.TypeBuilder{
   385  		File: protoimpl.DescBuilder{
   386  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   387  			RawDescriptor: file_stateservice_proto_rawDesc,
   388  			NumEnums:      1,
   389  			NumMessages:   4,
   390  			NumExtensions: 0,
   391  			NumServices:   1,
   392  		},
   393  		GoTypes:           file_stateservice_proto_goTypes,
   394  		DependencyIndexes: file_stateservice_proto_depIdxs,
   395  		EnumInfos:         file_stateservice_proto_enumTypes,
   396  		MessageInfos:      file_stateservice_proto_msgTypes,
   397  	}.Build()
   398  	File_stateservice_proto = out.File
   399  	file_stateservice_proto_rawDesc = nil
   400  	file_stateservice_proto_goTypes = nil
   401  	file_stateservice_proto_depIdxs = nil
   402  }
   403  
   404  // Reference imports to suppress errors if they are not otherwise used.
   405  var _ context.Context
   406  var _ grpc.ClientConnInterface
   407  
   408  // This is a compile-time assertion to ensure that this generated file
   409  // is compatible with the grpc package it is being compiled against.
   410  const _ = grpc.SupportPackageIsVersion6
   411  
   412  // StateClient is the client API for State service.
   413  //
   414  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   415  type StateClient interface {
   416  	// SubscribeState subscribes to the state of the wallet. The current wallet
   417  	// state will always be delivered immediately.
   418  	SubscribeState(ctx context.Context, in *SubscribeStateRequest, opts ...grpc.CallOption) (State_SubscribeStateClient, error)
   419  	// GetState returns the current wallet state without streaming further
   420  	// changes.
   421  	GetState(ctx context.Context, in *GetStateRequest, opts ...grpc.CallOption) (*GetStateResponse, error)
   422  }
   423  
   424  type stateClient struct {
   425  	cc grpc.ClientConnInterface
   426  }
   427  
   428  func NewStateClient(cc grpc.ClientConnInterface) StateClient {
   429  	return &stateClient{cc}
   430  }
   431  
   432  func (c *stateClient) SubscribeState(ctx context.Context, in *SubscribeStateRequest, opts ...grpc.CallOption) (State_SubscribeStateClient, error) {
   433  	stream, err := c.cc.NewStream(ctx, &_State_serviceDesc.Streams[0], "/lnrpc.State/SubscribeState", opts...)
   434  	if err != nil {
   435  		return nil, err
   436  	}
   437  	x := &stateSubscribeStateClient{stream}
   438  	if err := x.ClientStream.SendMsg(in); err != nil {
   439  		return nil, err
   440  	}
   441  	if err := x.ClientStream.CloseSend(); err != nil {
   442  		return nil, err
   443  	}
   444  	return x, nil
   445  }
   446  
   447  type State_SubscribeStateClient interface {
   448  	Recv() (*SubscribeStateResponse, error)
   449  	grpc.ClientStream
   450  }
   451  
   452  type stateSubscribeStateClient struct {
   453  	grpc.ClientStream
   454  }
   455  
   456  func (x *stateSubscribeStateClient) Recv() (*SubscribeStateResponse, error) {
   457  	m := new(SubscribeStateResponse)
   458  	if err := x.ClientStream.RecvMsg(m); err != nil {
   459  		return nil, err
   460  	}
   461  	return m, nil
   462  }
   463  
   464  func (c *stateClient) GetState(ctx context.Context, in *GetStateRequest, opts ...grpc.CallOption) (*GetStateResponse, error) {
   465  	out := new(GetStateResponse)
   466  	err := c.cc.Invoke(ctx, "/lnrpc.State/GetState", in, out, opts...)
   467  	if err != nil {
   468  		return nil, err
   469  	}
   470  	return out, nil
   471  }
   472  
   473  // StateServer is the server API for State service.
   474  type StateServer interface {
   475  	// SubscribeState subscribes to the state of the wallet. The current wallet
   476  	// state will always be delivered immediately.
   477  	SubscribeState(*SubscribeStateRequest, State_SubscribeStateServer) error
   478  	// GetState returns the current wallet state without streaming further
   479  	// changes.
   480  	GetState(context.Context, *GetStateRequest) (*GetStateResponse, error)
   481  }
   482  
   483  // UnimplementedStateServer can be embedded to have forward compatible implementations.
   484  type UnimplementedStateServer struct {
   485  }
   486  
   487  func (*UnimplementedStateServer) SubscribeState(*SubscribeStateRequest, State_SubscribeStateServer) error {
   488  	return status.Errorf(codes.Unimplemented, "method SubscribeState not implemented")
   489  }
   490  func (*UnimplementedStateServer) GetState(context.Context, *GetStateRequest) (*GetStateResponse, error) {
   491  	return nil, status.Errorf(codes.Unimplemented, "method GetState not implemented")
   492  }
   493  
   494  func RegisterStateServer(s *grpc.Server, srv StateServer) {
   495  	s.RegisterService(&_State_serviceDesc, srv)
   496  }
   497  
   498  func _State_SubscribeState_Handler(srv interface{}, stream grpc.ServerStream) error {
   499  	m := new(SubscribeStateRequest)
   500  	if err := stream.RecvMsg(m); err != nil {
   501  		return err
   502  	}
   503  	return srv.(StateServer).SubscribeState(m, &stateSubscribeStateServer{stream})
   504  }
   505  
   506  type State_SubscribeStateServer interface {
   507  	Send(*SubscribeStateResponse) error
   508  	grpc.ServerStream
   509  }
   510  
   511  type stateSubscribeStateServer struct {
   512  	grpc.ServerStream
   513  }
   514  
   515  func (x *stateSubscribeStateServer) Send(m *SubscribeStateResponse) error {
   516  	return x.ServerStream.SendMsg(m)
   517  }
   518  
   519  func _State_GetState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   520  	in := new(GetStateRequest)
   521  	if err := dec(in); err != nil {
   522  		return nil, err
   523  	}
   524  	if interceptor == nil {
   525  		return srv.(StateServer).GetState(ctx, in)
   526  	}
   527  	info := &grpc.UnaryServerInfo{
   528  		Server:     srv,
   529  		FullMethod: "/lnrpc.State/GetState",
   530  	}
   531  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   532  		return srv.(StateServer).GetState(ctx, req.(*GetStateRequest))
   533  	}
   534  	return interceptor(ctx, in, info, handler)
   535  }
   536  
   537  var _State_serviceDesc = grpc.ServiceDesc{
   538  	ServiceName: "lnrpc.State",
   539  	HandlerType: (*StateServer)(nil),
   540  	Methods: []grpc.MethodDesc{
   541  		{
   542  			MethodName: "GetState",
   543  			Handler:    _State_GetState_Handler,
   544  		},
   545  	},
   546  	Streams: []grpc.StreamDesc{
   547  		{
   548  			StreamName:    "SubscribeState",
   549  			Handler:       _State_SubscribeState_Handler,
   550  			ServerStreams: true,
   551  		},
   552  	},
   553  	Metadata: "stateservice.proto",
   554  }