ln-service 56.12.0 → 56.13.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,9 @@
1
1
  # Versions
2
2
 
3
+ ## 56.13.0
4
+
5
+ - `openChannels`: Add `is_simplified_taproot` to make a simplified taproot chan
6
+
3
7
  ## 56.12.0
4
8
 
5
9
  - `openChannel`: Add `is_simplified_taproot` to make a simplified taproot chan
package/README.md CHANGED
@@ -3830,6 +3830,9 @@ as well as a channel open request listener to accept the trusted funding.
3830
3830
 
3831
3831
  `description` is not supported on LND 0.16.4 and below
3832
3832
 
3833
+ `is_simplified_taproot` is not supported on LND 0.16.4 and below and requires
3834
+ `--protocol.simple-taproot-chans` set on both sides.
3835
+
3833
3836
  {
3834
3837
  channels: [{
3835
3838
  [base_fee_mtokens]: <Routing Base Fee Millitokens Charged String>
@@ -3839,6 +3842,7 @@ as well as a channel open request listener to accept the trusted funding.
3839
3842
  [fee_rate]: <Routing Fee Rate In Millitokens Per Million Number>
3840
3843
  [give_tokens]: <Tokens to Gift To Partner Number> // Defaults to zero
3841
3844
  [is_private]: <Channel is Private Bool> // Defaults to false
3845
+ [is_simplified_taproot]: <Channel is Simplified Taproot Type Bool>
3842
3846
  [is_trusted_funding]: <Peer Should Avoid Waiting For Confirmation Bool>
3843
3847
  [min_htlc_mtokens]: <Minimum HTLC Millitokens String>
3844
3848
  [partner_csv_delay]: <Peer Output CSV Delay Number>
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "cors": "2.8.5",
12
12
  "express": "4.18.2",
13
13
  "invoices": "3.0.0",
14
- "lightning": "9.12.0",
14
+ "lightning": "9.13.0",
15
15
  "macaroon": "3.0.4",
16
16
  "morgan": "1.10.0",
17
17
  "ws": "8.13.0"
@@ -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 && node test/runner"
71
71
  },
72
- "version": "56.12.0"
72
+ "version": "56.13.0"
73
73
  }
@@ -5,8 +5,13 @@ const asyncRetry = require('async/retry');
5
5
  const {spawnLightningCluster} = require('ln-docker-daemons');
6
6
 
7
7
  const {addPeer} = require('./../../');
8
+ const {broadcastChainTransaction} = require('./../../');
9
+ const {fundPendingChannels} = require('./../../');
10
+ const {fundPsbt} = require('./../../');
8
11
  const {getChannels} = require('./../../');
9
12
  const {openChannel} = require('./../../');
13
+ const {openChannels} = require('./../../');
14
+ const {signPsbt} = require('./../../');
10
15
 
11
16
  const channelCapacityTokens = 1e6;
12
17
  const count = 100;
@@ -107,5 +112,63 @@ test(`Open simplified taproot channel`, async () => {
107
112
  await kill({});
108
113
  }
109
114
 
115
+ // Try opening a simplified taproot channel via PSBT funding
116
+ {
117
+ const {kill, nodes} = await spawnLightningCluster({
118
+ size,
119
+ lnd_configuration: ['--protocol.simple-taproot-chans'],
120
+ });
121
+
122
+ const [{generate, id, lnd}, target] = nodes;
123
+
124
+ await generate({count});
125
+
126
+ await addPeer({lnd, public_key: target.id, socket: target.socket});
127
+
128
+ const channelOpen = await asyncRetry({interval, times}, async () => {
129
+ await addPeer({lnd, public_key: target.id, socket: target.socket});
130
+
131
+ return await openChannels({
132
+ lnd,
133
+ channels: [{
134
+ capacity: channelCapacityTokens,
135
+ is_private: true,
136
+ is_simplified_taproot: true,
137
+ partner_public_key: target.id,
138
+ }],
139
+ });
140
+ });
141
+
142
+ const funded = await fundPsbt({lnd, outputs: channelOpen.pending});
143
+
144
+ const signed = await signPsbt({lnd, psbt: funded.psbt});
145
+
146
+ await fundPendingChannels({
147
+ lnd,
148
+ channels: channelOpen.pending.map(n => n.id),
149
+ funding: signed.psbt,
150
+ });
151
+
152
+ await broadcastChainTransaction({lnd, transaction: signed.transaction});
153
+
154
+ const channel = await asyncRetry({interval, times}, async () => {
155
+ await generate({});
156
+
157
+ const {channels} = await getChannels({lnd});
158
+
159
+ const [channel] = channels;
160
+
161
+ if (!channel) {
162
+ throw new Error('ExpectedChannelOpened');
163
+ }
164
+
165
+ return channel;
166
+ });
167
+
168
+ equal(channel.type, 'simplified_taproot', 'Opened simplified taproot');
169
+
170
+ await kill({});
171
+ }
172
+
110
173
  return;
111
174
  });