lightning 9.11.3 → 9.12.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
|
@@ -1352,6 +1352,13 @@ enum CommitmentType {
|
|
|
1352
1352
|
channel before its maturity date.
|
|
1353
1353
|
*/
|
|
1354
1354
|
SCRIPT_ENFORCED_LEASE = 4;
|
|
1355
|
+
|
|
1356
|
+
/*
|
|
1357
|
+
A channel that uses musig2 for the funding output, and the new tapscript
|
|
1358
|
+
features where relevant.
|
|
1359
|
+
*/
|
|
1360
|
+
// TODO(roasbeef): need script enforce mirror type for the above as well?
|
|
1361
|
+
SIMPLE_TAPROOT = 5;
|
|
1355
1362
|
}
|
|
1356
1363
|
|
|
1357
1364
|
message ChannelConstraints {
|
|
@@ -2828,6 +2835,9 @@ message WalletAccountBalance {
|
|
|
2828
2835
|
}
|
|
2829
2836
|
|
|
2830
2837
|
message WalletBalanceRequest {
|
|
2838
|
+
// The wallet account the balance is shown for.
|
|
2839
|
+
// If this is not specified, the balance of the "default" account is shown.
|
|
2840
|
+
string account = 1;
|
|
2831
2841
|
}
|
|
2832
2842
|
|
|
2833
2843
|
message WalletBalanceResponse {
|
|
@@ -28,6 +28,8 @@ export type ChannelOpenOptions = {
|
|
|
28
28
|
is_max_funding?: boolean;
|
|
29
29
|
/** Channel is Private */
|
|
30
30
|
is_private?: boolean;
|
|
31
|
+
/** Create Simplified Taproot Type Channel */
|
|
32
|
+
is_simplified_taproot?: boolean;
|
|
31
33
|
/** Peer Should Avoid Waiting For Confirmation */
|
|
32
34
|
is_trusted_funding?: boolean;
|
|
33
35
|
/** Local Tokens */
|
|
@@ -11,6 +11,7 @@ const errMemoLength = /^provided memo \(.*\) is of length \d*, exceeds (\d*)$/;
|
|
|
11
11
|
const {isArray} = Array;
|
|
12
12
|
const minChannelTokens = 20000;
|
|
13
13
|
const method = 'openChannel';
|
|
14
|
+
const simplifiedTaprootChannelType = 'SIMPLE_TAPROOT';
|
|
14
15
|
const type = 'default';
|
|
15
16
|
|
|
16
17
|
/** Open a new channel.
|
|
@@ -36,6 +37,9 @@ const type = 'default';
|
|
|
36
37
|
|
|
37
38
|
`inputs` is not supported on LND 0.16.4 and below
|
|
38
39
|
|
|
40
|
+
`is_simplified_taproot` is not supported on LND 0.16.4 and below and requires
|
|
41
|
+
`--protocol.simple-taproot-chans` set on both sides.
|
|
42
|
+
|
|
39
43
|
{
|
|
40
44
|
[base_fee_mtokens]: <Routing Base Fee Millitokens Charged String>
|
|
41
45
|
[chain_fee_tokens_per_vbyte]: <Chain Fee Tokens Per VByte Number>
|
|
@@ -49,6 +53,7 @@ const type = 'default';
|
|
|
49
53
|
}]
|
|
50
54
|
[is_max_funding]: <Use Maximal Chain Funds For Local Funding Bool>
|
|
51
55
|
[is_private]: <Channel is Private Bool> // Defaults to false
|
|
56
|
+
[is_simplified_taproot]: <Channel is Simplified Taproot Type Bool>
|
|
52
57
|
[is_trusted_funding]: <Accept Funding as Trusted Bool>
|
|
53
58
|
lnd: <Authenticated LND API Object>
|
|
54
59
|
[local_tokens]: <Total Channel Capacity Tokens Number>
|
|
@@ -171,6 +176,10 @@ module.exports = (args, cbk) => {
|
|
|
171
176
|
options.push_sat = args.give_tokens;
|
|
172
177
|
}
|
|
173
178
|
|
|
179
|
+
if (!!args.is_simplified_taproot) {
|
|
180
|
+
options.commitment_type = simplifiedTaprootChannelType;
|
|
181
|
+
}
|
|
182
|
+
|
|
174
183
|
const channelOpen = args.lnd.default.openChannel(options);
|
|
175
184
|
|
|
176
185
|
channelOpen.on('data', chan => {
|
|
@@ -120,13 +120,14 @@ module.exports = (args, cbk) => {
|
|
|
120
120
|
const [lastChannel] = toOpen.map(n => n.id).reverse();
|
|
121
121
|
|
|
122
122
|
return asyncMap(toOpen, (channel, cbk) => {
|
|
123
|
+
const baseType = !!channel.is_trusted_funding ? anchors : undefined;
|
|
123
124
|
let isDone = false;
|
|
124
125
|
const isSelfPublish = !!args.is_avoiding_broadcast;
|
|
125
126
|
|
|
126
127
|
const channelOpen = args.lnd[type][method]({
|
|
127
128
|
base_fee: channel.base_fee_mtokens || undefined,
|
|
128
129
|
close_address: channel.cooperative_close_address || undefined,
|
|
129
|
-
commitment_type:
|
|
130
|
+
commitment_type: baseType,
|
|
130
131
|
fee_rate: channel.fee_rate,
|
|
131
132
|
funding_shim: {
|
|
132
133
|
psbt_shim: {
|
|
@@ -18,10 +18,12 @@
|
|
|
18
18
|
"ANCHORS": "anchor",
|
|
19
19
|
"LEGACY": "original",
|
|
20
20
|
"SCRIPT_ENFORCED_LEASE": "anchor_with_lease_constraint",
|
|
21
|
+
"SIMPLE_TAPROOT": "simplified_taproot",
|
|
21
22
|
"STATIC_REMOTE_KEY": "original_with_static_to_remote"
|
|
22
23
|
},
|
|
23
24
|
"commitmentTypes": {
|
|
24
25
|
"anchor": "ANCHORS",
|
|
26
|
+
"simplified_taproot": "SIMPLE_TAPROOT",
|
|
25
27
|
"static_remote_key": "STATIC_REMOTE_KEY",
|
|
26
28
|
"variable_remote_key": "LEGACY"
|
|
27
29
|
},
|
package/package.json
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@grpc/grpc-js": "1.9.1",
|
|
11
|
-
"@grpc/proto-loader": "0.7.
|
|
11
|
+
"@grpc/proto-loader": "0.7.9",
|
|
12
12
|
"@types/express": "4.17.17",
|
|
13
|
-
"@types/node": "20.5.
|
|
13
|
+
"@types/node": "20.5.7",
|
|
14
14
|
"@types/request": "2.48.8",
|
|
15
15
|
"@types/ws": "8.5.5",
|
|
16
16
|
"async": "3.2.4",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"invoices": "3.0.0",
|
|
27
27
|
"psbt": "3.0.0",
|
|
28
28
|
"tiny-secp256k1": "2.2.3",
|
|
29
|
-
"type-fest": "4.
|
|
29
|
+
"type-fest": "4.3.1"
|
|
30
30
|
},
|
|
31
31
|
"description": "Lightning Network client library",
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@alexbosworth/node-fetch": "2.6.2",
|
|
34
34
|
"tsd": "0.28.1",
|
|
35
|
-
"typescript": "5.
|
|
35
|
+
"typescript": "5.2.2",
|
|
36
36
|
"ws": "8.13.0"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"directory": "test/typescript"
|
|
60
60
|
},
|
|
61
61
|
"types": "index.d.ts",
|
|
62
|
-
"version": "9.
|
|
62
|
+
"version": "9.12.0"
|
|
63
63
|
}
|