ln-service 53.3.0 → 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,17 @@
1
1
  # Versions
2
2
 
3
+ ## 53.5.0
4
+
5
+ - `createWallet`: Add support for returning the admin `macaroon`
6
+
7
+ ## 53.4.2
8
+
9
+ - `pay`, `payViaPaymentRequest`: Fix support for `outgoing_channels` constraint
10
+
11
+ ## 53.4.0
12
+
13
+ - `deletePendingChannel`: Add method to remove a stuck pending channel open
14
+
3
15
  ## 53.3.0
4
16
 
5
17
  - `getInvoices`: Add `is_unconfirmed` to filter out canceled/settled invoices
package/README.md CHANGED
@@ -102,7 +102,7 @@ for `unlocker` methods.
102
102
 
103
103
  ## All Methods
104
104
 
105
- - [addPeer](#addPeer) - Connect to a peer
105
+ - [addPeer](#addpeer) - Connect to a peer
106
106
  - [authenticatedLndGrpc](#authenticatedlndgrpc) - LND API Object
107
107
  - [broadcastChainTransaction](#broadcastchaintransaction) - Push a chain tx
108
108
  - [cancelHodlInvoice](#cancelhodlinvoice) - Cancel a held or any open invoice
@@ -118,17 +118,22 @@ for `unlocker` methods.
118
118
  - [createUnsignedRequest](#createunsignedrequest) - create an unsigned invoice
119
119
  - [createWallet](#createwallet) - Make a new wallet
120
120
  - [decodePaymentRequest](#decodepaymentrequest) - Decode a Lightning invoice
121
- - [deleteFailedPayAttempts](#deletefailedpayattempts) - Remove records of failed pay attempts
122
- - [deleteFailedPayments](#deletefailedpayments) - Remove records of payments that failed
121
+ - [deleteFailedPayAttempts](#deletefailedpayattempts) - Remove records of
122
+ failed pay attempts
123
+ - [deleteFailedPayments](#deletefailedpayments) - Remove records of payments
124
+ that failed
123
125
  - [deleteForwardingReputations](#deleteforwardingreputations) - Wipe node reps
124
126
  - [deletePayment](#deletepayment) - Delete the record of a single past payment
125
127
  - [deletePayments](#deletepayments) - Delete entire history of past payments
128
+ - [deletePendingChannel](#deletependingchannel) - Delete a pending channel that
129
+ will never confirm due to a conflicting confirmed transaction
126
130
  - [diffieHellmanComputeSecret](#diffiehellmancomputesecret) - Get DH shared key
127
131
  - [disableChannel](#disablechannel) - Disable a channel for outgoing payments
128
132
  - [disconnectWatchtower](#disconnectwatchtower) - Disconnect a watchtower
129
133
  - [enableChannel](#enablechannel) - Enable a channel for outgoing payments
130
134
  - [fundPendingChannels](#fundpendingchannels) - Fund pending open channels
131
- - [fundPsbt](#fundpsbt) - Create an unsigned PSBT with funding inputs and spending outputs
135
+ - [fundPsbt](#fundpsbt) - Create an unsigned PSBT with funding inputs and
136
+ spending outputs
132
137
  - [getAccessIds](#getaccessids) - Get granted macaroon root access ids
133
138
  - [getAutopilot](#getautopilot) - Get autopilot status or node scores
134
139
  - [getBackup](#getbackup) - Get a backup of a channel
@@ -157,48 +162,53 @@ for `unlocker` methods.
157
162
  - [getNetworkGraph](#getnetworkgraph) - Get the channels and nodes of the graph
158
163
  - [getNetworkInfo](#getnetworkinfo) - Get high-level graph info
159
164
  - [getNode](#getnode) - Get graph info about a single node and its channels
160
- - [getPathfindingSettings](#getpathfindingsettings) - Get pathfinding system settings
165
+ - [getPathfindingSettings](#getpathfindingsettings) - Get pathfinding system
166
+ settings
161
167
  - [getPayment](#getpayment) - Get a past payment
162
168
  - [getPayments](#getpayments) - Get all past payments
163
169
  - [getPeers](#getpeers) - Get all connected peers
164
170
  - [getPendingChainBalance](#getpendingchainbalance) - Get pending chain balance
165
171
  - [getPendingChannels](#getpendingchannels) - Get channels in pending states
166
172
  - [getPublicKey](#getpublickey) - Get a public key out of the seed
167
- - [getRouteConfidence](#getRouteConfidence) - Get confidence in a route
168
- - [getRouteThroughHops](#getRouteThroughHops) - Get a route through nodes
169
- - [getRouteToDestination](#getRouteToDestination) - Get a route to a destination
170
- - [getSweepTransactions](#getSweepTransactions) - Get transactions sweeping to self
171
- - [getTowerServerInfo](#getTowerServerInfo) - Get information about tower server
172
- - [getUtxos](#getUtxos) - Get on-chain unspent outputs
173
- - [getWalletInfo](#getWalletInfo) - Get general wallet info
173
+ - [getRouteConfidence](#getrouteconfidence) - Get confidence in a route
174
+ - [getRouteThroughHops](#getroutethroughhops) - Get a route through nodes
175
+ - [getRouteToDestination](#getroutetodestination) - Get a route to a destination
176
+ - [getSweepTransactions](#getsweeptransactions) - Get transactions sweeping to
177
+ self
178
+ - [getTowerServerInfo](#gettowerserverinfo) - Get information about tower server
179
+ - [getUtxos](#getutxos) - Get on-chain unspent outputs
180
+ - [getWalletInfo](#getwalletinfo) - Get general wallet info
174
181
  - [getWalletStatus](#getwalletstatus) - Get the status of the wallet
175
- - [getWalletVersion](#getWalletVersion) - Get the build and version of the LND
176
- - [grantAccess](#grantAccess) - Grant an access credential macaroon
177
- - [grpcProxyServer](#grpcProxyServer) - REST proxy server for calling to gRPC
178
- - [isDestinationPayable](#isDestinationPayable) - Check can pay to destination
179
- - [lockUtxo](#lockUtxo) - Lock a UTXO temporarily to prevent it being used
180
- - [openChannel](#openChannel) - Open a new channel
181
- - [openChannels](#openChannels) - Open channels with external funding
182
- - [parsePaymentRequest](#parsePaymentRequest) - Parse a BOLT11 Payment Request
182
+ - [getWalletVersion](#getwalletversion) - Get the build and version of the LND
183
+ - [grantAccess](#grantaccess) - Grant an access credential macaroon
184
+ - [grpcProxyServer](#grpcproxyserver) - REST proxy server for calling to gRPC
185
+ - [isDestinationPayable](#isdestinationpayable) - Check can pay to destination
186
+ - [lockUtxo](#lockutxo) - Lock a UTXO temporarily to prevent it being used
187
+ - [openChannel](#openchannel) - Open a new channel
188
+ - [openChannels](#openchannels) - Open channels with external funding
189
+ - [parsePaymentRequest](#parsepaymentrequest) - Parse a BOLT11 Payment Request
183
190
  - [pay](#pay) - Send a payment
184
- - [payViaPaymentDetails](#payViaPaymentDetails) - Pay using decomposed details
185
- - [payViaPaymentRequest](#payViaPaymentRequest) - Pay using a payment request
186
- - [payViaRoutes](#payViaRoutes) - Make a payment over specified routes
187
- - [prepareForChannelProposal](#prepareForChannelProposal) - setup for a channel proposal
191
+ - [payViaPaymentDetails](#payviapaymentdetails) - Pay using decomposed details
192
+ - [payViaPaymentRequest](#payviapaymentrequest) - Pay using a payment request
193
+ - [payViaRoutes](#payviaroutes) - Make a payment over specified routes
194
+ - [prepareForChannelProposal](#prepareforchannelproposal) - setup for a channel
195
+ proposal
188
196
  - [probe](#probe) - Find a payable route by attempting a fake payment
189
- - [probeForRoute](#probeForRoute) - Actively probe to find a payable route
197
+ - [probeForRoute](#probeforroute) - Actively probe to find a payable route
190
198
  - [proposeChannel](#proposechannel) - Offer a channel proposal to a peer
191
- - [recoverFundsFromChannel](#recoverFundsFromChannel) - Restore a channel
192
- - [recoverFundsFromChannels](#recoverFundsFromChannels) - Restore all channels
193
- - [removePeer](#removePeer) - Disconnect from a connected peer
194
- - [requestChainFeeIncrease](#requestchainfeeincrease) - Request a CPFP spend on a UTXO
199
+ - [recoverFundsFromChannel](#recoverfundsfromchannel) - Restore a channel
200
+ - [recoverFundsFromChannels](#recoverfundsfromchannels) - Restore all channels
201
+ - [removePeer](#removepeer) - Disconnect from a connected peer
202
+ - [requestChainFeeIncrease](#requestchainfeeincrease) - Request a CPFP spend on
203
+ a UTXO
195
204
  - [restrictMacaroon](#restrictmacaroon) - Add limitations to a macaroon
196
205
  - [revokeAccess](#revokeaccess) - Revoke all access macaroons given to an id
197
206
  - [routeFromChannels](#routefromchannels) - Convert channel series to a route
198
207
  - [sendMessageToPeer](#sendmessagetopeer) - Send a custom message to a peer
199
208
  - [sendToChainAddress](#sendtochainaddress) - Send on-chain to an address
200
209
  - [sendToChainAddresses](#sendtochainaddresses) - Send on-chain to addresses
201
- - [sendToChainOutputScripts](#sendtochainoutputscripts) - Send to on-chain script outputs
210
+ - [sendToChainOutputScripts](#sendtochainoutputscripts) - Send to on-chain
211
+ script outputs
202
212
  - [setAutopilot](#setautopilot) - Turn autopilot on and set autopilot scores
203
213
  - [settleHodlInvoice](#settlehodlinvoice) - Accept a HODL HTLC invoice
204
214
  - [signBytes](#signbytes) - Sign over arbitrary bytes with node keys
@@ -211,18 +221,21 @@ for `unlocker` methods.
211
221
  - [subscribeToChainAddress](#subscribetochainaddress) - Subscribe to receives
212
222
  - [subscribeToChainSpend](#subscribetochainspend) - Subscribe to chain spends
213
223
  - [subscribeToChannels](#subscribetochannels) - Subscribe to channel statuses
214
- - [subscribeToForwardRequests](#subscribetoforwardrequests) - Interactively route
224
+ - [subscribeToForwardRequests](#subscribetoforwardrequests) - Interactively
225
+ route
215
226
  - [subscribeToForwards](#subscribetoforwards) - Subscribe to HTLC events
216
227
  - [subscribeToGraph](#subscribetograph) - Subscribe to network graph updates
217
228
  - [subscribeToInvoice](#subscribetoinvoice) - Subscribe to invoice updates
218
229
  - [subscribeToInvoices](#subscribetoinvoices) - Subscribe to all invoices
219
230
  - [subscribeToOpenRequests](#subscribetoopenrequests) - Approve open requests
220
231
  - [subscribeToPastPayment](#subscribetopastpayment) - Subscribe to a payment
221
- - [subscribeToPastPayments](#subscribetopastpayments) - Subscribe to all sent payments
232
+ - [subscribeToPastPayments](#subscribetopastpayments) - Subscribe to all sent
233
+ payments
222
234
  - [subscribeToPayViaDetails](#subscribetopayviadetails) - Pay using details
223
235
  - [subscribeToPayViaRequest](#subscribetopayviarequest) - Pay using a request
224
236
  - [subscribeToPayViaRoutes](#subscribetopayviaroutes) - Pay using routes
225
- - [subscribeToPeerMessages](#subscribetopeermessages) - Listen to incoming custom messages
237
+ - [subscribeToPeerMessages](#subscribetopeermessages) - Listen to incoming
238
+ custom messages
226
239
  - [subscribeToPeers](#subscribetopeers) - Subscribe to peers connectivity
227
240
  - [subscribeToProbe](#subscribetoprobe) - Subscribe to a probe for a route
228
241
  - [subscribeToProbeForRoute](#subscribetoprobeforroute) - Probe for a route
@@ -230,11 +243,14 @@ for `unlocker` methods.
230
243
  - [subscribeToTransactions](#subscribetotransactions) - Subscribe to chain tx
231
244
  - [subscribeToWalletStatus](#subscribetowalletstatus) - Subscribe to node state
232
245
  - [unauthenticatedLndGrpc](#unauthenticatedLndGrpc) - LND for locked lnd APIs
233
- - [unlockUtxo](#unlockUtxo) - Release a locked UTXO so that it can be used again
234
- - [unlockWallet](#unlockWallet) - Unlock a locked lnd
235
- - [updateChainTransaction](#updateChainTransaction) - Update a chain transaction
246
+ - [unlockUtxo](#unlockutxo) - Release a locked UTXO so that it can be used
247
+ again
248
+ - [unlockWallet](#unlockwallet) - Unlock a locked lnd
249
+ - [updateChainTransaction](#updatechaintransaction) - Update a chain
250
+ transaction
236
251
  - [updateConnectedWatchtower](#updateconnectedwatchtower) - Update watchtower
237
- - [updatePathfindingSettings](#updatepathfindingsettings) - Update pathfinding configuration
252
+ - [updatePathfindingSettings](#updatepathfindingsettings) - Update pathfinding
253
+ configuration
238
254
  - [updateRoutingFees](#updateroutingfees) - Change routing fees
239
255
  - [verifyAccess](#verifyaccess) - Verify a macaroon has access
240
256
  - [verifyBackup](#verifybackup) - Verify a channel backup
@@ -256,6 +272,7 @@ for `unlocker` methods.
256
272
  - run regtest integration tests
257
273
  - [ln-pathfinding](https://npmjs.com/package/ln-accounting) - pathfinding
258
274
  utilities
275
+ - [ln-sync](https://www.npmjs.com/package/ln-sync) - metadata helper methods
259
276
  - [probing](https://npmjs.com/package/probing) - payment probing utilities
260
277
  - [psbt](https://www.npmjs.com/package/psbt) - BIP 174 PSBT utilities
261
278
 
@@ -745,6 +762,9 @@ Requires unlocked lnd and unauthenticated LND API Object
745
762
  }
746
763
 
747
764
  @returns via cbk or Promise
765
+ {
766
+ macaroon: <Base64 Encoded Admin Macaroon String>
767
+ }
748
768
 
749
769
  Example:
750
770
 
@@ -918,6 +938,36 @@ const {deletePayments} = require('ln-service');
918
938
  await deletePayments({lnd});
919
939
  ```
920
940
 
941
+ ### deletePendingChannel
942
+
943
+ Delete a pending channel
944
+
945
+ Pass the confirmed conflicting transaction that spends the same input to
946
+ make sure that no funds are being deleted.
947
+
948
+ This method is not supported on LND 0.13.3 and below
949
+
950
+ {
951
+ confirmed_transaction: <Hex Encoded Conflicting Transaction String>
952
+ lnd: <Authenticated LND API Object>
953
+ pending_transaction: <Hex Encoded Pending Transaction String>
954
+ pending_transaction_vout: <Pending Channel Output Index Number>
955
+ }
956
+
957
+ @returns via cbk or Promise
958
+
959
+ ```node
960
+ const {deletePendingChannel} = require('ln-service');
961
+
962
+ // Delete a stuck pending channel
963
+ await deletePendingChannel({
964
+ lnd,
965
+ confirmed_transaction: confirmedTransactionHex,
966
+ pending_transaction: stuckPendingChannelOpenTxHex,
967
+ pending_transaction_vout: pendingChannelOutputIndexNumber,
968
+ });
969
+ ```
970
+
921
971
  ### diffieHellmanComputeSecret
922
972
 
923
973
  Derive a shared secret
package/index.js CHANGED
@@ -19,6 +19,7 @@ const {deleteFailedPayAttempts} = require('lightning');
19
19
  const {deleteFailedPayments} = require('lightning');
20
20
  const {deletePayment} = require('lightning');
21
21
  const {deletePayments} = require('lightning');
22
+ const {deletePendingChannel} = require('lightning');
22
23
  const {diffieHellmanComputeSecret} = require('lightning');
23
24
  const {disableChannel} = require('lightning');
24
25
  const {disconnectWatchtower} = require('lightning');
@@ -157,6 +158,7 @@ module.exports = {
157
158
  deleteForwardingReputations,
158
159
  deletePayment,
159
160
  deletePayments,
161
+ deletePendingChannel,
160
162
  diffieHellmanComputeSecret,
161
163
  disableChannel,
162
164
  disconnectWatchtower,
package/package.json CHANGED
@@ -10,23 +10,23 @@
10
10
  "bolt07": "1.8.0",
11
11
  "cors": "2.8.5",
12
12
  "express": "4.17.2",
13
- "invoices": "2.0.2",
14
- "lightning": "5.3.0",
13
+ "invoices": "2.0.3",
14
+ "lightning": "5.3.3",
15
15
  "macaroon": "3.0.4",
16
16
  "morgan": "1.10.0",
17
- "ws": "8.4.0"
17
+ "ws": "8.4.2"
18
18
  },
19
19
  "description": "Interaction helper for your Lightning Network daemon",
20
20
  "devDependencies": {
21
21
  "@alexbosworth/tap": "15.0.10",
22
22
  "@alexbosworth/node-fetch": "2.6.2",
23
23
  "async": "3.2.3",
24
- "asyncjs-util": "1.2.7",
24
+ "asyncjs-util": "1.2.8",
25
25
  "bip66": "1.1.5",
26
26
  "bitcoinjs-lib": "6.0.1",
27
27
  "bn.js": "5.2.0",
28
28
  "ecpair": "2.0.1",
29
- "ln-docker-daemons": "2.1.0",
29
+ "ln-docker-daemons": "2.2.0",
30
30
  "portfinder": "1.0.28",
31
31
  "psbt": "1.1.10",
32
32
  "rimraf": "3.0.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.3.0"
58
+ "version": "53.5.0"
59
59
  }
@@ -0,0 +1,156 @@
1
+ const {once} = require('events');
2
+
3
+ const asyncEach = require('async/each');
4
+ const asyncRetry = require('async/retry');
5
+ const {extractTransaction} = require('psbt');
6
+ const {spawnLightningCluster} = require('ln-docker-daemons');
7
+ const {test} = require('@alexbosworth/tap');
8
+
9
+ const {addPeer} = require('./../../');
10
+ const {broadcastChainTransaction} = require('./../../');
11
+ const {cancelPendingChannel} = require('./../../');
12
+ const {createCluster} = require('./../macros');
13
+ const {delay} = require('./../macros');
14
+ const {deletePendingChannel} = require('./../../');
15
+ const {fundPendingChannels} = require('./../../');
16
+ const {fundPsbt} = require('./../../');
17
+ const {getChainBalance} = require('./../../');
18
+ const {getChannels} = require('./../../');
19
+ const {getLockedUtxos} = require('./../../');
20
+ const {getPendingChannels} = require('./../../');
21
+ const {openChannels} = require('./../../');
22
+ const {signPsbt} = require('./../../');
23
+ const {unlockUtxo} = require('./../../');
24
+
25
+ const capacity = 1e6;
26
+ const count = 100;
27
+ const interval = 100;
28
+ const race = promises => Promise.race(promises);
29
+ const size = 3;
30
+ const timeout = 1000 * 5;
31
+ const times = 200;
32
+
33
+ // Forfeiting a pending channel should remove the pending channel
34
+ test(`Forfeit pending channel`, async ({end, equal}) => {
35
+ const {kill, nodes} = await spawnLightningCluster({size});
36
+
37
+ const [control, target, remote] = nodes;
38
+
39
+ const {generate, lnd} = control;
40
+
41
+ try {
42
+ await control.generate({count});
43
+
44
+ await asyncEach([target, remote], async node => {
45
+ return await addPeer({lnd, public_key: node.id, socket: node.socket});
46
+ });
47
+
48
+ const channels = [{capacity, partner_public_key: target.id}];
49
+
50
+ // Propose a channel to target
51
+ const proposeToTarget = await asyncRetry({interval, times}, async () => {
52
+ return await race([
53
+ delay(timeout),
54
+ openChannels({channels, lnd, is_avoiding_broadcast: true}),
55
+ ]);
56
+ });
57
+
58
+ // Setup funding for the target
59
+ const fundTarget = await fundPsbt({lnd, outputs: proposeToTarget.pending});
60
+
61
+ // Sign the funding to the target
62
+ const signTarget = await signPsbt({lnd, psbt: fundTarget.psbt});
63
+
64
+ // Fund the target channel that will get stuck
65
+ await fundPendingChannels({
66
+ lnd,
67
+ channels: proposeToTarget.pending.map(n => n.id),
68
+ funding: signTarget.psbt,
69
+ });
70
+
71
+ await asyncEach((await getLockedUtxos({lnd})).utxos, async utxo => {
72
+ return await unlockUtxo({
73
+ lnd,
74
+ id: utxo.lock_id,
75
+ transaction_id: utxo.transaction_id,
76
+ transaction_vout: utxo.transaction_vout,
77
+ });
78
+ });
79
+
80
+ // Propose a channel to remote
81
+ const proposeToRemote = await asyncRetry({interval, times}, async () => {
82
+ return await race([
83
+ delay(timeout),
84
+ openChannels({lnd,
85
+ channels: [{capacity, partner_public_key: remote.id}],
86
+ is_avoiding_broadcast: true,
87
+ }),
88
+ ]);
89
+ });
90
+
91
+ // Setup funding for the remote, using the same inputs
92
+ const fundRemote = await fundPsbt({
93
+ lnd,
94
+ inputs: fundTarget.inputs,
95
+ outputs: proposeToRemote.pending
96
+ });
97
+
98
+ // Sign the funding to the target
99
+ const signRemote = await signPsbt({lnd, psbt: fundRemote.psbt});
100
+
101
+ // Fund the remote channel
102
+ await fundPendingChannels({
103
+ lnd,
104
+ channels: proposeToRemote.pending.map(n => n.id),
105
+ funding: signRemote.psbt,
106
+ });
107
+
108
+ const {transaction} = extractTransaction({psbt: signRemote.psbt});
109
+
110
+ await broadcastChainTransaction({lnd, transaction});
111
+
112
+ const channel = await asyncRetry({interval, times}, async () => {
113
+ const [channel] = (await getChannels({lnd})).channels;
114
+
115
+ if (!!channel) {
116
+ return channel;
117
+ }
118
+
119
+ await generate({});
120
+
121
+ throw new Error('ExpectedNewChannelCreated');
122
+ });
123
+
124
+ const [pending] = (await getPendingChannels({lnd})).pending_channels;
125
+
126
+ const stuckTx = extractTransaction({psbt: signTarget.psbt});
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
+
139
+ await deletePendingChannel({
140
+ lnd,
141
+ confirmed_transaction: transaction,
142
+ pending_transaction: stuckTx.transaction,
143
+ pending_transaction_vout: pending.transaction_vout,
144
+ });
145
+
146
+ const [stillPending] = (await getPendingChannels({lnd})).pending_channels;
147
+
148
+ equal(stillPending, undefined, 'Conflicting pending channel deleted');
149
+ } catch (err) {
150
+ equal(err, null, 'No error is expected');
151
+ } finally {
152
+ await kill({});
153
+ }
154
+
155
+ return end();
156
+ });
@@ -105,14 +105,16 @@ test(`Subscribe to open requests`, async ({end, equal, fail, ok}) => {
105
105
  });
106
106
 
107
107
  try {
108
- await openChannel({
109
- lnd: target.lnd,
110
- chain_fee_tokens_per_vbyte: defaultFee,
111
- give_tokens: giftTokens,
112
- is_private: true,
113
- local_tokens: channelCapacityTokens,
114
- partner_public_key: control.id,
115
- socket: control.socket,
108
+ await asyncRetry({interval, times}, async () => {
109
+ return await openChannel({
110
+ lnd: target.lnd,
111
+ chain_fee_tokens_per_vbyte: defaultFee,
112
+ give_tokens: giftTokens,
113
+ is_private: true,
114
+ local_tokens: channelCapacityTokens,
115
+ partner_public_key: control.id,
116
+ socket: control.socket,
117
+ });
116
118
  });
117
119
  } catch (err) {
118
120
  equal(err, null, 'Expected no error when a channel is accepted');