ln-service 52.14.0 → 52.14.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,6 +1,6 @@
1
1
  # Versions
2
2
 
3
- ## 52.14.0
3
+ ## 52.14.4
4
4
 
5
5
  - `probeForRoute`, `subscribeToProbeForRoute`, `subscribeToPayViaRoutes`,
6
6
  `payViaRoutes`: When probing (no hash), delete the payment failure record after the probe
package/README.md CHANGED
@@ -9,7 +9,7 @@ through npm.
9
9
 
10
10
  Supported LND versions:
11
11
 
12
- - v0.13.0-beta to v0.13.3-beta
12
+ - v0.13.0-beta to v0.13.4-beta
13
13
  - v0.12.0-beta to v0.12.1-beta
14
14
  - v0.11.0-beta to v0.11.1-beta
15
15
 
@@ -806,7 +806,7 @@ Requires `offchain:write` permission
806
806
 
807
807
  Method not supported on LND 0.12.1 or below
808
808
 
809
- `id` is not supported on LND 0.13.3 or below
809
+ `id` is not supported on LND 0.13.4 or below
810
810
 
811
811
  {
812
812
  [id]: <Delete Only Failed Attempt Records For Payment With Hash Hex String>
@@ -874,7 +874,7 @@ Delete a payment record
874
874
 
875
875
  Requires `offchain:write` permission
876
876
 
877
- Note: this method is not supported on LND 0.13.3 and below
877
+ Note: this method is not supported on LND 0.13.4 and below
878
878
 
879
879
  {
880
880
  id: <Payment Preimage Hash Hex String>
@@ -2908,7 +2908,7 @@ Get wallet status.
2908
2908
 
2909
2909
  This method is not supported on LND 0.12.1 and below
2910
2910
 
2911
- `is_ready` is not supported on LND 0.13.3 and below
2911
+ `is_ready` is not supported on LND 0.13.4 and below
2912
2912
 
2913
2913
  {
2914
2914
  lnd: <Unauthenticated LND API Object>
@@ -4066,7 +4066,7 @@ If specified, message type is expected to be between 32768 and 65535
4066
4066
 
4067
4067
  Message data should not be larger than 65533 bytes
4068
4068
 
4069
- Note: this method is not supported in LND versions 0.13.3 and below
4069
+ Note: this method is not supported in LND versions 0.13.4 and below
4070
4070
 
4071
4071
  Requires `offchain:write` permission
4072
4072
 
@@ -4736,7 +4736,7 @@ Subscribe to HTLC events
4736
4736
 
4737
4737
  Requires `offchain:read` permission
4738
4738
 
4739
- Note: LND 0.13.3 and below do not return `secret` for forwards
4739
+ Note: LND 0.13.4 and below do not return `secret` for forwards
4740
4740
 
4741
4741
  {
4742
4742
  lnd: <Authenticated LND API Object>
@@ -5156,7 +5156,7 @@ Subscribe to successful outgoing payments
5156
5156
 
5157
5157
  Requires `offchain:read` permission
5158
5158
 
5159
- Note: Method not supported on LND 0.13.3 and below
5159
+ Note: Method not supported on LND 0.13.4 and below
5160
5160
 
5161
5161
  {
5162
5162
  lnd: <Authenticated LND API Object>
@@ -5605,7 +5605,7 @@ Subscribe to incoming peer messages
5605
5605
 
5606
5606
  Requires `offchain:read` permission
5607
5607
 
5608
- This method is not supported in LND 0.13.3 and below
5608
+ This method is not supported in LND 0.13.4 and below
5609
5609
 
5610
5610
  {
5611
5611
  lnd: <Authenticated LND API Object>
@@ -5851,7 +5851,7 @@ Requires `macaroon:write` permission
5851
5851
 
5852
5852
  LND must be running with "RPC middleware" enabled: `rpcmiddleware.enable=1`
5853
5853
 
5854
- This method is not supported in LND 0.13.3 and below
5854
+ This method is not supported in LND 0.13.4 and below
5855
5855
 
5856
5856
  {
5857
5857
  [id]: <RPC Middleware Interception Name String>
@@ -5870,7 +5870,7 @@ This method is not supported in LND 0.13.3 and below
5870
5870
  @event 'close_channel_request'
5871
5871
  {
5872
5872
  accept: ({}, [cbk]) => {}
5873
- id: <Request Id Number>
5873
+ id: <Message Id Number>
5874
5874
  macaroon: <Base64 Encoded Macaroon String>
5875
5875
  reject: ({message: <Rejection String>}, [cbk]) => {}
5876
5876
  request: {
@@ -5888,7 +5888,7 @@ This method is not supported in LND 0.13.3 and below
5888
5888
  @event 'open_channel_request'
5889
5889
  {
5890
5890
  accept: ({}, [cbk]) => {}
5891
- id: <Request Id Number>
5891
+ id: <Message Id Number>
5892
5892
  macaroon: <Base64 Encoded Macaroon String>
5893
5893
  reject: ({message: <Rejection String>}, [cbk]) => {}
5894
5894
  request: {
@@ -5909,7 +5909,7 @@ This method is not supported in LND 0.13.3 and below
5909
5909
  @event 'pay_via_route_request'
5910
5910
  {
5911
5911
  accept: ({}, [cbk]) => {}
5912
- id: <Request Id Number>
5912
+ id: <Message Id Number>
5913
5913
  macaroon: <Base64 Encoded Macaroon String>
5914
5914
  reject: ({message: <Rejection String>}, [cbk]) => {}
5915
5915
  request: {
@@ -5939,14 +5939,16 @@ This method is not supported in LND 0.13.3 and below
5939
5939
 
5940
5940
  @event 'request'
5941
5941
  {
5942
- id: <Request Id Number>
5942
+ call: <Call Identifier Number>
5943
+ id: <Message Id Number>
5943
5944
  [macaroon]: <Base64 Encoded Macaroon String>
5944
5945
  [uri]: <RPC URI String>
5945
5946
  }
5946
5947
 
5947
5948
  @event 'response'
5948
5949
  {
5949
- id: <Request Id Number>
5950
+ call: <Call Identifier Number>
5951
+ id: <Message Id Number>
5950
5952
  [macaroon]: <Base64 Encoded Macaroon String>
5951
5953
  [uri]: <RPC URI String>
5952
5954
  }
@@ -6016,7 +6018,7 @@ Subscribe to wallet status events
6016
6018
 
6017
6019
  This method is not supported on LND 0.12.1 and below
6018
6020
 
6019
- `ready` is not supported on LND 0.13.3 and below
6021
+ `ready` is not supported on LND 0.13.4 and below
6020
6022
 
6021
6023
  {
6022
6024
  lnd: <Unauthenticated LND API Object>
@@ -6256,7 +6258,7 @@ Setting both `base_fee_tokens` and `base_fee_mtokens` is not supported
6256
6258
 
6257
6259
  Requires `offchain:write` permission
6258
6260
 
6259
- `failures` are not returned on LND 0.13.3 and below
6261
+ `failures` are not returned on LND 0.13.4 and below
6260
6262
 
6261
6263
  {
6262
6264
  [base_fee_mtokens]: <Base Fee Millitokens Charged String>
@@ -6293,7 +6295,7 @@ await updateRoutingFees({lnd, fee_rate: 2500});
6293
6295
 
6294
6296
  Verify an access token has a given set of permissions
6295
6297
 
6296
- Note: this method is not supported in LND versions 0.13.3 and below
6298
+ Note: this method is not supported in LND versions 0.13.4 and below
6297
6299
 
6298
6300
  Requires `macaroon:read` permission
6299
6301
 
package/package.json CHANGED
@@ -7,11 +7,11 @@
7
7
  "url": "https://github.com/alexbosworth/ln-service/issues"
8
8
  },
9
9
  "dependencies": {
10
- "bolt07": "1.7.3",
10
+ "bolt07": "1.7.4",
11
11
  "cors": "2.8.5",
12
12
  "express": "4.17.1",
13
- "invoices": "2.0.0",
14
- "lightning": "4.12.0",
13
+ "invoices": "2.0.1",
14
+ "lightning": "4.13.3",
15
15
  "macaroon": "3.0.4",
16
16
  "morgan": "1.10.0",
17
17
  "ws": "8.2.3"
@@ -20,8 +20,8 @@
20
20
  "devDependencies": {
21
21
  "@alexbosworth/tap": "15.0.10",
22
22
  "@alexbosworth/node-fetch": "2.6.2",
23
- "async": "3.2.1",
24
- "asyncjs-util": "1.2.6",
23
+ "async": "3.2.2",
24
+ "asyncjs-util": "1.2.7",
25
25
  "bip66": "1.1.5",
26
26
  "bitcoinjs-lib": "5.2.0",
27
27
  "bn.js": "5.2.0",
@@ -61,5 +61,5 @@
61
61
  "tower_server-integration-tests": "tap --no-coverage test/tower_serverrpc-integration/*.js",
62
62
  "wallet-integration-tests": "tap --no-coverage test/walletrpc-integration/*.js"
63
63
  },
64
- "version": "52.14.0"
64
+ "version": "52.14.4"
65
65
  }
@@ -33,7 +33,7 @@ test('Delete payment', async ({afterEach, fail, end, equal, strictSame}) => {
33
33
 
34
34
  const priorLength = (await getPayments({lnd})).payments.length;
35
35
 
36
- // LND 0.13.3 and below do not support deletePayment
36
+ // LND 0.13.4 and below do not support deletePayment
37
37
  try {
38
38
  await deletePayment({lnd, id: invoice.id});
39
39
  } catch (err) {
@@ -15,7 +15,6 @@ test(`Get network info`, async ({end, equal}) => {
15
15
  equal(result.max_channel_size, 0, 'Maximum channel size');
16
16
  equal(result.median_channel_size, 0, 'Median channel size');
17
17
  equal(result.min_channel_size, 0, 'Minimum channel size');
18
- equal(result.node_count, 1, 'Node count');
19
18
  equal(result.not_recently_updated_policy_count, 0, 'Not updated count');
20
19
  equal(result.total_capacity, 0, 'Total capacity');
21
20
 
@@ -23,7 +23,7 @@ test(`Send peer message`, async ({end, equal, strictSame}) => {
23
23
  } catch (err) {
24
24
  const [code] = err;
25
25
 
26
- // Send message to peer is not supported on LND 0.13.3 or lower
26
+ // Send message to peer is not supported on LND 0.13.4 or lower
27
27
  if (code === 501) {
28
28
  await cluster.kill({});
29
29
 
@@ -23,7 +23,7 @@ test(`Subscribe to peer messages`, async ({end, equal, strictSame}) => {
23
23
  } catch (err) {
24
24
  const [code] = err;
25
25
 
26
- // Send message to peer is not supported on LND 0.13.3 or lower
26
+ // Send message to peer is not supported on LND 0.13.4 or lower
27
27
  if (code === 501) {
28
28
  await cluster.kill({});
29
29
 
@@ -23,7 +23,7 @@ test(`Subscribe to RPC requests`, async ({end, equal, fail, strictSame}) => {
23
23
  }
24
24
  })();
25
25
 
26
- // LND 0.13.3 and below do not support rpc interception
26
+ // LND 0.13.4 and below do not support rpc interception
27
27
  if (!spawned) {
28
28
  return end();
29
29
  }
@@ -71,7 +71,7 @@ test(`Update routing fees`, async ({end, equal, strictSame}) => {
71
71
  transaction_vout: 1,
72
72
  }];
73
73
 
74
- // Failures is not supported on LND 0.13.3 and below
74
+ // Failures is not supported on LND 0.13.4 and below
75
75
  if (!!failures.length) {
76
76
  strictSame(failures, expectedFailures, 'Got expected failures');
77
77
  }
@@ -16,7 +16,7 @@ test(`Verify access`, async ({end, equal, rejects, strictSame}) => {
16
16
 
17
17
  const {macaroon} = await grantAccess({lnd, permissions});
18
18
 
19
- // verifyAccess is not supported on LND 0.13.3 and below
19
+ // verifyAccess is not supported on LND 0.13.4 and below
20
20
  try {
21
21
  const validity = await verifyAccess({lnd, macaroon, permissions});
22
22
 
@@ -86,13 +86,18 @@ test(`Get sweep transactions`, async ({end, equal}) => {
86
86
  equal(!!transaction.confirmation_count, true, 'Sweep confirm count');
87
87
  equal(!!transaction.confirmation_height, true, 'Sweep confirm height');
88
88
  equal(!!transaction.created_at, true, 'Sweep creation date');
89
- equal(transaction.description, undefined, 'Sweep has description');
90
89
  equal(transaction.fee, undefined, 'Sweep fee is undefined');
91
90
  equal(transaction.id.length, 64, 'Sweep has transaction id');
92
91
  equal(transaction.is_confirmed, true, 'Sweep is confirmed');
93
92
  equal(transaction.output_addresses.length, 1, 'Sweep has out address');
94
93
  equal(!!transaction.transaction.length, true, 'Sweep has transaction');
95
94
 
95
+ if (!!transaction.description) {
96
+ equal(transaction.description, '0:sweep', 'Sweep has description');
97
+ } else {
98
+ equal(transaction.description, undefined, 'Sweep has description');
99
+ }
100
+
96
101
  await cluster.kill({});
97
102
 
98
103
  return end();
@@ -81,7 +81,7 @@ test('Probe for route', async ({end, equal, strictSame}) => {
81
81
 
82
82
  const [, minor] = (version || '').split('.');
83
83
 
84
- if (!version || parseInt(minor) <= 13) {
84
+ if (!version || parseInt(minor) > 13) {
85
85
  const {payments} = await getFailedPayments({lnd});
86
86
 
87
87
  strictSame(payments, [], 'Probes do not leave a failed state behind');
@@ -54,7 +54,7 @@ test(`Subscribe to past payment`, async ({end, rejects, strictSame}) => {
54
54
 
55
55
  [sub, sub2].forEach(n => n.removeAllListeners());
56
56
 
57
- // LND 0.13.3 and below do not support preimages in forward notifications
57
+ // LND 0.13.4 and below do not support preimages in forward notifications
58
58
  if (!!sent && !!sent.secret) {
59
59
  strictSame(got, payment, 'Payment subscription notifies of payment');
60
60
  }