/
node.proto
2711 lines (2425 loc) · 65.1 KB
/
node.proto
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
syntax = "proto3";
package cln;
// This file was automatically derived from the JSON-RPC schemas in
// `doc/schemas`. Do not edit this file manually as it would get
// overwritten.
import "primitives.proto";
service Node {
rpc Getinfo(GetinfoRequest) returns (GetinfoResponse) {}
rpc ListPeers(ListpeersRequest) returns (ListpeersResponse) {}
rpc ListFunds(ListfundsRequest) returns (ListfundsResponse) {}
rpc SendPay(SendpayRequest) returns (SendpayResponse) {}
rpc ListChannels(ListchannelsRequest) returns (ListchannelsResponse) {}
rpc AddGossip(AddgossipRequest) returns (AddgossipResponse) {}
rpc AutoCleanInvoice(AutocleaninvoiceRequest) returns (AutocleaninvoiceResponse) {}
rpc AutoCleanOnce(AutocleanonceRequest) returns (AutocleanonceResponse) {}
rpc AutoCleanStatus(AutocleanstatusRequest) returns (AutocleanstatusResponse) {}
rpc CheckMessage(CheckmessageRequest) returns (CheckmessageResponse) {}
rpc Close(CloseRequest) returns (CloseResponse) {}
rpc ConnectPeer(ConnectRequest) returns (ConnectResponse) {}
rpc CreateInvoice(CreateinvoiceRequest) returns (CreateinvoiceResponse) {}
rpc Datastore(DatastoreRequest) returns (DatastoreResponse) {}
rpc DatastoreUsage(DatastoreusageRequest) returns (DatastoreusageResponse) {}
rpc CreateOnion(CreateonionRequest) returns (CreateonionResponse) {}
rpc DelDatastore(DeldatastoreRequest) returns (DeldatastoreResponse) {}
rpc DelInvoice(DelinvoiceRequest) returns (DelinvoiceResponse) {}
rpc Invoice(InvoiceRequest) returns (InvoiceResponse) {}
rpc ListDatastore(ListdatastoreRequest) returns (ListdatastoreResponse) {}
rpc ListInvoices(ListinvoicesRequest) returns (ListinvoicesResponse) {}
rpc SendOnion(SendonionRequest) returns (SendonionResponse) {}
rpc ListSendPays(ListsendpaysRequest) returns (ListsendpaysResponse) {}
rpc ListTransactions(ListtransactionsRequest) returns (ListtransactionsResponse) {}
rpc Pay(PayRequest) returns (PayResponse) {}
rpc ListNodes(ListnodesRequest) returns (ListnodesResponse) {}
rpc WaitAnyInvoice(WaitanyinvoiceRequest) returns (WaitanyinvoiceResponse) {}
rpc WaitInvoice(WaitinvoiceRequest) returns (WaitinvoiceResponse) {}
rpc WaitSendPay(WaitsendpayRequest) returns (WaitsendpayResponse) {}
rpc NewAddr(NewaddrRequest) returns (NewaddrResponse) {}
rpc Withdraw(WithdrawRequest) returns (WithdrawResponse) {}
rpc KeySend(KeysendRequest) returns (KeysendResponse) {}
rpc FundPsbt(FundpsbtRequest) returns (FundpsbtResponse) {}
rpc SendPsbt(SendpsbtRequest) returns (SendpsbtResponse) {}
rpc SignPsbt(SignpsbtRequest) returns (SignpsbtResponse) {}
rpc UtxoPsbt(UtxopsbtRequest) returns (UtxopsbtResponse) {}
rpc TxDiscard(TxdiscardRequest) returns (TxdiscardResponse) {}
rpc TxPrepare(TxprepareRequest) returns (TxprepareResponse) {}
rpc TxSend(TxsendRequest) returns (TxsendResponse) {}
rpc ListPeerChannels(ListpeerchannelsRequest) returns (ListpeerchannelsResponse) {}
rpc ListClosedChannels(ListclosedchannelsRequest) returns (ListclosedchannelsResponse) {}
rpc DecodePay(DecodepayRequest) returns (DecodepayResponse) {}
rpc Decode(DecodeRequest) returns (DecodeResponse) {}
rpc DelPay(DelpayRequest) returns (DelpayResponse) {}
rpc DelForward(DelforwardRequest) returns (DelforwardResponse) {}
rpc DisableOffer(DisableofferRequest) returns (DisableofferResponse) {}
rpc Disconnect(DisconnectRequest) returns (DisconnectResponse) {}
rpc Feerates(FeeratesRequest) returns (FeeratesResponse) {}
rpc FetchInvoice(FetchinvoiceRequest) returns (FetchinvoiceResponse) {}
rpc FundChannel_Cancel(Fundchannel_cancelRequest) returns (Fundchannel_cancelResponse) {}
rpc FundChannel_Complete(Fundchannel_completeRequest) returns (Fundchannel_completeResponse) {}
rpc FundChannel(FundchannelRequest) returns (FundchannelResponse) {}
rpc FundChannel_Start(Fundchannel_startRequest) returns (Fundchannel_startResponse) {}
rpc GetLog(GetlogRequest) returns (GetlogResponse) {}
rpc GetRoute(GetrouteRequest) returns (GetrouteResponse) {}
rpc ListForwards(ListforwardsRequest) returns (ListforwardsResponse) {}
rpc ListOffers(ListoffersRequest) returns (ListoffersResponse) {}
rpc ListPays(ListpaysRequest) returns (ListpaysResponse) {}
rpc ListHtlcs(ListhtlcsRequest) returns (ListhtlcsResponse) {}
rpc MultiFundChannel(MultifundchannelRequest) returns (MultifundchannelResponse) {}
rpc Offer(OfferRequest) returns (OfferResponse) {}
rpc OpenChannel_Abort(Openchannel_abortRequest) returns (Openchannel_abortResponse) {}
rpc OpenChannel_Bump(Openchannel_bumpRequest) returns (Openchannel_bumpResponse) {}
rpc OpenChannel_Init(Openchannel_initRequest) returns (Openchannel_initResponse) {}
rpc OpenChannel_Signed(Openchannel_signedRequest) returns (Openchannel_signedResponse) {}
rpc OpenChannel_Update(Openchannel_updateRequest) returns (Openchannel_updateResponse) {}
rpc Ping(PingRequest) returns (PingResponse) {}
rpc Plugin(PluginRequest) returns (PluginResponse) {}
rpc RenePayStatus(RenepaystatusRequest) returns (RenepaystatusResponse) {}
rpc RenePay(RenepayRequest) returns (RenepayResponse) {}
rpc ReserveInputs(ReserveinputsRequest) returns (ReserveinputsResponse) {}
rpc SendCustomMsg(SendcustommsgRequest) returns (SendcustommsgResponse) {}
rpc SendInvoice(SendinvoiceRequest) returns (SendinvoiceResponse) {}
rpc SetChannel(SetchannelRequest) returns (SetchannelResponse) {}
rpc SignInvoice(SigninvoiceRequest) returns (SigninvoiceResponse) {}
rpc SignMessage(SignmessageRequest) returns (SignmessageResponse) {}
rpc Splice_Init(Splice_initRequest) returns (Splice_initResponse) {}
rpc Splice_Signed(Splice_signedRequest) returns (Splice_signedResponse) {}
rpc Splice_Update(Splice_updateRequest) returns (Splice_updateResponse) {}
rpc UnreserveInputs(UnreserveinputsRequest) returns (UnreserveinputsResponse) {}
rpc WaitBlockHeight(WaitblockheightRequest) returns (WaitblockheightResponse) {}
rpc Wait(WaitRequest) returns (WaitResponse) {}
rpc Stop(StopRequest) returns (StopResponse) {}
rpc PreApproveKeysend(PreapprovekeysendRequest) returns (PreapprovekeysendResponse) {}
rpc PreApproveInvoice(PreapproveinvoiceRequest) returns (PreapproveinvoiceResponse) {}
rpc StaticBackup(StaticbackupRequest) returns (StaticbackupResponse) {}
rpc BkprChannelsApy(BkprchannelsapyRequest) returns (BkprchannelsapyResponse) {}
rpc BkprDumpIncomeCsv(BkprdumpincomecsvRequest) returns (BkprdumpincomecsvResponse) {}
rpc BkprInspect(BkprinspectRequest) returns (BkprinspectResponse) {}
rpc BkprListAccountEvents(BkprlistaccounteventsRequest) returns (BkprlistaccounteventsResponse) {}
rpc BkprListBalances(BkprlistbalancesRequest) returns (BkprlistbalancesResponse) {}
rpc BkprListIncome(BkprlistincomeRequest) returns (BkprlistincomeResponse) {}
}
message GetinfoRequest {
}
message GetinfoResponse {
bytes id = 1;
optional string alias = 2;
bytes color = 3;
uint32 num_peers = 4;
uint32 num_pending_channels = 5;
uint32 num_active_channels = 6;
uint32 num_inactive_channels = 7;
string version = 8;
string lightning_dir = 9;
optional GetinfoOur_features our_features = 10;
uint32 blockheight = 11;
string network = 12;
Amount fees_collected_msat = 13;
repeated GetinfoAddress address = 14;
repeated GetinfoBinding binding = 15;
optional string warning_bitcoind_sync = 16;
optional string warning_lightningd_sync = 17;
}
message GetinfoOur_features {
bytes init = 1;
bytes node = 2;
bytes channel = 3;
bytes invoice = 4;
}
message GetinfoAddress {
// Getinfo.address[].type
enum GetinfoAddressType {
DNS = 0;
IPV4 = 1;
IPV6 = 2;
TORV2 = 3;
TORV3 = 4;
}
GetinfoAddressType item_type = 1;
uint32 port = 2;
optional string address = 3;
}
message GetinfoBinding {
// Getinfo.binding[].type
enum GetinfoBindingType {
LOCAL_SOCKET = 0;
IPV4 = 1;
IPV6 = 2;
TORV2 = 3;
TORV3 = 4;
WEBSOCKET = 5;
}
GetinfoBindingType item_type = 1;
optional string address = 2;
optional uint32 port = 3;
optional string socket = 4;
optional string subtype = 5;
}
message ListpeersRequest {
// ListPeers.level
enum ListpeersLevel {
IO = 0;
DEBUG = 1;
INFO = 2;
UNUSUAL = 3;
TRACE = 4;
}
optional bytes id = 1;
optional ListpeersLevel level = 2;
}
message ListpeersResponse {
repeated ListpeersPeers peers = 1;
}
message ListpeersPeers {
bytes id = 1;
bool connected = 2;
repeated ListpeersPeersLog log = 3;
repeated string netaddr = 5;
optional bytes features = 6;
optional string remote_addr = 7;
optional uint32 num_channels = 8;
}
message ListpeersPeersLog {
// ListPeers.peers[].log[].type
enum ListpeersPeersLogType {
SKIPPED = 0;
BROKEN = 1;
UNUSUAL = 2;
INFO = 3;
DEBUG = 4;
IO_IN = 5;
IO_OUT = 6;
TRACE = 7;
}
ListpeersPeersLogType item_type = 1;
optional uint32 num_skipped = 2;
optional string time = 3;
optional string source = 4;
optional string log = 5;
optional bytes node_id = 6;
optional bytes data = 7;
}
message ListfundsRequest {
optional bool spent = 1;
}
message ListfundsResponse {
repeated ListfundsOutputs outputs = 1;
repeated ListfundsChannels channels = 2;
}
message ListfundsOutputs {
// ListFunds.outputs[].status
enum ListfundsOutputsStatus {
UNCONFIRMED = 0;
CONFIRMED = 1;
SPENT = 2;
IMMATURE = 3;
}
bytes txid = 1;
uint32 output = 2;
Amount amount_msat = 3;
bytes scriptpubkey = 4;
optional string address = 5;
optional bytes redeemscript = 6;
ListfundsOutputsStatus status = 7;
optional uint32 blockheight = 8;
bool reserved = 9;
optional uint32 reserved_to_block = 10;
}
message ListfundsChannels {
bytes peer_id = 1;
Amount our_amount_msat = 2;
Amount amount_msat = 3;
bytes funding_txid = 4;
uint32 funding_output = 5;
bool connected = 6;
ChannelState state = 7;
optional string short_channel_id = 8;
optional bytes channel_id = 9;
}
message SendpayRequest {
repeated SendpayRoute route = 1;
bytes payment_hash = 2;
optional string label = 3;
optional string bolt11 = 5;
optional bytes payment_secret = 6;
optional uint64 partid = 7;
optional uint64 groupid = 9;
optional Amount amount_msat = 10;
optional bytes localinvreqid = 11;
optional bytes payment_metadata = 12;
optional string description = 13;
}
message SendpayResponse {
// SendPay.status
enum SendpayStatus {
PENDING = 0;
COMPLETE = 1;
}
uint64 id = 1;
optional uint64 groupid = 2;
bytes payment_hash = 3;
SendpayStatus status = 4;
optional Amount amount_msat = 5;
optional bytes destination = 6;
uint64 created_at = 7;
Amount amount_sent_msat = 8;
optional string label = 9;
optional uint64 partid = 10;
optional string bolt11 = 11;
optional string bolt12 = 12;
optional bytes payment_preimage = 13;
optional string message = 14;
optional uint64 completed_at = 15;
optional uint64 created_index = 16;
optional uint64 updated_index = 17;
}
message SendpayRoute {
bytes id = 2;
uint32 delay = 3;
string channel = 4;
Amount amount_msat = 5;
}
message ListchannelsRequest {
optional string short_channel_id = 1;
optional bytes source = 2;
optional bytes destination = 3;
}
message ListchannelsResponse {
repeated ListchannelsChannels channels = 1;
}
message ListchannelsChannels {
bytes source = 1;
bytes destination = 2;
string short_channel_id = 3;
bool public = 4;
Amount amount_msat = 5;
uint32 message_flags = 6;
uint32 channel_flags = 7;
bool active = 8;
uint32 last_update = 9;
uint32 base_fee_millisatoshi = 10;
uint32 fee_per_millionth = 11;
uint32 delay = 12;
Amount htlc_minimum_msat = 13;
optional Amount htlc_maximum_msat = 14;
bytes features = 15;
uint32 direction = 16;
}
message AddgossipRequest {
bytes message = 1;
}
message AddgossipResponse {
}
message AutocleaninvoiceRequest {
optional uint64 expired_by = 1;
optional uint64 cycle_seconds = 2;
}
message AutocleaninvoiceResponse {
bool enabled = 1;
optional uint64 expired_by = 2;
optional uint64 cycle_seconds = 3;
}
message AutocleanonceRequest {
AutocleanSubsystem subsystem = 1;
uint64 age = 2;
}
message AutocleanonceResponse {
AutocleanonceAutoclean autoclean = 1;
}
message AutocleanonceAutoclean {
optional AutocleanonceAutocleanSucceededforwards succeededforwards = 1;
optional AutocleanonceAutocleanFailedforwards failedforwards = 2;
optional AutocleanonceAutocleanSucceededpays succeededpays = 3;
optional AutocleanonceAutocleanFailedpays failedpays = 4;
optional AutocleanonceAutocleanPaidinvoices paidinvoices = 5;
optional AutocleanonceAutocleanExpiredinvoices expiredinvoices = 6;
}
message AutocleanonceAutocleanSucceededforwards {
uint64 cleaned = 1;
uint64 uncleaned = 2;
}
message AutocleanonceAutocleanFailedforwards {
uint64 cleaned = 1;
uint64 uncleaned = 2;
}
message AutocleanonceAutocleanSucceededpays {
uint64 cleaned = 1;
uint64 uncleaned = 2;
}
message AutocleanonceAutocleanFailedpays {
uint64 cleaned = 1;
uint64 uncleaned = 2;
}
message AutocleanonceAutocleanPaidinvoices {
uint64 cleaned = 1;
uint64 uncleaned = 2;
}
message AutocleanonceAutocleanExpiredinvoices {
uint64 cleaned = 1;
uint64 uncleaned = 2;
}
message AutocleanstatusRequest {
optional AutocleanSubsystem subsystem = 1;
}
message AutocleanstatusResponse {
AutocleanstatusAutoclean autoclean = 1;
}
message AutocleanstatusAutoclean {
optional AutocleanstatusAutocleanSucceededforwards succeededforwards = 1;
optional AutocleanstatusAutocleanFailedforwards failedforwards = 2;
optional AutocleanstatusAutocleanSucceededpays succeededpays = 3;
optional AutocleanstatusAutocleanFailedpays failedpays = 4;
optional AutocleanstatusAutocleanPaidinvoices paidinvoices = 5;
optional AutocleanstatusAutocleanExpiredinvoices expiredinvoices = 6;
}
message AutocleanstatusAutocleanSucceededforwards {
bool enabled = 1;
uint64 cleaned = 2;
optional uint64 age = 3;
}
message AutocleanstatusAutocleanFailedforwards {
bool enabled = 1;
uint64 cleaned = 2;
optional uint64 age = 3;
}
message AutocleanstatusAutocleanSucceededpays {
bool enabled = 1;
uint64 cleaned = 2;
optional uint64 age = 3;
}
message AutocleanstatusAutocleanFailedpays {
bool enabled = 1;
uint64 cleaned = 2;
optional uint64 age = 3;
}
message AutocleanstatusAutocleanPaidinvoices {
bool enabled = 1;
uint64 cleaned = 2;
optional uint64 age = 3;
}
message AutocleanstatusAutocleanExpiredinvoices {
bool enabled = 1;
uint64 cleaned = 2;
optional uint64 age = 3;
}
message CheckmessageRequest {
string message = 1;
string zbase = 2;
optional bytes pubkey = 3;
}
message CheckmessageResponse {
bool verified = 1;
bytes pubkey = 2;
}
message CloseRequest {
string id = 1;
optional uint32 unilateraltimeout = 2;
optional string destination = 3;
optional string fee_negotiation_step = 4;
optional Outpoint wrong_funding = 5;
optional bool force_lease_closed = 6;
repeated Feerate feerange = 7;
}
message CloseResponse {
// Close.type
enum CloseType {
MUTUAL = 0;
UNILATERAL = 1;
UNOPENED = 2;
}
CloseType item_type = 1;
optional bytes tx = 2;
optional bytes txid = 3;
}
message ConnectRequest {
string id = 1;
optional string host = 2;
optional uint32 port = 3;
}
message ConnectResponse {
// Connect.direction
enum ConnectDirection {
IN = 0;
OUT = 1;
}
bytes id = 1;
bytes features = 2;
ConnectDirection direction = 3;
ConnectAddress address = 4;
}
message ConnectAddress {
// Connect.address.type
enum ConnectAddressType {
LOCAL_SOCKET = 0;
IPV4 = 1;
IPV6 = 2;
TORV2 = 3;
TORV3 = 4;
}
ConnectAddressType item_type = 1;
optional string socket = 2;
optional string address = 3;
optional uint32 port = 4;
}
message CreateinvoiceRequest {
string invstring = 1;
string label = 2;
bytes preimage = 3;
}
message CreateinvoiceResponse {
// CreateInvoice.status
enum CreateinvoiceStatus {
PAID = 0;
EXPIRED = 1;
UNPAID = 2;
}
string label = 1;
optional string bolt11 = 2;
optional string bolt12 = 3;
bytes payment_hash = 4;
optional Amount amount_msat = 5;
CreateinvoiceStatus status = 6;
string description = 7;
uint64 expires_at = 8;
optional uint64 pay_index = 9;
optional Amount amount_received_msat = 10;
optional uint64 paid_at = 11;
optional bytes payment_preimage = 12;
optional bytes local_offer_id = 13;
optional string invreq_payer_note = 15;
optional uint64 created_index = 16;
optional CreateinvoicePaid_outpoint paid_outpoint = 17;
}
message CreateinvoicePaid_outpoint {
optional bytes txid = 1;
optional uint32 outnum = 2;
}
message DatastoreRequest {
// Datastore.mode
enum DatastoreMode {
MUST_CREATE = 0;
MUST_REPLACE = 1;
CREATE_OR_REPLACE = 2;
MUST_APPEND = 3;
CREATE_OR_APPEND = 4;
}
optional bytes hex = 2;
optional DatastoreMode mode = 3;
optional uint64 generation = 4;
repeated string key = 5;
optional string string = 6;
}
message DatastoreResponse {
optional uint64 generation = 2;
optional bytes hex = 3;
optional string string = 4;
repeated string key = 5;
}
message DatastoreusageRequest {
repeated string key = 1;
}
message DatastoreusageResponse {
optional DatastoreusageDatastoreusage datastoreusage = 1;
}
message DatastoreusageDatastoreusage {
optional string key = 1;
optional uint64 total_bytes = 2;
}
message CreateonionRequest {
repeated CreateonionHops hops = 1;
bytes assocdata = 2;
optional bytes session_key = 3;
optional uint32 onion_size = 4;
}
message CreateonionResponse {
bytes onion = 1;
repeated bytes shared_secrets = 2;
}
message CreateonionHops {
bytes pubkey = 1;
bytes payload = 2;
}
message DeldatastoreRequest {
optional uint64 generation = 2;
repeated string key = 3;
}
message DeldatastoreResponse {
optional uint64 generation = 2;
optional bytes hex = 3;
optional string string = 4;
repeated string key = 5;
}
message DelinvoiceRequest {
// DelInvoice.status
enum DelinvoiceStatus {
PAID = 0;
EXPIRED = 1;
UNPAID = 2;
}
string label = 1;
DelinvoiceStatus status = 2;
optional bool desconly = 3;
}
message DelinvoiceResponse {
// DelInvoice.status
enum DelinvoiceStatus {
PAID = 0;
EXPIRED = 1;
UNPAID = 2;
}
string label = 1;
optional string bolt11 = 2;
optional string bolt12 = 3;
optional Amount amount_msat = 4;
optional string description = 5;
bytes payment_hash = 6;
DelinvoiceStatus status = 7;
uint64 expires_at = 8;
optional bytes local_offer_id = 9;
optional string invreq_payer_note = 11;
optional uint64 created_index = 12;
optional uint64 updated_index = 13;
optional uint64 pay_index = 14;
optional Amount amount_received_msat = 15;
optional uint64 paid_at = 16;
optional bytes payment_preimage = 17;
}
message InvoiceRequest {
string description = 2;
string label = 3;
repeated string fallbacks = 4;
optional bytes preimage = 5;
optional uint32 cltv = 6;
optional uint64 expiry = 7;
optional bool deschashonly = 9;
AmountOrAny amount_msat = 10;
}
message InvoiceResponse {
string bolt11 = 1;
bytes payment_hash = 2;
bytes payment_secret = 3;
uint64 expires_at = 4;
optional string warning_capacity = 5;
optional string warning_offline = 6;
optional string warning_deadends = 7;
optional string warning_private_unused = 8;
optional string warning_mpp = 9;
optional uint64 created_index = 10;
}
message ListdatastoreRequest {
repeated string key = 2;
}
message ListdatastoreResponse {
repeated ListdatastoreDatastore datastore = 1;
}
message ListdatastoreDatastore {
repeated string key = 1;
optional uint64 generation = 2;
optional bytes hex = 3;
optional string string = 4;
}
message ListinvoicesRequest {
// ListInvoices.index
enum ListinvoicesIndex {
CREATED = 0;
UPDATED = 1;
}
optional string label = 1;
optional string invstring = 2;
optional bytes payment_hash = 3;
optional string offer_id = 4;
optional ListinvoicesIndex index = 5;
optional uint64 start = 6;
optional uint32 limit = 7;
}
message ListinvoicesResponse {
repeated ListinvoicesInvoices invoices = 1;
}
message ListinvoicesInvoices {
// ListInvoices.invoices[].status
enum ListinvoicesInvoicesStatus {
UNPAID = 0;
PAID = 1;
EXPIRED = 2;
}
string label = 1;
optional string description = 2;
bytes payment_hash = 3;
ListinvoicesInvoicesStatus status = 4;
uint64 expires_at = 5;
optional Amount amount_msat = 6;
optional string bolt11 = 7;
optional string bolt12 = 8;
optional bytes local_offer_id = 9;
optional uint64 pay_index = 11;
optional Amount amount_received_msat = 12;
optional uint64 paid_at = 13;
optional bytes payment_preimage = 14;
optional string invreq_payer_note = 15;
optional uint64 created_index = 16;
optional uint64 updated_index = 17;
optional ListinvoicesInvoicesPaid_outpoint paid_outpoint = 18;
}
message ListinvoicesInvoicesPaid_outpoint {
optional bytes txid = 1;
optional uint32 outnum = 2;
}
message SendonionRequest {
bytes onion = 1;
SendonionFirst_hop first_hop = 2;
bytes payment_hash = 3;
optional string label = 4;
repeated bytes shared_secrets = 5;
optional uint32 partid = 6;
optional string bolt11 = 7;
optional bytes destination = 9;
optional uint64 groupid = 11;
optional Amount amount_msat = 12;
optional bytes localinvreqid = 13;
optional string description = 14;
}
message SendonionResponse {
// SendOnion.status
enum SendonionStatus {
PENDING = 0;
COMPLETE = 1;
}
uint64 id = 1;
bytes payment_hash = 2;
SendonionStatus status = 3;
optional Amount amount_msat = 4;
optional bytes destination = 5;
uint64 created_at = 6;
Amount amount_sent_msat = 7;
optional string label = 8;
optional string bolt11 = 9;
optional string bolt12 = 10;
optional bytes payment_preimage = 11;
optional string message = 12;
optional uint64 partid = 13;
optional uint64 created_index = 14;
optional uint64 updated_index = 15;
}
message SendonionFirst_hop {
bytes id = 1;
Amount amount_msat = 2;
uint32 delay = 3;
}
message ListsendpaysRequest {
// ListSendPays.status
enum ListsendpaysStatus {
PENDING = 0;
COMPLETE = 1;
FAILED = 2;
}
// ListSendPays.index
enum ListsendpaysIndex {
CREATED = 0;
UPDATED = 1;
}
optional string bolt11 = 1;
optional bytes payment_hash = 2;
optional ListsendpaysStatus status = 3;
optional ListsendpaysIndex index = 4;
optional uint64 start = 5;
optional uint32 limit = 6;
}
message ListsendpaysResponse {
repeated ListsendpaysPayments payments = 1;
}
message ListsendpaysPayments {
// ListSendPays.payments[].status
enum ListsendpaysPaymentsStatus {
PENDING = 0;
FAILED = 1;
COMPLETE = 2;
}
uint64 id = 1;
uint64 groupid = 2;
bytes payment_hash = 3;
ListsendpaysPaymentsStatus status = 4;
optional Amount amount_msat = 5;
optional bytes destination = 6;
uint64 created_at = 7;
Amount amount_sent_msat = 8;
optional string label = 9;
optional string bolt11 = 10;
optional string bolt12 = 11;
optional bytes payment_preimage = 12;
optional bytes erroronion = 13;
optional string description = 14;
optional uint64 partid = 15;
optional uint64 created_index = 16;
optional uint64 updated_index = 17;
optional uint64 completed_at = 18;
}
message ListtransactionsRequest {
}
message ListtransactionsResponse {
repeated ListtransactionsTransactions transactions = 1;
}
message ListtransactionsTransactions {
bytes hash = 1;
bytes rawtx = 2;
uint32 blockheight = 3;
uint32 txindex = 4;
uint32 locktime = 7;
uint32 version = 8;
repeated ListtransactionsTransactionsInputs inputs = 9;
repeated ListtransactionsTransactionsOutputs outputs = 10;
}
message ListtransactionsTransactionsInputs {
bytes txid = 1;
uint32 index = 2;
uint32 sequence = 3;
}
message ListtransactionsTransactionsOutputs {
uint32 index = 1;
bytes scriptPubKey = 3;
Amount amount_msat = 6;
}
message PayRequest {
string bolt11 = 1;
optional string label = 3;
optional double maxfeepercent = 4;
optional uint32 retry_for = 5;
optional uint32 maxdelay = 6;
optional Amount exemptfee = 7;
optional double riskfactor = 8;
repeated string exclude = 10;
optional Amount maxfee = 11;
optional string description = 12;
optional Amount amount_msat = 13;
optional bytes localinvreqid = 14;
optional Amount partial_msat = 15;
}
message PayResponse {
// Pay.status
enum PayStatus {
COMPLETE = 0;
PENDING = 1;
FAILED = 2;
}
bytes payment_preimage = 1;
optional bytes destination = 2;
bytes payment_hash = 3;
double created_at = 4;
uint32 parts = 5;
Amount amount_msat = 6;
Amount amount_sent_msat = 7;
optional string warning_partial_completion = 8;
PayStatus status = 9;
}
message ListnodesRequest {
optional bytes id = 1;
}
message ListnodesResponse {
repeated ListnodesNodes nodes = 1;
}
message ListnodesNodes {
bytes nodeid = 1;
optional uint32 last_timestamp = 2;
optional string alias = 3;
optional bytes color = 4;
optional bytes features = 5;
repeated ListnodesNodesAddresses addresses = 6;
optional ListnodesNodesOption_will_fund option_will_fund = 7;
}
message ListnodesNodesOption_will_fund {
Amount lease_fee_base_msat = 1;
uint32 lease_fee_basis = 2;
uint32 funding_weight = 3;
Amount channel_fee_max_base_msat = 4;
uint32 channel_fee_max_proportional_thousandths = 5;
bytes compact_lease = 6;
}
message ListnodesNodesAddresses {
// ListNodes.nodes[].addresses[].type
enum ListnodesNodesAddressesType {
DNS = 0;
IPV4 = 1;
IPV6 = 2;
TORV2 = 3;
TORV3 = 4;
}
ListnodesNodesAddressesType item_type = 1;
uint32 port = 2;
optional string address = 3;
}
message WaitanyinvoiceRequest {
optional uint64 lastpay_index = 1;
optional uint64 timeout = 2;
}
message WaitanyinvoiceResponse {
// WaitAnyInvoice.status
enum WaitanyinvoiceStatus {
PAID = 0;
EXPIRED = 1;
}
string label = 1;
string description = 2;
bytes payment_hash = 3;
WaitanyinvoiceStatus status = 4;
uint64 expires_at = 5;
optional Amount amount_msat = 6;
optional string bolt11 = 7;
optional string bolt12 = 8;
optional uint64 pay_index = 9;
optional Amount amount_received_msat = 10;
optional uint64 paid_at = 11;
optional bytes payment_preimage = 12;
optional uint64 created_index = 13;
optional uint64 updated_index = 14;
optional WaitanyinvoicePaid_outpoint paid_outpoint = 15;
}
message WaitanyinvoicePaid_outpoint {
optional bytes txid = 1;
optional uint32 outnum = 2;
}
message WaitinvoiceRequest {
string label = 1;
}
message WaitinvoiceResponse {
// WaitInvoice.status
enum WaitinvoiceStatus {
PAID = 0;
EXPIRED = 1;
}
string label = 1;
string description = 2;
bytes payment_hash = 3;
WaitinvoiceStatus status = 4;
uint64 expires_at = 5;
optional Amount amount_msat = 6;
optional string bolt11 = 7;
optional string bolt12 = 8;
optional uint64 pay_index = 9;
optional Amount amount_received_msat = 10;
optional uint64 paid_at = 11;
optional bytes payment_preimage = 12;
optional uint64 created_index = 13;
optional uint64 updated_index = 14;
optional WaitinvoicePaid_outpoint paid_outpoint = 15;
}