-
Notifications
You must be signed in to change notification settings - Fork 3
/
rpc_pb2_grpc.py
1226 lines (1140 loc) · 55.5 KB
/
rpc_pb2_grpc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import rpc_pb2 as rpc__pb2
class WalletUnlockerStub(object):
"""*
Comments in this file will be directly parsed into the API
Documentation as descriptions of the associated method, message, or field.
These descriptions should go right above the definition of the object, and
can be in either block or /// comment format.
One edge case exists where a // comment followed by a /// comment in the
next line will cause the description not to show up in the documentation. In
that instance, simply separate the two comments with a blank line.
An RPC method can be matched to an lncli command by placing a line in the
beginning of the description in exactly the following format:
lncli: `methodname`
Failure to specify the exact name of the command will cause documentation
generation to fail.
More information on how exactly the gRPC documentation is generated from
this proto file can be found here:
https://github.com/lightninglabs/lightning-api
The WalletUnlocker service is used to set up a wallet password for
lnd at first startup, and unlock a previously set up wallet.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GenSeed = channel.unary_unary(
'/lnrpc.WalletUnlocker/GenSeed',
request_serializer=rpc__pb2.GenSeedRequest.SerializeToString,
response_deserializer=rpc__pb2.GenSeedResponse.FromString,
)
self.InitWallet = channel.unary_unary(
'/lnrpc.WalletUnlocker/InitWallet',
request_serializer=rpc__pb2.InitWalletRequest.SerializeToString,
response_deserializer=rpc__pb2.InitWalletResponse.FromString,
)
self.UnlockWallet = channel.unary_unary(
'/lnrpc.WalletUnlocker/UnlockWallet',
request_serializer=rpc__pb2.UnlockWalletRequest.SerializeToString,
response_deserializer=rpc__pb2.UnlockWalletResponse.FromString,
)
self.ChangePassword = channel.unary_unary(
'/lnrpc.WalletUnlocker/ChangePassword',
request_serializer=rpc__pb2.ChangePasswordRequest.SerializeToString,
response_deserializer=rpc__pb2.ChangePasswordResponse.FromString,
)
class WalletUnlockerServicer(object):
"""*
Comments in this file will be directly parsed into the API
Documentation as descriptions of the associated method, message, or field.
These descriptions should go right above the definition of the object, and
can be in either block or /// comment format.
One edge case exists where a // comment followed by a /// comment in the
next line will cause the description not to show up in the documentation. In
that instance, simply separate the two comments with a blank line.
An RPC method can be matched to an lncli command by placing a line in the
beginning of the description in exactly the following format:
lncli: `methodname`
Failure to specify the exact name of the command will cause documentation
generation to fail.
More information on how exactly the gRPC documentation is generated from
this proto file can be found here:
https://github.com/lightninglabs/lightning-api
The WalletUnlocker service is used to set up a wallet password for
lnd at first startup, and unlock a previously set up wallet.
"""
def GenSeed(self, request, context):
"""*
GenSeed is the first method that should be used to instantiate a new lnd
instance. This method allows a caller to generate a new aezeed cipher seed
given an optional passphrase. If provided, the passphrase will be necessary
to decrypt the cipherseed to expose the internal wallet seed.
Once the cipherseed is obtained and verified by the user, the InitWallet
method should be used to commit the newly generated seed, and create the
wallet.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def InitWallet(self, request, context):
"""*
InitWallet is used when lnd is starting up for the first time to fully
initialize the daemon and its internal wallet. At the very least a wallet
password must be provided. This will be used to encrypt sensitive material
on disk.
In the case of a recovery scenario, the user can also specify their aezeed
mnemonic and passphrase. If set, then the daemon will use this prior state
to initialize its internal wallet.
Alternatively, this can be used along with the GenSeed RPC to obtain a
seed, then present it to the user. Once it has been verified by the user,
the seed can be fed into this RPC in order to commit the new wallet.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UnlockWallet(self, request, context):
"""* lncli: `unlock`
UnlockWallet is used at startup of lnd to provide a password to unlock
the wallet database.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ChangePassword(self, request, context):
"""* lncli: `changepassword`
ChangePassword changes the password of the encrypted wallet. This will
automatically unlock the wallet database if successful.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_WalletUnlockerServicer_to_server(servicer, server):
rpc_method_handlers = {
'GenSeed': grpc.unary_unary_rpc_method_handler(
servicer.GenSeed,
request_deserializer=rpc__pb2.GenSeedRequest.FromString,
response_serializer=rpc__pb2.GenSeedResponse.SerializeToString,
),
'InitWallet': grpc.unary_unary_rpc_method_handler(
servicer.InitWallet,
request_deserializer=rpc__pb2.InitWalletRequest.FromString,
response_serializer=rpc__pb2.InitWalletResponse.SerializeToString,
),
'UnlockWallet': grpc.unary_unary_rpc_method_handler(
servicer.UnlockWallet,
request_deserializer=rpc__pb2.UnlockWalletRequest.FromString,
response_serializer=rpc__pb2.UnlockWalletResponse.SerializeToString,
),
'ChangePassword': grpc.unary_unary_rpc_method_handler(
servicer.ChangePassword,
request_deserializer=rpc__pb2.ChangePasswordRequest.FromString,
response_serializer=rpc__pb2.ChangePasswordResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'lnrpc.WalletUnlocker', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
class LightningStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.WalletBalance = channel.unary_unary(
'/lnrpc.Lightning/WalletBalance',
request_serializer=rpc__pb2.WalletBalanceRequest.SerializeToString,
response_deserializer=rpc__pb2.WalletBalanceResponse.FromString,
)
self.ChannelBalance = channel.unary_unary(
'/lnrpc.Lightning/ChannelBalance',
request_serializer=rpc__pb2.ChannelBalanceRequest.SerializeToString,
response_deserializer=rpc__pb2.ChannelBalanceResponse.FromString,
)
self.GetTransactions = channel.unary_unary(
'/lnrpc.Lightning/GetTransactions',
request_serializer=rpc__pb2.GetTransactionsRequest.SerializeToString,
response_deserializer=rpc__pb2.TransactionDetails.FromString,
)
self.EstimateFee = channel.unary_unary(
'/lnrpc.Lightning/EstimateFee',
request_serializer=rpc__pb2.EstimateFeeRequest.SerializeToString,
response_deserializer=rpc__pb2.EstimateFeeResponse.FromString,
)
self.SendCoins = channel.unary_unary(
'/lnrpc.Lightning/SendCoins',
request_serializer=rpc__pb2.SendCoinsRequest.SerializeToString,
response_deserializer=rpc__pb2.SendCoinsResponse.FromString,
)
self.ListUnspent = channel.unary_unary(
'/lnrpc.Lightning/ListUnspent',
request_serializer=rpc__pb2.ListUnspentRequest.SerializeToString,
response_deserializer=rpc__pb2.ListUnspentResponse.FromString,
)
self.SubscribeTransactions = channel.unary_stream(
'/lnrpc.Lightning/SubscribeTransactions',
request_serializer=rpc__pb2.GetTransactionsRequest.SerializeToString,
response_deserializer=rpc__pb2.Transaction.FromString,
)
self.SendMany = channel.unary_unary(
'/lnrpc.Lightning/SendMany',
request_serializer=rpc__pb2.SendManyRequest.SerializeToString,
response_deserializer=rpc__pb2.SendManyResponse.FromString,
)
self.NewAddress = channel.unary_unary(
'/lnrpc.Lightning/NewAddress',
request_serializer=rpc__pb2.NewAddressRequest.SerializeToString,
response_deserializer=rpc__pb2.NewAddressResponse.FromString,
)
self.SignMessage = channel.unary_unary(
'/lnrpc.Lightning/SignMessage',
request_serializer=rpc__pb2.SignMessageRequest.SerializeToString,
response_deserializer=rpc__pb2.SignMessageResponse.FromString,
)
self.VerifyMessage = channel.unary_unary(
'/lnrpc.Lightning/VerifyMessage',
request_serializer=rpc__pb2.VerifyMessageRequest.SerializeToString,
response_deserializer=rpc__pb2.VerifyMessageResponse.FromString,
)
self.ConnectPeer = channel.unary_unary(
'/lnrpc.Lightning/ConnectPeer',
request_serializer=rpc__pb2.ConnectPeerRequest.SerializeToString,
response_deserializer=rpc__pb2.ConnectPeerResponse.FromString,
)
self.DisconnectPeer = channel.unary_unary(
'/lnrpc.Lightning/DisconnectPeer',
request_serializer=rpc__pb2.DisconnectPeerRequest.SerializeToString,
response_deserializer=rpc__pb2.DisconnectPeerResponse.FromString,
)
self.ListPeers = channel.unary_unary(
'/lnrpc.Lightning/ListPeers',
request_serializer=rpc__pb2.ListPeersRequest.SerializeToString,
response_deserializer=rpc__pb2.ListPeersResponse.FromString,
)
self.GetInfo = channel.unary_unary(
'/lnrpc.Lightning/GetInfo',
request_serializer=rpc__pb2.GetInfoRequest.SerializeToString,
response_deserializer=rpc__pb2.GetInfoResponse.FromString,
)
self.PendingChannels = channel.unary_unary(
'/lnrpc.Lightning/PendingChannels',
request_serializer=rpc__pb2.PendingChannelsRequest.SerializeToString,
response_deserializer=rpc__pb2.PendingChannelsResponse.FromString,
)
self.ListChannels = channel.unary_unary(
'/lnrpc.Lightning/ListChannels',
request_serializer=rpc__pb2.ListChannelsRequest.SerializeToString,
response_deserializer=rpc__pb2.ListChannelsResponse.FromString,
)
self.SubscribeChannelEvents = channel.unary_stream(
'/lnrpc.Lightning/SubscribeChannelEvents',
request_serializer=rpc__pb2.ChannelEventSubscription.SerializeToString,
response_deserializer=rpc__pb2.ChannelEventUpdate.FromString,
)
self.ClosedChannels = channel.unary_unary(
'/lnrpc.Lightning/ClosedChannels',
request_serializer=rpc__pb2.ClosedChannelsRequest.SerializeToString,
response_deserializer=rpc__pb2.ClosedChannelsResponse.FromString,
)
self.OpenChannelSync = channel.unary_unary(
'/lnrpc.Lightning/OpenChannelSync',
request_serializer=rpc__pb2.OpenChannelRequest.SerializeToString,
response_deserializer=rpc__pb2.ChannelPoint.FromString,
)
self.OpenChannel = channel.unary_stream(
'/lnrpc.Lightning/OpenChannel',
request_serializer=rpc__pb2.OpenChannelRequest.SerializeToString,
response_deserializer=rpc__pb2.OpenStatusUpdate.FromString,
)
self.CloseChannel = channel.unary_stream(
'/lnrpc.Lightning/CloseChannel',
request_serializer=rpc__pb2.CloseChannelRequest.SerializeToString,
response_deserializer=rpc__pb2.CloseStatusUpdate.FromString,
)
self.AbandonChannel = channel.unary_unary(
'/lnrpc.Lightning/AbandonChannel',
request_serializer=rpc__pb2.AbandonChannelRequest.SerializeToString,
response_deserializer=rpc__pb2.AbandonChannelResponse.FromString,
)
self.SendPayment = channel.stream_stream(
'/lnrpc.Lightning/SendPayment',
request_serializer=rpc__pb2.SendRequest.SerializeToString,
response_deserializer=rpc__pb2.SendResponse.FromString,
)
self.SendPaymentSync = channel.unary_unary(
'/lnrpc.Lightning/SendPaymentSync',
request_serializer=rpc__pb2.SendRequest.SerializeToString,
response_deserializer=rpc__pb2.SendResponse.FromString,
)
self.SendToRoute = channel.stream_stream(
'/lnrpc.Lightning/SendToRoute',
request_serializer=rpc__pb2.SendToRouteRequest.SerializeToString,
response_deserializer=rpc__pb2.SendResponse.FromString,
)
self.SendToRouteSync = channel.unary_unary(
'/lnrpc.Lightning/SendToRouteSync',
request_serializer=rpc__pb2.SendToRouteRequest.SerializeToString,
response_deserializer=rpc__pb2.SendResponse.FromString,
)
self.AddInvoice = channel.unary_unary(
'/lnrpc.Lightning/AddInvoice',
request_serializer=rpc__pb2.Invoice.SerializeToString,
response_deserializer=rpc__pb2.AddInvoiceResponse.FromString,
)
self.ListInvoices = channel.unary_unary(
'/lnrpc.Lightning/ListInvoices',
request_serializer=rpc__pb2.ListInvoiceRequest.SerializeToString,
response_deserializer=rpc__pb2.ListInvoiceResponse.FromString,
)
self.LookupInvoice = channel.unary_unary(
'/lnrpc.Lightning/LookupInvoice',
request_serializer=rpc__pb2.PaymentHash.SerializeToString,
response_deserializer=rpc__pb2.Invoice.FromString,
)
self.SubscribeInvoices = channel.unary_stream(
'/lnrpc.Lightning/SubscribeInvoices',
request_serializer=rpc__pb2.InvoiceSubscription.SerializeToString,
response_deserializer=rpc__pb2.Invoice.FromString,
)
self.DecodePayReq = channel.unary_unary(
'/lnrpc.Lightning/DecodePayReq',
request_serializer=rpc__pb2.PayReqString.SerializeToString,
response_deserializer=rpc__pb2.PayReq.FromString,
)
self.ListPayments = channel.unary_unary(
'/lnrpc.Lightning/ListPayments',
request_serializer=rpc__pb2.ListPaymentsRequest.SerializeToString,
response_deserializer=rpc__pb2.ListPaymentsResponse.FromString,
)
self.DeleteAllPayments = channel.unary_unary(
'/lnrpc.Lightning/DeleteAllPayments',
request_serializer=rpc__pb2.DeleteAllPaymentsRequest.SerializeToString,
response_deserializer=rpc__pb2.DeleteAllPaymentsResponse.FromString,
)
self.DescribeGraph = channel.unary_unary(
'/lnrpc.Lightning/DescribeGraph',
request_serializer=rpc__pb2.ChannelGraphRequest.SerializeToString,
response_deserializer=rpc__pb2.ChannelGraph.FromString,
)
self.GetChanInfo = channel.unary_unary(
'/lnrpc.Lightning/GetChanInfo',
request_serializer=rpc__pb2.ChanInfoRequest.SerializeToString,
response_deserializer=rpc__pb2.ChannelEdge.FromString,
)
self.GetNodeInfo = channel.unary_unary(
'/lnrpc.Lightning/GetNodeInfo',
request_serializer=rpc__pb2.NodeInfoRequest.SerializeToString,
response_deserializer=rpc__pb2.NodeInfo.FromString,
)
self.QueryRoutes = channel.unary_unary(
'/lnrpc.Lightning/QueryRoutes',
request_serializer=rpc__pb2.QueryRoutesRequest.SerializeToString,
response_deserializer=rpc__pb2.QueryRoutesResponse.FromString,
)
self.GetNetworkInfo = channel.unary_unary(
'/lnrpc.Lightning/GetNetworkInfo',
request_serializer=rpc__pb2.NetworkInfoRequest.SerializeToString,
response_deserializer=rpc__pb2.NetworkInfo.FromString,
)
self.StopDaemon = channel.unary_unary(
'/lnrpc.Lightning/StopDaemon',
request_serializer=rpc__pb2.StopRequest.SerializeToString,
response_deserializer=rpc__pb2.StopResponse.FromString,
)
self.SubscribeChannelGraph = channel.unary_stream(
'/lnrpc.Lightning/SubscribeChannelGraph',
request_serializer=rpc__pb2.GraphTopologySubscription.SerializeToString,
response_deserializer=rpc__pb2.GraphTopologyUpdate.FromString,
)
self.DebugLevel = channel.unary_unary(
'/lnrpc.Lightning/DebugLevel',
request_serializer=rpc__pb2.DebugLevelRequest.SerializeToString,
response_deserializer=rpc__pb2.DebugLevelResponse.FromString,
)
self.FeeReport = channel.unary_unary(
'/lnrpc.Lightning/FeeReport',
request_serializer=rpc__pb2.FeeReportRequest.SerializeToString,
response_deserializer=rpc__pb2.FeeReportResponse.FromString,
)
self.UpdateChannelPolicy = channel.unary_unary(
'/lnrpc.Lightning/UpdateChannelPolicy',
request_serializer=rpc__pb2.PolicyUpdateRequest.SerializeToString,
response_deserializer=rpc__pb2.PolicyUpdateResponse.FromString,
)
self.ForwardingHistory = channel.unary_unary(
'/lnrpc.Lightning/ForwardingHistory',
request_serializer=rpc__pb2.ForwardingHistoryRequest.SerializeToString,
response_deserializer=rpc__pb2.ForwardingHistoryResponse.FromString,
)
self.ExportChannelBackup = channel.unary_unary(
'/lnrpc.Lightning/ExportChannelBackup',
request_serializer=rpc__pb2.ExportChannelBackupRequest.SerializeToString,
response_deserializer=rpc__pb2.ChannelBackup.FromString,
)
self.ExportAllChannelBackups = channel.unary_unary(
'/lnrpc.Lightning/ExportAllChannelBackups',
request_serializer=rpc__pb2.ChanBackupExportRequest.SerializeToString,
response_deserializer=rpc__pb2.ChanBackupSnapshot.FromString,
)
self.VerifyChanBackup = channel.unary_unary(
'/lnrpc.Lightning/VerifyChanBackup',
request_serializer=rpc__pb2.ChanBackupSnapshot.SerializeToString,
response_deserializer=rpc__pb2.VerifyChanBackupResponse.FromString,
)
self.RestoreChannelBackups = channel.unary_unary(
'/lnrpc.Lightning/RestoreChannelBackups',
request_serializer=rpc__pb2.RestoreChanBackupRequest.SerializeToString,
response_deserializer=rpc__pb2.RestoreBackupResponse.FromString,
)
self.SubscribeChannelBackups = channel.unary_stream(
'/lnrpc.Lightning/SubscribeChannelBackups',
request_serializer=rpc__pb2.ChannelBackupSubscription.SerializeToString,
response_deserializer=rpc__pb2.ChanBackupSnapshot.FromString,
)
class LightningServicer(object):
# missing associated documentation comment in .proto file
pass
def WalletBalance(self, request, context):
"""* lncli: `walletbalance`
WalletBalance returns total unspent outputs(confirmed and unconfirmed), all
confirmed unspent outputs and all unconfirmed unspent outputs under control
of the wallet.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ChannelBalance(self, request, context):
"""* lncli: `channelbalance`
ChannelBalance returns the total funds available across all open channels
in satoshis.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetTransactions(self, request, context):
"""* lncli: `listchaintxns`
GetTransactions returns a list describing all the known transactions
relevant to the wallet.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def EstimateFee(self, request, context):
"""* lncli: `estimatefee`
EstimateFee asks the chain backend to estimate the fee rate and total fees
for a transaction that pays to multiple specified outputs.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SendCoins(self, request, context):
"""* lncli: `sendcoins`
SendCoins executes a request to send coins to a particular address. Unlike
SendMany, this RPC call only allows creating a single output at a time. If
neither target_conf, or sat_per_byte are set, then the internal wallet will
consult its fee model to determine a fee for the default confirmation
target.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ListUnspent(self, request, context):
"""* lncli: `listunspent`
ListUnspent returns a list of all utxos spendable by the wallet with a
number of confirmations between the specified minimum and maximum.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SubscribeTransactions(self, request, context):
"""*
SubscribeTransactions creates a uni-directional stream from the server to
the client in which any newly discovered transactions relevant to the
wallet are sent over.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SendMany(self, request, context):
"""* lncli: `sendmany`
SendMany handles a request for a transaction that creates multiple specified
outputs in parallel. If neither target_conf, or sat_per_byte are set, then
the internal wallet will consult its fee model to determine a fee for the
default confirmation target.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def NewAddress(self, request, context):
"""* lncli: `newaddress`
NewAddress creates a new address under control of the local wallet.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SignMessage(self, request, context):
"""* lncli: `signmessage`
SignMessage signs a message with this node's private key. The returned
signature string is `zbase32` encoded and pubkey recoverable, meaning that
only the message digest and signature are needed for verification.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def VerifyMessage(self, request, context):
"""* lncli: `verifymessage`
VerifyMessage verifies a signature over a msg. The signature must be
zbase32 encoded and signed by an active node in the resident node's
channel database. In addition to returning the validity of the signature,
VerifyMessage also returns the recovered pubkey from the signature.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ConnectPeer(self, request, context):
"""* lncli: `connect`
ConnectPeer attempts to establish a connection to a remote peer. This is at
the networking level, and is used for communication between nodes. This is
distinct from establishing a channel with a peer.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DisconnectPeer(self, request, context):
"""* lncli: `disconnect`
DisconnectPeer attempts to disconnect one peer from another identified by a
given pubKey. In the case that we currently have a pending or active channel
with the target peer, then this action will be not be allowed.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ListPeers(self, request, context):
"""* lncli: `listpeers`
ListPeers returns a verbose listing of all currently active peers.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetInfo(self, request, context):
"""* lncli: `getinfo`
GetInfo returns general information concerning the lightning node including
it's identity pubkey, alias, the chains it is connected to, and information
concerning the number of open+pending channels.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def PendingChannels(self, request, context):
"""TODO(roasbeef): merge with below with bool?
* lncli: `pendingchannels`
PendingChannels returns a list of all the channels that are currently
considered "pending". A channel is pending if it has finished the funding
workflow and is waiting for confirmations for the funding txn, or is in the
process of closure, either initiated cooperatively or non-cooperatively.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ListChannels(self, request, context):
"""* lncli: `listchannels`
ListChannels returns a description of all the open channels that this node
is a participant in.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SubscribeChannelEvents(self, request, context):
"""* lncli: `subscribechannelevents`
SubscribeChannelEvents creates a uni-directional stream from the server to
the client in which any updates relevant to the state of the channels are
sent over. Events include new active channels, inactive channels, and closed
channels.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ClosedChannels(self, request, context):
"""* lncli: `closedchannels`
ClosedChannels returns a description of all the closed channels that
this node was a participant in.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def OpenChannelSync(self, request, context):
"""*
OpenChannelSync is a synchronous version of the OpenChannel RPC call. This
call is meant to be consumed by clients to the REST proxy. As with all
other sync calls, all byte slices are intended to be populated as hex
encoded strings.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def OpenChannel(self, request, context):
"""* lncli: `openchannel`
OpenChannel attempts to open a singly funded channel specified in the
request to a remote peer. Users are able to specify a target number of
blocks that the funding transaction should be confirmed in, or a manual fee
rate to us for the funding transaction. If neither are specified, then a
lax block confirmation target is used.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def CloseChannel(self, request, context):
"""* lncli: `closechannel`
CloseChannel attempts to close an active channel identified by its channel
outpoint (ChannelPoint). The actions of this method can additionally be
augmented to attempt a force close after a timeout period in the case of an
inactive peer. If a non-force close (cooperative closure) is requested,
then the user can specify either a target number of blocks until the
closure transaction is confirmed, or a manual fee rate. If neither are
specified, then a default lax, block confirmation target is used.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def AbandonChannel(self, request, context):
"""* lncli: `abandonchannel`
AbandonChannel removes all channel state from the database except for a
close summary. This method can be used to get rid of permanently unusable
channels due to bugs fixed in newer versions of lnd. Only available
when in debug builds of lnd.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SendPayment(self, request_iterator, context):
"""* lncli: `sendpayment`
SendPayment dispatches a bi-directional streaming RPC for sending payments
through the Lightning Network. A single RPC invocation creates a persistent
bi-directional stream allowing clients to rapidly send payments through the
Lightning Network with a single persistent connection.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SendPaymentSync(self, request, context):
"""*
SendPaymentSync is the synchronous non-streaming version of SendPayment.
This RPC is intended to be consumed by clients of the REST proxy.
Additionally, this RPC expects the destination's public key and the payment
hash (if any) to be encoded as hex strings.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SendToRoute(self, request_iterator, context):
"""* lncli: `sendtoroute`
SendToRoute is a bi-directional streaming RPC for sending payment through
the Lightning Network. This method differs from SendPayment in that it
allows users to specify a full route manually. This can be used for things
like rebalancing, and atomic swaps.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SendToRouteSync(self, request, context):
"""*
SendToRouteSync is a synchronous version of SendToRoute. It Will block
until the payment either fails or succeeds.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def AddInvoice(self, request, context):
"""* lncli: `addinvoice`
AddInvoice attempts to add a new invoice to the invoice database. Any
duplicated invoices are rejected, therefore all invoices *must* have a
unique payment preimage.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ListInvoices(self, request, context):
"""* lncli: `listinvoices`
ListInvoices returns a list of all the invoices currently stored within the
database. Any active debug invoices are ignored. It has full support for
paginated responses, allowing users to query for specific invoices through
their add_index. This can be done by using either the first_index_offset or
last_index_offset fields included in the response as the index_offset of the
next request. By default, the first 100 invoices created will be returned.
Backwards pagination is also supported through the Reversed flag.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def LookupInvoice(self, request, context):
"""* lncli: `lookupinvoice`
LookupInvoice attempts to look up an invoice according to its payment hash.
The passed payment hash *must* be exactly 32 bytes, if not, an error is
returned.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SubscribeInvoices(self, request, context):
"""*
SubscribeInvoices returns a uni-directional stream (server -> client) for
notifying the client of newly added/settled invoices. The caller can
optionally specify the add_index and/or the settle_index. If the add_index
is specified, then we'll first start by sending add invoice events for all
invoices with an add_index greater than the specified value. If the
settle_index is specified, the next, we'll send out all settle events for
invoices with a settle_index greater than the specified value. One or both
of these fields can be set. If no fields are set, then we'll only send out
the latest add/settle events.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DecodePayReq(self, request, context):
"""* lncli: `decodepayreq`
DecodePayReq takes an encoded payment request string and attempts to decode
it, returning a full description of the conditions encoded within the
payment request.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ListPayments(self, request, context):
"""* lncli: `listpayments`
ListPayments returns a list of all outgoing payments.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DeleteAllPayments(self, request, context):
"""*
DeleteAllPayments deletes all outgoing payments from DB.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DescribeGraph(self, request, context):
"""* lncli: `describegraph`
DescribeGraph returns a description of the latest graph state from the
point of view of the node. The graph information is partitioned into two
components: all the nodes/vertexes, and all the edges that connect the
vertexes themselves. As this is a directed graph, the edges also contain
the node directional specific routing policy which includes: the time lock
delta, fee information, etc.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetChanInfo(self, request, context):
"""* lncli: `getchaninfo`
GetChanInfo returns the latest authenticated network announcement for the
given channel identified by its channel ID: an 8-byte integer which
uniquely identifies the location of transaction's funding output within the
blockchain.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetNodeInfo(self, request, context):
"""* lncli: `getnodeinfo`
GetNodeInfo returns the latest advertised, aggregated, and authenticated
channel information for the specified node identified by its public key.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def QueryRoutes(self, request, context):
"""* lncli: `queryroutes`
QueryRoutes attempts to query the daemon's Channel Router for a possible
route to a target destination capable of carrying a specific amount of
satoshis. The returned route contains the full details required to craft and
send an HTLC, also including the necessary information that should be
present within the Sphinx packet encapsulated within the HTLC.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetNetworkInfo(self, request, context):
"""* lncli: `getnetworkinfo`
GetNetworkInfo returns some basic stats about the known channel graph from
the point of view of the node.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def StopDaemon(self, request, context):
"""* lncli: `stop`
StopDaemon will send a shutdown request to the interrupt handler, triggering
a graceful shutdown of the daemon.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SubscribeChannelGraph(self, request, context):
"""*
SubscribeChannelGraph launches a streaming RPC that allows the caller to
receive notifications upon any changes to the channel graph topology from
the point of view of the responding node. Events notified include: new
nodes coming online, nodes updating their authenticated attributes, new
channels being advertised, updates in the routing policy for a directional
channel edge, and when channels are closed on-chain.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DebugLevel(self, request, context):
"""* lncli: `debuglevel`
DebugLevel allows a caller to programmatically set the logging verbosity of
lnd. The logging can be targeted according to a coarse daemon-wide logging
level, or in a granular fashion to specify the logging for a target
sub-system.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def FeeReport(self, request, context):
"""* lncli: `feereport`
FeeReport allows the caller to obtain a report detailing the current fee
schedule enforced by the node globally for each channel.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def UpdateChannelPolicy(self, request, context):
"""* lncli: `updatechanpolicy`
UpdateChannelPolicy allows the caller to update the fee schedule and
channel policies for all channels globally, or a particular channel.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ForwardingHistory(self, request, context):
"""* lncli: `fwdinghistory`
ForwardingHistory allows the caller to query the htlcswitch for a record of
all HTLCs forwarded within the target time range, and integer offset
within that time range. If no time-range is specified, then the first chunk
of the past 24 hrs of forwarding history are returned.
A list of forwarding events are returned. The size of each forwarding event
is 40 bytes, and the max message size able to be returned in gRPC is 4 MiB.
As a result each message can only contain 50k entries. Each response has
the index offset of the last entry. The index offset can be provided to the
request to allow the caller to skip a series of records.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ExportChannelBackup(self, request, context):
"""* lncli: `exportchanbackup`
ExportChannelBackup attempts to return an encrypted static channel backup
for the target channel identified by it channel point. The backup is
encrypted with a key generated from the aezeed seed of the user. The
returned backup can either be restored using the RestoreChannelBackup
method once lnd is running, or via the InitWallet and UnlockWallet methods
from the WalletUnlocker service.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ExportAllChannelBackups(self, request, context):
"""*
ExportAllChannelBackups returns static channel backups for all existing
channels known to lnd. A set of regular singular static channel backups for
each channel are returned. Additionally, a multi-channel backup is returned
as well, which contains a single encrypted blob containing the backups of
each channel.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def VerifyChanBackup(self, request, context):
"""*
VerifyChanBackup allows a caller to verify the integrity of a channel backup
snapshot. This method will accept either a packed Single or a packed Multi.
Specifying both will result in an error.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RestoreChannelBackups(self, request, context):
"""* lncli: `restorechanbackup`
RestoreChannelBackups accepts a set of singular channel backups, or a
single encrypted multi-chan backup and attempts to recover any funds
remaining within the channel. If we are able to unpack the backup, then the
new channel will be shown under listchannels, as well as pending channels.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SubscribeChannelBackups(self, request, context):
"""*
SubscribeChannelBackups allows a client to sub-subscribe to the most up to
date information concerning the state of all channel backups. Each time a
new channel is added, we return the new set of channels, along with a
multi-chan backup containing the backup info for all channels. Each time a
channel is closed, we send a new update, which contains new new chan back
ups, but the updated set of encrypted multi-chan backups with the closed
channel(s) removed.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_LightningServicer_to_server(servicer, server):
rpc_method_handlers = {
'WalletBalance': grpc.unary_unary_rpc_method_handler(
servicer.WalletBalance,
request_deserializer=rpc__pb2.WalletBalanceRequest.FromString,
response_serializer=rpc__pb2.WalletBalanceResponse.SerializeToString,
),
'ChannelBalance': grpc.unary_unary_rpc_method_handler(
servicer.ChannelBalance,
request_deserializer=rpc__pb2.ChannelBalanceRequest.FromString,
response_serializer=rpc__pb2.ChannelBalanceResponse.SerializeToString,
),
'GetTransactions': grpc.unary_unary_rpc_method_handler(
servicer.GetTransactions,
request_deserializer=rpc__pb2.GetTransactionsRequest.FromString,
response_serializer=rpc__pb2.TransactionDetails.SerializeToString,
),
'EstimateFee': grpc.unary_unary_rpc_method_handler(
servicer.EstimateFee,
request_deserializer=rpc__pb2.EstimateFeeRequest.FromString,
response_serializer=rpc__pb2.EstimateFeeResponse.SerializeToString,
),
'SendCoins': grpc.unary_unary_rpc_method_handler(
servicer.SendCoins,
request_deserializer=rpc__pb2.SendCoinsRequest.FromString,
response_serializer=rpc__pb2.SendCoinsResponse.SerializeToString,
),
'ListUnspent': grpc.unary_unary_rpc_method_handler(
servicer.ListUnspent,
request_deserializer=rpc__pb2.ListUnspentRequest.FromString,