ln-service 57.24.0 → 57.25.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
+ ## 57.25.0
4
+
5
+ - Add support for Testnet4
6
+
3
7
  ## 57.24.0
4
8
 
5
9
  - `closeChannel`: Add `is_graceful_close` option to wait for pending resolution
package/package.json CHANGED
@@ -8,8 +8,8 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "bolt07": "1.9.4",
11
- "invoices": "3.0.0",
12
- "lightning": "10.24.0",
11
+ "invoices": "4.0.0",
12
+ "lightning": "10.25.0",
13
13
  "macaroon": "3.0.4"
14
14
  },
15
15
  "description": "Interaction helper for your Lightning Network daemon",
@@ -21,13 +21,13 @@
21
21
  "bip32": "4.0.0",
22
22
  "bip66": "2.0.0",
23
23
  "bitcoinjs-lib": "6.1.7",
24
- "bn.js": "5.2.1",
24
+ "bn.js": "5.2.2",
25
25
  "bs58check": "4.0.0",
26
- "ecpair": "2.1.0",
27
- "ln-docker-daemons": "6.0.24",
26
+ "ecpair": "3.0.0",
27
+ "ln-docker-daemons": "6.0.25",
28
28
  "p2tr": "2.0.0",
29
- "portfinder": "1.0.34",
30
- "psbt": "3.0.0",
29
+ "portfinder": "1.0.37",
30
+ "psbt": "4.0.0",
31
31
  "rimraf": "6.0.1",
32
32
  "tiny-secp256k1": "2.2.3",
33
33
  "uuid": "11.1.0",
@@ -76,5 +76,5 @@
76
76
  "integration-test-0.14.4": "DOCKER_LND_VERSION=v0.14.4-beta npm run test",
77
77
  "test": "echo $DOCKER_LND_VERSION && node test/runner"
78
78
  },
79
- "version": "57.24.0"
79
+ "version": "57.25.0"
80
80
  }
@@ -194,7 +194,10 @@ test(`Sign a taproot transaction`, async () => {
194
194
 
195
195
  const unusedKey = ecp.makeRandom({network: networks.regtest});
196
196
 
197
- const witnessScript = compile([unusedKey.publicKey.slice(1), OP_CHECKSIG]);
197
+ const witnessScript = compile([
198
+ Buffer.from(unusedKey.publicKey).slice(1),
199
+ OP_CHECKSIG,
200
+ ]);
198
201
 
199
202
  const branches = [{script: witnessScript}];
200
203
 
@@ -273,6 +276,9 @@ test(`Sign a taproot transaction`, async () => {
273
276
  }
274
277
  });
275
278
  } catch (err) {
279
+ console.log("ERR", err);
280
+ await kill({});
281
+
276
282
  equal(err, null, 'Expected no error');
277
283
  }
278
284
 
@@ -128,14 +128,20 @@ test(`Fund PSBT`, async () => {
128
128
  const keyPair2 = ecp.makeRandom({network: networks.regtest});
129
129
  const unusedKey = ecp.makeRandom({network: networks.regtest});
130
130
 
131
- const witnessScript = compile([unusedKey.publicKey.slice(1), OP_CHECKSIG]);
131
+ const witnessScript = compile([
132
+ from(unusedKey.publicKey).slice(1),
133
+ OP_CHECKSIG,
134
+ ]);
132
135
 
133
136
  const branches = [{script: witnessScript}];
134
137
 
135
138
  const {hash} = hashForTree({branches});
136
139
 
137
140
  // Create a combined key using public key material
138
- const combinedPoint = pointAdd(keyPair1.publicKey, keyPair2.publicKey);
141
+ const combinedPoint = pointAdd(
142
+ from(keyPair1.publicKey),
143
+ from(keyPair2.publicKey)
144
+ );
139
145
 
140
146
  const output = v1OutputScript({
141
147
  hash,
@@ -187,7 +193,10 @@ test(`Fund PSBT`, async () => {
187
193
  });
188
194
 
189
195
  // Ready for private key combining
190
- const combinedKey = privateAdd(keyPair1.privateKey, keyPair2.privateKey);
196
+ const combinedKey = privateAdd(
197
+ from(keyPair1.privateKey),
198
+ from(keyPair2.privateKey)
199
+ );
191
200
 
192
201
  const signedInput = signHash({
193
202
  hash,
@@ -224,7 +233,10 @@ test(`Fund PSBT`, async () => {
224
233
 
225
234
  const keyPair = ecp.makeRandom({network: networks.regtest});
226
235
 
227
- const witnessScript = compile([keyPair.publicKey.slice(1), OP_CHECKSIG]);
236
+ const witnessScript = compile([
237
+ from(keyPair.publicKey.slice(1)),
238
+ OP_CHECKSIG,
239
+ ]);
228
240
 
229
241
  const branches = [{script: witnessScript}];
230
242
 
@@ -277,7 +289,7 @@ test(`Fund PSBT`, async () => {
277
289
  );
278
290
  });
279
291
 
280
- const signature = from(signSchnorr(hashToSign, keyPair.privateKey));
292
+ const signature = from(signSchnorr(hashToSign, from(keyPair.privateKey)));
281
293
 
282
294
  const {block} = controlBlock({
283
295
  external_key: output.external_key,
@@ -308,7 +320,11 @@ test(`Fund PSBT`, async () => {
308
320
  }
309
321
  });
310
322
  } catch (err) {
323
+ await kill({});
324
+
311
325
  equal(err, null, 'Expected no error');
326
+
327
+ return;
312
328
  }
313
329
 
314
330
  // A Taproot output should be funded for a regular key spend
@@ -318,7 +334,7 @@ test(`Fund PSBT`, async () => {
318
334
  const keyPair = ecp.makeRandom({network: networks.regtest});
319
335
 
320
336
  const output = v1OutputScript({
321
- internal_key: keyPair.publicKey.toString('hex'),
337
+ internal_key: from(keyPair.publicKey).toString('hex'),
322
338
  });
323
339
 
324
340
  const outputScript = hexAsBuffer(output.script);
@@ -368,8 +384,8 @@ test(`Fund PSBT`, async () => {
368
384
  });
369
385
 
370
386
  const signedInput = signHash({
371
- private_key: keyPair.privateKey.toString('hex'),
372
- public_key: keyPair.publicKey.toString('hex'),
387
+ private_key: from(keyPair.privateKey).toString('hex'),
388
+ public_key: from(keyPair.publicKey).toString('hex'),
373
389
  sign_hash: hashToSign.toString('hex'),
374
390
  });
375
391