lightning 5.3.3 → 5.3.4

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
+ ## 5.3.4
4
+
5
+ - `getPayments`: Correct paging issue that prevented paging through all results
6
+
3
7
  ## 5.3.3
4
8
 
5
9
  - `pay`, `payViaPaymentRequest`: Fix support for `outgoing_channels` constraint
package/README.md CHANGED
@@ -7,17 +7,26 @@ Methods for working with the Lightning Network
7
7
  ## Selected Projects using Lightning
8
8
 
9
9
  - [coinos.io](https://coinos.io/) - https://github.com/coinos/coinos-server
10
- - [LNMarkets](https://twitter.com/lnmarkets) - https://github.com/lnmarkets/umbrel
10
+ - [Lightning Shell](https://lightningshell.app/) -
11
+ https://github.com/ibz/lightning-shell
12
+ - [LNMarkets](https://twitter.com/lnmarkets) -
13
+ https://github.com/lnmarkets/umbrel
11
14
  - [Galoy](https://galoy.io/) - https://github.com/GaloyMoney/galoy
12
15
  - [Tarnhelm](https://www.tarnhelm.app/) - https://github.com/bkiac/tarnhelm
13
- - [tbtcswaps](https://tbtcswaps.com/) - https://github.com/keep-community/tbtcswaps
14
- - [stackernews](https://stacker.news/) - https://github.com/stackernews/stacker.news
15
- - [Thunderhub](https://www.thunderhub.io/) - https://github.com/apotdevin/thunderhub
16
- - [Lightning Roulette](https://lightning-roulette.com/) - https://github.com/igreshev/lightning-roulette
17
- - [Lightning Poker](https://lightning-poker.com/) - https://github.com/igreshev/lightning-poker
16
+ - [tbtcswaps](https://tbtcswaps.com/) -
17
+ https://github.com/keep-community/tbtcswaps
18
+ - [stackernews](https://stacker.news/) -
19
+ https://github.com/stackernews/stacker.news
20
+ - [Thunderhub](https://www.thunderhub.io/) -
21
+ https://github.com/apotdevin/thunderhub
22
+ - [Lightning Roulette](https://lightning-roulette.com/) -
23
+ https://github.com/igreshev/lightning-roulette
24
+ - [Lightning Poker](https://lightning-poker.com/) -
25
+ https://github.com/igreshev/lightning-poker
18
26
  - [p2plnbot](https://telegram.me/lnp2pbot) - https://github.com/grunch/p2plnbot
19
27
  - [rekr](https://rekr.app/) - https://github.com/ryan-lingle/rekr
20
- - [Suredbits API](https://suredbits.com/) - https://github.com/Suredbits/sb-api-lnd
28
+ - [Suredbits API](https://suredbits.com/) -
29
+ https://github.com/Suredbits/sb-api-lnd
21
30
 
22
31
  ## LND Authentication
23
32
 
@@ -8,7 +8,7 @@ const {sortBy} = require('./../../arrays');
8
8
  const defaultLimit = 250;
9
9
  const {isArray} = Array;
10
10
  const isFailed = payment => !!payment && payment.status === 'FAILED';
11
- const lastPageFirstIndexOffset = 0;
11
+ const lastPageFirstIndexOffset = 1;
12
12
  const method = 'listPayments';
13
13
  const {parse} = JSON;
14
14
  const {stringify} = JSON;
@@ -152,7 +152,7 @@ module.exports = ({limit, lnd, token}, cbk) => {
152
152
 
153
153
  return cbk(null, {
154
154
  payments: res.payments.filter(isFailed),
155
- token: offset === lastPageFirstIndexOffset ? undefined : token,
155
+ token: offset <= lastPageFirstIndexOffset ? undefined : token,
156
156
  });
157
157
  });
158
158
  }],
@@ -157,7 +157,7 @@ module.exports = ({limit, lnd, token}, cbk) => {
157
157
 
158
158
  return cbk(null, {
159
159
  payments: res.payments,
160
- token: offset === lastPageFirstIndexOffset ? undefined : token,
160
+ token: offset <= lastPageFirstIndexOffset ? undefined : token,
161
161
  });
162
162
  });
163
163
  }],
@@ -185,7 +185,7 @@ module.exports = ({limit, lnd, token}, cbk) => {
185
185
  });
186
186
 
187
187
  return cbk(null, {
188
- next: !!foundPayments.length ? listPayments.token : undefined,
188
+ next: listPayments.token || undefined,
189
189
  payments: payments.sorted.reverse(),
190
190
  });
191
191
  }],
package/package.json CHANGED
@@ -7,10 +7,10 @@
7
7
  "url": "https://github.com/alexbosworth/lightning/issues"
8
8
  },
9
9
  "dependencies": {
10
- "@grpc/grpc-js": "1.5.1",
10
+ "@grpc/grpc-js": "1.5.3",
11
11
  "@grpc/proto-loader": "0.6.9",
12
12
  "@types/express": "4.17.13",
13
- "@types/node": "17.0.8",
13
+ "@types/node": "17.0.10",
14
14
  "@types/request": "2.48.8",
15
15
  "@types/ws": "8.2.2",
16
16
  "async": "3.2.3",
@@ -24,14 +24,14 @@
24
24
  "express": "4.17.2",
25
25
  "invoices": "2.0.3",
26
26
  "psbt": "1.1.10",
27
- "type-fest": "2.9.0"
27
+ "type-fest": "2.10.0"
28
28
  },
29
29
  "description": "Lightning Network client library",
30
30
  "devDependencies": {
31
31
  "@alexbosworth/node-fetch": "2.6.2",
32
32
  "@alexbosworth/tap": "15.0.10",
33
33
  "tsd": "0.19.1",
34
- "typescript": "4.5.4",
34
+ "typescript": "4.5.5",
35
35
  "ws": "8.4.2"
36
36
  },
37
37
  "engines": {
@@ -57,5 +57,5 @@
57
57
  "directory": "test/typescript"
58
58
  },
59
59
  "types": "index.d.ts",
60
- "version": "5.3.3"
60
+ "version": "5.3.4"
61
61
  }