lightning_network 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/lightning_network.rb +4 -0
- data/lib/node.rb +2 -2
- data/lib/rpc.proto +281 -40
- data/lib/rpc_pb.rb +69 -11
- data/lib/rpc_services_pb.rb +47 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d8fab151e1b804895dc0efb60a02ecf32f5f2f3
|
4
|
+
data.tar.gz: 51e4c37e939f67a73a8ea3beda14a8ae78d214ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f12e2ba30419840ca9b20f166b268a73a8a4e50d02b8c7579392288300ea021b4e6ccaea12fda7934f311654c323c444a7d9271729b87d8606a49f361aa614d4
|
7
|
+
data.tar.gz: 3dd327f4c24def6808fcc1b3d11756ec6312827b384b74b4d707f912a45f1469d81c4ac6d2114ba3948a371970ce26d0fc0aa220ca747ff2040d332613b4f1a7
|
data/lib/lightning_network.rb
CHANGED
data/lib/node.rb
CHANGED
data/lib/rpc.proto
CHANGED
@@ -3,6 +3,9 @@ syntax = "proto3";
|
|
3
3
|
import "google/api/annotations.proto";
|
4
4
|
|
5
5
|
package lnrpc;
|
6
|
+
|
7
|
+
option go_package = "github.com/lightningnetwork/lnd/lnrpc";
|
8
|
+
|
6
9
|
/**
|
7
10
|
* Comments in this file will be directly parsed into the API
|
8
11
|
* Documentation as descriptions of the associated method, message, or field.
|
@@ -22,7 +25,7 @@ package lnrpc;
|
|
22
25
|
*
|
23
26
|
* More information on how exactly the gRPC documentation is generated from
|
24
27
|
* this proto file can be found here:
|
25
|
-
* https://github.com/
|
28
|
+
* https://github.com/lightninglabs/lightning-api
|
26
29
|
*/
|
27
30
|
|
28
31
|
// The WalletUnlocker service is used to set up a wallet password for
|
@@ -231,6 +234,16 @@ service Lightning {
|
|
231
234
|
};
|
232
235
|
}
|
233
236
|
|
237
|
+
/** lncli: `listunspent`
|
238
|
+
ListUnspent returns a list of all utxos spendable by the wallet with a
|
239
|
+
number of confirmations between the specified minimum and maximum.
|
240
|
+
*/
|
241
|
+
rpc ListUnspent (ListUnspentRequest) returns (ListUnspentResponse) {
|
242
|
+
option (google.api.http) = {
|
243
|
+
get: "/v1/utxos"
|
244
|
+
};
|
245
|
+
}
|
246
|
+
|
234
247
|
/**
|
235
248
|
SubscribeTransactions creates a uni-directional stream from the server to
|
236
249
|
the client in which any newly discovered transactions relevant to the
|
@@ -249,12 +262,7 @@ service Lightning {
|
|
249
262
|
/** lncli: `newaddress`
|
250
263
|
NewAddress creates a new address under control of the local wallet.
|
251
264
|
*/
|
252
|
-
rpc NewAddress (NewAddressRequest) returns (NewAddressResponse)
|
253
|
-
|
254
|
-
/**
|
255
|
-
NewWitnessAddress creates a new witness address under control of the local wallet.
|
256
|
-
*/
|
257
|
-
rpc NewWitnessAddress (NewWitnessAddressRequest) returns (NewAddressResponse) {
|
265
|
+
rpc NewAddress (NewAddressRequest) returns (NewAddressResponse) {
|
258
266
|
option (google.api.http) = {
|
259
267
|
get: "/v1/newaddress"
|
260
268
|
};
|
@@ -265,7 +273,12 @@ service Lightning {
|
|
265
273
|
signature string is `zbase32` encoded and pubkey recoverable, meaning that
|
266
274
|
only the message digest and signature are needed for verification.
|
267
275
|
*/
|
268
|
-
rpc SignMessage (SignMessageRequest) returns (SignMessageResponse)
|
276
|
+
rpc SignMessage (SignMessageRequest) returns (SignMessageResponse) {
|
277
|
+
option (google.api.http) = {
|
278
|
+
post: "/v1/signmessage"
|
279
|
+
body: "*"
|
280
|
+
};
|
281
|
+
}
|
269
282
|
|
270
283
|
/** lncli: `verifymessage`
|
271
284
|
VerifyMessage verifies a signature over a msg. The signature must be
|
@@ -273,7 +286,12 @@ service Lightning {
|
|
273
286
|
channel database. In addition to returning the validity of the signature,
|
274
287
|
VerifyMessage also returns the recovered pubkey from the signature.
|
275
288
|
*/
|
276
|
-
rpc VerifyMessage (VerifyMessageRequest) returns (VerifyMessageResponse)
|
289
|
+
rpc VerifyMessage (VerifyMessageRequest) returns (VerifyMessageResponse) {
|
290
|
+
option (google.api.http) = {
|
291
|
+
post: "/v1/verifymessage"
|
292
|
+
body: "*"
|
293
|
+
};
|
294
|
+
}
|
277
295
|
|
278
296
|
/** lncli: `connect`
|
279
297
|
ConnectPeer attempts to establish a connection to a remote peer. This is at
|
@@ -389,6 +407,19 @@ service Lightning {
|
|
389
407
|
};
|
390
408
|
}
|
391
409
|
|
410
|
+
/** lncli: `abandonchannel`
|
411
|
+
AbandonChannel removes all channel state from the database except for a
|
412
|
+
close summary. This method can be used to get rid of permanently unusable
|
413
|
+
channels due to bugs fixed in newer versions of lnd. Only available
|
414
|
+
when in debug builds of lnd.
|
415
|
+
*/
|
416
|
+
rpc AbandonChannel (AbandonChannelRequest) returns (AbandonChannelResponse) {
|
417
|
+
option (google.api.http) = {
|
418
|
+
delete: "/v1/channels/abandon/{channel_point.funding_txid_str}/{channel_point.output_index}"
|
419
|
+
};
|
420
|
+
}
|
421
|
+
|
422
|
+
|
392
423
|
/** lncli: `sendpayment`
|
393
424
|
SendPayment dispatches a bi-directional streaming RPC for sending payments
|
394
425
|
through the Lightning Network. A single RPC invocation creates a persistent
|
@@ -443,7 +474,12 @@ service Lightning {
|
|
443
474
|
|
444
475
|
/** lncli: `listinvoices`
|
445
476
|
ListInvoices returns a list of all the invoices currently stored within the
|
446
|
-
database. Any active debug invoices are ignored.
|
477
|
+
database. Any active debug invoices are ignored. It has full support for
|
478
|
+
paginated responses, allowing users to query for specific invoices through
|
479
|
+
their add_index. This can be done by using either the first_index_offset or
|
480
|
+
last_index_offset fields included in the response as the index_offset of the
|
481
|
+
next request. By default, the first 100 invoices created will be returned.
|
482
|
+
Backwards pagination is also supported through the Reversed flag.
|
447
483
|
*/
|
448
484
|
rpc ListInvoices (ListInvoiceRequest) returns (ListInvoiceResponse) {
|
449
485
|
option (google.api.http) = {
|
@@ -463,8 +499,15 @@ service Lightning {
|
|
463
499
|
}
|
464
500
|
|
465
501
|
/**
|
466
|
-
SubscribeInvoices returns a uni-directional stream (
|
467
|
-
notifying the client of newly added/settled invoices.
|
502
|
+
SubscribeInvoices returns a uni-directional stream (server -> client) for
|
503
|
+
notifying the client of newly added/settled invoices. The caller can
|
504
|
+
optionally specify the add_index and/or the settle_index. If the add_index
|
505
|
+
is specified, then we'll first start by sending add invoice events for all
|
506
|
+
invoices with an add_index greater than the specified value. If the
|
507
|
+
settle_index is specified, the next, we'll send out all settle events for
|
508
|
+
invoices with a settle_index greater than the specified value. One or both
|
509
|
+
of these fields can be set. If no fields are set, then we'll only send out
|
510
|
+
the latest add/settle events.
|
468
511
|
*/
|
469
512
|
rpc SubscribeInvoices (InvoiceSubscription) returns (stream Invoice) {
|
470
513
|
option (google.api.http) = {
|
@@ -625,11 +668,33 @@ service Lightning {
|
|
625
668
|
};
|
626
669
|
}
|
627
670
|
|
671
|
+
message Utxo {
|
672
|
+
/// The type of address
|
673
|
+
AddressType type = 1 [json_name = "address_type"];
|
674
|
+
|
675
|
+
/// The address
|
676
|
+
string address = 2 [json_name = "address"];
|
677
|
+
|
678
|
+
/// The value of the unspent coin in satoshis
|
679
|
+
int64 amount_sat = 3 [json_name = "amount_sat"];
|
680
|
+
|
681
|
+
/// The scriptpubkey in hex
|
682
|
+
string script_pubkey = 4 [json_name = "script_pubkey"];
|
683
|
+
|
684
|
+
/// The outpoint in format txid:n
|
685
|
+
/// Note that this reuses the `ChannelPoint` message but
|
686
|
+
/// is not actually a channel related outpoint, of course
|
687
|
+
ChannelPoint outpoint = 5 [json_name = "outpoint"];
|
688
|
+
|
689
|
+
/// The number of confirmations for the Utxo
|
690
|
+
int64 confirmations = 6 [json_name = "confirmations"];
|
691
|
+
}
|
692
|
+
|
628
693
|
message Transaction {
|
629
694
|
/// The transaction hash
|
630
695
|
string tx_hash = 1 [ json_name = "tx_hash" ];
|
631
696
|
|
632
|
-
/// The transaction
|
697
|
+
/// The transaction amount, denominated in satoshis
|
633
698
|
int64 amount = 2 [ json_name = "amount" ];
|
634
699
|
|
635
700
|
/// The number of confirmations
|
@@ -708,6 +773,7 @@ message SendResponse {
|
|
708
773
|
string payment_error = 1 [json_name = "payment_error"];
|
709
774
|
bytes payment_preimage = 2 [json_name = "payment_preimage"];
|
710
775
|
Route payment_route = 3 [json_name = "payment_route"];
|
776
|
+
bytes payment_hash = 4 [json_name = "payment_hash"];
|
711
777
|
}
|
712
778
|
|
713
779
|
message SendToRouteRequest {
|
@@ -769,32 +835,47 @@ message SendCoinsRequest {
|
|
769
835
|
|
770
836
|
/// A manual fee rate set in sat/byte that should be used when crafting the transaction.
|
771
837
|
int64 sat_per_byte = 5;
|
838
|
+
|
839
|
+
/**
|
840
|
+
If set, then the amount field will be ignored, and lnd will attempt to
|
841
|
+
send all the coins under control of the internal wallet to the specified
|
842
|
+
address.
|
843
|
+
*/
|
844
|
+
bool send_all = 6;
|
772
845
|
}
|
773
846
|
message SendCoinsResponse {
|
774
847
|
/// The transaction ID of the transaction
|
775
848
|
string txid = 1 [json_name = "txid"];
|
776
849
|
}
|
777
850
|
|
851
|
+
message ListUnspentRequest {
|
852
|
+
/// The minimum number of confirmations to be included.
|
853
|
+
int32 min_confs = 1;
|
854
|
+
|
855
|
+
/// The maximum number of confirmations to be included.
|
856
|
+
int32 max_confs = 2;
|
857
|
+
}
|
858
|
+
message ListUnspentResponse {
|
859
|
+
/// A list of utxos
|
860
|
+
repeated Utxo utxos = 1 [json_name = "utxos"];
|
861
|
+
|
862
|
+
}
|
863
|
+
|
778
864
|
/**
|
779
865
|
`AddressType` has to be one of:
|
780
866
|
|
781
867
|
- `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0)
|
782
868
|
- `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1)
|
783
|
-
- `p2pkh`: Pay to public key hash (`PUBKEY_HASH` = 2)
|
784
869
|
*/
|
785
|
-
|
786
|
-
enum AddressType {
|
870
|
+
enum AddressType {
|
787
871
|
WITNESS_PUBKEY_HASH = 0;
|
788
872
|
NESTED_PUBKEY_HASH = 1;
|
789
|
-
|
873
|
+
}
|
790
874
|
|
875
|
+
message NewAddressRequest {
|
791
876
|
/// The address type
|
792
877
|
AddressType type = 1;
|
793
878
|
}
|
794
|
-
|
795
|
-
message NewWitnessAddressRequest {
|
796
|
-
}
|
797
|
-
|
798
879
|
message NewAddressResponse {
|
799
880
|
/// The newly generated wallet address
|
800
881
|
string address = 1 [json_name = "address"];
|
@@ -927,8 +1008,11 @@ message Channel {
|
|
927
1008
|
*/
|
928
1009
|
uint32 csv_delay = 16 [json_name = "csv_delay"];
|
929
1010
|
|
930
|
-
/// Whether this channel is advertised to the network or not
|
1011
|
+
/// Whether this channel is advertised to the network or not.
|
931
1012
|
bool private = 17 [json_name = "private"];
|
1013
|
+
|
1014
|
+
/// True if we were the ones that creted the channel.
|
1015
|
+
bool initiator = 18 [json_name = "initiator"];
|
932
1016
|
}
|
933
1017
|
|
934
1018
|
|
@@ -977,6 +1061,7 @@ message ChannelCloseSummary {
|
|
977
1061
|
REMOTE_FORCE_CLOSE = 2;
|
978
1062
|
BREACH_CLOSE = 3;
|
979
1063
|
FUNDING_CANCELED = 4;
|
1064
|
+
ABANDONED = 5;
|
980
1065
|
}
|
981
1066
|
|
982
1067
|
/// Details on how the channel was closed.
|
@@ -989,6 +1074,7 @@ message ClosedChannelsRequest {
|
|
989
1074
|
bool remote_force = 3;
|
990
1075
|
bool breach = 4;
|
991
1076
|
bool funding_canceled = 5;
|
1077
|
+
bool abandoned = 6;
|
992
1078
|
}
|
993
1079
|
|
994
1080
|
message ClosedChannelsResponse {
|
@@ -1056,11 +1142,13 @@ message GetInfoResponse {
|
|
1056
1142
|
/// Whether the wallet's view is synced to the main chain
|
1057
1143
|
bool synced_to_chain = 9 [json_name = "synced_to_chain"];
|
1058
1144
|
|
1059
|
-
|
1060
|
-
|
1145
|
+
/**
|
1146
|
+
Whether the current node is connected to testnet. This field is
|
1147
|
+
deprecated and the network field should be used instead
|
1148
|
+
**/
|
1149
|
+
bool testnet = 10 [json_name = "testnet", deprecated = true];
|
1061
1150
|
|
1062
|
-
|
1063
|
-
repeated string chains = 11 [json_name = "chains"];
|
1151
|
+
reserved 11;
|
1064
1152
|
|
1065
1153
|
/// The URIs of the current node.
|
1066
1154
|
repeated string uris = 12 [json_name = "uris"];
|
@@ -1071,6 +1159,19 @@ message GetInfoResponse {
|
|
1071
1159
|
/// The version of the LND software that the node is running.
|
1072
1160
|
string version = 14 [ json_name = "version" ];
|
1073
1161
|
|
1162
|
+
/// Number of inactive channels
|
1163
|
+
uint32 num_inactive_channels = 15 [json_name = "num_inactive_channels"];
|
1164
|
+
|
1165
|
+
/// A list of active chains the node is connected to
|
1166
|
+
repeated Chain chains = 16 [json_name = "chains"];
|
1167
|
+
}
|
1168
|
+
|
1169
|
+
message Chain {
|
1170
|
+
/// The blockchain the node is on (eg bitcoin, litecoin)
|
1171
|
+
string chain = 1 [json_name = "chain"];
|
1172
|
+
|
1173
|
+
/// The network the node is on (eg regtest, testnet, mainnet)
|
1174
|
+
string network = 2 [json_name = "network"];
|
1074
1175
|
}
|
1075
1176
|
|
1076
1177
|
message ConfirmationUpdate {
|
@@ -1111,7 +1212,6 @@ message CloseChannelRequest {
|
|
1111
1212
|
message CloseStatusUpdate {
|
1112
1213
|
oneof update {
|
1113
1214
|
PendingUpdate close_pending = 1 [json_name = "close_pending"];
|
1114
|
-
ConfirmationUpdate confirmation = 2 [json_name = "confirmation"];
|
1115
1215
|
ChannelCloseUpdate chan_close = 3 [json_name = "chan_close"];
|
1116
1216
|
}
|
1117
1217
|
}
|
@@ -1122,11 +1222,10 @@ message PendingUpdate {
|
|
1122
1222
|
}
|
1123
1223
|
|
1124
1224
|
message OpenChannelRequest {
|
1125
|
-
|
1126
1225
|
/// The pubkey of the node to open a channel with
|
1127
1226
|
bytes node_pubkey = 2 [json_name = "node_pubkey"];
|
1128
1227
|
|
1129
|
-
/// The hex encoded pubkey of the node to open a channel with
|
1228
|
+
/// The hex encoded pubkey of the node to open a channel with
|
1130
1229
|
string node_pubkey_string = 3 [json_name = "node_pubkey_string"];
|
1131
1230
|
|
1132
1231
|
/// The number of satoshis the wallet should commit to the channel
|
@@ -1149,11 +1248,16 @@ message OpenChannelRequest {
|
|
1149
1248
|
|
1150
1249
|
/// The delay we require on the remote's commitment transaction. If this is not set, it will be scaled automatically with the channel size.
|
1151
1250
|
uint32 remote_csv_delay = 10 [json_name = "remote_csv_delay"];
|
1251
|
+
|
1252
|
+
/// The minimum number of confirmations each one of your outputs used for the funding transaction must satisfy.
|
1253
|
+
int32 min_confs = 11 [json_name = "min_confs"];
|
1254
|
+
|
1255
|
+
/// Whether unconfirmed outputs should be used as inputs for the funding transaction.
|
1256
|
+
bool spend_unconfirmed = 12 [json_name = "spend_unconfirmed"];
|
1152
1257
|
}
|
1153
1258
|
message OpenStatusUpdate {
|
1154
1259
|
oneof update {
|
1155
1260
|
PendingUpdate chan_pending = 1 [json_name = "chan_pending"];
|
1156
|
-
ConfirmationUpdate confirmation = 2 [json_name = "confirmation"];
|
1157
1261
|
ChannelOpenUpdate chan_open = 3 [json_name = "chan_open"];
|
1158
1262
|
}
|
1159
1263
|
}
|
@@ -1341,6 +1445,12 @@ message Hop {
|
|
1341
1445
|
uint32 expiry = 5 [json_name = "expiry"];
|
1342
1446
|
int64 amt_to_forward_msat = 6 [json_name = "amt_to_forward_msat"];
|
1343
1447
|
int64 fee_msat = 7 [json_name = "fee_msat"];
|
1448
|
+
|
1449
|
+
/**
|
1450
|
+
An optional public key of the hop. If the public key is given, the payment
|
1451
|
+
can be executed without relying on a copy of the channel graph.
|
1452
|
+
*/
|
1453
|
+
string pub_key = 8 [json_name = "pub_key"];
|
1344
1454
|
}
|
1345
1455
|
|
1346
1456
|
/**
|
@@ -1435,6 +1545,7 @@ message RoutingPolicy {
|
|
1435
1545
|
int64 min_htlc = 2 [json_name = "min_htlc"];
|
1436
1546
|
int64 fee_base_msat = 3 [json_name = "fee_base_msat"];
|
1437
1547
|
int64 fee_rate_milli_msat = 4 [json_name = "fee_rate_milli_msat"];
|
1548
|
+
bool disabled = 5 [json_name = "disabled"];
|
1438
1549
|
}
|
1439
1550
|
|
1440
1551
|
/**
|
@@ -1466,6 +1577,12 @@ message ChannelEdge {
|
|
1466
1577
|
}
|
1467
1578
|
|
1468
1579
|
message ChannelGraphRequest {
|
1580
|
+
/**
|
1581
|
+
Whether unannounced channels are included in the response or not. If set,
|
1582
|
+
unannounced channels are included. Unannounced channels are both private
|
1583
|
+
channels, and public channels that are not yet announced to the network.
|
1584
|
+
*/
|
1585
|
+
bool include_unannounced = 1 [json_name = "include_unannounced"];
|
1469
1586
|
}
|
1470
1587
|
|
1471
1588
|
/// Returns a new instance of the directed channel graph.
|
@@ -1587,8 +1704,10 @@ message Invoice {
|
|
1587
1704
|
*/
|
1588
1705
|
string memo = 1 [json_name = "memo"];
|
1589
1706
|
|
1590
|
-
|
1591
|
-
|
1707
|
+
/** Deprecated. An optional cryptographic receipt of payment which is not
|
1708
|
+
implemented.
|
1709
|
+
*/
|
1710
|
+
bytes receipt = 2 [json_name = "receipt", deprecated = true];
|
1592
1711
|
|
1593
1712
|
/**
|
1594
1713
|
The hex-encoded preimage (32 byte) which will allow settling an incoming
|
@@ -1603,7 +1722,7 @@ message Invoice {
|
|
1603
1722
|
int64 value = 5 [json_name = "value"];
|
1604
1723
|
|
1605
1724
|
/// Whether this invoice has been fulfilled
|
1606
|
-
bool settled = 6 [json_name = "settled"];
|
1725
|
+
bool settled = 6 [json_name = "settled", deprecated = true];
|
1607
1726
|
|
1608
1727
|
/// When this invoice was created
|
1609
1728
|
int64 creation_date = 7 [json_name = "creation_date"];
|
@@ -1642,7 +1761,57 @@ message Invoice {
|
|
1642
1761
|
|
1643
1762
|
/// Whether this invoice should include routing hints for private channels.
|
1644
1763
|
bool private = 15 [json_name = "private"];
|
1764
|
+
|
1765
|
+
/**
|
1766
|
+
The "add" index of this invoice. Each newly created invoice will increment
|
1767
|
+
this index making it monotonically increasing. Callers to the
|
1768
|
+
SubscribeInvoices call can use this to instantly get notified of all added
|
1769
|
+
invoices with an add_index greater than this one.
|
1770
|
+
*/
|
1771
|
+
uint64 add_index = 16 [json_name = "add_index"];
|
1772
|
+
|
1773
|
+
/**
|
1774
|
+
The "settle" index of this invoice. Each newly settled invoice will
|
1775
|
+
increment this index making it monotonically increasing. Callers to the
|
1776
|
+
SubscribeInvoices call can use this to instantly get notified of all
|
1777
|
+
settled invoices with an settle_index greater than this one.
|
1778
|
+
*/
|
1779
|
+
uint64 settle_index = 17 [json_name = "settle_index"];
|
1780
|
+
|
1781
|
+
/// Deprecated, use amt_paid_sat or amt_paid_msat.
|
1782
|
+
int64 amt_paid = 18 [json_name = "amt_paid", deprecated = true];
|
1783
|
+
|
1784
|
+
/**
|
1785
|
+
The amount that was accepted for this invoice, in satoshis. This will ONLY
|
1786
|
+
be set if this invoice has been settled. We provide this field as if the
|
1787
|
+
invoice was created with a zero value, then we need to record what amount
|
1788
|
+
was ultimately accepted. Additionally, it's possible that the sender paid
|
1789
|
+
MORE that was specified in the original invoice. So we'll record that here
|
1790
|
+
as well.
|
1791
|
+
*/
|
1792
|
+
int64 amt_paid_sat = 19 [json_name = "amt_paid_sat"];
|
1793
|
+
|
1794
|
+
/**
|
1795
|
+
The amount that was accepted for this invoice, in millisatoshis. This will
|
1796
|
+
ONLY be set if this invoice has been settled. We provide this field as if
|
1797
|
+
the invoice was created with a zero value, then we need to record what
|
1798
|
+
amount was ultimately accepted. Additionally, it's possible that the sender
|
1799
|
+
paid MORE that was specified in the original invoice. So we'll record that
|
1800
|
+
here as well.
|
1801
|
+
*/
|
1802
|
+
int64 amt_paid_msat = 20 [json_name = "amt_paid_msat"];
|
1803
|
+
|
1804
|
+
enum InvoiceState {
|
1805
|
+
OPEN = 0;
|
1806
|
+
SETTLED = 1;
|
1807
|
+
}
|
1808
|
+
|
1809
|
+
/**
|
1810
|
+
The state the invoice is in.
|
1811
|
+
*/
|
1812
|
+
InvoiceState state = 21 [json_name = "state"];
|
1645
1813
|
}
|
1814
|
+
|
1646
1815
|
message AddInvoiceResponse {
|
1647
1816
|
bytes r_hash = 1 [json_name = "r_hash"];
|
1648
1817
|
|
@@ -1652,6 +1821,14 @@ message AddInvoiceResponse {
|
|
1652
1821
|
payment to the recipient.
|
1653
1822
|
*/
|
1654
1823
|
string payment_request = 2 [json_name = "payment_request"];
|
1824
|
+
|
1825
|
+
/**
|
1826
|
+
The "add" index of this invoice. Each newly created invoice will increment
|
1827
|
+
this index making it monotonically increasing. Callers to the
|
1828
|
+
SubscribeInvoices call can use this to instantly get notified of all added
|
1829
|
+
invoices with an add_index greater than this one.
|
1830
|
+
*/
|
1831
|
+
uint64 add_index = 16 [json_name = "add_index"];
|
1655
1832
|
}
|
1656
1833
|
message PaymentHash {
|
1657
1834
|
/**
|
@@ -1663,15 +1840,62 @@ message PaymentHash {
|
|
1663
1840
|
/// The payment hash of the invoice to be looked up.
|
1664
1841
|
bytes r_hash = 2 [json_name = "r_hash"];
|
1665
1842
|
}
|
1843
|
+
|
1666
1844
|
message ListInvoiceRequest {
|
1667
|
-
///
|
1668
|
-
bool pending_only = 1;
|
1845
|
+
/// If set, only unsettled invoices will be returned in the response.
|
1846
|
+
bool pending_only = 1 [json_name = "pending_only"];
|
1847
|
+
|
1848
|
+
/**
|
1849
|
+
The index of an invoice that will be used as either the start or end of a
|
1850
|
+
query to determine which invoices should be returned in the response.
|
1851
|
+
*/
|
1852
|
+
uint64 index_offset = 4 [json_name = "index_offset"];
|
1853
|
+
|
1854
|
+
/// The max number of invoices to return in the response to this query.
|
1855
|
+
uint64 num_max_invoices = 5 [json_name = "num_max_invoices"];
|
1856
|
+
|
1857
|
+
/**
|
1858
|
+
If set, the invoices returned will result from seeking backwards from the
|
1859
|
+
specified index offset. This can be used to paginate backwards.
|
1860
|
+
*/
|
1861
|
+
bool reversed = 6 [json_name = "reversed"];
|
1669
1862
|
}
|
1670
1863
|
message ListInvoiceResponse {
|
1864
|
+
/**
|
1865
|
+
A list of invoices from the time slice of the time series specified in the
|
1866
|
+
request.
|
1867
|
+
*/
|
1671
1868
|
repeated Invoice invoices = 1 [json_name = "invoices"];
|
1869
|
+
|
1870
|
+
/**
|
1871
|
+
The index of the last item in the set of returned invoices. This can be used
|
1872
|
+
to seek further, pagination style.
|
1873
|
+
*/
|
1874
|
+
uint64 last_index_offset = 2 [json_name = "last_index_offset"];
|
1875
|
+
|
1876
|
+
/**
|
1877
|
+
The index of the last item in the set of returned invoices. This can be used
|
1878
|
+
to seek backwards, pagination style.
|
1879
|
+
*/
|
1880
|
+
uint64 first_index_offset = 3 [json_name = "first_index_offset"];
|
1672
1881
|
}
|
1673
1882
|
|
1674
1883
|
message InvoiceSubscription {
|
1884
|
+
/**
|
1885
|
+
If specified (non-zero), then we'll first start by sending out
|
1886
|
+
notifications for all added indexes with an add_index greater than this
|
1887
|
+
value. This allows callers to catch up on any events they missed while they
|
1888
|
+
weren't connected to the streaming RPC.
|
1889
|
+
*/
|
1890
|
+
uint64 add_index = 1 [json_name = "add_index"];
|
1891
|
+
|
1892
|
+
/**
|
1893
|
+
If specified (non-zero), then we'll first start by sending out
|
1894
|
+
notifications for all settled indexes with an settle_index greater than
|
1895
|
+
this value. This allows callers to catch up on any events they missed while
|
1896
|
+
they weren't connected to the streaming RPC.
|
1897
|
+
*/
|
1898
|
+
uint64 settle_index = 2 [json_name = "settle_index"];
|
1675
1899
|
}
|
1676
1900
|
|
1677
1901
|
|
@@ -1679,8 +1903,8 @@ message Payment {
|
|
1679
1903
|
/// The payment hash
|
1680
1904
|
string payment_hash = 1 [json_name = "payment_hash"];
|
1681
1905
|
|
1682
|
-
///
|
1683
|
-
int64 value = 2 [json_name = "value"];
|
1906
|
+
/// Deprecated, use value_sat or value_msat.
|
1907
|
+
int64 value = 2 [json_name = "value", deprecated = true];
|
1684
1908
|
|
1685
1909
|
/// The date of this payment
|
1686
1910
|
int64 creation_date = 3 [json_name = "creation_date"];
|
@@ -1693,6 +1917,12 @@ message Payment {
|
|
1693
1917
|
|
1694
1918
|
/// The payment preimage
|
1695
1919
|
string payment_preimage = 6 [json_name = "payment_preimage"];
|
1920
|
+
|
1921
|
+
/// The value of the payment in satoshis
|
1922
|
+
int64 value_sat = 7 [json_name = "value_sat"];
|
1923
|
+
|
1924
|
+
/// The value of the payment in milli-satoshis
|
1925
|
+
int64 value_msat = 8 [json_name = "value_msat"];
|
1696
1926
|
}
|
1697
1927
|
|
1698
1928
|
message ListPaymentsRequest {
|
@@ -1709,6 +1939,14 @@ message DeleteAllPaymentsRequest {
|
|
1709
1939
|
message DeleteAllPaymentsResponse {
|
1710
1940
|
}
|
1711
1941
|
|
1942
|
+
message AbandonChannelRequest {
|
1943
|
+
ChannelPoint channel_point = 1;
|
1944
|
+
}
|
1945
|
+
|
1946
|
+
message AbandonChannelResponse {
|
1947
|
+
}
|
1948
|
+
|
1949
|
+
|
1712
1950
|
message DebugLevelRequest {
|
1713
1951
|
bool show = 1;
|
1714
1952
|
string level_spec = 2;
|
@@ -1806,15 +2044,18 @@ message ForwardingEvent {
|
|
1806
2044
|
/// The outgoing channel ID that carried the preimage that completed the circuit.
|
1807
2045
|
uint64 chan_id_out = 4 [json_name = "chan_id_out"];
|
1808
2046
|
|
1809
|
-
/// The total amount of the incoming HTLC that created half the circuit.
|
2047
|
+
/// The total amount (in satoshis) of the incoming HTLC that created half the circuit.
|
1810
2048
|
uint64 amt_in = 5 [json_name = "amt_in"];
|
1811
2049
|
|
1812
|
-
/// The total amount of the
|
2050
|
+
/// The total amount (in satoshis) of the outgoing HTLC that created the second half of the circuit.
|
1813
2051
|
uint64 amt_out = 6 [json_name = "amt_out"];
|
1814
2052
|
|
1815
|
-
/// The total fee that this payment circuit carried.
|
2053
|
+
/// The total fee (in satoshis) that this payment circuit carried.
|
1816
2054
|
uint64 fee = 7 [json_name = "fee"];
|
1817
2055
|
|
2056
|
+
/// The total fee (in milli-satoshis) that this payment circuit carried.
|
2057
|
+
uint64 fee_msat = 8 [json_name = "fee_msat"];
|
2058
|
+
|
1818
2059
|
// TODO(roasbeef): add settlement latency?
|
1819
2060
|
// * use FPE on the chan id?
|
1820
2061
|
// * also list failures?
|
data/lib/rpc_pb.rb
CHANGED
@@ -33,6 +33,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
33
33
|
end
|
34
34
|
add_message "lnrpc.ChangePasswordResponse" do
|
35
35
|
end
|
36
|
+
add_message "lnrpc.Utxo" do
|
37
|
+
optional :type, :enum, 1, "lnrpc.AddressType"
|
38
|
+
optional :address, :string, 2
|
39
|
+
optional :amount_sat, :int64, 3
|
40
|
+
optional :script_pubkey, :string, 4
|
41
|
+
optional :outpoint, :message, 5, "lnrpc.ChannelPoint"
|
42
|
+
optional :confirmations, :int64, 6
|
43
|
+
end
|
36
44
|
add_message "lnrpc.Transaction" do
|
37
45
|
optional :tx_hash, :string, 1
|
38
46
|
optional :amount, :int64, 2
|
@@ -68,6 +76,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
68
76
|
optional :payment_error, :string, 1
|
69
77
|
optional :payment_preimage, :bytes, 2
|
70
78
|
optional :payment_route, :message, 3, "lnrpc.Route"
|
79
|
+
optional :payment_hash, :bytes, 4
|
71
80
|
end
|
72
81
|
add_message "lnrpc.SendToRouteRequest" do
|
73
82
|
optional :payment_hash, :bytes, 1
|
@@ -98,18 +107,20 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
98
107
|
optional :amount, :int64, 2
|
99
108
|
optional :target_conf, :int32, 3
|
100
109
|
optional :sat_per_byte, :int64, 5
|
110
|
+
optional :send_all, :bool, 6
|
101
111
|
end
|
102
112
|
add_message "lnrpc.SendCoinsResponse" do
|
103
113
|
optional :txid, :string, 1
|
104
114
|
end
|
105
|
-
add_message "lnrpc.
|
106
|
-
optional :
|
115
|
+
add_message "lnrpc.ListUnspentRequest" do
|
116
|
+
optional :min_confs, :int32, 1
|
117
|
+
optional :max_confs, :int32, 2
|
107
118
|
end
|
108
|
-
|
109
|
-
|
110
|
-
value :NESTED_PUBKEY_HASH, 1
|
119
|
+
add_message "lnrpc.ListUnspentResponse" do
|
120
|
+
repeated :utxos, :message, 1, "lnrpc.Utxo"
|
111
121
|
end
|
112
|
-
add_message "lnrpc.
|
122
|
+
add_message "lnrpc.NewAddressRequest" do
|
123
|
+
optional :type, :enum, 1, "lnrpc.AddressType"
|
113
124
|
end
|
114
125
|
add_message "lnrpc.NewAddressResponse" do
|
115
126
|
optional :address, :string, 1
|
@@ -163,6 +174,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
163
174
|
repeated :pending_htlcs, :message, 15, "lnrpc.HTLC"
|
164
175
|
optional :csv_delay, :uint32, 16
|
165
176
|
optional :private, :bool, 17
|
177
|
+
optional :initiator, :bool, 18
|
166
178
|
end
|
167
179
|
add_message "lnrpc.ListChannelsRequest" do
|
168
180
|
optional :active_only, :bool, 1
|
@@ -191,6 +203,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
191
203
|
value :REMOTE_FORCE_CLOSE, 2
|
192
204
|
value :BREACH_CLOSE, 3
|
193
205
|
value :FUNDING_CANCELED, 4
|
206
|
+
value :ABANDONED, 5
|
194
207
|
end
|
195
208
|
add_message "lnrpc.ClosedChannelsRequest" do
|
196
209
|
optional :cooperative, :bool, 1
|
@@ -198,6 +211,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
198
211
|
optional :remote_force, :bool, 3
|
199
212
|
optional :breach, :bool, 4
|
200
213
|
optional :funding_canceled, :bool, 5
|
214
|
+
optional :abandoned, :bool, 6
|
201
215
|
end
|
202
216
|
add_message "lnrpc.ClosedChannelsResponse" do
|
203
217
|
repeated :channels, :message, 1, "lnrpc.ChannelCloseSummary"
|
@@ -229,10 +243,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
229
243
|
optional :block_hash, :string, 8
|
230
244
|
optional :synced_to_chain, :bool, 9
|
231
245
|
optional :testnet, :bool, 10
|
232
|
-
repeated :chains, :string, 11
|
233
246
|
repeated :uris, :string, 12
|
234
247
|
optional :best_header_timestamp, :int64, 13
|
235
248
|
optional :version, :string, 14
|
249
|
+
optional :num_inactive_channels, :uint32, 15
|
250
|
+
repeated :chains, :message, 16, "lnrpc.Chain"
|
251
|
+
end
|
252
|
+
add_message "lnrpc.Chain" do
|
253
|
+
optional :chain, :string, 1
|
254
|
+
optional :network, :string, 2
|
236
255
|
end
|
237
256
|
add_message "lnrpc.ConfirmationUpdate" do
|
238
257
|
optional :block_sha, :bytes, 1
|
@@ -255,7 +274,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
255
274
|
add_message "lnrpc.CloseStatusUpdate" do
|
256
275
|
oneof :update do
|
257
276
|
optional :close_pending, :message, 1, "lnrpc.PendingUpdate"
|
258
|
-
optional :confirmation, :message, 2, "lnrpc.ConfirmationUpdate"
|
259
277
|
optional :chan_close, :message, 3, "lnrpc.ChannelCloseUpdate"
|
260
278
|
end
|
261
279
|
end
|
@@ -273,11 +291,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
273
291
|
optional :private, :bool, 8
|
274
292
|
optional :min_htlc_msat, :int64, 9
|
275
293
|
optional :remote_csv_delay, :uint32, 10
|
294
|
+
optional :min_confs, :int32, 11
|
295
|
+
optional :spend_unconfirmed, :bool, 12
|
276
296
|
end
|
277
297
|
add_message "lnrpc.OpenStatusUpdate" do
|
278
298
|
oneof :update do
|
279
299
|
optional :chan_pending, :message, 1, "lnrpc.PendingUpdate"
|
280
|
-
optional :confirmation, :message, 2, "lnrpc.ConfirmationUpdate"
|
281
300
|
optional :chan_open, :message, 3, "lnrpc.ChannelOpenUpdate"
|
282
301
|
end
|
283
302
|
end
|
@@ -360,6 +379,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
360
379
|
optional :expiry, :uint32, 5
|
361
380
|
optional :amt_to_forward_msat, :int64, 6
|
362
381
|
optional :fee_msat, :int64, 7
|
382
|
+
optional :pub_key, :string, 8
|
363
383
|
end
|
364
384
|
add_message "lnrpc.Route" do
|
365
385
|
optional :total_time_lock, :uint32, 1
|
@@ -393,6 +413,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
393
413
|
optional :min_htlc, :int64, 2
|
394
414
|
optional :fee_base_msat, :int64, 3
|
395
415
|
optional :fee_rate_milli_msat, :int64, 4
|
416
|
+
optional :disabled, :bool, 5
|
396
417
|
end
|
397
418
|
add_message "lnrpc.ChannelEdge" do
|
398
419
|
optional :channel_id, :uint64, 1
|
@@ -405,6 +426,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
405
426
|
optional :node2_policy, :message, 8, "lnrpc.RoutingPolicy"
|
406
427
|
end
|
407
428
|
add_message "lnrpc.ChannelGraphRequest" do
|
429
|
+
optional :include_unannounced, :bool, 1
|
408
430
|
end
|
409
431
|
add_message "lnrpc.ChannelGraph" do
|
410
432
|
repeated :nodes, :message, 1, "lnrpc.LightningNode"
|
@@ -483,10 +505,21 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
483
505
|
optional :cltv_expiry, :uint64, 13
|
484
506
|
repeated :route_hints, :message, 14, "lnrpc.RouteHint"
|
485
507
|
optional :private, :bool, 15
|
508
|
+
optional :add_index, :uint64, 16
|
509
|
+
optional :settle_index, :uint64, 17
|
510
|
+
optional :amt_paid, :int64, 18
|
511
|
+
optional :amt_paid_sat, :int64, 19
|
512
|
+
optional :amt_paid_msat, :int64, 20
|
513
|
+
optional :state, :enum, 21, "lnrpc.Invoice.InvoiceState"
|
514
|
+
end
|
515
|
+
add_enum "lnrpc.Invoice.InvoiceState" do
|
516
|
+
value :OPEN, 0
|
517
|
+
value :SETTLED, 1
|
486
518
|
end
|
487
519
|
add_message "lnrpc.AddInvoiceResponse" do
|
488
520
|
optional :r_hash, :bytes, 1
|
489
521
|
optional :payment_request, :string, 2
|
522
|
+
optional :add_index, :uint64, 16
|
490
523
|
end
|
491
524
|
add_message "lnrpc.PaymentHash" do
|
492
525
|
optional :r_hash_str, :string, 1
|
@@ -494,11 +527,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
494
527
|
end
|
495
528
|
add_message "lnrpc.ListInvoiceRequest" do
|
496
529
|
optional :pending_only, :bool, 1
|
530
|
+
optional :index_offset, :uint64, 4
|
531
|
+
optional :num_max_invoices, :uint64, 5
|
532
|
+
optional :reversed, :bool, 6
|
497
533
|
end
|
498
534
|
add_message "lnrpc.ListInvoiceResponse" do
|
499
535
|
repeated :invoices, :message, 1, "lnrpc.Invoice"
|
536
|
+
optional :last_index_offset, :uint64, 2
|
537
|
+
optional :first_index_offset, :uint64, 3
|
500
538
|
end
|
501
539
|
add_message "lnrpc.InvoiceSubscription" do
|
540
|
+
optional :add_index, :uint64, 1
|
541
|
+
optional :settle_index, :uint64, 2
|
502
542
|
end
|
503
543
|
add_message "lnrpc.Payment" do
|
504
544
|
optional :payment_hash, :string, 1
|
@@ -507,6 +547,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
507
547
|
repeated :path, :string, 4
|
508
548
|
optional :fee, :int64, 5
|
509
549
|
optional :payment_preimage, :string, 6
|
550
|
+
optional :value_sat, :int64, 7
|
551
|
+
optional :value_msat, :int64, 8
|
510
552
|
end
|
511
553
|
add_message "lnrpc.ListPaymentsRequest" do
|
512
554
|
end
|
@@ -517,6 +559,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
517
559
|
end
|
518
560
|
add_message "lnrpc.DeleteAllPaymentsResponse" do
|
519
561
|
end
|
562
|
+
add_message "lnrpc.AbandonChannelRequest" do
|
563
|
+
optional :channel_point, :message, 1, "lnrpc.ChannelPoint"
|
564
|
+
end
|
565
|
+
add_message "lnrpc.AbandonChannelResponse" do
|
566
|
+
end
|
520
567
|
add_message "lnrpc.DebugLevelRequest" do
|
521
568
|
optional :show, :bool, 1
|
522
569
|
optional :level_spec, :string, 2
|
@@ -577,11 +624,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
577
624
|
optional :amt_in, :uint64, 5
|
578
625
|
optional :amt_out, :uint64, 6
|
579
626
|
optional :fee, :uint64, 7
|
627
|
+
optional :fee_msat, :uint64, 8
|
580
628
|
end
|
581
629
|
add_message "lnrpc.ForwardingHistoryResponse" do
|
582
630
|
repeated :forwarding_events, :message, 1, "lnrpc.ForwardingEvent"
|
583
631
|
optional :last_offset_index, :uint32, 2
|
584
632
|
end
|
633
|
+
add_enum "lnrpc.AddressType" do
|
634
|
+
value :WITNESS_PUBKEY_HASH, 0
|
635
|
+
value :NESTED_PUBKEY_HASH, 1
|
636
|
+
end
|
585
637
|
end
|
586
638
|
|
587
639
|
module Lnrpc
|
@@ -593,6 +645,7 @@ module Lnrpc
|
|
593
645
|
UnlockWalletResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.UnlockWalletResponse").msgclass
|
594
646
|
ChangePasswordRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChangePasswordRequest").msgclass
|
595
647
|
ChangePasswordResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChangePasswordResponse").msgclass
|
648
|
+
Utxo = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Utxo").msgclass
|
596
649
|
Transaction = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Transaction").msgclass
|
597
650
|
GetTransactionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetTransactionsRequest").msgclass
|
598
651
|
TransactionDetails = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.TransactionDetails").msgclass
|
@@ -606,9 +659,9 @@ module Lnrpc
|
|
606
659
|
SendManyResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendManyResponse").msgclass
|
607
660
|
SendCoinsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendCoinsRequest").msgclass
|
608
661
|
SendCoinsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SendCoinsResponse").msgclass
|
662
|
+
ListUnspentRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListUnspentRequest").msgclass
|
663
|
+
ListUnspentResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListUnspentResponse").msgclass
|
609
664
|
NewAddressRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NewAddressRequest").msgclass
|
610
|
-
NewAddressRequest::AddressType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NewAddressRequest.AddressType").enummodule
|
611
|
-
NewWitnessAddressRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NewWitnessAddressRequest").msgclass
|
612
665
|
NewAddressResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.NewAddressResponse").msgclass
|
613
666
|
SignMessageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SignMessageRequest").msgclass
|
614
667
|
SignMessageResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.SignMessageResponse").msgclass
|
@@ -631,6 +684,7 @@ module Lnrpc
|
|
631
684
|
ListPeersResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPeersResponse").msgclass
|
632
685
|
GetInfoRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetInfoRequest").msgclass
|
633
686
|
GetInfoResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.GetInfoResponse").msgclass
|
687
|
+
Chain = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Chain").msgclass
|
634
688
|
ConfirmationUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ConfirmationUpdate").msgclass
|
635
689
|
ChannelOpenUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelOpenUpdate").msgclass
|
636
690
|
ChannelCloseUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ChannelCloseUpdate").msgclass
|
@@ -676,6 +730,7 @@ module Lnrpc
|
|
676
730
|
HopHint = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.HopHint").msgclass
|
677
731
|
RouteHint = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.RouteHint").msgclass
|
678
732
|
Invoice = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice").msgclass
|
733
|
+
Invoice::InvoiceState = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.Invoice.InvoiceState").enummodule
|
679
734
|
AddInvoiceResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddInvoiceResponse").msgclass
|
680
735
|
PaymentHash = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PaymentHash").msgclass
|
681
736
|
ListInvoiceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListInvoiceRequest").msgclass
|
@@ -686,6 +741,8 @@ module Lnrpc
|
|
686
741
|
ListPaymentsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ListPaymentsResponse").msgclass
|
687
742
|
DeleteAllPaymentsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteAllPaymentsRequest").msgclass
|
688
743
|
DeleteAllPaymentsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DeleteAllPaymentsResponse").msgclass
|
744
|
+
AbandonChannelRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AbandonChannelRequest").msgclass
|
745
|
+
AbandonChannelResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AbandonChannelResponse").msgclass
|
689
746
|
DebugLevelRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DebugLevelRequest").msgclass
|
690
747
|
DebugLevelResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.DebugLevelResponse").msgclass
|
691
748
|
PayReqString = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.PayReqString").msgclass
|
@@ -698,4 +755,5 @@ module Lnrpc
|
|
698
755
|
ForwardingHistoryRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ForwardingHistoryRequest").msgclass
|
699
756
|
ForwardingEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ForwardingEvent").msgclass
|
700
757
|
ForwardingHistoryResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.ForwardingHistoryResponse").msgclass
|
758
|
+
AddressType = Google::Protobuf::DescriptorPool.generated_pool.lookup("lnrpc.AddressType").enummodule
|
701
759
|
end
|
data/lib/rpc_services_pb.rb
CHANGED
@@ -2,10 +2,31 @@
|
|
2
2
|
# Source: rpc.proto for package 'lnrpc'
|
3
3
|
|
4
4
|
require 'grpc'
|
5
|
-
|
5
|
+
require 'rpc_pb'
|
6
6
|
|
7
7
|
module Lnrpc
|
8
8
|
module WalletUnlocker
|
9
|
+
# *
|
10
|
+
# Comments in this file will be directly parsed into the API
|
11
|
+
# Documentation as descriptions of the associated method, message, or field.
|
12
|
+
# These descriptions should go right above the definition of the object, and
|
13
|
+
# can be in either block or /// comment format.
|
14
|
+
#
|
15
|
+
# One edge case exists where a // comment followed by a /// comment in the
|
16
|
+
# next line will cause the description not to show up in the documentation. In
|
17
|
+
# that instance, simply separate the two comments with a blank line.
|
18
|
+
#
|
19
|
+
# An RPC method can be matched to an lncli command by placing a line in the
|
20
|
+
# beginning of the description in exactly the following format:
|
21
|
+
# lncli: `methodname`
|
22
|
+
#
|
23
|
+
# Failure to specify the exact name of the command will cause documentation
|
24
|
+
# generation to fail.
|
25
|
+
#
|
26
|
+
# More information on how exactly the gRPC documentation is generated from
|
27
|
+
# this proto file can be found here:
|
28
|
+
# https://github.com/lightninglabs/lightning-api
|
29
|
+
#
|
9
30
|
# The WalletUnlocker service is used to set up a wallet password for
|
10
31
|
# lnd at first startup, and unlock a previously set up wallet.
|
11
32
|
class Service
|
@@ -81,6 +102,10 @@ module Lnrpc
|
|
81
102
|
# consult its fee model to determine a fee for the default confirmation
|
82
103
|
# target.
|
83
104
|
rpc :SendCoins, SendCoinsRequest, SendCoinsResponse
|
105
|
+
# * lncli: `listunspent`
|
106
|
+
# ListUnspent returns a list of all utxos spendable by the wallet with a
|
107
|
+
# number of confirmations between the specified minimum and maximum.
|
108
|
+
rpc :ListUnspent, ListUnspentRequest, ListUnspentResponse
|
84
109
|
# *
|
85
110
|
# SubscribeTransactions creates a uni-directional stream from the server to
|
86
111
|
# the client in which any newly discovered transactions relevant to the
|
@@ -95,9 +120,6 @@ module Lnrpc
|
|
95
120
|
# * lncli: `newaddress`
|
96
121
|
# NewAddress creates a new address under control of the local wallet.
|
97
122
|
rpc :NewAddress, NewAddressRequest, NewAddressResponse
|
98
|
-
# *
|
99
|
-
# NewWitnessAddress creates a new witness address under control of the local wallet.
|
100
|
-
rpc :NewWitnessAddress, NewWitnessAddressRequest, NewAddressResponse
|
101
123
|
# * lncli: `signmessage`
|
102
124
|
# SignMessage signs a message with this node's private key. The returned
|
103
125
|
# signature string is `zbase32` encoded and pubkey recoverable, meaning that
|
@@ -165,6 +187,12 @@ module Lnrpc
|
|
165
187
|
# closure transaction is confirmed, or a manual fee rate. If neither are
|
166
188
|
# specified, then a default lax, block confirmation target is used.
|
167
189
|
rpc :CloseChannel, CloseChannelRequest, stream(CloseStatusUpdate)
|
190
|
+
# * lncli: `abandonchannel`
|
191
|
+
# AbandonChannel removes all channel state from the database except for a
|
192
|
+
# close summary. This method can be used to get rid of permanently unusable
|
193
|
+
# channels due to bugs fixed in newer versions of lnd. Only available
|
194
|
+
# when in debug builds of lnd.
|
195
|
+
rpc :AbandonChannel, AbandonChannelRequest, AbandonChannelResponse
|
168
196
|
# * lncli: `sendpayment`
|
169
197
|
# SendPayment dispatches a bi-directional streaming RPC for sending payments
|
170
198
|
# through the Lightning Network. A single RPC invocation creates a persistent
|
@@ -194,7 +222,12 @@ module Lnrpc
|
|
194
222
|
rpc :AddInvoice, Invoice, AddInvoiceResponse
|
195
223
|
# * lncli: `listinvoices`
|
196
224
|
# ListInvoices returns a list of all the invoices currently stored within the
|
197
|
-
# database. Any active debug invoices are ignored.
|
225
|
+
# database. Any active debug invoices are ignored. It has full support for
|
226
|
+
# paginated responses, allowing users to query for specific invoices through
|
227
|
+
# their add_index. This can be done by using either the first_index_offset or
|
228
|
+
# last_index_offset fields included in the response as the index_offset of the
|
229
|
+
# next request. By default, the first 100 invoices created will be returned.
|
230
|
+
# Backwards pagination is also supported through the Reversed flag.
|
198
231
|
rpc :ListInvoices, ListInvoiceRequest, ListInvoiceResponse
|
199
232
|
# * lncli: `lookupinvoice`
|
200
233
|
# LookupInvoice attempts to look up an invoice according to its payment hash.
|
@@ -202,8 +235,15 @@ module Lnrpc
|
|
202
235
|
# returned.
|
203
236
|
rpc :LookupInvoice, PaymentHash, Invoice
|
204
237
|
# *
|
205
|
-
# SubscribeInvoices returns a uni-directional stream (
|
206
|
-
# notifying the client of newly added/settled invoices.
|
238
|
+
# SubscribeInvoices returns a uni-directional stream (server -> client) for
|
239
|
+
# notifying the client of newly added/settled invoices. The caller can
|
240
|
+
# optionally specify the add_index and/or the settle_index. If the add_index
|
241
|
+
# is specified, then we'll first start by sending add invoice events for all
|
242
|
+
# invoices with an add_index greater than the specified value. If the
|
243
|
+
# settle_index is specified, the next, we'll send out all settle events for
|
244
|
+
# invoices with a settle_index greater than the specified value. One or both
|
245
|
+
# of these fields can be set. If no fields are set, then we'll only send out
|
246
|
+
# the latest add/settle events.
|
207
247
|
rpc :SubscribeInvoices, InvoiceSubscription, stream(Invoice)
|
208
248
|
# * lncli: `decodepayreq`
|
209
249
|
# DecodePayReq takes an encoded payment request string and attempts to decode
|