lightning 12.1.1 → 12.2.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 +9 -0
- package/lnd_methods/info/constants.json +1 -0
- package/lnd_methods/onchain/open_channel.d.ts +2 -0
- package/lnd_methods/onchain/open_channel.js +9 -0
- package/lnd_methods/onchain/open_channels.d.ts +1 -0
- package/lnd_methods/onchain/open_channels.js +10 -1
- package/lnd_responses/constants.json +3 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"15c1eb13972f86a7c1e8cb084aa6d52700d685ff": "0.14.5-beta",
|
|
25
25
|
"1a3194d302f33bb52823297d9d7f75cd37516053": "0.10.0-beta",
|
|
26
26
|
"1e511be523eb8e97c4e2d9c89a7a263963a3929f": "0.14.2-beta",
|
|
27
|
+
"2b87887fd9ef6b3e1391dc25e4c658ee73a06fa0": "0.21.1-beta",
|
|
27
28
|
"2fb150c8fe827df9df0520ef9916b3afb7b03a8d": "0.17.0-beta",
|
|
28
29
|
"2fb725e0e257cc85e8d1e213ac9a3ba3e96a640c": "0.19.3-beta",
|
|
29
30
|
"3ae46d81f4a2edad06ef778b2940d9b06386d93b": "0.11.0-beta",
|
|
@@ -32,6 +32,8 @@ export type ChannelOpenOptions = {
|
|
|
32
32
|
is_private?: boolean;
|
|
33
33
|
/** Create Simplified Taproot Type Channel */
|
|
34
34
|
is_simplified_taproot?: boolean;
|
|
35
|
+
/** Create Standard Taproot Type Channel */
|
|
36
|
+
is_standard_taproot?: boolean;
|
|
35
37
|
/** Peer Should Avoid Waiting For Confirmation */
|
|
36
38
|
is_trusted_funding?: boolean;
|
|
37
39
|
/** Local Tokens */
|
|
@@ -14,6 +14,7 @@ const minChannelTokens = 20000;
|
|
|
14
14
|
const method = 'openChannel';
|
|
15
15
|
const reserve = isDust => isDust ? 354 : undefined;
|
|
16
16
|
const simplifiedTaprootChannelType = 'SIMPLE_TAPROOT';
|
|
17
|
+
const standardTaprootChannelType = 'TAPROOT';
|
|
17
18
|
const type = 'default';
|
|
18
19
|
|
|
19
20
|
/** Open a new channel.
|
|
@@ -44,6 +45,9 @@ const type = 'default';
|
|
|
44
45
|
`is_simplified_taproot` is not supported on LND 0.16.4 and below and requires
|
|
45
46
|
`--protocol.simple-taproot-chans` set on both sides.
|
|
46
47
|
|
|
48
|
+
`is_standard_taproot` is not supported on LND 0.21.0 and below and requires
|
|
49
|
+
`--protocol.simple-taproot-chans` set on both sides.
|
|
50
|
+
|
|
47
51
|
{
|
|
48
52
|
[base_fee_mtokens]: <Routing Base Fee Millitokens Charged String>
|
|
49
53
|
[chain_fee_tokens_per_vbyte]: <Chain Fee Tokens Per VByte Number>
|
|
@@ -59,6 +63,7 @@ const type = 'default';
|
|
|
59
63
|
[is_max_funding]: <Use Maximal Chain Funds For Local Funding Bool>
|
|
60
64
|
[is_private]: <Channel is Private Bool> // Defaults to false
|
|
61
65
|
[is_simplified_taproot]: <Channel is Simplified Taproot Type Bool>
|
|
66
|
+
[is_standard_taproot]: <Channel is Standard Taproot Type Bool>
|
|
62
67
|
[is_trusted_funding]: <Accept Funding as Trusted Bool>
|
|
63
68
|
lnd: <Authenticated LND API Object>
|
|
64
69
|
[local_tokens]: <Total Channel Capacity Tokens Number>
|
|
@@ -188,6 +193,10 @@ module.exports = (args, cbk) => {
|
|
|
188
193
|
options.commitment_type = simplifiedTaprootChannelType;
|
|
189
194
|
}
|
|
190
195
|
|
|
196
|
+
if (!!args.is_standard_taproot) {
|
|
197
|
+
options.commitment_type = standardTaprootChannelType;
|
|
198
|
+
}
|
|
199
|
+
|
|
191
200
|
const channelOpen = args.lnd.default.openChannel(options);
|
|
192
201
|
|
|
193
202
|
channelOpen.on('data', chan => {
|
|
@@ -19,6 +19,7 @@ const makeId = () => randomBytes(32);
|
|
|
19
19
|
const method = 'openChannel';
|
|
20
20
|
const reserve = isDust => isDust ? 354 : undefined;
|
|
21
21
|
const taproot = 'SIMPLE_TAPROOT';
|
|
22
|
+
const taproot2 = 'TAPROOT';
|
|
22
23
|
const type = 'default';
|
|
23
24
|
|
|
24
25
|
/** Open one or more channels
|
|
@@ -48,6 +49,9 @@ const type = 'default';
|
|
|
48
49
|
`is_simplified_taproot` is not supported on LND 0.16.4 and below and requires
|
|
49
50
|
`--protocol.simple-taproot-chans` set on both sides.
|
|
50
51
|
|
|
52
|
+
`is_standard_taproot` is not supported on LND 0.21.0 and below and requires
|
|
53
|
+
`--protocol.simple-taproot-chans` set on both sides.
|
|
54
|
+
|
|
51
55
|
{
|
|
52
56
|
channels: [{
|
|
53
57
|
[base_fee_mtokens]: <Routing Base Fee Millitokens Charged String>
|
|
@@ -59,6 +63,7 @@ const type = 'default';
|
|
|
59
63
|
[is_allowing_minimal_reserve]: <Allow Peer to Have Minimal Reserve Bool>
|
|
60
64
|
[is_private]: <Channel is Private Bool> // Defaults to false
|
|
61
65
|
[is_simplified_taproot]: <Channel is Simplified Taproot Type Bool>
|
|
66
|
+
[is_standard_taproot]: <Channel is Standard Taproot Type Bool>
|
|
62
67
|
[is_trusted_funding]: <Peer Should Avoid Waiting For Confirmation Bool>
|
|
63
68
|
[min_htlc_mtokens]: <Minimum HTLC Millitokens String>
|
|
64
69
|
[partner_csv_delay]: <Peer Output CSV Delay Number>
|
|
@@ -118,6 +123,7 @@ module.exports = (args, cbk) => {
|
|
|
118
123
|
is_allowing_minimal_reserve: channel.is_allowing_minimal_reserve,
|
|
119
124
|
is_private: channel.is_private,
|
|
120
125
|
is_simplified_taproot: channel.is_simplified_taproot,
|
|
126
|
+
is_standard_taproot: channel.is_standard_taproot,
|
|
121
127
|
is_trusted_funding: channel.is_trusted_funding,
|
|
122
128
|
min_htlc_mtokens: channel.min_htlc_mtokens,
|
|
123
129
|
partner_public_key: channel.partner_public_key,
|
|
@@ -137,10 +143,13 @@ module.exports = (args, cbk) => {
|
|
|
137
143
|
|
|
138
144
|
const commit = !!channel.is_simplified_taproot ? taproot : baseType;
|
|
139
145
|
|
|
146
|
+
// After simplified taproot there is a new standard mode for taproot
|
|
147
|
+
const cType = !!channel.is_standard_taproot ? taproot2 : commit;
|
|
148
|
+
|
|
140
149
|
const channelOpen = args.lnd[type][method]({
|
|
141
150
|
base_fee: channel.base_fee_mtokens || undefined,
|
|
142
151
|
close_address: channel.cooperative_close_address || undefined,
|
|
143
|
-
commitment_type:
|
|
152
|
+
commitment_type: cType,
|
|
144
153
|
fee_rate: channel.fee_rate,
|
|
145
154
|
funding_shim: {
|
|
146
155
|
psbt_shim: {
|
|
@@ -19,11 +19,13 @@
|
|
|
19
19
|
"LEGACY": "original",
|
|
20
20
|
"SCRIPT_ENFORCED_LEASE": "anchor_with_lease_constraint",
|
|
21
21
|
"SIMPLE_TAPROOT": "simplified_taproot",
|
|
22
|
-
"STATIC_REMOTE_KEY": "original_with_static_to_remote"
|
|
22
|
+
"STATIC_REMOTE_KEY": "original_with_static_to_remote",
|
|
23
|
+
"TAPROOT": "standard_taproot"
|
|
23
24
|
},
|
|
24
25
|
"commitmentTypes": {
|
|
25
26
|
"anchor": "ANCHORS",
|
|
26
27
|
"simplified_taproot": "SIMPLE_TAPROOT",
|
|
28
|
+
"standard_taproot": "TAPROOT",
|
|
27
29
|
"static_remote_key": "STATIC_REMOTE_KEY",
|
|
28
30
|
"variable_remote_key": "LEGACY"
|
|
29
31
|
},
|
package/package.json
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"@alexbosworth/blockchain": "3.2.0",
|
|
11
11
|
"@grpc/grpc-js": "1.14.4",
|
|
12
12
|
"@grpc/proto-loader": "0.8.1",
|
|
13
|
-
"@types/node": "
|
|
13
|
+
"@types/node": "26.1.0",
|
|
14
14
|
"@types/request": "2.48.13",
|
|
15
15
|
"@types/ws": "8.18.1",
|
|
16
16
|
"async": "3.2.6",
|
|
17
17
|
"asyncjs-util": "1.2.12",
|
|
18
|
-
"bn.js": "5.2.
|
|
18
|
+
"bn.js": "5.2.4",
|
|
19
19
|
"bolt07": "1.9.5",
|
|
20
20
|
"bolt09": "2.2.0",
|
|
21
21
|
"invoices": "5.0.2",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"directory": "test-typescript/typescript"
|
|
52
52
|
},
|
|
53
53
|
"types": "index.d.ts",
|
|
54
|
-
"version": "12.
|
|
54
|
+
"version": "12.2.0"
|
|
55
55
|
}
|