paid-services 4.0.0 → 4.0.1

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,6 +1,6 @@
1
1
  # Versions
2
2
 
3
- ## Version 4.0.0
3
+ ## Version 4.0.1
4
4
 
5
5
  - `createGroupChannel`: Add method to coordinate a channel group
6
6
  - `joinGroupChannel`: Add method to join a channel group
@@ -138,27 +138,31 @@ module.exports = ({capacity, count, ecp, identity, lnd, rate}) => {
138
138
 
139
139
  const basePsbt = decodePsbt({ecp, psbt: coordinator.unsigned()});
140
140
 
141
- // Sign the unsigned funding transaction
142
- const signed = await signAndFundGroupChannel({
143
- lnd,
144
- id: pending.id,
145
- psbt: coordinator.unsigned(),
146
- utxos: pending.utxos,
147
- });
148
-
149
- // Make sure there is an incoming channel
150
- await asyncRetry({interval, times}, async () => {
151
- return await confirmIncomingChannel({
152
- capacity,
141
+ try {
142
+ // Sign the unsigned funding transaction
143
+ const signed = await signAndFundGroupChannel({
153
144
  lnd,
154
- from: coordinator.partners(identity).inbound,
155
- id: fromHex(basePsbt.unsigned_transaction).getId(),
156
- to: coordinator.partners(identity).outbound || undefined,
145
+ id: pending.id,
146
+ psbt: coordinator.unsigned(),
147
+ utxos: pending.utxos,
148
+ });
149
+
150
+ // Make sure there is an incoming channel
151
+ await asyncRetry({interval, times}, async () => {
152
+ return await confirmIncomingChannel({
153
+ capacity,
154
+ lnd,
155
+ from: coordinator.partners(identity).inbound,
156
+ id: fromHex(basePsbt.unsigned_transaction).getId(),
157
+ to: coordinator.partners(identity).outbound || undefined,
158
+ });
157
159
  });
158
- });
159
160
 
160
- // Register the signature with the coordinator
161
- return coordinator.sign({id: identity, signed: signed.psbt});
161
+ // Register the signature with the coordinator
162
+ return coordinator.sign({id: identity, signed: signed.psbt});
163
+ } catch (err) {
164
+ return errored(err);
165
+ }
162
166
  });
163
167
 
164
168
  // Group members have submitted their partial signatures
package/package.json CHANGED
@@ -16,8 +16,8 @@
16
16
  "ecpair": "2.1.0",
17
17
  "goldengate": "11.4.0",
18
18
  "invoices": "2.2.0",
19
- "ln-service": "54.2.0",
20
- "ln-sync": "3.14.0",
19
+ "ln-service": "54.2.3",
20
+ "ln-sync": "4.0.4",
21
21
  "psbt": "2.7.1",
22
22
  "p2tr": "1.3.2",
23
23
  "tiny-secp256k1": "2.2.1"
@@ -25,7 +25,7 @@
25
25
  "description": "Lightning Paid Services library",
26
26
  "devDependencies": {
27
27
  "@alexbosworth/tap": "15.0.11",
28
- "ln-docker-daemons": "3.1.0",
28
+ "ln-docker-daemons": "3.1.2",
29
29
  "mock-lnd": "1.4.4",
30
30
  "secp256k1": "4.0.3"
31
31
  },
@@ -47,5 +47,5 @@
47
47
  "integration-tests": "tap -j 2 --branches=1 --functions=1 --lines=1 --statements=1 -t 180 test/integration/*.js",
48
48
  "test": "tap --branches=1 --functions=1 --lines=1 --statements=1 -t 60 test/actions/*.js test/balanced/*.js test/capacity/*.js test/client/*.js test/config/*.js test/p2p/*.js test/records/*.js test/respond/*.js test/server/*.js test/swaps/*.js test/services/*.js test/trades/*.js"
49
49
  },
50
- "version": "4.0.0"
50
+ "version": "4.0.1"
51
51
  }