lightning 7.1.7 → 7.1.9

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
- ## 7.1.7
3
+ ## 7.1.9
4
+
5
+ - `getPeers`: Correct feature bit returned as string and not number
6
+
7
+ ## 7.1.8
4
8
 
5
9
  - `signChainAddressMessage`: Add method to sign a message given a chain address
6
10
  - `verifyChainAddressMessage`: Add method to verify a chain address message
@@ -1,4 +1,16 @@
1
- import {AuthenticatedLightningSubscription} from '../../typescript';
1
+ import {
2
+ AuthenticatedLightningArgs,
3
+ AuthenticatedLightningSubscription,
4
+ } from '../../typescript';
5
+
6
+ export type SubscribeToInvoicesArgs = AuthenticatedLightningArgs<{
7
+ /** Invoice Added After Index Number */
8
+ added_after?: number;
9
+ /** Invoice Confirmed After Index Number */
10
+ confirmed_after?: number;
11
+ /** Restart Subscription Delay Milliseconds Number */
12
+ restart_delay_ms?: number;
13
+ }>;
2
14
 
3
15
  export type SubscribeToInvoicesInvoiceUpdatedEvent = {
4
16
  /** Fallback Chain Address */
@@ -7,6 +19,8 @@ export type SubscribeToInvoicesInvoiceUpdatedEvent = {
7
19
  cltv_delta: number;
8
20
  /** Confirmed At ISO 8601 Date */
9
21
  confirmed_at?: string;
22
+ /** Confirmed Index Number */
23
+ confirmed_index?: number;
10
24
  /** Created At ISO 8601 Date */
11
25
  created_at: string;
12
26
  /** Description */
@@ -27,12 +41,14 @@ export type SubscribeToInvoicesInvoiceUpdatedEvent = {
27
41
  }[];
28
42
  /** Invoice Payment Hash Hex String */
29
43
  id: string;
44
+ /** Invoice Index Number */
45
+ index: number;
30
46
  /** Invoice is Confirmed */
31
47
  is_confirmed: boolean;
32
- /** Invoice is Outgoing */
33
- is_outgoing: boolean;
34
48
  /** Invoice is Push Payment */
35
49
  is_push?: boolean;
50
+ /** Invoiced Millitokens String */
51
+ mtokens: string;
36
52
  /**
37
53
  * Payment Identifying Secret Hex String
38
54
  *
@@ -88,4 +104,4 @@ export type SubscribeToInvoicesInvoiceUpdatedEvent = {
88
104
  *
89
105
  * `payment` is not supported on LND 0.11.1 and below
90
106
  */
91
- export const subscribeToInvoices: AuthenticatedLightningSubscription;
107
+ export const subscribeToInvoices: AuthenticatedLightningSubscription<SubscribeToInvoicesArgs>;
@@ -116,7 +116,7 @@ module.exports = peer => {
116
116
  bytes_received: Number(peer.bytes_recv),
117
117
  bytes_sent: Number(peer.bytes_sent),
118
118
  features: keys(peer.features).map(bit => ({
119
- bit,
119
+ bit: Number(bit),
120
120
  is_known: peer.features[bit].is_known,
121
121
  is_required: peer.features[bit].is_required,
122
122
  type: featureFlagDetails({bit}).type,
package/package.json CHANGED
@@ -26,14 +26,14 @@
26
26
  "invoices": "2.2.3",
27
27
  "psbt": "2.7.2",
28
28
  "tiny-secp256k1": "2.2.1",
29
- "type-fest": "3.7.2"
29
+ "type-fest": "3.8.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.12",
35
35
  "tsd": "0.28.1",
36
- "typescript": "5.0.3",
36
+ "typescript": "5.0.4",
37
37
  "ws": "8.13.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": "7.1.7"
62
+ "version": "7.1.9"
63
63
  }
@@ -34,7 +34,7 @@ const makeExpected = overrides => {
34
34
  bytes_received: 1,
35
35
  bytes_sent: 1,
36
36
  features: [{
37
- bit: '1',
37
+ bit: 1,
38
38
  is_known: true,
39
39
  is_required: false,
40
40
  type: 'data_loss_protection',
@@ -4,8 +4,14 @@ import {AuthenticatedLnd} from '../../lnd_grpc';
4
4
  import {subscribeToInvoices} from '../../lnd_methods';
5
5
 
6
6
  const lnd = {} as AuthenticatedLnd;
7
+ const added_after = 0;
8
+ const confirmed_after = 0;
9
+ const restart_delay_ms = 0;
7
10
 
8
11
  expectError(subscribeToInvoices());
9
12
  expectError(subscribeToInvoices({}));
10
13
 
11
14
  expectType<events.EventEmitter>(subscribeToInvoices({lnd}));
15
+ expectType<events.EventEmitter>(subscribeToInvoices({lnd, added_after}));
16
+ expectType<events.EventEmitter>(subscribeToInvoices({lnd, confirmed_after}));
17
+ expectType<events.EventEmitter>(subscribeToInvoices({lnd, restart_delay_ms}));