lightning 12.0.4 → 12.1.0
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.
- package/CHANGELOG.md +4 -0
- package/grpc/protos/lightning.proto +22 -186
- package/grpc/protos/router.proto +9 -98
- package/lnd_methods/info/constants.json +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -262,47 +262,6 @@ service Lightning {
|
|
|
262
262
|
*/
|
|
263
263
|
rpc AbandonChannel (AbandonChannelRequest) returns (AbandonChannelResponse);
|
|
264
264
|
|
|
265
|
-
/* lncli: `sendpayment`
|
|
266
|
-
Deprecated, use routerrpc.SendPaymentV2. SendPayment dispatches a
|
|
267
|
-
bi-directional streaming RPC for sending payments through the Lightning
|
|
268
|
-
Network. A single RPC invocation creates a persistent bi-directional
|
|
269
|
-
stream allowing clients to rapidly send payments through the Lightning
|
|
270
|
-
Network with a single persistent connection.
|
|
271
|
-
*/
|
|
272
|
-
rpc SendPayment (stream SendRequest) returns (stream SendResponse) {
|
|
273
|
-
option deprecated = true;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/*
|
|
277
|
-
Deprecated, use routerrpc.SendPaymentV2. SendPaymentSync is the synchronous
|
|
278
|
-
non-streaming version of SendPayment. This RPC is intended to be consumed by
|
|
279
|
-
clients of the REST proxy. Additionally, this RPC expects the destination's
|
|
280
|
-
public key and the payment hash (if any) to be encoded as hex strings.
|
|
281
|
-
*/
|
|
282
|
-
rpc SendPaymentSync (SendRequest) returns (SendResponse) {
|
|
283
|
-
option deprecated = true;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
/* lncli: `sendtoroute`
|
|
287
|
-
Deprecated, use routerrpc.SendToRouteV2. SendToRoute is a bi-directional
|
|
288
|
-
streaming RPC for sending payment through the Lightning Network. This
|
|
289
|
-
method differs from SendPayment in that it allows users to specify a full
|
|
290
|
-
route manually. This can be used for things like rebalancing, and atomic
|
|
291
|
-
swaps.
|
|
292
|
-
*/
|
|
293
|
-
rpc SendToRoute (stream SendToRouteRequest) returns (stream SendResponse) {
|
|
294
|
-
option deprecated = true;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/*
|
|
298
|
-
Deprecated, use routerrpc.SendToRouteV2. SendToRouteSync is a synchronous
|
|
299
|
-
version of SendToRoute. It Will block until the payment either fails or
|
|
300
|
-
succeeds.
|
|
301
|
-
*/
|
|
302
|
-
rpc SendToRouteSync (SendToRouteRequest) returns (SendResponse) {
|
|
303
|
-
option deprecated = true;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
265
|
/* lncli: `addinvoice`
|
|
307
266
|
AddInvoice attempts to add a new invoice to the invoice database. Any
|
|
308
267
|
duplicated invoices are rejected, therefore all invoices *must* have a
|
|
@@ -896,139 +855,6 @@ message FeeLimit {
|
|
|
896
855
|
}
|
|
897
856
|
}
|
|
898
857
|
|
|
899
|
-
message SendRequest {
|
|
900
|
-
/*
|
|
901
|
-
The identity pubkey of the payment recipient. When using REST, this field
|
|
902
|
-
must be encoded as base64.
|
|
903
|
-
*/
|
|
904
|
-
bytes dest = 1;
|
|
905
|
-
|
|
906
|
-
/*
|
|
907
|
-
The hex-encoded identity pubkey of the payment recipient. Deprecated now
|
|
908
|
-
that the REST gateway supports base64 encoding of bytes fields.
|
|
909
|
-
*/
|
|
910
|
-
string dest_string = 2 [deprecated = true];
|
|
911
|
-
|
|
912
|
-
/*
|
|
913
|
-
The amount to send expressed in satoshis.
|
|
914
|
-
|
|
915
|
-
The fields amt and amt_msat are mutually exclusive.
|
|
916
|
-
*/
|
|
917
|
-
int64 amt = 3;
|
|
918
|
-
|
|
919
|
-
/*
|
|
920
|
-
The amount to send expressed in millisatoshis.
|
|
921
|
-
|
|
922
|
-
The fields amt and amt_msat are mutually exclusive.
|
|
923
|
-
*/
|
|
924
|
-
int64 amt_msat = 12;
|
|
925
|
-
|
|
926
|
-
/*
|
|
927
|
-
The hash to use within the payment's HTLC. When using REST, this field
|
|
928
|
-
must be encoded as base64.
|
|
929
|
-
*/
|
|
930
|
-
bytes payment_hash = 4;
|
|
931
|
-
|
|
932
|
-
/*
|
|
933
|
-
The hex-encoded hash to use within the payment's HTLC. Deprecated now
|
|
934
|
-
that the REST gateway supports base64 encoding of bytes fields.
|
|
935
|
-
*/
|
|
936
|
-
string payment_hash_string = 5 [deprecated = true];
|
|
937
|
-
|
|
938
|
-
/*
|
|
939
|
-
A bare-bones invoice for a payment within the Lightning Network. With the
|
|
940
|
-
details of the invoice, the sender has all the data necessary to send a
|
|
941
|
-
payment to the recipient.
|
|
942
|
-
*/
|
|
943
|
-
string payment_request = 6;
|
|
944
|
-
|
|
945
|
-
/*
|
|
946
|
-
The CLTV delta from the current height that should be used to set the
|
|
947
|
-
timelock for the final hop.
|
|
948
|
-
*/
|
|
949
|
-
int32 final_cltv_delta = 7;
|
|
950
|
-
|
|
951
|
-
/*
|
|
952
|
-
The maximum number of satoshis that will be paid as a fee of the payment.
|
|
953
|
-
This value can be represented either as a percentage of the amount being
|
|
954
|
-
sent, or as a fixed amount of the maximum fee the user is willing the pay to
|
|
955
|
-
send the payment. If not specified, lnd will use a default value of 100%
|
|
956
|
-
fees for small amounts (<=1k sat) or 5% fees for larger amounts.
|
|
957
|
-
*/
|
|
958
|
-
FeeLimit fee_limit = 8;
|
|
959
|
-
|
|
960
|
-
/*
|
|
961
|
-
The channel id of the channel that must be taken to the first hop. If zero,
|
|
962
|
-
any channel may be used.
|
|
963
|
-
*/
|
|
964
|
-
uint64 outgoing_chan_id = 9 [jstype = JS_STRING];
|
|
965
|
-
|
|
966
|
-
/*
|
|
967
|
-
The pubkey of the last hop of the route. If empty, any hop may be used.
|
|
968
|
-
*/
|
|
969
|
-
bytes last_hop_pubkey = 13;
|
|
970
|
-
|
|
971
|
-
/*
|
|
972
|
-
An optional maximum total time lock for the route. This should not exceed
|
|
973
|
-
lnd's `--max-cltv-expiry` setting. If zero, then the value of
|
|
974
|
-
`--max-cltv-expiry` is enforced.
|
|
975
|
-
*/
|
|
976
|
-
uint32 cltv_limit = 10;
|
|
977
|
-
|
|
978
|
-
/*
|
|
979
|
-
An optional field that can be used to pass an arbitrary set of TLV records
|
|
980
|
-
to a peer which understands the new records. This can be used to pass
|
|
981
|
-
application specific data during the payment attempt. Record types are
|
|
982
|
-
required to be in the custom range >= 65536. When using REST, the values
|
|
983
|
-
must be encoded as base64.
|
|
984
|
-
*/
|
|
985
|
-
map<uint64, bytes> dest_custom_records = 11;
|
|
986
|
-
|
|
987
|
-
// If set, circular payments to self are permitted.
|
|
988
|
-
bool allow_self_payment = 14;
|
|
989
|
-
|
|
990
|
-
/*
|
|
991
|
-
Features assumed to be supported by the final node. All transitive feature
|
|
992
|
-
dependencies must also be set properly. For a given feature bit pair, either
|
|
993
|
-
optional or remote may be set, but not both. If this field is nil or empty,
|
|
994
|
-
the router will try to load destination features from the graph as a
|
|
995
|
-
fallback.
|
|
996
|
-
*/
|
|
997
|
-
repeated FeatureBit dest_features = 15;
|
|
998
|
-
|
|
999
|
-
/*
|
|
1000
|
-
The payment address of the generated invoice. This is also called
|
|
1001
|
-
payment secret in specifications (e.g. BOLT 11).
|
|
1002
|
-
*/
|
|
1003
|
-
bytes payment_addr = 16;
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
message SendResponse {
|
|
1007
|
-
string payment_error = 1;
|
|
1008
|
-
bytes payment_preimage = 2;
|
|
1009
|
-
Route payment_route = 3;
|
|
1010
|
-
bytes payment_hash = 4;
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
message SendToRouteRequest {
|
|
1014
|
-
/*
|
|
1015
|
-
The payment hash to use for the HTLC. When using REST, this field must be
|
|
1016
|
-
encoded as base64.
|
|
1017
|
-
*/
|
|
1018
|
-
bytes payment_hash = 1;
|
|
1019
|
-
|
|
1020
|
-
/*
|
|
1021
|
-
An optional hex-encoded payment hash to be used for the HTLC. Deprecated now
|
|
1022
|
-
that the REST gateway supports base64 encoding of bytes fields.
|
|
1023
|
-
*/
|
|
1024
|
-
string payment_hash_string = 2 [deprecated = true];
|
|
1025
|
-
|
|
1026
|
-
reserved 3;
|
|
1027
|
-
|
|
1028
|
-
// Route that should be used to attempt to complete the payment.
|
|
1029
|
-
Route route = 4;
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
858
|
message ChannelAcceptRequest {
|
|
1033
859
|
// The pubkey of the node that wishes to open an inbound channel.
|
|
1034
860
|
bytes node_pubkey = 1;
|
|
@@ -1479,6 +1305,11 @@ message HTLC {
|
|
|
1479
1305
|
}
|
|
1480
1306
|
|
|
1481
1307
|
enum CommitmentType {
|
|
1308
|
+
// Allow multiple enum names to map to the same numeric value so the
|
|
1309
|
+
// taproot channel types can expose short, canonical aliases without
|
|
1310
|
+
// breaking on-wire compatibility with the historic names.
|
|
1311
|
+
option allow_alias = true;
|
|
1312
|
+
|
|
1482
1313
|
/*
|
|
1483
1314
|
Returned when the commitment type isn't known or unavailable.
|
|
1484
1315
|
*/
|
|
@@ -1515,19 +1346,28 @@ enum CommitmentType {
|
|
|
1515
1346
|
SCRIPT_ENFORCED_LEASE = 4;
|
|
1516
1347
|
|
|
1517
1348
|
/*
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1349
|
+
The production taproot channel type that uses musig2 for the funding
|
|
1350
|
+
output and the new tapscript features, with final scripts and feature
|
|
1351
|
+
bits 80/81. This is the recommended taproot variant; new integrations
|
|
1352
|
+
should select this enum value.
|
|
1521
1353
|
*/
|
|
1522
|
-
|
|
1354
|
+
TAPROOT = 7;
|
|
1523
1355
|
|
|
1524
1356
|
/*
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
and
|
|
1357
|
+
Deprecated alias for TAPROOT, preserved so existing clients that select
|
|
1358
|
+
the production taproot channel type by its historic name continue to
|
|
1359
|
+
compile and serialize against the same wire value.
|
|
1528
1360
|
*/
|
|
1529
1361
|
SIMPLE_TAPROOT_FINAL = 7;
|
|
1530
1362
|
|
|
1363
|
+
/*
|
|
1364
|
+
A legacy taproot channel type that uses musig2 for the funding output and
|
|
1365
|
+
the new tapscript features, but with development scripts and the staging
|
|
1366
|
+
feature bits. Retained for compatibility with peers that have not upgraded
|
|
1367
|
+
to TAPROOT; new integrations should prefer TAPROOT.
|
|
1368
|
+
*/
|
|
1369
|
+
SIMPLE_TAPROOT = 5;
|
|
1370
|
+
|
|
1531
1371
|
/*
|
|
1532
1372
|
Identical to the SIMPLE_TAPROOT channel type, but with extra functionality.
|
|
1533
1373
|
This channel type also commits to additional meta data in the tapscript
|
|
@@ -3315,11 +3155,7 @@ message QueryRoutesRequest {
|
|
|
3315
3155
|
*/
|
|
3316
3156
|
map<uint64, bytes> dest_custom_records = 13;
|
|
3317
3157
|
|
|
3318
|
-
|
|
3319
|
-
Deprecated, use outgoing_chan_ids. The channel id of the channel that must
|
|
3320
|
-
be taken to the first hop. If zero, any channel may be used.
|
|
3321
|
-
*/
|
|
3322
|
-
uint64 outgoing_chan_id = 14 [jstype = JS_STRING, deprecated = true];
|
|
3158
|
+
reserved 14;
|
|
3323
3159
|
|
|
3324
3160
|
/*
|
|
3325
3161
|
The pubkey of the last hop of the route. If empty, any hop may be used.
|
package/grpc/protos/router.proto
CHANGED
|
@@ -59,17 +59,6 @@ service Router {
|
|
|
59
59
|
*/
|
|
60
60
|
rpc EstimateRouteFee (RouteFeeRequest) returns (RouteFeeResponse);
|
|
61
61
|
|
|
62
|
-
/*
|
|
63
|
-
Deprecated, use SendToRouteV2. SendToRoute attempts to make a payment via
|
|
64
|
-
the specified route. This method differs from SendPayment in that it
|
|
65
|
-
allows users to specify a full route manually. This can be used for
|
|
66
|
-
things like rebalancing, and atomic swaps. It differs from the newer
|
|
67
|
-
SendToRouteV2 in that it doesn't return the full HTLC information.
|
|
68
|
-
*/
|
|
69
|
-
rpc SendToRoute (SendToRouteRequest) returns (SendToRouteResponse) {
|
|
70
|
-
option deprecated = true;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
62
|
/* lncli: `sendtoroute`
|
|
74
63
|
SendToRouteV2 attempts to make a payment via the specified route. This
|
|
75
64
|
method differs from SendPayment in that it allows users to specify a full
|
|
@@ -141,23 +130,6 @@ service Router {
|
|
|
141
130
|
rpc SubscribeHtlcEvents (SubscribeHtlcEventsRequest)
|
|
142
131
|
returns (stream HtlcEvent);
|
|
143
132
|
|
|
144
|
-
/*
|
|
145
|
-
Deprecated, use SendPaymentV2. SendPayment attempts to route a payment
|
|
146
|
-
described by the passed PaymentRequest to the final destination. The call
|
|
147
|
-
returns a stream of payment status updates.
|
|
148
|
-
*/
|
|
149
|
-
rpc SendPayment (SendPaymentRequest) returns (stream PaymentStatus) {
|
|
150
|
-
option deprecated = true;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/*
|
|
154
|
-
Deprecated, use TrackPaymentV2. TrackPayment returns an update stream for
|
|
155
|
-
the payment identified by the payment hash.
|
|
156
|
-
*/
|
|
157
|
-
rpc TrackPayment (TrackPaymentRequest) returns (stream PaymentStatus) {
|
|
158
|
-
option deprecated = true;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
133
|
/**
|
|
162
134
|
HtlcInterceptor dispatches a bi-directional streaming RPC in which
|
|
163
135
|
Forwarded HTLC requests are sent to the client and the client responds with
|
|
@@ -264,12 +236,7 @@ message SendPaymentRequest {
|
|
|
264
236
|
*/
|
|
265
237
|
int64 fee_limit_sat = 7;
|
|
266
238
|
|
|
267
|
-
|
|
268
|
-
Deprecated, use outgoing_chan_ids. The channel id of the channel that must
|
|
269
|
-
be taken to the first hop. If zero, any channel may be used (unless
|
|
270
|
-
outgoing_chan_ids are set).
|
|
271
|
-
*/
|
|
272
|
-
uint64 outgoing_chan_id = 8 [jstype = JS_STRING, deprecated = true];
|
|
239
|
+
reserved 8;
|
|
273
240
|
|
|
274
241
|
/*
|
|
275
242
|
An optional maximum total time lock for the route. This should not
|
|
@@ -443,6 +410,14 @@ message RouteFeeRequest {
|
|
|
443
410
|
controlled by the timeout parameter.
|
|
444
411
|
*/
|
|
445
412
|
uint32 timeout = 4;
|
|
413
|
+
|
|
414
|
+
/*
|
|
415
|
+
The channel ids of the channels that are allowed for the first hop. If
|
|
416
|
+
empty, any channel may be used. This field is applicable to both
|
|
417
|
+
graph-based fee estimation (using dest + amt_sat) and probe-based
|
|
418
|
+
estimation (using payment_request).
|
|
419
|
+
*/
|
|
420
|
+
repeated uint64 outgoing_chan_ids = 5;
|
|
446
421
|
}
|
|
447
422
|
|
|
448
423
|
message RouteFeeResponse {
|
|
@@ -491,14 +466,6 @@ message SendToRouteRequest {
|
|
|
491
466
|
map<uint64, bytes> first_hop_custom_records = 4;
|
|
492
467
|
}
|
|
493
468
|
|
|
494
|
-
message SendToRouteResponse {
|
|
495
|
-
// The preimage obtained by making the payment.
|
|
496
|
-
bytes preimage = 1;
|
|
497
|
-
|
|
498
|
-
// The failure message in case the payment failed.
|
|
499
|
-
lnrpc.Failure failure = 2;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
469
|
message ResetMissionControlRequest {
|
|
503
470
|
}
|
|
504
471
|
|
|
@@ -930,62 +897,6 @@ enum FailureDetail {
|
|
|
930
897
|
EXTERNAL_VALIDATION_FAILED = 27;
|
|
931
898
|
}
|
|
932
899
|
|
|
933
|
-
enum PaymentState {
|
|
934
|
-
/*
|
|
935
|
-
Payment is still in flight.
|
|
936
|
-
*/
|
|
937
|
-
IN_FLIGHT = 0;
|
|
938
|
-
|
|
939
|
-
/*
|
|
940
|
-
Payment completed successfully.
|
|
941
|
-
*/
|
|
942
|
-
SUCCEEDED = 1;
|
|
943
|
-
|
|
944
|
-
/*
|
|
945
|
-
There are more routes to try, but the payment timeout was exceeded.
|
|
946
|
-
*/
|
|
947
|
-
FAILED_TIMEOUT = 2;
|
|
948
|
-
|
|
949
|
-
/*
|
|
950
|
-
All possible routes were tried and failed permanently. Or were no
|
|
951
|
-
routes to the destination at all.
|
|
952
|
-
*/
|
|
953
|
-
FAILED_NO_ROUTE = 3;
|
|
954
|
-
|
|
955
|
-
/*
|
|
956
|
-
A non-recoverable error has occurred.
|
|
957
|
-
*/
|
|
958
|
-
FAILED_ERROR = 4;
|
|
959
|
-
|
|
960
|
-
/*
|
|
961
|
-
Payment details incorrect (unknown hash, invalid amt or
|
|
962
|
-
invalid final cltv delta)
|
|
963
|
-
*/
|
|
964
|
-
FAILED_INCORRECT_PAYMENT_DETAILS = 5;
|
|
965
|
-
|
|
966
|
-
/*
|
|
967
|
-
Insufficient local balance.
|
|
968
|
-
*/
|
|
969
|
-
FAILED_INSUFFICIENT_BALANCE = 6;
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
message PaymentStatus {
|
|
973
|
-
// Current state the payment is in.
|
|
974
|
-
PaymentState state = 1;
|
|
975
|
-
|
|
976
|
-
/*
|
|
977
|
-
The pre-image of the payment when state is SUCCEEDED.
|
|
978
|
-
*/
|
|
979
|
-
bytes preimage = 2;
|
|
980
|
-
|
|
981
|
-
reserved 3;
|
|
982
|
-
|
|
983
|
-
/*
|
|
984
|
-
The HTLCs made in attempt to settle the payment [EXPERIMENTAL].
|
|
985
|
-
*/
|
|
986
|
-
repeated lnrpc.HTLCAttempt htlcs = 4;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
900
|
message CircuitKey {
|
|
990
901
|
/// The id of the channel that the is part of this circuit.
|
|
991
902
|
uint64 chan_id = 1;
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
],
|
|
19
19
|
"prefAttachType": "preferential",
|
|
20
20
|
"versions": {
|
|
21
|
+
"0c4a70340d21d5cd87bb77b940acb02c90f4e8e7": "0.21.0-beta",
|
|
21
22
|
"0d5b0fefa4d9082f7964836f5e58c3a6bda8e471": "0.10.2-beta",
|
|
22
23
|
"13aa7f99248c7ee63989d3b62e0cbfe86d7b0964": "0.17.3-beta",
|
|
23
24
|
"15c1eb13972f86a7c1e8cb084aa6d52700d685ff": "0.14.5-beta",
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"bolt09": "2.2.0",
|
|
21
21
|
"invoices": "5.0.2",
|
|
22
22
|
"psbt": "5.0.0",
|
|
23
|
-
"type-fest": "5.
|
|
23
|
+
"type-fest": "5.7.0"
|
|
24
24
|
},
|
|
25
25
|
"description": "Lightning Network client library",
|
|
26
26
|
"devDependencies": {
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"directory": "test-typescript/typescript"
|
|
52
52
|
},
|
|
53
53
|
"types": "index.d.ts",
|
|
54
|
-
"version": "12.0
|
|
54
|
+
"version": "12.1.0"
|
|
55
55
|
}
|