ln-service 53.4.2 → 53.5.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.5.0
4
+
5
+ - `createWallet`: Add support for returning the admin `macaroon`
6
+
3
7
  ## 53.4.2
4
8
 
5
9
  - `pay`, `payViaPaymentRequest`: Fix support for `outgoing_channels` constraint
package/README.md CHANGED
@@ -762,6 +762,9 @@ Requires unlocked lnd and unauthenticated LND API Object
762
762
  }
763
763
 
764
764
  @returns via cbk or Promise
765
+ {
766
+ macaroon: <Base64 Encoded Admin Macaroon String>
767
+ }
765
768
 
766
769
  Example:
767
770
 
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "cors": "2.8.5",
12
12
  "express": "4.17.2",
13
13
  "invoices": "2.0.3",
14
- "lightning": "5.3.2",
14
+ "lightning": "5.3.3",
15
15
  "macaroon": "3.0.4",
16
16
  "morgan": "1.10.0",
17
17
  "ws": "8.4.2"
@@ -55,5 +55,5 @@
55
55
  "scripts": {
56
56
  "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/routerrpc-integration/*.js test/signerrpc-integration/*.js test/tower_clientrpc-integration/*.js test/tower_serverrpc-integration/*.js test/walletrpc-integration/*.js"
57
57
  },
58
- "version": "53.4.2"
58
+ "version": "53.5.0"
59
59
  }
@@ -8,6 +8,7 @@ const {test} = require('@alexbosworth/tap');
8
8
 
9
9
  const {addPeer} = require('./../../');
10
10
  const {broadcastChainTransaction} = require('./../../');
11
+ const {cancelPendingChannel} = require('./../../');
11
12
  const {createCluster} = require('./../macros');
12
13
  const {delay} = require('./../macros');
13
14
  const {deletePendingChannel} = require('./../../');
@@ -60,7 +61,7 @@ test(`Forfeit pending channel`, async ({end, equal}) => {
60
61
  // Sign the funding to the target
61
62
  const signTarget = await signPsbt({lnd, psbt: fundTarget.psbt});
62
63
 
63
- // Fund the target channel
64
+ // Fund the target channel that will get stuck
64
65
  await fundPendingChannels({
65
66
  lnd,
66
67
  channels: proposeToTarget.pending.map(n => n.id),
@@ -124,6 +125,17 @@ test(`Forfeit pending channel`, async ({end, equal}) => {
124
125
 
125
126
  const stuckTx = extractTransaction({psbt: signTarget.psbt});
126
127
 
128
+ const [stuckPending] = proposeToTarget.pending;
129
+
130
+ // Try to cancel the pending channel, it will fail
131
+ try {
132
+ await cancelPendingChannel({lnd, id: stuckPending.id});
133
+ } catch (err) {
134
+ const [code] = err;
135
+
136
+ equal(code, 503, 'Pending channel cannot be canceled');
137
+ }
138
+
127
139
  await deletePendingChannel({
128
140
  lnd,
129
141
  confirmed_transaction: transaction,