lightning 10.14.2 → 10.14.4

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,6 +1,6 @@
1
1
  # Versions
2
2
 
3
- ## 10.14.2
3
+ ## 10.14.4
4
4
 
5
5
  - `getChannel`: Add support for specifying `transaction_id` and
6
6
  `transaction_vout` instead of `id`
@@ -55,10 +55,19 @@ service Invoices {
55
55
  rpc SettleInvoice (SettleInvoiceMsg) returns (SettleInvoiceResp);
56
56
 
57
57
  /*
58
- LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced
58
+ LookupInvoiceV2 attempts to look up at invoice. An invoice can be referenced
59
59
  using either its payment hash, payment address, or set ID.
60
60
  */
61
61
  rpc LookupInvoiceV2 (LookupInvoiceMsg) returns (lnrpc.Invoice);
62
+
63
+ /*
64
+ HtlcModifier is a bidirectional streaming RPC that allows a client to
65
+ intercept and modify the HTLCs that attempt to settle the given invoice. The
66
+ server will send HTLCs of invoices to the client and the client can modify
67
+ some aspects of the HTLC in order to pass the invoice acceptance tests.
68
+ */
69
+ rpc HtlcModifier (stream HtlcModifyResponse)
70
+ returns (stream HtlcModifyRequest);
62
71
  }
63
72
 
64
73
  message CancelInvoiceMsg {
@@ -191,4 +200,46 @@ message LookupInvoiceMsg {
191
200
  }
192
201
 
193
202
  LookupModifier lookup_modifier = 4;
203
+ }
204
+
205
+ // CircuitKey is a unique identifier for an HTLC.
206
+ message CircuitKey {
207
+ /// The id of the channel that the is part of this circuit.
208
+ uint64 chan_id = 1;
209
+
210
+ /// The index of the incoming htlc in the incoming channel.
211
+ uint64 htlc_id = 2;
212
+ }
213
+
214
+ message HtlcModifyRequest {
215
+ // The invoice the intercepted HTLC is attempting to settle. The HTLCs in
216
+ // the invoice are only HTLCs that have already been accepted or settled,
217
+ // not including the current intercepted HTLC.
218
+ lnrpc.Invoice invoice = 1;
219
+
220
+ // The unique identifier of the HTLC of this intercepted HTLC.
221
+ CircuitKey exit_htlc_circuit_key = 2;
222
+
223
+ // The amount in milli-satoshi that the exit HTLC is attempting to pay.
224
+ uint64 exit_htlc_amt = 3;
225
+
226
+ // The absolute expiry height of the exit HTLC.
227
+ uint32 exit_htlc_expiry = 4;
228
+
229
+ // The current block height.
230
+ uint32 current_height = 5;
231
+
232
+ // The wire message custom records of the exit HTLC.
233
+ map<uint64, bytes> exit_htlc_wire_custom_records = 6;
234
+ }
235
+
236
+ message HtlcModifyResponse {
237
+ // The circuit key of the HTLC that the client wants to modify.
238
+ CircuitKey circuit_key = 1;
239
+
240
+ // The modified amount in milli-satoshi that the exit HTLC is paying. This
241
+ // value can be different from the actual on-chain HTLC amount, in case the
242
+ // HTLC carries other valuable items, as can be the case with custom channel
243
+ // types. In order to not modify this value, the client should set it zero.
244
+ uint64 amt_paid = 2;
194
245
  }
@@ -330,6 +330,15 @@ message SendPaymentRequest {
330
330
  only, to 1 to optimize for reliability only or a value inbetween for a mix.
331
331
  */
332
332
  double time_pref = 23;
333
+
334
+ /*
335
+ If set, the payment loop can be interrupted by manually canceling the
336
+ payment context, even before the payment timeout is reached. Note that the
337
+ payment may still succeed after cancellation, as in-flight attempts can
338
+ still settle afterwards. Canceling will only prevent further attempts from
339
+ being sent.
340
+ */
341
+ bool cancelable = 24;
333
342
  }
334
343
 
335
344
  message TrackPaymentRequest {
@@ -25,6 +25,7 @@
25
25
  "1e511be523eb8e97c4e2d9c89a7a263963a3929f": "0.14.2-beta",
26
26
  "2fb150c8fe827df9df0520ef9916b3afb7b03a8d": "0.17.0-beta",
27
27
  "3ae46d81f4a2edad06ef778b2940d9b06386d93b": "0.11.0-beta",
28
+ "42b856dbb98dee83d284646bfc3eab96199cec62": "0.18.1-beta",
28
29
  "47483f1c66ae6fbb2e03ff29f9bc9b80c611c027": "0.16.3-beta",
29
30
  "4f567577db9d85b6f392f960b3aabddcad3cd02c": "0.13.3-beta",
30
31
  "51df3e5b1ea2f1f749652cecf26e7471d35aa629": "0.16.0-beta",
@@ -409,6 +409,7 @@ module.exports = args => {
409
409
  allow_self_payment: true,
410
410
  amt: amounts.tokens,
411
411
  amt_msat: amounts.mtokens,
412
+ cancelable: true,
412
413
  cltv_limit: !!args.max_timeout_height ? maxCltvDelta : undefined,
413
414
  dest: !args.destination ? undefined : hexToBuf(args.destination),
414
415
  dest_custom_records: !messages.length ? undefined : destTlv,
package/package.json CHANGED
@@ -7,9 +7,9 @@
7
7
  "url": "https://github.com/alexbosworth/lightning/issues"
8
8
  },
9
9
  "dependencies": {
10
- "@grpc/grpc-js": "1.10.9",
10
+ "@grpc/grpc-js": "1.10.10",
11
11
  "@grpc/proto-loader": "0.7.13",
12
- "@types/node": "20.14.2",
12
+ "@types/node": "20.14.9",
13
13
  "@types/request": "2.48.12",
14
14
  "@types/ws": "8.5.10",
15
15
  "async": "3.2.5",
@@ -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.20.1"
25
+ "type-fest": "4.21.0"
26
26
  },
27
27
  "description": "Lightning Network client library",
28
28
  "devDependencies": {
29
- "tsd": "0.31.0",
30
- "typescript": "5.4.5"
29
+ "tsd": "0.31.1",
30
+ "typescript": "5.5.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.14.2"
56
+ "version": "10.14.4"
57
57
  }