lightning 10.25.0 → 10.25.2
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 +5 -1
- package/lnd_methods/generic/get_height.js +1 -1
- package/lnd_methods/info/constants.json +1 -0
- package/lnd_methods/onchain/close_channel.d.ts +4 -0
- package/lnd_methods/onchain/request_chain_fee_increase.js +5 -0
- package/lnd_methods/onchain/subscribe_to_blocks.js +1 -1
- package/package.json +10 -10
- package/test/lnd_methods/onchain/test_request_chain_fee_increase.js +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"b4e7131bdb47531ad2f00ce345ddcdb58935bba5": "0.15.3-beta",
|
|
49
49
|
"bd0c46b4fcb027af1915bd67a3da70e8ca5c6efe": "0.14.3-beta",
|
|
50
50
|
"c0a09209782b1c62c3393fcea0844e095c25046b": "0.15.5-beta",
|
|
51
|
+
"c52a6ddeb8e596c6f4fcd61382d2a0a0f6ee9abc": "0.19.0-beta",
|
|
51
52
|
"ddeb8351684a611f6c27f16f09be75d5c039f08c": "0.18.4-beta",
|
|
52
53
|
"d176d2d65fc06e6631c4dc9478592be8545a21de": "0.12.0-beta",
|
|
53
54
|
"d22b3937eae91d33cd8c035e8fa894e3793e1636": "0.18.2-beta",
|
|
@@ -47,6 +47,8 @@ export type ForceCloseChannelArgs = AuthenticatedLightningArgs<
|
|
|
47
47
|
export type CoopCloseChannelArgs = AuthenticatedLightningArgs<
|
|
48
48
|
ExpectedIdOfChannelToClose & {
|
|
49
49
|
is_force_close?: false;
|
|
50
|
+
/** Is Waiting For Pending Payments to Coop Close Bool */
|
|
51
|
+
is_graceful_close?: boolean;
|
|
50
52
|
/** Request Sending Local Channel Funds To Address String */
|
|
51
53
|
address?: string;
|
|
52
54
|
/** Fail Cooperative Close Above Fee Rate */
|
|
@@ -79,6 +81,8 @@ export type CloseChannelResult = {
|
|
|
79
81
|
* Requires `info:read`, `offchain:write`, `onchain:write`, `peers:write` permissions
|
|
80
82
|
*
|
|
81
83
|
* `max_tokens_per_vbyte` is not supported in LND 0.15.0 and below
|
|
84
|
+
*
|
|
85
|
+
* `is_graceful_close` is not supported in LND 0.17.5 and below
|
|
82
86
|
*/
|
|
83
87
|
export const closeChannel: AuthenticatedLightningMethod<
|
|
84
88
|
CloseChannelArgs,
|
|
@@ -7,6 +7,7 @@ const defaultConfirmations = 6;
|
|
|
7
7
|
const isHash = n => /^[0-9A-F]{64}$/i.test(n);
|
|
8
8
|
const isNumber = n => !isNaN(n);
|
|
9
9
|
const messageExternalUtxo = 'the passed output does not belong to the wallet';
|
|
10
|
+
const messageInvalidOutputIndex = /^invalid.output.index/;
|
|
10
11
|
const method = 'bumpFee';
|
|
11
12
|
const type = 'wallet';
|
|
12
13
|
|
|
@@ -81,6 +82,10 @@ module.exports = (args, cbk) => {
|
|
|
81
82
|
return cbk([404, 'SpecifiedOutpointNotFoundInWalletUtxos']);
|
|
82
83
|
}
|
|
83
84
|
|
|
85
|
+
if (!!err && messageInvalidOutputIndex.test(err.details)) {
|
|
86
|
+
return cbk([404, 'SpecifiedOutpointNotFoundInWalletUtxos']);
|
|
87
|
+
}
|
|
88
|
+
|
|
84
89
|
if (!!err) {
|
|
85
90
|
return cbk([500, 'UnexpectedErrorRequestingChainFeeBump', {err}]);
|
|
86
91
|
}
|
package/package.json
CHANGED
|
@@ -7,27 +7,27 @@
|
|
|
7
7
|
"url": "https://github.com/alexbosworth/lightning/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@grpc/grpc-js": "1.13.
|
|
11
|
-
"@grpc/proto-loader": "0.7.
|
|
12
|
-
"@types/node": "22.
|
|
10
|
+
"@grpc/grpc-js": "1.13.4",
|
|
11
|
+
"@grpc/proto-loader": "0.7.15",
|
|
12
|
+
"@types/node": "22.15.21",
|
|
13
13
|
"@types/request": "2.48.12",
|
|
14
|
-
"@types/ws": "8.18.
|
|
14
|
+
"@types/ws": "8.18.1",
|
|
15
15
|
"async": "3.2.6",
|
|
16
16
|
"asyncjs-util": "1.2.12",
|
|
17
17
|
"bitcoinjs-lib": "6.1.7",
|
|
18
|
-
"bn.js": "5.2.
|
|
18
|
+
"bn.js": "5.2.2",
|
|
19
19
|
"bolt07": "1.9.4",
|
|
20
20
|
"bolt09": "2.1.0",
|
|
21
21
|
"ecpair": "3.0.0",
|
|
22
|
-
"invoices": "
|
|
22
|
+
"invoices": "4.0.0",
|
|
23
23
|
"psbt": "4.0.0",
|
|
24
24
|
"tiny-secp256k1": "2.2.3",
|
|
25
|
-
"type-fest": "4.
|
|
25
|
+
"type-fest": "4.41.0"
|
|
26
26
|
},
|
|
27
27
|
"description": "Lightning Network client library",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"tsd": "0.
|
|
30
|
-
"typescript": "5.8.
|
|
29
|
+
"tsd": "0.32.0",
|
|
30
|
+
"typescript": "5.8.3"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|
|
33
33
|
"node": ">=18"
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"directory": "test/typescript"
|
|
54
54
|
},
|
|
55
55
|
"types": "index.d.ts",
|
|
56
|
-
"version": "10.25.
|
|
56
|
+
"version": "10.25.2"
|
|
57
57
|
}
|
|
@@ -44,6 +44,19 @@ const tests = [
|
|
|
44
44
|
description: 'A tx output index is required',
|
|
45
45
|
error: [400, 'ExpectedTransactionOutputIndexToRequestFeeBump'],
|
|
46
46
|
},
|
|
47
|
+
{
|
|
48
|
+
args: makeArgs({
|
|
49
|
+
lnd: {
|
|
50
|
+
wallet: {
|
|
51
|
+
bumpFee: ({}, cbk) => cbk({
|
|
52
|
+
details: 'invalid output index 999 for transaction with 3 outputs',
|
|
53
|
+
}),
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
}),
|
|
57
|
+
description: 'Unknown UTXO error is passed back',
|
|
58
|
+
error: [404, 'SpecifiedOutpointNotFoundInWalletUtxos'],
|
|
59
|
+
},
|
|
47
60
|
{
|
|
48
61
|
args: makeArgs({
|
|
49
62
|
lnd: {
|