lightning 6.1.2 → 6.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
CHANGED
|
@@ -2190,6 +2190,33 @@ message OpenChannelRequest {
|
|
|
2190
2190
|
attempted.
|
|
2191
2191
|
*/
|
|
2192
2192
|
bool scid_alias = 20;
|
|
2193
|
+
|
|
2194
|
+
/*
|
|
2195
|
+
The base fee charged regardless of the number of milli-satoshis sent.
|
|
2196
|
+
*/
|
|
2197
|
+
uint64 base_fee = 21;
|
|
2198
|
+
|
|
2199
|
+
/*
|
|
2200
|
+
The fee rate in ppm (parts per million) that will be charged in
|
|
2201
|
+
proportion of the value of each forwarded HTLC.
|
|
2202
|
+
*/
|
|
2203
|
+
uint64 fee_rate = 22;
|
|
2204
|
+
|
|
2205
|
+
/*
|
|
2206
|
+
If use_base_fee is true the open channel announcement will update the
|
|
2207
|
+
channel base fee with the value specified in base_fee. In the case of
|
|
2208
|
+
a base_fee of 0 use_base_fee is needed downstream to distinguish whether
|
|
2209
|
+
to use the default base fee value specified in the config or 0.
|
|
2210
|
+
*/
|
|
2211
|
+
bool use_base_fee = 23;
|
|
2212
|
+
|
|
2213
|
+
/*
|
|
2214
|
+
If use_fee_rate is true the open channel announcement will update the
|
|
2215
|
+
channel fee rate with the value specified in fee_rate. In the case of
|
|
2216
|
+
a fee_rate of 0 use_fee_rate is needed downstream to distinguish whether
|
|
2217
|
+
to use the default fee rate value specified in the config or 0.
|
|
2218
|
+
*/
|
|
2219
|
+
bool use_fee_rate = 24;
|
|
2193
2220
|
}
|
|
2194
2221
|
message OpenStatusUpdate {
|
|
2195
2222
|
oneof update {
|
|
@@ -20,9 +20,14 @@ const type = 'default';
|
|
|
20
20
|
|
|
21
21
|
External funding requires LND compiled with `walletrpc` build tag
|
|
22
22
|
|
|
23
|
+
`base_fee_mtokens` is not supported on LND 0.15.2 and below
|
|
24
|
+
`fee_rate` is not supported on LND 0.15.2 and below
|
|
25
|
+
|
|
23
26
|
{
|
|
27
|
+
[base_fee_mtokens]: <Routing Base Fee Millitokens Charged String>
|
|
24
28
|
[chain_fee_tokens_per_vbyte]: <Chain Fee Tokens Per VByte Number>
|
|
25
29
|
[cooperative_close_address]: <Restrict Cooperative Close To Address String>
|
|
30
|
+
[fee_rate]: <Routing Fee Rate In Millitokens Per Million Number>
|
|
26
31
|
[give_tokens]: <Tokens to Gift To Partner Number> // Defaults to zero
|
|
27
32
|
[is_private]: <Channel is Private Bool> // Defaults to false
|
|
28
33
|
lnd: <Authenticated LND API Object>
|
|
@@ -92,6 +97,8 @@ module.exports = (args, cbk) => {
|
|
|
92
97
|
let isAnnounced = false;
|
|
93
98
|
|
|
94
99
|
const options = {
|
|
100
|
+
base_fee: args.base_fee_mtokens || undefined,
|
|
101
|
+
fee_rate: args.fee_rate,
|
|
95
102
|
local_funding_amount: args.local_tokens,
|
|
96
103
|
min_confs: minConfs,
|
|
97
104
|
min_htlc_msat: args.min_htlc_mtokens || defaultMinHtlcMtokens,
|
|
@@ -99,7 +106,9 @@ module.exports = (args, cbk) => {
|
|
|
99
106
|
private: !!args.is_private,
|
|
100
107
|
remote_csv_delay: args.partner_csv_delay || undefined,
|
|
101
108
|
spend_unconfirmed: !minConfs,
|
|
102
|
-
|
|
109
|
+
use_base_fee: args.base_fee_mtokens !== undefined,
|
|
110
|
+
use_fee_rate: args.fee_rate !== undefined,
|
|
111
|
+
};
|
|
103
112
|
|
|
104
113
|
if (!!args.chain_fee_tokens_per_vbyte) {
|
|
105
114
|
options.sat_per_byte = args.chain_fee_tokens_per_vbyte;
|
|
@@ -8,6 +8,7 @@ const {returnResult} = require('asyncjs-util');
|
|
|
8
8
|
const cancelPendingChannel = require('./cancel_pending_channel');
|
|
9
9
|
const {isLnd} = require('./../../lnd_requests');
|
|
10
10
|
|
|
11
|
+
const anchors = 'ANCHORS';
|
|
11
12
|
const bufferFromHex = hex => Buffer.from(hex, 'hex');
|
|
12
13
|
const defaultMinHtlcMtokens = '1';
|
|
13
14
|
const fundEvent = 'psbt_fund';
|
|
@@ -36,10 +37,15 @@ const type = 'default';
|
|
|
36
37
|
`--protocol.option-scid-alias` and `--protocol.zero-conf` set on both sides
|
|
37
38
|
as well as a channel open request listener to accept the trusted funding.
|
|
38
39
|
|
|
40
|
+
`base_fee_mtokens` is not supported on LND 0.15.2 and below
|
|
41
|
+
`fee_rate` is not supported on LND 0.15.2 and below
|
|
42
|
+
|
|
39
43
|
{
|
|
40
44
|
channels: [{
|
|
45
|
+
[base_fee_mtokens]: <Routing Base Fee Millitokens Charged String>
|
|
41
46
|
capacity: <Channel Capacity Tokens Number>
|
|
42
47
|
[cooperative_close_address]: <Restrict Coop Close To Address String>
|
|
48
|
+
[fee_rate]: <Routing Fee Rate In Millitokens Per Million Number>
|
|
43
49
|
[give_tokens]: <Tokens to Gift To Partner Number> // Defaults to zero
|
|
44
50
|
[is_private]: <Channel is Private Bool> // Defaults to false
|
|
45
51
|
[is_trusted_funding]: <Peer Should Avoid Waiting For Confirmation Bool>
|
|
@@ -91,7 +97,9 @@ module.exports = (args, cbk) => {
|
|
|
91
97
|
// Channels to open
|
|
92
98
|
toOpen: ['validate', ({}, cbk) => {
|
|
93
99
|
return cbk(null, args.channels.map(channel => ({
|
|
100
|
+
base_fee_mtokens: channel.base_fee_mtokens,
|
|
94
101
|
capacity: channel.capacity,
|
|
102
|
+
fee_rate: channel.fee_rate,
|
|
95
103
|
id: makeId(),
|
|
96
104
|
cooperative_close_address: channel.cooperative_close_address,
|
|
97
105
|
give_tokens: channel.give_tokens,
|
|
@@ -112,8 +120,10 @@ module.exports = (args, cbk) => {
|
|
|
112
120
|
const isSelfPublish = !!args.is_avoiding_broadcast;
|
|
113
121
|
|
|
114
122
|
const channelOpen = args.lnd[type][method]({
|
|
123
|
+
base_fee: channel.base_fee_mtokens || undefined,
|
|
115
124
|
close_address: channel.cooperative_close_address || undefined,
|
|
116
|
-
commitment_type: channel.is_trusted_funding ?
|
|
125
|
+
commitment_type: channel.is_trusted_funding ? anchors : undefined,
|
|
126
|
+
fee_rate: channel.fee_rate,
|
|
117
127
|
funding_shim: {
|
|
118
128
|
psbt_shim: {
|
|
119
129
|
no_publish: !!isSelfPublish || !channel.id.equals(lastChannel),
|
|
@@ -127,6 +137,8 @@ module.exports = (args, cbk) => {
|
|
|
127
137
|
push_sat: channel.give_tokens || undefined,
|
|
128
138
|
remote_csv_delay: channel.partner_csv_delay || undefined,
|
|
129
139
|
scid_alias: channel.is_trusted_funding && channel.is_private,
|
|
140
|
+
use_base_fee: channel.base_fee_mtokens !== undefined,
|
|
141
|
+
use_fee_rate: channel.fee_rate !== undefined,
|
|
130
142
|
zero_conf: channel.is_trusted_funding || undefined,
|
|
131
143
|
});
|
|
132
144
|
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@grpc/grpc-js": "1.7.1",
|
|
11
11
|
"@grpc/proto-loader": "0.7.3",
|
|
12
12
|
"@types/express": "4.17.14",
|
|
13
|
-
"@types/node": "18.
|
|
13
|
+
"@types/node": "18.8.1",
|
|
14
14
|
"@types/request": "2.48.8",
|
|
15
15
|
"@types/ws": "8.5.3",
|
|
16
16
|
"async": "3.2.4",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"directory": "test/typescript"
|
|
60
60
|
},
|
|
61
61
|
"types": "index.d.ts",
|
|
62
|
-
"version": "6.
|
|
62
|
+
"version": "6.2.0"
|
|
63
63
|
}
|