ln-service 56.5.1 → 56.7.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
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Versions
|
|
2
2
|
|
|
3
|
+
## 56.7.0
|
|
4
|
+
|
|
5
|
+
- `getPendingChannels`: Add `description` to return pending channel description
|
|
6
|
+
- `getPendingChannels`: Add `is_private` to show pending channel announcement
|
|
7
|
+
|
|
8
|
+
## 56.6.0
|
|
9
|
+
|
|
10
|
+
- `getPendingChannels`: Add `type` to return pending channel type
|
|
11
|
+
|
|
3
12
|
## 56.5.1
|
|
4
13
|
|
|
5
14
|
- `getPendingChannels`: Fix returning closing transaction id for waiting close
|
package/README.md
CHANGED
|
@@ -1684,7 +1684,7 @@ Requires `offchain:read` permission
|
|
|
1684
1684
|
|
|
1685
1685
|
`is_trusted_funding` is not supported on LND 0.15.0 and below
|
|
1686
1686
|
|
|
1687
|
-
`description` is not supported on LND 0.16.
|
|
1687
|
+
`description` is not supported on LND 0.16.4 and below
|
|
1688
1688
|
|
|
1689
1689
|
{
|
|
1690
1690
|
[is_active]: <Limit Results To Only Active Channels Bool> // false
|
|
@@ -2881,6 +2881,10 @@ channel may be opening, closing, or active.
|
|
|
2881
2881
|
|
|
2882
2882
|
Requires `offchain:read` permission
|
|
2883
2883
|
|
|
2884
|
+
`is_private` is not supported in LND 0.14.5 or before
|
|
2885
|
+
|
|
2886
|
+
`description` is not supported in LND 0.16.4 or before
|
|
2887
|
+
|
|
2884
2888
|
{
|
|
2885
2889
|
lnd: <Authenticated LND API Object>
|
|
2886
2890
|
}
|
|
@@ -2890,10 +2894,12 @@ Requires `offchain:read` permission
|
|
|
2890
2894
|
pending_channels: [{
|
|
2891
2895
|
capacity: <Channel Capacity Tokens Number>
|
|
2892
2896
|
[close_transaction_id]: <Channel Closing Transaction Id String>
|
|
2897
|
+
[description]: <Channel Description String>
|
|
2893
2898
|
is_active: <Channel Is Active Bool>
|
|
2894
2899
|
is_closing: <Channel Is Closing Bool>
|
|
2895
2900
|
is_opening: <Channel Is Opening Bool>
|
|
2896
2901
|
[is_partner_initiated]: <Channel Partner Initiated Channel Bool>
|
|
2902
|
+
[is_private]: <Channel Is Private Bool>
|
|
2897
2903
|
is_timelocked: <Channel Local Funds Constrained by Timelock Script Bool>
|
|
2898
2904
|
local_balance: <Channel Local Tokens Balance Number>
|
|
2899
2905
|
local_reserve: <Channel Local Reserved Tokens Number>
|
|
@@ -2917,6 +2923,7 @@ Requires `offchain:read` permission
|
|
|
2917
2923
|
transaction_id: <Channel Funding Transaction Id String>
|
|
2918
2924
|
transaction_vout: <Channel Funding Transaction Vout Number>
|
|
2919
2925
|
[transaction_weight]: <Commit Transaction Weight Number>
|
|
2926
|
+
[type]: <Channel Commitment Transaction Type String>
|
|
2920
2927
|
}]
|
|
2921
2928
|
}
|
|
2922
2929
|
|
|
@@ -3701,9 +3708,9 @@ Requires `offchain:write`, `onchain:write`, `peers:write` permissions
|
|
|
3701
3708
|
`base_fee_mtokens` is not supported on LND 0.15.5 and below
|
|
3702
3709
|
`fee_rate` is not supported on LND 0.15.5 and below
|
|
3703
3710
|
|
|
3704
|
-
`is_max_funding` is not supported on LND 0.16.
|
|
3711
|
+
`is_max_funding` is not supported on LND 0.16.4 and below
|
|
3705
3712
|
|
|
3706
|
-
`description` is not supported on LND 0.16.
|
|
3713
|
+
`description` is not supported on LND 0.16.4 and below
|
|
3707
3714
|
|
|
3708
3715
|
{
|
|
3709
3716
|
[base_fee_mtokens]: <Routing Base Fee Millitokens Charged String>
|
|
@@ -3760,7 +3767,7 @@ as well as a channel open request listener to accept the trusted funding.
|
|
|
3760
3767
|
`base_fee_mtokens` is not supported on LND 0.15.5 and below
|
|
3761
3768
|
`fee_rate` is not supported on LND 0.15.5 and below
|
|
3762
3769
|
|
|
3763
|
-
`description` is not supported on LND 0.16.
|
|
3770
|
+
`description` is not supported on LND 0.16.4 and below
|
|
3764
3771
|
|
|
3765
3772
|
{
|
|
3766
3773
|
channels: [{
|
|
@@ -4393,7 +4400,7 @@ Requires `address:read`, `offchain:write`, `onchain:write` permissions
|
|
|
4393
4400
|
|
|
4394
4401
|
Requires LND compiled with `walletrpc` build tag
|
|
4395
4402
|
|
|
4396
|
-
`description` is not supported on LND 0.16.
|
|
4403
|
+
`description` is not supported on LND 0.16.4 and below
|
|
4397
4404
|
|
|
4398
4405
|
{
|
|
4399
4406
|
capacity: <Channel Capacity Tokens Number>
|
|
@@ -5263,7 +5270,7 @@ Requires `offchain:read` permission
|
|
|
5263
5270
|
|
|
5264
5271
|
`is_trusted_funding`, `other_ids` are not supported on LND 0.15.0 and below
|
|
5265
5272
|
|
|
5266
|
-
`description` is not supported on LND 0.16.
|
|
5273
|
+
`description` is not supported on LND 0.16.4 and below
|
|
5267
5274
|
|
|
5268
5275
|
{
|
|
5269
5276
|
lnd: <Authenticated LND API Object>
|
|
@@ -6805,7 +6812,7 @@ LND must be running with "RPC middleware" enabled: `rpcmiddleware.enable=1`
|
|
|
6805
6812
|
|
|
6806
6813
|
This method is not supported in LND 0.13.4 and below
|
|
6807
6814
|
|
|
6808
|
-
`description` is not supported on LND 0.16.
|
|
6815
|
+
`description` is not supported on LND 0.16.4 and below
|
|
6809
6816
|
|
|
6810
6817
|
{
|
|
6811
6818
|
[id]: <RPC Middleware Interception Name String>
|
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": "9.
|
|
14
|
+
"lightning": "9.7.0",
|
|
15
15
|
"macaroon": "3.0.4",
|
|
16
16
|
"morgan": "1.10.0",
|
|
17
17
|
"ws": "8.13.0"
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"asyncjs-util": "1.2.11",
|
|
26
26
|
"bip32": "4.0.0",
|
|
27
27
|
"bip66": "1.1.5",
|
|
28
|
-
"bitcoinjs-lib": "6.1.
|
|
28
|
+
"bitcoinjs-lib": "6.1.3",
|
|
29
29
|
"bn.js": "5.2.1",
|
|
30
30
|
"bs58check": "3.0.1",
|
|
31
31
|
"ecpair": "2.1.0",
|
|
32
|
-
"ln-docker-daemons": "5.0.
|
|
32
|
+
"ln-docker-daemons": "5.0.6",
|
|
33
33
|
"p2tr": "1.3.3",
|
|
34
34
|
"portfinder": "1.0.32",
|
|
35
35
|
"psbt": "2.7.2",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"integration-test-0.14.4": "DOCKER_LND_VERSION=v0.14.4-beta npm run test",
|
|
70
70
|
"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"
|
|
71
71
|
},
|
|
72
|
-
"version": "56.
|
|
72
|
+
"version": "56.7.0"
|
|
73
73
|
}
|
|
@@ -27,6 +27,7 @@ const {unlockUtxo} = require('./../../');
|
|
|
27
27
|
|
|
28
28
|
const capacity = 1e6;
|
|
29
29
|
const count = 100;
|
|
30
|
+
const description = 'description';
|
|
30
31
|
const interval = 100;
|
|
31
32
|
const race = promises => Promise.race(promises);
|
|
32
33
|
const size = 3;
|
|
@@ -61,11 +62,16 @@ test(`Forfeit pending channel`, async ({end, equal, strictSame}) => {
|
|
|
61
62
|
return await addPeer({lnd, public_key: node.id, socket: node.socket});
|
|
62
63
|
});
|
|
63
64
|
|
|
64
|
-
const channels = [{
|
|
65
|
+
const channels = [{
|
|
66
|
+
capacity,
|
|
67
|
+
description,
|
|
68
|
+
is_private: true,
|
|
69
|
+
partner_public_key: target.id,
|
|
70
|
+
}];
|
|
65
71
|
|
|
66
72
|
// Propose a channel to target
|
|
67
|
-
const proposeToTarget = await asyncRetry({interval, times}, cbk => {
|
|
68
|
-
return asyncTimeout(openChannels, 1000 *
|
|
73
|
+
const proposeToTarget = await asyncRetry({interval: 1000, times}, cbk => {
|
|
74
|
+
return asyncTimeout(openChannels, 1000 * 3)({
|
|
69
75
|
channels,
|
|
70
76
|
lnd,
|
|
71
77
|
is_avoiding_broadcast: true,
|
|
@@ -96,10 +102,15 @@ test(`Forfeit pending channel`, async ({end, equal, strictSame}) => {
|
|
|
96
102
|
});
|
|
97
103
|
|
|
98
104
|
// Propose a channel to remote
|
|
99
|
-
const proposeToRemote = await asyncRetry({interval, times}, cbk => {
|
|
100
|
-
return asyncTimeout(openChannels, 1000 *
|
|
105
|
+
const proposeToRemote = await asyncRetry({interval: 1000, times}, cbk => {
|
|
106
|
+
return asyncTimeout(openChannels, 1000 * 3)({
|
|
101
107
|
lnd,
|
|
102
|
-
channels: [{
|
|
108
|
+
channels: [{
|
|
109
|
+
capacity,
|
|
110
|
+
description,
|
|
111
|
+
is_private: true,
|
|
112
|
+
partner_public_key: remote.id,
|
|
113
|
+
}],
|
|
103
114
|
is_avoiding_broadcast: true,
|
|
104
115
|
},
|
|
105
116
|
cbk);
|
|
@@ -122,13 +133,18 @@ test(`Forfeit pending channel`, async ({end, equal, strictSame}) => {
|
|
|
122
133
|
funding: signRemote.psbt,
|
|
123
134
|
});
|
|
124
135
|
|
|
136
|
+
await delay(1000);
|
|
137
|
+
|
|
125
138
|
const {transaction} = extractTransaction({ecp, psbt: signRemote.psbt});
|
|
126
139
|
|
|
127
140
|
await broadcastChainTransaction({lnd, transaction});
|
|
128
141
|
|
|
129
|
-
|
|
142
|
+
await generate({});
|
|
143
|
+
|
|
144
|
+
const channel = await asyncRetry({interval: 1000, times}, async () => {
|
|
130
145
|
const [channel] = (await getChannels({lnd})).channels;
|
|
131
146
|
|
|
147
|
+
// Exit early when the channel is created
|
|
132
148
|
if (!!channel) {
|
|
133
149
|
return channel;
|
|
134
150
|
}
|
|
@@ -142,6 +158,12 @@ test(`Forfeit pending channel`, async ({end, equal, strictSame}) => {
|
|
|
142
158
|
|
|
143
159
|
const [pending] = (await getPendingChannels({lnd})).pending_channels;
|
|
144
160
|
|
|
161
|
+
// Description is not supported in LND 0.16.4 or before
|
|
162
|
+
if (!!pending.description) {
|
|
163
|
+
strictSame(pending.description, description, 'Got expected description');
|
|
164
|
+
strictSame(pending.is_private, true, 'Got pending private status');
|
|
165
|
+
}
|
|
166
|
+
|
|
145
167
|
const stuckTx = extractTransaction({ecp, psbt: signTarget.psbt});
|
|
146
168
|
|
|
147
169
|
const [stuckPending] = proposeToTarget.pending;
|
|
@@ -107,7 +107,7 @@ test('Subscribe to channels', async ({end, equal, fail}) => {
|
|
|
107
107
|
equal(openEvent.local_balance, 890950, 'Channel local balance returned');
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
// LND 0.16.
|
|
110
|
+
// LND 0.16.4 and below do not support channel descriptions
|
|
111
111
|
if (!!openEvent.description) {
|
|
112
112
|
equal(openEvent.description, description, 'Got channel open description');
|
|
113
113
|
}
|