lightning 9.8.2 → 9.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,9 @@
1
1
  # Versions
2
2
 
3
+ ## 9.9.0
4
+
5
+ - `openChannel`: Add `is_trusted_funding` to support skipping confirmation wait
6
+
3
7
  ## 9.8.2
4
8
 
5
9
  - `subscribeToForwards`: Cancel subscription when there are no event listeners
@@ -18,6 +18,8 @@ export type ChannelOpenOptions = {
18
18
  give_tokens?: number;
19
19
  /** Channel is Private */
20
20
  is_private?: boolean;
21
+ /** Peer Should Avoid Waiting For Confirmation */
22
+ is_trusted_funding?: boolean;
21
23
  /** Local Tokens */
22
24
  local_tokens: number;
23
25
  /** Spend UTXOs With Minimum Confirmations */
@@ -4,6 +4,7 @@ const {returnResult} = require('asyncjs-util');
4
4
  const {addPeer} = require('./../peers');
5
5
  const {isLnd} = require('./../../lnd_requests');
6
6
 
7
+ const anchors = 'ANCHORS';
7
8
  const defaultMinConfs = 1;
8
9
  const defaultMinHtlcMtokens = '1';
9
10
  const errMemoLength = /^provided memo \(.*\) is of length \d*, exceeds (\d*)$/;
@@ -11,6 +12,7 @@ const minChannelTokens = 20000;
11
12
  const method = 'openChannel';
12
13
  const type = 'default';
13
14
 
15
+
14
16
  /** Open a new channel.
15
17
 
16
18
  The capacity of the channel is set with local_tokens
@@ -28,6 +30,10 @@ const type = 'default';
28
30
 
29
31
  `description` is not supported on LND 0.16.4 and below
30
32
 
33
+ `is_trusted_funding` is not supported on LND 0.15.0 and below and requires
34
+ `--protocol.option-scid-alias` and `--protocol.zero-conf` set on both sides
35
+ as well as a channel open request listener to accept the trusted funding.
36
+
31
37
  {
32
38
  [base_fee_mtokens]: <Routing Base Fee Millitokens Charged String>
33
39
  [chain_fee_tokens_per_vbyte]: <Chain Fee Tokens Per VByte Number>
@@ -37,6 +43,7 @@ const type = 'default';
37
43
  [give_tokens]: <Tokens to Gift To Partner Number> // Defaults to zero
38
44
  [is_max_funding]: <Use Maximal Chain Funds For Local Funding Bool>
39
45
  [is_private]: <Channel is Private Bool> // Defaults to false
46
+ [is_trusted_funding]: <Accept Funding as Trusted Bool>
40
47
  lnd: <Authenticated LND API Object>
41
48
  [local_tokens]: <Total Channel Capacity Tokens Number>
42
49
  [min_confirmations]: <Spend UTXOs With Minimum Confirmations Number>
@@ -105,6 +112,7 @@ module.exports = (args, cbk) => {
105
112
 
106
113
  const options = {
107
114
  base_fee: args.base_fee_mtokens || undefined,
115
+ commitment_type: args.is_trusted_funding ? anchors : undefined,
108
116
  fee_rate: args.fee_rate,
109
117
  fund_max: args.is_max_funding || undefined,
110
118
  local_funding_amount: args.local_tokens,
@@ -117,6 +125,7 @@ module.exports = (args, cbk) => {
117
125
  spend_unconfirmed: !minConfs,
118
126
  use_base_fee: args.base_fee_mtokens !== undefined,
119
127
  use_fee_rate: args.fee_rate !== undefined,
128
+ zero_conf: !!args.is_trusted_funding || undefined,
120
129
  };
121
130
 
122
131
  if (!!args.chain_fee_tokens_per_vbyte) {
package/package.json CHANGED
@@ -58,5 +58,5 @@
58
58
  "directory": "test/typescript"
59
59
  },
60
60
  "types": "index.d.ts",
61
- "version": "9.8.2"
61
+ "version": "9.9.0"
62
62
  }