lightning 10.16.0 → 10.16.1
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 +4 -1
- package/lnd_methods/offchain/get_fee_rates.d.ts +12 -0
- package/lnd_methods/offchain/get_fee_rates.js +2 -0
- package/lnd_responses/channel_edge_as_channel.js +2 -0
- package/lnd_responses/rpc_fees_as_channel_fees.js +6 -0
- package/package.json +6 -6
- package/test/lnd_methods/offchain/test_get_fee_rates.js +2 -0
- package/test/lnd_responses/test_rpc_fees_as_channel_fees.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Versions
|
|
2
2
|
|
|
3
|
-
## 10.16.
|
|
3
|
+
## 10.16.1
|
|
4
|
+
|
|
5
|
+
- `getFeeRates`: Add support for `inbound_base_discount_mtokens`,
|
|
6
|
+
'inbound_rate_discount` for inbound fee policy discounts
|
|
4
7
|
|
|
5
8
|
- `getClosedChannels`: Add support for anchor resolution status via new
|
|
6
9
|
attributes `anchor_is_confirmed`, `anchor_is_pending`, `anchor_spent_by`,
|
|
@@ -11,6 +11,18 @@ export type GetFeeRatesResult = {
|
|
|
11
11
|
fee_rate: number;
|
|
12
12
|
/** Standard Format Channel Id */
|
|
13
13
|
id: string;
|
|
14
|
+
/**
|
|
15
|
+
* Source Based Base Fee Reduction String
|
|
16
|
+
*
|
|
17
|
+
* Not supported on LND 0.17.5 and below
|
|
18
|
+
*/
|
|
19
|
+
inbound_base_discount_mtokens: string;
|
|
20
|
+
/**
|
|
21
|
+
* Source Based Per Million Rate Reduction Number
|
|
22
|
+
*
|
|
23
|
+
* Not supported on LND 0.17.5 and below
|
|
24
|
+
*/
|
|
25
|
+
inbound_rate_discount: number;
|
|
14
26
|
/** Channel Funding Transaction Id Hex */
|
|
15
27
|
transaction_id: string;
|
|
16
28
|
/** Funding Outpoint Output Index */
|
|
@@ -23,6 +23,8 @@ const type = 'default';
|
|
|
23
23
|
base_fee_mtokens: <Base Flat Fee Millitokens String>
|
|
24
24
|
fee_rate: <Fee Rate in Millitokens Per Million Number>
|
|
25
25
|
id: <Standard Format Channel Id String>
|
|
26
|
+
inbound_base_discount_mtokens: <Source Based Base Fee Reduction String>
|
|
27
|
+
inbound_rate_discount: <Source Based Per Million Rate Reduction Number>
|
|
26
28
|
transaction_id: <Channel Funding Transaction Id Hex String>
|
|
27
29
|
transaction_vout: <Funding Outpoint Output Index Number>
|
|
28
30
|
}]
|
|
@@ -43,6 +43,8 @@ const separatorChar = ':';
|
|
|
43
43
|
[base_fee_mtokens]: <Base Fee Millitokens String>
|
|
44
44
|
[cltv_delta]: <Locktime Delta Number>
|
|
45
45
|
[fee_rate]: <Fees Charged in Millitokens Per Million Number>
|
|
46
|
+
[inbound_base_discount_mtokens]: <Source Based Base Fee Reduction String>
|
|
47
|
+
[inbound_rate_discount]: <Source Based Per Million Rate Reduction Number>
|
|
46
48
|
[is_disabled]: <Channel Is Disabled Bool>
|
|
47
49
|
[max_htlc_mtokens]: <Maximum HTLC Millitokens Value String>
|
|
48
50
|
[min_htlc_mtokens]: <Minimum HTLC Millitokens Value String>
|
|
@@ -2,6 +2,8 @@ const {chanFormat} = require('bolt07');
|
|
|
2
2
|
|
|
3
3
|
const {safeTokens} = require('./../bolt00');
|
|
4
4
|
|
|
5
|
+
const discount = fee => (!fee ? 0 : -fee).toString();
|
|
6
|
+
const inverse = rate => !rate ? 0 : -rate;
|
|
5
7
|
const isHash = n => /^[0-9A-F]{64}$/i.test(n);
|
|
6
8
|
const notFound = -1;
|
|
7
9
|
const outpointDivider = ':';
|
|
@@ -21,6 +23,8 @@ const outpointDivider = ':';
|
|
|
21
23
|
base_fee_mtokens: <Base Flat Fee Millitokens String>
|
|
22
24
|
fee_rate: <Fee Rate in Millitokens Per Million Number>
|
|
23
25
|
id: <Standard Format Channel Id String>
|
|
26
|
+
inbound_base_discount_mtokens: <Source Based Base Fee Reduction String>
|
|
27
|
+
inbound_rate_discount: <Source Based Per Million Rate Reduction Number>
|
|
24
28
|
transaction_id: <Channel Funding Transaction Id Hex String>
|
|
25
29
|
transaction_vout: <Funding Outpoint Output Index Number>
|
|
26
30
|
}
|
|
@@ -61,6 +65,8 @@ module.exports = channel => {
|
|
|
61
65
|
base_fee_mtokens: channel.base_fee_msat,
|
|
62
66
|
fee_rate: Number(channel.fee_per_mil),
|
|
63
67
|
id: chanFormat({number: channel.chan_id}).channel,
|
|
68
|
+
inbound_base_discount_mtokens: discount(channel.inbound_base_fee_msat),
|
|
69
|
+
inbound_rate_discount: inverse(channel.inbound_fee_per_mil),
|
|
64
70
|
transaction_id: txId,
|
|
65
71
|
transaction_vout: Number(index),
|
|
66
72
|
};
|
package/package.json
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
"url": "https://github.com/alexbosworth/lightning/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@grpc/grpc-js": "1.11.
|
|
10
|
+
"@grpc/grpc-js": "1.11.1",
|
|
11
11
|
"@grpc/proto-loader": "0.7.13",
|
|
12
|
-
"@types/node": "
|
|
12
|
+
"@types/node": "22.1.0",
|
|
13
13
|
"@types/request": "2.48.12",
|
|
14
|
-
"@types/ws": "8.5.
|
|
14
|
+
"@types/ws": "8.5.12",
|
|
15
15
|
"async": "3.2.5",
|
|
16
16
|
"asyncjs-util": "1.2.12",
|
|
17
17
|
"bitcoinjs-lib": "6.1.6",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"invoices": "3.0.0",
|
|
23
23
|
"psbt": "3.0.0",
|
|
24
24
|
"tiny-secp256k1": "2.2.3",
|
|
25
|
-
"type-fest": "4.
|
|
25
|
+
"type-fest": "4.23.0"
|
|
26
26
|
},
|
|
27
27
|
"description": "Lightning Network client library",
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"tsd": "0.31.1",
|
|
30
|
-
"typescript": "5.5.
|
|
30
|
+
"typescript": "5.5.4"
|
|
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.16.
|
|
56
|
+
"version": "10.16.1"
|
|
57
57
|
}
|