lightning 10.23.1 → 10.24.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
@@ -1,5 +1,9 @@
1
1
  # Versions
2
2
 
3
+ ## 10.24.0
4
+
5
+ - `closeChannel`: Add `is_graceful_close` to wait for pending resolutions
6
+
3
7
  ## 10.23.1
4
8
 
5
9
  - `getRoutingFeeEstimate`: Add method to estimate an offchain payment fee
@@ -274,12 +274,14 @@ service Lightning {
274
274
  }
275
275
 
276
276
  /*
277
- SendPaymentSync is the synchronous non-streaming version of SendPayment.
278
- This RPC is intended to be consumed by clients of the REST proxy.
279
- Additionally, this RPC expects the destination's public key and the payment
280
- hash (if any) to be encoded as hex strings.
277
+ Deprecated, use routerrpc.SendPaymentV2. SendPaymentSync is the synchronous
278
+ non-streaming version of SendPayment. This RPC is intended to be consumed by
279
+ clients of the REST proxy. Additionally, this RPC expects the destination's
280
+ public key and the payment hash (if any) to be encoded as hex strings.
281
281
  */
282
- rpc SendPaymentSync (SendRequest) returns (SendResponse);
282
+ rpc SendPaymentSync (SendRequest) returns (SendResponse) {
283
+ option deprecated = true;
284
+ }
283
285
 
284
286
  /* lncli: `sendtoroute`
285
287
  Deprecated, use routerrpc.SendToRouteV2. SendToRoute is a bi-directional
@@ -293,10 +295,13 @@ service Lightning {
293
295
  }
294
296
 
295
297
  /*
296
- SendToRouteSync is a synchronous version of SendToRoute. It Will block
297
- until the payment either fails or succeeds.
298
+ Deprecated, use routerrpc.SendToRouteV2. SendToRouteSync is a synchronous
299
+ version of SendToRoute. It Will block until the payment either fails or
300
+ succeeds.
298
301
  */
299
- rpc SendToRouteSync (SendToRouteRequest) returns (SendResponse);
302
+ rpc SendToRouteSync (SendToRouteRequest) returns (SendResponse) {
303
+ option deprecated = true;
304
+ }
300
305
 
301
306
  /* lncli: `addinvoice`
302
307
  AddInvoice attempts to add a new invoice to the invoice database. Any
@@ -2141,9 +2146,13 @@ message CloseChannelRequest {
2141
2146
  // NOTE: This field is only respected if we're the initiator of the channel.
2142
2147
  uint64 max_fee_per_vbyte = 7;
2143
2148
 
2144
- // If true, then the rpc call will not block while it awaits a closing txid.
2145
- // Consequently this RPC call will not return a closing txid if this value
2146
- // is set.
2149
+ // If true, then the rpc call will not block while it awaits a closing txid
2150
+ // to be broadcasted to the mempool. To obtain the closing tx one has to
2151
+ // listen to the stream for the particular updates. Moreover if a coop close
2152
+ // is specified and this flag is set to true the coop closing flow will be
2153
+ // initiated even if HTLCs are active on the channel. The channel will wait
2154
+ // until all HTLCs are resolved and then start the coop closing process. The
2155
+ // channel will be disabled in the meantime and will disallow any new HTLCs.
2147
2156
  bool no_wait = 8;
2148
2157
  }
2149
2158
 
@@ -2161,6 +2170,10 @@ message PendingUpdate {
2161
2170
  }
2162
2171
 
2163
2172
  message InstantUpdate {
2173
+ // The number of pending HTLCs that are currently active on the channel.
2174
+ // These HTLCs need to be resolved before the channel can be closed
2175
+ // cooperatively.
2176
+ int32 num_pending_htlcs = 1;
2164
2177
  }
2165
2178
 
2166
2179
  message ReadyForPsbtFunding {
@@ -1188,9 +1188,8 @@ message BumpFeeRequest {
1188
1188
  // The input we're attempting to bump the fee of.
1189
1189
  lnrpc.OutPoint outpoint = 1;
1190
1190
 
1191
- // Optional. The deadline in number of blocks that the input should be spent
1192
- // within. When not set, for new inputs, the default value (1008) is used;
1193
- // for existing inputs, their current values will be retained.
1191
+ // Optional. The conf target the underlying fee estimator will use to
1192
+ // estimate the starting fee rate for the fee function.
1194
1193
  uint32 target_conf = 2;
1195
1194
 
1196
1195
  /*
@@ -1217,7 +1216,7 @@ message BumpFeeRequest {
1217
1216
 
1218
1217
  /*
1219
1218
  Optional. Whether this input will be swept immediately. When set to true,
1220
- the sweeper will sweep this input without waiting for the next batch.
1219
+ the sweeper will sweep this input without waiting for the next block.
1221
1220
  */
1222
1221
  bool immediate = 6;
1223
1222
 
@@ -1230,6 +1229,12 @@ message BumpFeeRequest {
1230
1229
  retained.
1231
1230
  */
1232
1231
  uint64 budget = 7;
1232
+
1233
+ // Optional. The deadline delta in number of blocks that the output
1234
+ // should be spent within. This translates internally to the width of the
1235
+ // fee function that the sweeper will use to bump the fee rate. When the
1236
+ // deadline is reached, ALL the budget will be spent as fees.
1237
+ uint32 deadline_delta = 8;
1233
1238
  }
1234
1239
 
1235
1240
  message BumpFeeResponse {
@@ -1243,7 +1248,8 @@ message BumpForceCloseFeeRequest {
1243
1248
  lnrpc.ChannelPoint chan_point = 1;
1244
1249
 
1245
1250
  // Optional. The deadline delta in number of blocks that the anchor output
1246
- // should be spent within to bump the closing transaction.
1251
+ // should be spent within to bump the closing transaction. When the
1252
+ // deadline is reached, ALL the budget will be spent as fees
1247
1253
  uint32 deadline_delta = 2;
1248
1254
 
1249
1255
  /*
@@ -1270,6 +1276,10 @@ message BumpForceCloseFeeRequest {
1270
1276
  transaction of the force closed channel otherwise the fee bumping will fail.
1271
1277
  */
1272
1278
  uint64 budget = 5;
1279
+
1280
+ // Optional. The conf target the underlying fee estimator will use to
1281
+ // estimate the starting fee rate for the fee function.
1282
+ uint32 target_conf = 6;
1273
1283
  }
1274
1284
 
1275
1285
  message BumpForceCloseFeeResponse {
@@ -23,10 +23,13 @@ const type = 'default';
23
23
 
24
24
  `max_tokens_per_vbyte` is not supported in LND 0.15.0 and below
25
25
 
26
+ `is_graceful_close` is not supported in LND 0.17.5 and below
27
+
26
28
  {
27
29
  [address]: <Request Sending Local Channel Funds To Address String>
28
30
  [id]: <Standard Format Channel Id String>
29
31
  [is_force_close]: <Is Force Close Bool>
32
+ [is_graceful_close]: <Is Waiting For Pending Payments to Coop Close Bool>
30
33
  lnd: <Authenticated LND API Object>
31
34
  [max_tokens_per_vbyte]: <Fail Cooperative Close Above Fee Rate Number>
32
35
  [public_key]: <Peer Public Key String>
@@ -143,6 +146,7 @@ module.exports = (args, cbk) => {
143
146
  delivery_address: args.address || undefined,
144
147
  force: !!args.is_force_close,
145
148
  max_fee_per_vbyte: args.max_tokens_per_vbyte || undefined,
149
+ no_wait: args.is_graceful_close || undefined,
146
150
  sat_per_vbyte: !!tokensPerVByte ? tokensPerVByte : undefined,
147
151
  target_conf: targetConf,
148
152
  });
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.12.6",
10
+ "@grpc/grpc-js": "1.13.0",
11
11
  "@grpc/proto-loader": "0.7.13",
12
- "@types/node": "22.13.4",
12
+ "@types/node": "22.13.10",
13
13
  "@types/request": "2.48.12",
14
- "@types/ws": "8.5.14",
14
+ "@types/ws": "8.18.0",
15
15
  "async": "3.2.6",
16
16
  "asyncjs-util": "1.2.12",
17
17
  "bitcoinjs-lib": "6.1.7",
18
18
  "bn.js": "5.2.1",
19
19
  "bolt07": "1.9.4",
20
20
  "bolt09": "2.1.0",
21
- "ecpair": "2.1.0",
21
+ "ecpair": "3.0.0",
22
22
  "invoices": "3.0.0",
23
23
  "psbt": "3.0.0",
24
24
  "tiny-secp256k1": "2.2.3",
25
- "type-fest": "4.34.1"
25
+ "type-fest": "4.37.0"
26
26
  },
27
27
  "description": "Lightning Network client library",
28
28
  "devDependencies": {
29
29
  "tsd": "0.31.2",
30
- "typescript": "5.7.3"
30
+ "typescript": "5.8.2"
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.23.1"
56
+ "version": "10.24.0"
57
57
  }
@@ -197,6 +197,11 @@ const tests = [
197
197
  description: 'A channel is closed with a tx fee',
198
198
  expected: {transaction_id: '04030201', transaction_vout: 0},
199
199
  },
200
+ {
201
+ args: makeArgs({is_graceful_close: true}),
202
+ description: 'A channel is closed with a graceful exit',
203
+ expected: {transaction_id: '04030201', transaction_vout: 0},
204
+ },
200
205
  ];
201
206
 
202
207
  tests.forEach(({args, description, error, expected}) => {