ln-service 54.3.3 → 54.4.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 +5 -0
- package/README.md +2 -0
- package/package.json +4 -4
- package/test/chainrpc-integration/test_subscribe_to_blocks.js +1 -1
- package/test/integration/test_get_forwards.js +3 -1
- package/test/integration/test_recover_funds_from_channel.js +3 -0
- package/test/integration/test_recover_funds_from_channels.js +3 -0
- package/test/integration/test_send_to_chain_addresses.js +2 -1
- package/test/integration/test_subscribe_to_rpc_requests.js +2 -0
- package/test/integration/test_trusted_funding.js +9 -7
- package/test/{extra-integration/tower_serverrpc-integration → tower_serverrpc-integration}/test_get_tower_server_info.js +6 -9
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -6704,8 +6704,10 @@ This method is not supported in LND 0.13.4 and below
|
|
|
6704
6704
|
macaroon: <Base64 Encoded Macaroon String>
|
|
6705
6705
|
reject: ({message: <Rejection String>}, [cbk]) => {}
|
|
6706
6706
|
request: {
|
|
6707
|
+
[base_fee_mtokens]: <Routing Base Fee Millitokens Charged String>
|
|
6707
6708
|
[chain_fee_tokens_per_vbyte]: <Chain Fee Tokens Per VByte Number>
|
|
6708
6709
|
[cooperative_close_address]: <Prefer Cooperative Close To Address String>
|
|
6710
|
+
[fee_rate]: <Routing Fee Rate In Millitokens Per Million Number>
|
|
6709
6711
|
[give_tokens]: <Tokens to Gift To Partner Number>
|
|
6710
6712
|
[is_private]: <Channel is Private Bool>
|
|
6711
6713
|
local_tokens: <Local Tokens Number>
|
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.2",
|
|
14
|
-
"lightning": "6.
|
|
14
|
+
"lightning": "6.4.0",
|
|
15
15
|
"macaroon": "3.0.4",
|
|
16
16
|
"morgan": "1.10.0",
|
|
17
17
|
"ws": "8.11.0"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"bn.js": "5.2.1",
|
|
29
29
|
"bs58check": "2.1.2",
|
|
30
30
|
"ecpair": "2.1.0",
|
|
31
|
-
"ln-docker-daemons": "
|
|
31
|
+
"ln-docker-daemons": "4.0.0",
|
|
32
32
|
"p2tr": "1.3.2",
|
|
33
33
|
"portfinder": "1.0.32",
|
|
34
34
|
"psbt": "2.7.1",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"integration-test-0.15.2": "DOCKER_LND_VERSION=v0.15.2-beta npm run test",
|
|
63
63
|
"integration-test-0.14.5": "DOCKER_LND_VERSION=v0.14.5-beta npm run test",
|
|
64
64
|
"integration-test-0.14.4": "DOCKER_LND_VERSION=v0.14.4-beta npm run test",
|
|
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/walletrpc-integration/*.js"
|
|
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_serverrpc-integration/*.js test/walletrpc-integration/*.js"
|
|
66
66
|
},
|
|
67
|
-
"version": "54.
|
|
67
|
+
"version": "54.4.0"
|
|
68
68
|
}
|
|
@@ -14,7 +14,7 @@ const {subscribeToBlocks} = require('./../../');
|
|
|
14
14
|
const {waitForTermination} = require('./../macros');
|
|
15
15
|
|
|
16
16
|
const confirmationCount = 6;
|
|
17
|
-
const interval =
|
|
17
|
+
const interval = 50;
|
|
18
18
|
const race = promises => Promise.race(promises);
|
|
19
19
|
const times = 4000;
|
|
20
20
|
|
|
@@ -9,8 +9,10 @@ const {getForwards} = require('./../../');
|
|
|
9
9
|
const {pay} = require('./../../');
|
|
10
10
|
const {setupChannel} = require('./../macros');
|
|
11
11
|
|
|
12
|
+
const interval = 100;
|
|
12
13
|
const limit = 1;
|
|
13
14
|
const size = 3;
|
|
15
|
+
const times = 1000;
|
|
14
16
|
const tokens = 100;
|
|
15
17
|
|
|
16
18
|
// Getting forwarded payments should return all forwarded payments
|
|
@@ -32,7 +34,7 @@ test('Get forwards', async ({end, equal, strictSame}) => {
|
|
|
32
34
|
await delay(2000);
|
|
33
35
|
|
|
34
36
|
for (let i = 0, l = remote.lnd; i < 3; i++) {
|
|
35
|
-
await asyncRetry({}, async () => {
|
|
37
|
+
await asyncRetry({interval, times}, async () => {
|
|
36
38
|
await delay(1000);
|
|
37
39
|
|
|
38
40
|
await pay({
|
|
@@ -34,6 +34,7 @@ test(`Recover funds from channel`, async ({end, equal}) => {
|
|
|
34
34
|
generate_address: generateAddress,
|
|
35
35
|
lightning_p2p_port: await getPort({port: 12001, stopPort: 13000}),
|
|
36
36
|
lightning_rpc_port: await getPort({port: 13001, stopPort: 14000}),
|
|
37
|
+
lightning_tower_port: await getPort({port: 14001, stopPort: 15000}),
|
|
37
38
|
});
|
|
38
39
|
});
|
|
39
40
|
|
|
@@ -46,6 +47,7 @@ test(`Recover funds from channel`, async ({end, equal}) => {
|
|
|
46
47
|
generate_address: generateAddress,
|
|
47
48
|
lightning_p2p_port: await getPort({port: 12001, stopPort: 13000}),
|
|
48
49
|
lightning_rpc_port: await getPort({port: 13001, stopPort: 14000}),
|
|
50
|
+
lightning_tower_port: await getPort({port: 14001, stopPort: 15000}),
|
|
49
51
|
});
|
|
50
52
|
});
|
|
51
53
|
|
|
@@ -116,6 +118,7 @@ test(`Recover funds from channel`, async ({end, equal}) => {
|
|
|
116
118
|
generate_address: generateAddress,
|
|
117
119
|
lightning_p2p_port: await getPort({port: 12001, stopPort: 13000}),
|
|
118
120
|
lightning_rpc_port: await getPort({port: 13001, stopPort: 14000}),
|
|
121
|
+
lightning_tower_port: await getPort({port: 14001, stopPort: 15000}),
|
|
119
122
|
});
|
|
120
123
|
});
|
|
121
124
|
|
|
@@ -34,6 +34,7 @@ test(`Recover funds from channels`, async ({end, equal}) => {
|
|
|
34
34
|
generate_address: generateAddress,
|
|
35
35
|
lightning_p2p_port: await getPort({port: 12001, stopPort: 13000}),
|
|
36
36
|
lightning_rpc_port: await getPort({port: 13001, stopPort: 14000}),
|
|
37
|
+
lightning_tower_port: await getPort({port: 14001, stopPort: 15000}),
|
|
37
38
|
});
|
|
38
39
|
});
|
|
39
40
|
|
|
@@ -46,6 +47,7 @@ test(`Recover funds from channels`, async ({end, equal}) => {
|
|
|
46
47
|
generate_address: generateAddress,
|
|
47
48
|
lightning_p2p_port: await getPort({port: 12001, stopPort: 13000}),
|
|
48
49
|
lightning_rpc_port: await getPort({port: 13001, stopPort: 14000}),
|
|
50
|
+
lightning_tower_port: await getPort({port: 14001, stopPort: 15000}),
|
|
49
51
|
});
|
|
50
52
|
});
|
|
51
53
|
|
|
@@ -112,6 +114,7 @@ test(`Recover funds from channels`, async ({end, equal}) => {
|
|
|
112
114
|
generate_address: generateAddress,
|
|
113
115
|
lightning_p2p_port: await getPort({port: 12001, stopPort: 13000}),
|
|
114
116
|
lightning_rpc_port: await getPort({port: 13001, stopPort: 14000}),
|
|
117
|
+
lightning_tower_port: await getPort({port: 14001, stopPort: 15000}),
|
|
115
118
|
});
|
|
116
119
|
});
|
|
117
120
|
|
|
@@ -6,6 +6,7 @@ const {createChainAddress} = require('./../../');
|
|
|
6
6
|
const {getChainBalance} = require('./../../');
|
|
7
7
|
const {sendToChainAddresses} = require('./../../');
|
|
8
8
|
|
|
9
|
+
const interval = 1000;
|
|
9
10
|
const regtestBech32AddressHrp = 'bcrt';
|
|
10
11
|
const size = 2;
|
|
11
12
|
const times = 10;
|
|
@@ -47,7 +48,7 @@ test(`Send to chain address`, async ({end, equal}) => {
|
|
|
47
48
|
equal(sent.is_outgoing, true, 'Transaction is outgoing');
|
|
48
49
|
equal(sent.tokens, tokens, 'Tokens amount matches tokens sent');
|
|
49
50
|
|
|
50
|
-
await asyncRetry({times}, async () => {
|
|
51
|
+
await asyncRetry({interval, times}, async () => {
|
|
51
52
|
// Generate to confirm the tx
|
|
52
53
|
await control.generate({});
|
|
53
54
|
|
|
@@ -143,6 +143,8 @@ test(`Subscribe to RPC requests`, async ({end, equal, fail, strictSame}) => {
|
|
|
143
143
|
// Gift some tokens in a channel
|
|
144
144
|
await openChannel({
|
|
145
145
|
lnd,
|
|
146
|
+
base_fee_mtokens: '1',
|
|
147
|
+
fee_rate: 1,
|
|
146
148
|
give_tokens: 1e5,
|
|
147
149
|
local_tokens: 1e6,
|
|
148
150
|
partner_public_key: Buffer.alloc(33, 2).toString('hex'),
|
|
@@ -85,13 +85,15 @@ test(`Open unconfirmed channels`, async ({end, equal, match, strictSame}) => {
|
|
|
85
85
|
});
|
|
86
86
|
|
|
87
87
|
// Propose the channel to the peer
|
|
88
|
-
const {pending} = await
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
const {pending} = await asyncRetry({interval, times}, async () => {
|
|
89
|
+
return await openChannels({
|
|
90
|
+
lnd,
|
|
91
|
+
channels: [{
|
|
92
|
+
capacity,
|
|
93
|
+
is_trusted_funding: true,
|
|
94
|
+
partner_public_key: target.id,
|
|
95
|
+
}],
|
|
96
|
+
});
|
|
95
97
|
});
|
|
96
98
|
|
|
97
99
|
// Setup funding to the 2:2 output
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
+
const {spawnLightningCluster} = require('ln-docker-daemons');
|
|
1
2
|
const {test} = require('@alexbosworth/tap');
|
|
2
3
|
|
|
3
4
|
const {getTowerServerInfo} = require('./../../');
|
|
4
|
-
const {spawnLnd} = require('./../macros');
|
|
5
|
-
const {waitForTermination} = require('./../macros');
|
|
6
5
|
|
|
7
|
-
const
|
|
6
|
+
const conf = ['--watchtower.active'];
|
|
8
7
|
|
|
9
8
|
// Getting the tower server info should return tower server info
|
|
10
9
|
test(`Get tower server info`, async ({end, equal, match}) => {
|
|
11
|
-
const
|
|
10
|
+
const {kill, nodes} = await spawnLightningCluster({lnd_configuration: conf});
|
|
12
11
|
|
|
13
|
-
const {lnd} =
|
|
12
|
+
const [{lnd}] = nodes;
|
|
14
13
|
|
|
15
14
|
const {tower} = await getTowerServerInfo({lnd});
|
|
16
15
|
|
|
@@ -20,15 +19,13 @@ test(`Get tower server info`, async ({end, equal, match}) => {
|
|
|
20
19
|
|
|
21
20
|
match(socket, /127.0.0.1\:\d\d\d\d/, 'Tower socket returned');
|
|
22
21
|
|
|
23
|
-
equal(tower.public_key.length,
|
|
22
|
+
equal(tower.public_key.length, 66, 'Public key returned');
|
|
24
23
|
|
|
25
24
|
const [uri] = tower.uris;
|
|
26
25
|
|
|
27
26
|
equal(uri, `${tower.public_key}@${socket}`, 'Got back socket');
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
await waitForTermination({lnd});
|
|
28
|
+
await kill({});
|
|
32
29
|
|
|
33
30
|
return end();
|
|
34
31
|
});
|