lightning 5.8.0 → 5.8.3

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,10 @@
1
1
  # Versions
2
2
 
3
- ## 5.8.0
3
+ ## 5.8.3
4
+
5
+ - `getInvoice`: Add typescript timeout field on individual payment HTLCs
6
+
7
+ ## 5.8.2
4
8
 
5
9
  - `getMasterPublicKeys`: Add method to lookup wallet extended public keys
6
10
 
package/README.md CHANGED
@@ -6,6 +6,8 @@ Methods for working with the Lightning Network
6
6
 
7
7
  ## Selected Projects using Lightning
8
8
 
9
+ - [bitpay.com crypto-rpc](https://bitpay.com/) -
10
+ https://github.com/bitpay/crypto-rpc
9
11
  - [coinos.io](https://coinos.io/) - https://github.com/coinos/coinos-server
10
12
  - [Lightning Shell](https://lightningshell.app/) -
11
13
  https://github.com/ibz/lightning-shell
@@ -27,6 +29,8 @@ Methods for working with the Lightning Network
27
29
  - [rekr](https://rekr.app/) - https://github.com/ryan-lingle/rekr
28
30
  - [Suredbits API](https://suredbits.com/) -
29
31
  https://github.com/Suredbits/sb-api-lnd
32
+ - [Synonym demo server](https://synonym.to) -
33
+ https://github.com/synonymdev/slash-pay-demo-server
30
34
 
31
35
  ## LND Authentication
32
36
 
@@ -76,6 +76,8 @@ export type GetInvoiceResult = {
76
76
  mtokens: string;
77
77
  /** Pending Payment Channel HTLC Index */
78
78
  pending_index?: number;
79
+ /** HTLC CLTV Timeout Height Number */
80
+ timeout: number;
79
81
  /** Payment Tokens */
80
82
  tokens: number;
81
83
  }[];
@@ -67,6 +67,8 @@ export type SubscribeToPastPaymentsPaymentEvent = {
67
67
  /**
68
68
  * Subscribe to successful outgoing payments
69
69
  *
70
+ * Payments may be omitted if LND does not finalize the payment record
71
+ *
70
72
  * Requires `offchain:read` permission
71
73
  *
72
74
  * Note: Method not supported on LND 0.13.4 and below
@@ -21,6 +21,8 @@ const unknownFailureMessage = '2 UNKNOWN: unknown failure detail type: <nil>';
21
21
 
22
22
  /** Subscribe to successful outgoing payments
23
23
 
24
+ Payments may be omitted if LND does not finalize the payment record
25
+
24
26
  Requires `offchain:read` permission
25
27
 
26
28
  Note: Method not supported on LND 0.13.4 and below
@@ -96,6 +98,11 @@ module.exports = ({lnd}) => {
96
98
  return;
97
99
  }
98
100
 
101
+ // Exit early when there is no payment
102
+ if (!res.payment) {
103
+ return;
104
+ }
105
+
99
106
  // Emit payment details
100
107
  return emitter.emit(event, res.payment);
101
108
  });
@@ -51,8 +51,6 @@ module.exports = ({lnd}) => {
51
51
 
52
52
  subscription.cancel();
53
53
 
54
- subscription.removeAllListeners();
55
-
56
54
  return;
57
55
  });
58
56
 
package/package.json CHANGED
@@ -7,33 +7,33 @@
7
7
  "url": "https://github.com/alexbosworth/lightning/issues"
8
8
  },
9
9
  "dependencies": {
10
- "@grpc/grpc-js": "1.5.5",
10
+ "@grpc/grpc-js": "1.5.7",
11
11
  "@grpc/proto-loader": "0.6.9",
12
12
  "@types/express": "4.17.13",
13
- "@types/node": "17.0.17",
13
+ "@types/node": "17.0.21",
14
14
  "@types/request": "2.48.8",
15
- "@types/ws": "8.2.2",
15
+ "@types/ws": "8.5.2",
16
16
  "async": "3.2.3",
17
17
  "asyncjs-util": "1.2.8",
18
18
  "bitcoinjs-lib": "6.0.1",
19
19
  "bn.js": "5.2.0",
20
- "body-parser": "1.19.1",
20
+ "body-parser": "1.19.2",
21
21
  "bolt07": "1.8.0",
22
- "bolt09": "0.2.1",
22
+ "bolt09": "0.2.2",
23
23
  "cbor": "8.1.0",
24
24
  "ecpair": "2.0.1",
25
- "express": "4.17.2",
25
+ "express": "4.17.3",
26
26
  "invoices": "2.0.4",
27
27
  "psbt": "2.0.0",
28
- "tiny-secp256k1": "2.2.0",
29
- "type-fest": "2.11.2"
28
+ "tiny-secp256k1": "2.2.1",
29
+ "type-fest": "2.12.0"
30
30
  },
31
31
  "description": "Lightning Network client library",
32
32
  "devDependencies": {
33
33
  "@alexbosworth/node-fetch": "2.6.2",
34
34
  "@alexbosworth/tap": "15.0.10",
35
35
  "tsd": "0.19.1",
36
- "typescript": "4.5.5",
36
+ "typescript": "4.6.2",
37
37
  "ws": "8.5.0"
38
38
  },
39
39
  "engines": {
@@ -59,5 +59,5 @@
59
59
  "directory": "test/typescript"
60
60
  },
61
61
  "types": "index.d.ts",
62
- "version": "5.8.0"
62
+ "version": "5.8.3"
63
63
  }