ln-service 54.10.0 → 54.10.2
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/README.md
CHANGED
|
@@ -3244,6 +3244,8 @@ Get the settlement status of a received HTLC
|
|
|
3244
3244
|
|
|
3245
3245
|
Note: this method is not supported in LND versions 0.15.5 and below
|
|
3246
3246
|
|
|
3247
|
+
Requires LND running with `--store-final-htlc-resolutions` flag
|
|
3248
|
+
|
|
3247
3249
|
Requires `offchain:read` permissions
|
|
3248
3250
|
|
|
3249
3251
|
{
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"cors": "2.8.5",
|
|
12
12
|
"express": "4.18.2",
|
|
13
13
|
"invoices": "2.2.3",
|
|
14
|
-
"lightning": "7.1.
|
|
14
|
+
"lightning": "7.1.2",
|
|
15
15
|
"macaroon": "3.0.4",
|
|
16
16
|
"morgan": "1.10.0",
|
|
17
17
|
"ws": "8.12.1"
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
"@alexbosworth/node-fetch": "2.6.2",
|
|
23
23
|
"async": "3.2.4",
|
|
24
24
|
"asyncjs-util": "1.2.11",
|
|
25
|
-
"bip32": "
|
|
25
|
+
"bip32": "4.0.0",
|
|
26
26
|
"bip66": "1.1.5",
|
|
27
27
|
"bitcoinjs-lib": "6.1.0",
|
|
28
28
|
"bn.js": "5.2.1",
|
|
29
|
-
"bs58check": "
|
|
29
|
+
"bs58check": "3.0.1",
|
|
30
30
|
"ecpair": "2.1.0",
|
|
31
|
-
"ln-docker-daemons": "4.1.
|
|
31
|
+
"ln-docker-daemons": "4.1.2",
|
|
32
32
|
"p2tr": "1.3.3",
|
|
33
33
|
"portfinder": "1.0.32",
|
|
34
34
|
"psbt": "2.7.2",
|
|
35
|
-
"rimraf": "4.1.
|
|
35
|
+
"rimraf": "4.1.3",
|
|
36
36
|
"secp256k1": "5.0.0",
|
|
37
37
|
"tiny-secp256k1": "2.2.1",
|
|
38
38
|
"uuid": "9.0.0",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"integration-test-0.14.4": "DOCKER_LND_VERSION=v0.14.4-beta npm run test",
|
|
65
65
|
"test": "echo $DOCKER_LND_VERSION && tap -j 2 --branches=1 --functions=1 --lines=1 --statements=1 -t 200 test/autopilotrpc-integration/*.js test/chainrpc-integration/*.js test/integration/*.js test/invoicesrpc-integration/*.js test/peersrpc-integration/*.js test/routerrpc-integration/*.js test/signerrpc-integration/*.js test/tower_clientrpc-integration/*.js test/tower_serverrpc-integration/*.js test/walletrpc-integration/*.js"
|
|
66
66
|
},
|
|
67
|
-
"version": "54.10.
|
|
67
|
+
"version": "54.10.2"
|
|
68
68
|
}
|
|
@@ -15,30 +15,39 @@ const tokens = 100;
|
|
|
15
15
|
|
|
16
16
|
// Get the settlement status of an HTLC
|
|
17
17
|
test(`Get settlement status`, async ({end, equal, strictSame}) => {
|
|
18
|
-
|
|
18
|
+
// LND 0.15.5 and below do not support settlement status lookups
|
|
19
|
+
{
|
|
20
|
+
const {kill, nodes} = await spawnLightningCluster({size});
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
const [{generate, lnd}, target] = nodes;
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
const [code, message] = err;
|
|
24
|
+
try {
|
|
25
|
+
await getSettlementStatus({
|
|
26
|
+
lnd: target.lnd,
|
|
27
|
+
channel: fakeChannelId,
|
|
28
|
+
payment: Number(),
|
|
29
|
+
});
|
|
30
|
+
} catch (err) {
|
|
31
|
+
const [code, message] = err;
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
if (code !== 404) {
|
|
34
|
+
equal(code, 501, 'Method unsupported');
|
|
35
|
+
equal(message, 'LookupHtlcResolutionMethodUnsupported', 'Unsupported');
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
await kill({});
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
return end();
|
|
40
|
+
}
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
|
|
44
|
+
const {kill, nodes} = await spawnLightningCluster({
|
|
45
|
+
size,
|
|
46
|
+
lnd_configuration: ['--store-final-htlc-resolutions'],
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const [{generate, lnd}, target] = nodes;
|
|
50
|
+
|
|
42
51
|
try {
|
|
43
52
|
const channel = await setupChannel({generate, lnd, to: target});
|
|
44
53
|
|
|
@@ -59,8 +59,8 @@ test(`Get master public keys`, async ({end, equal, strictSame}) => {
|
|
|
59
59
|
// Convert the key from base58 into its raw form
|
|
60
60
|
const rawKey = bs58check.decode(masterIdentityKey.extended_public_key);
|
|
61
61
|
|
|
62
|
-
const chainCode = chainCodeFromMasterPublicKey(rawKey);
|
|
63
|
-
const publicKey = publicKeyFromMasterPublicKey(rawKey);
|
|
62
|
+
const chainCode = Buffer.from(chainCodeFromMasterPublicKey(rawKey));
|
|
63
|
+
const publicKey = Buffer.from(publicKeyFromMasterPublicKey(rawKey));
|
|
64
64
|
|
|
65
65
|
// Make a bip32 object to derive from
|
|
66
66
|
const masterKey = fromPublicKey(publicKey, chainCode);
|