ln-service 57.8.0 → 57.9.0

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,15 @@
1
1
  # Versions
2
2
 
3
+ ## 57.9.0
4
+
5
+ - `fundPsbt`, `getChainFeeEstimate`, `sendToChainAddress`,
6
+ `sendToChainAddresses`, `sendToChainOutputScripts`: Add `utxo_selection` to
7
+ specify preferred coin selection behavior.
8
+
9
+ ## 57.8.1
10
+
11
+ - `pay` and payment via request methods: disallow features 30/31 from payments
12
+
3
13
  ## 57.8.0
4
14
 
5
15
  - `removeAdvertisedFeature`: Add method to remove a feature bit support ad
package/README.md CHANGED
@@ -1341,6 +1341,8 @@ Specify outputs or PSBT with the outputs encoded
1341
1341
 
1342
1342
  If there are no inputs passed, internal UTXOs will be selected and locked
1343
1343
 
1344
+ `utxo_selection` methods: 'largest', 'random'
1345
+
1344
1346
  Requires `onchain:write` permission
1345
1347
 
1346
1348
  Requires LND built with `walletrpc` tag
@@ -1349,6 +1351,8 @@ This method is not supported in LND 0.11.1 and below
1349
1351
 
1350
1352
  Specifying 0 for `min_confirmations` is not supported in LND 0.13.0 and below
1351
1353
 
1354
+ `utxo_selection` is not supported in LND 0.17.4 and below
1355
+
1352
1356
  {
1353
1357
  [fee_tokens_per_vbyte]: <Chain Fee Tokens Per Virtual Byte Number>
1354
1358
  [inputs]: [{
@@ -1363,6 +1367,7 @@ Specifying 0 for `min_confirmations` is not supported in LND 0.13.0 and below
1363
1367
  }]
1364
1368
  [target_confirmations]: <Confirmations To Wait Number>
1365
1369
  [psbt]: <Existing PSBT Hex String>
1370
+ [utxo_selection]: <Select UTXOs Using Method String>
1366
1371
  }
1367
1372
 
1368
1373
  @returns via cbk or Promise
@@ -1637,10 +1642,14 @@ const chainBalance = (await getChainBalance({lnd})).chain_balance;
1637
1642
 
1638
1643
  Get a chain fee estimate for a prospective chain send
1639
1644
 
1645
+ `utxo_selection` methods: 'largest', 'random'
1646
+
1640
1647
  Requires `onchain:read` permission
1641
1648
 
1642
1649
  Specifying 0 for `utxo_confirmations` is not supported in LND 0.13.0 or below
1643
1650
 
1651
+ `utxo_selection` is not supported in LND 0.17.4 and below
1652
+
1644
1653
  {
1645
1654
  lnd: <Authenticated LND API Object>
1646
1655
  send_to: [{
@@ -1648,6 +1657,8 @@ Specifying 0 for `utxo_confirmations` is not supported in LND 0.13.0 or below
1648
1657
  tokens: <Tokens Number>
1649
1658
  }]
1650
1659
  [target_confirmations]: <Target Confirmations Number>
1660
+ [utxo_confirmations]: <Minimum Confirmations for UTXO Selection Number>
1661
+ [utxo_selection]: <Select UTXOs Using Method String>
1651
1662
  }
1652
1663
 
1653
1664
  @returns via cbk or Promise
@@ -4955,10 +4966,14 @@ await sendMessageToPeer({
4955
4966
 
4956
4967
  Send tokens in a blockchain transaction.
4957
4968
 
4969
+ `utxo_selection` methods: 'largest', 'random'
4970
+
4958
4971
  Requires `onchain:write` permission
4959
4972
 
4960
4973
  `utxo_confirmations` is not supported on LND 0.11.1 or below
4961
4974
 
4975
+ `utxo_selection` is not supported in LND 0.17.4 and below
4976
+
4962
4977
  {
4963
4978
  address: <Destination Chain Address String>
4964
4979
  [description]: <Transaction Label String>
@@ -4969,6 +4984,7 @@ Requires `onchain:write` permission
4969
4984
  [target_confirmations]: <Confirmations To Wait Number>
4970
4985
  tokens: <Tokens To Send Number>
4971
4986
  [utxo_confirmations]: <Minimum Confirmations for UTXO Selection Number>
4987
+ [utxo_selection]: <Select UTXOs Using Method String>
4972
4988
  [wss]: [<Web Socket Server Object>]
4973
4989
  }
4974
4990
 
@@ -4994,10 +5010,14 @@ await sendToChainAddress({address, lnd, tokens});
4994
5010
 
4995
5011
  Send tokens to multiple destinations in a blockchain transaction.
4996
5012
 
5013
+ `utxo_selection` methods: 'largest', 'random'
5014
+
4997
5015
  Requires `onchain:write` permission
4998
5016
 
4999
5017
  `utxo_confirmations` is not supported on LND 0.11.1 or below
5000
5018
 
5019
+ `utxo_selection` is not supported in LND 0.17.4 and below
5020
+
5001
5021
  {
5002
5022
  [description]: <Transaction Label String>
5003
5023
  [fee_tokens_per_vbyte]: <Chain Fee Tokens Per Virtual Byte Number>
@@ -5009,6 +5029,7 @@ Requires `onchain:write` permission
5009
5029
  }]
5010
5030
  [target_confirmations]: <Confirmations To Wait Number>
5011
5031
  [utxo_confirmations]: <Minimum Confirmations for UTXO Selection Number>
5032
+ [utxo_selection]: <Select UTXOs Using Method String>
5012
5033
  [wss]: [<Web Socket Server Object>]
5013
5034
  }
5014
5035
 
@@ -5033,10 +5054,14 @@ await sendToChainAddresses({lnd, send_to: sendTo});
5033
5054
 
5034
5055
  Send on-chain funds to multiple output scripts
5035
5056
 
5057
+ `utxo_selection` methods: 'largest', 'random'
5058
+
5036
5059
  Requires `onchain:write` permission
5037
5060
 
5038
5061
  Requires LND compiled with `walletrpc` build tag
5039
5062
 
5063
+ `utxo_selection` is not supported in LND 0.17.4 and below
5064
+
5040
5065
  {
5041
5066
  [description]: <Transaction Label String>
5042
5067
  [fee_tokens_per_vbyte]: <Chain Fee Tokens Per Virtual Byte Number>
@@ -5046,6 +5071,7 @@ Requires LND compiled with `walletrpc` build tag
5046
5071
  tokens: <Tokens Number>
5047
5072
  }]
5048
5073
  [utxo_confirmations]: <Minimum Confirmations for UTXO Selection Number>
5074
+ [utxo_selection]: <Select UTXOs Using Method String>
5049
5075
  }
5050
5076
 
5051
5077
  @returns via cbk or Promise
package/package.json CHANGED
@@ -9,12 +9,12 @@
9
9
  "dependencies": {
10
10
  "bolt07": "1.8.4",
11
11
  "invoices": "3.0.0",
12
- "lightning": "10.8.1",
12
+ "lightning": "10.9.0",
13
13
  "macaroon": "3.0.4"
14
14
  },
15
15
  "description": "Interaction helper for your Lightning Network daemon",
16
16
  "devDependencies": {
17
- "@alexbosworth/blockchain": "1.7.0",
17
+ "@alexbosworth/blockchain": "2.0.0",
18
18
  "@alexbosworth/node-fetch": "2.6.2",
19
19
  "async": "3.2.5",
20
20
  "asyncjs-util": "1.2.12",
@@ -24,7 +24,7 @@
24
24
  "bn.js": "5.2.1",
25
25
  "bs58check": "3.0.1",
26
26
  "ecpair": "2.1.0",
27
- "ln-docker-daemons": "6.0.12",
27
+ "ln-docker-daemons": "6.0.13",
28
28
  "p2tr": "2.0.0",
29
29
  "portfinder": "1.0.32",
30
30
  "psbt": "3.0.0",
@@ -69,5 +69,5 @@
69
69
  "integration-test-0.14.4": "DOCKER_LND_VERSION=v0.14.4-beta npm run test",
70
70
  "test": "echo $DOCKER_LND_VERSION && node test/runner"
71
71
  },
72
- "version": "57.8.0"
72
+ "version": "57.9.0"
73
73
  }
@@ -84,7 +84,11 @@ test('Payment errors', async () => {
84
84
  route.tokens = 1000;
85
85
 
86
86
  await pay({lnd, path: {id, routes: [route]}});
87
+
88
+ await kill({});
87
89
  } catch (err) {
90
+ await kill({});
91
+
88
92
  if (Array.isArray(err)) {
89
93
  const [, code, context] = err;
90
94
 
@@ -94,7 +98,5 @@ test('Payment errors', async () => {
94
98
  }
95
99
  }
96
100
 
97
- await kill({});
98
-
99
101
  return;
100
102
  });
@@ -67,11 +67,13 @@ test(`Cancel back a hodl invoice`, async () => {
67
67
 
68
68
  equal(code, 503, 'Canceled back HODL HTLC results in 404');
69
69
  equal(message, 'PaymentRejectedByDestination', 'Got back 404 error');
70
+
71
+ await kill({});
70
72
  } catch (err) {
73
+ await kill({});
74
+
71
75
  equal(err, null, 'Expected no error');
72
76
  }
73
77
 
74
- await kill({});
75
-
76
78
  return;
77
79
  });
@@ -89,11 +89,13 @@ test('Delete forwarding reputations', async () => {
89
89
 
90
90
  equal(nodes.length, [].length, 'Reputations should be wiped');
91
91
  }
92
+
93
+ await kill({});
92
94
  } catch (err) {
95
+ await kill({});
96
+
93
97
  equal(err, null, 'Expected no error');
94
98
  }
95
99
 
96
- await kill({});
97
-
98
100
  return;
99
101
  });