lightning 6.2.4 → 6.2.5
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
CHANGED
package/grpc/protos/router.proto
CHANGED
|
@@ -618,6 +618,8 @@ message HtlcEvent {
|
|
|
618
618
|
ForwardFailEvent forward_fail_event = 8;
|
|
619
619
|
SettleEvent settle_event = 9;
|
|
620
620
|
LinkFailEvent link_fail_event = 10;
|
|
621
|
+
SubscribedEvent subscribed_event = 11;
|
|
622
|
+
FinalHtlcEvent final_htlc_event = 12;
|
|
621
623
|
}
|
|
622
624
|
}
|
|
623
625
|
|
|
@@ -648,6 +650,14 @@ message SettleEvent {
|
|
|
648
650
|
bytes preimage = 1;
|
|
649
651
|
}
|
|
650
652
|
|
|
653
|
+
message FinalHtlcEvent {
|
|
654
|
+
bool settled = 1;
|
|
655
|
+
bool offchain = 2;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
message SubscribedEvent {
|
|
659
|
+
}
|
|
660
|
+
|
|
651
661
|
message LinkFailEvent {
|
|
652
662
|
// Info contains details about the htlc that we failed.
|
|
653
663
|
HtlcInfo info = 1;
|
|
@@ -792,6 +802,10 @@ message ForwardHtlcInterceptRequest {
|
|
|
792
802
|
|
|
793
803
|
// The onion blob for the next hop
|
|
794
804
|
bytes onion_blob = 9;
|
|
805
|
+
|
|
806
|
+
// The block height at which this htlc will be auto-failed to prevent the
|
|
807
|
+
// channel from force-closing.
|
|
808
|
+
int32 auto_fail_height = 10;
|
|
795
809
|
}
|
|
796
810
|
|
|
797
811
|
/**
|
|
@@ -3,6 +3,7 @@ const {returnResult} = require('asyncjs-util');
|
|
|
3
3
|
|
|
4
4
|
const {isLnd} = require('./../../lnd_requests');
|
|
5
5
|
|
|
6
|
+
const errorMessageNotFound = 'tower not found';
|
|
6
7
|
const hexAsBuffer = hex => Buffer.from(hex, 'hex');
|
|
7
8
|
const method = 'removeTower';
|
|
8
9
|
const type = 'tower_client';
|
|
@@ -47,6 +48,11 @@ module.exports = (args, cbk) => {
|
|
|
47
48
|
return cbk([501, 'ExpectedLndWithWtclientrpcTagToDisconnect']);
|
|
48
49
|
}
|
|
49
50
|
|
|
51
|
+
// Exit early when the tower is already not present
|
|
52
|
+
if (!!err && err.details === errorMessageNotFound) {
|
|
53
|
+
return cbk();
|
|
54
|
+
}
|
|
55
|
+
|
|
50
56
|
if (!!err) {
|
|
51
57
|
return cbk([503, 'UnexpectedErrDisconnectingWatchtower', {err}]);
|
|
52
58
|
}
|
|
@@ -71,6 +71,15 @@ module.exports = ({lnd}) => {
|
|
|
71
71
|
const sub = lnd[type][method]({});
|
|
72
72
|
|
|
73
73
|
sub.on('data', data => {
|
|
74
|
+
// Exit early on subscribed events
|
|
75
|
+
if (!!data && !!data.subscribed_event) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (!!data && !!data.final_htlc_event) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
74
83
|
try {
|
|
75
84
|
emitter.emit(event, forwardFromHtlcEvent(data));
|
|
76
85
|
} catch (err) {
|
|
@@ -81,6 +81,15 @@ module.exports = ({lnd}) => {
|
|
|
81
81
|
const emitErr = emitSubscriptionError({emitter, subscription: sub});
|
|
82
82
|
|
|
83
83
|
sub.on('data', data => {
|
|
84
|
+
// Exit early on subscribed events
|
|
85
|
+
if (!!data && !!data.subscribed_event) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (!!data && !!data.final_htlc_event) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
84
93
|
try {
|
|
85
94
|
const htlc = forwardFromHtlcEvent(data);
|
|
86
95
|
|
package/package.json
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
"url": "https://github.com/alexbosworth/lightning/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@grpc/grpc-js": "1.7.
|
|
10
|
+
"@grpc/grpc-js": "1.7.3",
|
|
11
11
|
"@grpc/proto-loader": "0.7.3",
|
|
12
12
|
"@types/express": "4.17.14",
|
|
13
|
-
"@types/node": "18.11.
|
|
13
|
+
"@types/node": "18.11.7",
|
|
14
14
|
"@types/request": "2.48.8",
|
|
15
15
|
"@types/ws": "8.5.3",
|
|
16
16
|
"async": "3.2.4",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"bn.js": "5.2.1",
|
|
20
20
|
"body-parser": "1.20.1",
|
|
21
21
|
"bolt07": "1.8.2",
|
|
22
|
-
"bolt09": "0.2.
|
|
22
|
+
"bolt09": "0.2.4",
|
|
23
23
|
"cbor": "8.1.0",
|
|
24
24
|
"ecpair": "2.1.0",
|
|
25
25
|
"express": "4.18.2",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@alexbosworth/tap": "15.0.11",
|
|
35
35
|
"tsd": "0.24.1",
|
|
36
36
|
"typescript": "4.8.4",
|
|
37
|
-
"ws": "8.
|
|
37
|
+
"ws": "8.10.0"
|
|
38
38
|
},
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=14"
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"directory": "test/typescript"
|
|
60
60
|
},
|
|
61
61
|
"types": "index.d.ts",
|
|
62
|
-
"version": "6.2.
|
|
62
|
+
"version": "6.2.5"
|
|
63
63
|
}
|