ln-service 53.20.0 → 53.21.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
+ ## 53.21.0
4
+
5
+ - `getLockedUtxos`: Add support for locked UTXO `output_script`, `tokens`
6
+
3
7
  ## 53.20.0
4
8
 
5
9
  - `closeChannel`: Add support for `max_tokens_per_vbyte` to set max fee rate
package/README.md CHANGED
@@ -2253,6 +2253,8 @@ Requires LND built with `walletrpc` build tag
2253
2253
 
2254
2254
  This method is not supported on LND 0.12.1 and below
2255
2255
 
2256
+ `output_script`, `tokens` are not supported on LND 0.15.0 and below
2257
+
2256
2258
  {
2257
2259
  lnd: <Authenticated LND API Object>
2258
2260
  }
@@ -2262,6 +2264,8 @@ This method is not supported on LND 0.12.1 and below
2262
2264
  utxos: [{
2263
2265
  lock_expires_at: <Lock Expires At ISO 8601 Date String>
2264
2266
  lock_id: <Locking Id Hex String>
2267
+ [output_script]: <Outpoint Output Script Hex String>
2268
+ [tokens]: <Token Value of Outpoint Number>
2265
2269
  transaction_id: <Transaction Id Hex String>
2266
2270
  transaction_vout: <Transaction Output Index Number>
2267
2271
  }]
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "cors": "2.8.5",
12
12
  "express": "4.18.1",
13
13
  "invoices": "2.1.0",
14
- "lightning": "5.19.0",
14
+ "lightning": "5.20.0",
15
15
  "macaroon": "3.0.4",
16
16
  "morgan": "1.10.0",
17
17
  "ws": "8.8.1"
@@ -28,7 +28,7 @@
28
28
  "bn.js": "5.2.1",
29
29
  "bs58check": "2.1.2",
30
30
  "ecpair": "2.0.1",
31
- "ln-docker-daemons": "2.3.4",
31
+ "ln-docker-daemons": "2.3.5",
32
32
  "p2tr": "1.3.1",
33
33
  "portfinder": "1.0.32",
34
34
  "psbt": "2.7.1",
@@ -70,5 +70,5 @@
70
70
  "integration-test-0.12.0": "DOCKER_LND_VERSION=v0.12.0-beta npm run test",
71
71
  "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"
72
72
  },
73
- "version": "53.20.0"
73
+ "version": "53.21.0"
74
74
  }
@@ -43,6 +43,13 @@ test(`Lock UTXO`, async ({end, equal, rejects, strictSame}) => {
43
43
 
44
44
  const [locked] = (await getLockedUtxos({lnd})).utxos;
45
45
 
46
+ const got = {
47
+ lock_expires_at: locked.lock_expires_at,
48
+ lock_id: locked.lock_id,
49
+ transaction_id: locked.transaction_id,
50
+ transaction_vout: locked.transaction_vout,
51
+ };
52
+
46
53
  const expected = {
47
54
  lock_expires_at: lock.expires_at,
48
55
  lock_id: lock.id,
@@ -50,7 +57,14 @@ test(`Lock UTXO`, async ({end, equal, rejects, strictSame}) => {
50
57
  transaction_vout: utxo.transaction_vout,
51
58
  };
52
59
 
53
- strictSame(locked, expected, 'Got expected UTXO lock');
60
+ strictSame(got, expected, 'Got expected UTXO lock');
61
+
62
+ // LND 0.15.0 and below do not support locked UTXO output script
63
+ if (!!locked.output_script) {
64
+ equal(locked.output_script, utxo.output_script, 'Got output script');
65
+ equal(locked.tokens, utxo.tokens, 'Got output value');
66
+ }
67
+
54
68
  } catch (err) {
55
69
  strictSame(
56
70
  err,