lightning 11.1.0 → 12.0.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.
Files changed (99) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/grpc/protos/lightning.proto +137 -2
  3. package/grpc/protos/router.proto +69 -3
  4. package/grpc/protos/signer.proto +60 -0
  5. package/grpc/protos/walletkit.proto +67 -1
  6. package/lnd_messages/pay_via_route_request.js +0 -2
  7. package/lnd_methods/info/get_configuration.js +1 -1
  8. package/lnd_methods/info/get_route_to_destination.d.ts +0 -4
  9. package/lnd_methods/info/get_route_to_destination.js +4 -6
  10. package/lnd_methods/macaroon/subscribe_to_rpc_requests.d.ts +0 -2
  11. package/lnd_methods/macaroon/subscribe_to_rpc_requests.js +0 -1
  12. package/lnd_methods/offchain/attempt_route.d.ts +0 -2
  13. package/lnd_methods/offchain/attempt_route.js +0 -1
  14. package/lnd_methods/offchain/finished_payment.d.ts +0 -10
  15. package/lnd_methods/offchain/finished_payment.js +0 -5
  16. package/lnd_methods/offchain/get_failed_payments.d.ts +0 -2
  17. package/lnd_methods/offchain/get_failed_payments.js +0 -1
  18. package/lnd_methods/offchain/get_payment.d.ts +0 -6
  19. package/lnd_methods/offchain/get_payment.js +0 -3
  20. package/lnd_methods/offchain/get_payments.d.ts +0 -2
  21. package/lnd_methods/offchain/get_payments.js +0 -1
  22. package/lnd_methods/offchain/get_pending_payments.d.ts +0 -2
  23. package/lnd_methods/offchain/get_pending_payments.js +0 -1
  24. package/lnd_methods/offchain/get_route_through_hops.d.ts +0 -2
  25. package/lnd_methods/offchain/get_route_through_hops.js +0 -1
  26. package/lnd_methods/offchain/list_payments.js +0 -1
  27. package/lnd_methods/offchain/pay.d.ts +0 -4
  28. package/lnd_methods/offchain/pay.js +0 -3
  29. package/lnd_methods/offchain/pay_via_payment_details.d.ts +0 -4
  30. package/lnd_methods/offchain/pay_via_payment_details.js +0 -2
  31. package/lnd_methods/offchain/pay_via_payment_request.d.ts +0 -4
  32. package/lnd_methods/offchain/pay_via_payment_request.js +0 -2
  33. package/lnd_methods/offchain/pay_via_routes.d.ts +0 -4
  34. package/lnd_methods/offchain/pay_via_routes.js +0 -3
  35. package/lnd_methods/offchain/probe_for_route.d.ts +0 -2
  36. package/lnd_methods/offchain/probe_for_route.js +0 -2
  37. package/lnd_methods/offchain/subscribe_to_channels.js +1 -1
  38. package/lnd_methods/offchain/subscribe_to_past_payment.d.ts +0 -4
  39. package/lnd_methods/offchain/subscribe_to_past_payment.js +0 -2
  40. package/lnd_methods/offchain/subscribe_to_past_payments.d.ts +0 -2
  41. package/lnd_methods/offchain/subscribe_to_past_payments.js +0 -1
  42. package/lnd_methods/offchain/subscribe_to_pay.d.ts +0 -10
  43. package/lnd_methods/offchain/subscribe_to_pay.js +0 -5
  44. package/lnd_methods/offchain/subscribe_to_pay_via_details.js +0 -5
  45. package/lnd_methods/offchain/subscribe_to_pay_via_request.js +0 -5
  46. package/lnd_methods/offchain/subscribe_to_pay_via_routes.d.ts +0 -10
  47. package/lnd_methods/offchain/subscribe_to_pay_via_routes.js +0 -5
  48. package/lnd_methods/offchain/subscribe_to_payments.d.ts +0 -4
  49. package/lnd_methods/offchain/subscribe_to_payments.js +0 -2
  50. package/lnd_methods/offchain/subscribe_to_probe_for_route.d.ts +0 -8
  51. package/lnd_methods/offchain/subscribe_to_probe_for_route.js +0 -4
  52. package/lnd_requests/rpc_hop_from_hop.js +0 -7
  53. package/lnd_requests/rpc_route_from_route.js +0 -2
  54. package/lnd_responses/confirmed_from_payment.d.ts +0 -6
  55. package/lnd_responses/confirmed_from_payment.js +0 -3
  56. package/lnd_responses/confirmed_from_payment_status.js +0 -5
  57. package/lnd_responses/pending_from_payment.js +0 -2
  58. package/lnd_responses/routes_from_query_routes.js +0 -3
  59. package/lnd_responses/routing_failure_from_htlc.js +0 -2
  60. package/lnd_responses/rpc_attempt_htlc_as_attempt.js +0 -2
  61. package/lnd_responses/rpc_hop_as_hop.js +0 -7
  62. package/lnd_responses/rpc_payment_as_payment.js +0 -2
  63. package/lnd_responses/rpc_route_as_route.js +0 -2
  64. package/package.json +4 -4
  65. package/test/lnd_messages/test_pay_via_route_request.js +0 -2
  66. package/test/lnd_methods/fixtures/query_routes_response.json +0 -1
  67. package/test/lnd_methods/info/test_get_route_to_destination.js +0 -3
  68. package/test/lnd_methods/macaroon/test_handle_rpc_request_update.js +0 -2
  69. package/test/lnd_methods/offchain/test_finished_payment.js +0 -4
  70. package/test/lnd_methods/offchain/test_get_payment.js +0 -5
  71. package/test/lnd_methods/offchain/test_get_payments.js +0 -2
  72. package/test/lnd_methods/offchain/test_get_route_through_hops.js +0 -4
  73. package/test/lnd_methods/offchain/test_is_destination_payable.js +0 -3
  74. package/test/lnd_methods/offchain/test_pay.js +0 -3
  75. package/test/lnd_methods/offchain/test_pay_via_payment_details.js +0 -4
  76. package/test/lnd_methods/offchain/test_pay_via_payment_request.js +0 -4
  77. package/test/lnd_methods/offchain/test_pay_via_routes.js +0 -9
  78. package/test/lnd_methods/offchain/test_subscribe_to_channels.js +0 -20
  79. package/test/lnd_methods/offchain/test_subscribe_to_past_payments.js +0 -3
  80. package/test/lnd_methods/offchain/test_subscribe_to_pay_via_routes.js +0 -7
  81. package/test/lnd_methods/offchain/test_subscribe_to_payments.js +0 -3
  82. package/test/lnd_methods/offchain/test_subscribe_to_probe_for_route.js +0 -1
  83. package/test/lnd_requests/test_rpc_hop_from_hop.js +1 -10
  84. package/test/lnd_requests/test_rpc_route_from_route.js +0 -4
  85. package/test/lnd_responses/test_confirmed_from_payment.js +0 -3
  86. package/test/lnd_responses/test_confirmed_from_payment_status.js +0 -4
  87. package/test/lnd_responses/test_pending_from_payment.js +0 -2
  88. package/test/lnd_responses/test_routes_from_query_routes.js +0 -2
  89. package/test/lnd_responses/test_routing_failure_from_htlc.js +0 -2
  90. package/test/lnd_responses/test_rpc_attempt_htlc_as_attempt.js +0 -2
  91. package/test/lnd_responses/test_rpc_hop_as_hop.js +0 -7
  92. package/test/lnd_responses/test_rpc_payment_as_payment.js +0 -6
  93. package/test/lnd_responses/test_rpc_route_as_route.js +0 -2
  94. package/test-typescript/typescript/attempt_route.test-d.ts +0 -1
  95. package/test-typescript/typescript/confirmed_from_payment.test-d.ts +0 -1
  96. package/test-typescript/typescript/finished_payment.test-d.ts +0 -2
  97. package/test-typescript/typescript/pay.test-d.ts +0 -1
  98. package/test-typescript/typescript/pay_via_routes.test-d.ts +0 -1
  99. package/test-typescript/typescript/subscribe_to_pay_via_routes.test-d.ts +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Versions
2
2
 
3
+ ## 12.0.1
4
+
5
+ ### Breaking Changes
6
+
7
+ - Eliminate support for `channel_capacity` in payment hops
8
+ - End support for node.js 20, require 22 or higher
9
+ - End support for LND 0.19 and below
10
+
3
11
  ## 11.1.0
4
12
 
5
13
  - `getChannels`: Add support for `partner_scid_alias`
@@ -597,6 +597,18 @@ service Lightning {
597
597
  rpc SubscribeCustomMessages (SubscribeCustomMessagesRequest)
598
598
  returns (stream CustomMessage);
599
599
 
600
+ /* lncli: `sendonion`
601
+ SendOnionMessage sends an onion message to a peer.
602
+ */
603
+ rpc SendOnionMessage (SendOnionMessageRequest)
604
+ returns (SendOnionMessageResponse);
605
+
606
+ /* lncli: `subscribeonion`
607
+ SubscribeOnionMessages subscribes to a stream of incoming onion messages.
608
+ */
609
+ rpc SubscribeOnionMessages (SubscribeOnionMessagesRequest)
610
+ returns (stream OnionMessageUpdate);
611
+
600
612
  /* lncli: `listaliases`
601
613
  ListAliases returns the set of all aliases that have ever existed with
602
614
  their confirmed SCID (if it exists) and/or the base SCID (in the case of
@@ -642,7 +654,8 @@ message CustomMessage {
642
654
  }
643
655
 
644
656
  message SendCustomMessageRequest {
645
- // Peer to send the message to
657
+ // Peer to which the message will be sent. Represented as a byte-encoded
658
+ // public key
646
659
  bytes peer = 1;
647
660
 
648
661
  // Message type. This value needs to be in the custom range (>= 32768).
@@ -660,6 +673,67 @@ message SendCustomMessageResponse {
660
673
  string status = 1;
661
674
  }
662
675
 
676
+ message SubscribeOnionMessagesRequest {
677
+ }
678
+
679
+ message OnionMessageUpdate {
680
+ // Peer from which this message originates. Represented as a byte-encoded
681
+ // public key.
682
+ bytes peer = 1;
683
+
684
+ // PathKey is used to derive the blinded node id by tweaking the hop's
685
+ // static public key. The hop uses the corresponding blinded private key
686
+ // together with the sender's ephemeral key to perform ECDH and obtain the
687
+ // shared secret for decrypting the onion payload. Separately, for
688
+ // decrypting `encrypted_recipient_data`, the recipient performs ECDH
689
+ // between its static node private key and the path_key to derive the
690
+ // decryption key.
691
+ bytes path_key = 2;
692
+
693
+ // Serialized Sphinx onion packet (BOLT 4) containing the layered, per-hop
694
+ // encrypted payloads and routing instructions used to forward this message
695
+ // along its designated path.
696
+ bytes onion = 3;
697
+
698
+ // reply_path is the blinded path that should be used when replying to a
699
+ // received message.
700
+ BlindedPath reply_path = 4;
701
+
702
+ // encrypted_recipient_data is the encrypted data that contains the
703
+ // forwarding information for an onion message. It contains either
704
+ // next_node_id or short_channel_id for each non-final node. It MAY contain
705
+ // the path_id for the final node.
706
+ bytes encrypted_recipient_data = 5;
707
+
708
+ // Custom onion message tlv records. These are customized fields that are
709
+ // not defined by LND and cannot be extracted.
710
+ map<uint64, bytes> custom_records = 6;
711
+ }
712
+
713
+ message SendOnionMessageRequest {
714
+ // Peer to send the message to
715
+ bytes peer = 1;
716
+
717
+ // PathKey is used to derive the blinded node id by tweaking the hop's
718
+ // static public key. The hop uses the corresponding blinded private key
719
+ // together with the sender's ephemeral key to perform ECDH and obtain the
720
+ // shared secret for decrypting the onion payload. Separately, for
721
+ // decrypting `encrypted_recipient_data`, the recipient performs ECDH
722
+ // between its static node private key and the path_key to derive the
723
+ // decryption key.
724
+ bytes path_key = 2;
725
+
726
+ // Serialized Sphinx onion packet (BOLT 4) containing the layered, per-hop
727
+ // encrypted payloads and routing instructions used to forward this message
728
+ // along its designated path.
729
+ bytes onion = 3;
730
+ }
731
+
732
+ message SendOnionMessageResponse {
733
+ // The status of the onion message send operation.
734
+ string status = 1;
735
+ }
736
+
663
737
  message Utxo {
664
738
  // The type of address
665
739
  AddressType address_type = 1;
@@ -1159,6 +1233,9 @@ message EstimateFeeRequest {
1159
1233
 
1160
1234
  // The strategy to use for selecting coins during fees estimation.
1161
1235
  CoinSelectionStrategy coin_selection_strategy = 5;
1236
+
1237
+ // A list of selected inputs for the transaction.
1238
+ repeated OutPoint inputs = 6;
1162
1239
  }
1163
1240
 
1164
1241
  message EstimateFeeResponse {
@@ -1171,6 +1248,9 @@ message EstimateFeeResponse {
1171
1248
 
1172
1249
  // The fee rate in satoshi/vbyte.
1173
1250
  uint64 sat_per_vbyte = 3;
1251
+
1252
+ // A list of selected inputs for the transaction the estimate is for.
1253
+ repeated OutPoint inputs = 4;
1174
1254
  }
1175
1255
 
1176
1256
  message SendManyRequest {
@@ -1436,10 +1516,18 @@ enum CommitmentType {
1436
1516
 
1437
1517
  /*
1438
1518
  A channel that uses musig2 for the funding output, and the new tapscript
1439
- features where relevant.
1519
+ features where relevant. This is the staging version using development
1520
+ scripts.
1440
1521
  */
1441
1522
  SIMPLE_TAPROOT = 5;
1442
1523
 
1524
+ /*
1525
+ A channel that uses musig2 for the funding output, and the new tapscript
1526
+ features where relevant. This is the production version using final scripts
1527
+ and feature bits 80/81.
1528
+ */
1529
+ SIMPLE_TAPROOT_FINAL = 7;
1530
+
1443
1531
  /*
1444
1532
  Identical to the SIMPLE_TAPROOT channel type, but with extra functionality.
1445
1533
  This channel type also commits to additional meta data in the tapscript
@@ -1919,6 +2007,7 @@ message Peer {
1919
2007
  repeated TimestampedError errors = 12;
1920
2008
 
1921
2009
  /*
2010
+ This field is populated when the peer has at least one channel with us.
1922
2011
  The number of times we have recorded this peer going offline or coming
1923
2012
  online, recorded across restarts. Note that this value is decreased over
1924
2013
  time if the peer has not recently flapped, so that we can forgive peers
@@ -1927,6 +2016,7 @@ message Peer {
1927
2016
  int32 flap_count = 13;
1928
2017
 
1929
2018
  /*
2019
+ This field is populated when the peer has at least one channel with us.
1930
2020
  The timestamp of the last flap we observed for this peer. If this value is
1931
2021
  zero, we have not observed any flaps for this peer.
1932
2022
  */
@@ -1976,6 +2066,13 @@ message PeerEvent {
1976
2066
 
1977
2067
  message GetInfoRequest {
1978
2068
  }
2069
+ enum GraphCacheStatus {
2070
+ GRAPH_CACHE_STATUS_DISABLED = 0;
2071
+ GRAPH_CACHE_STATUS_LOADING = 1;
2072
+ GRAPH_CACHE_STATUS_LOADED = 2;
2073
+ GRAPH_CACHE_STATUS_FAILED = 3;
2074
+ }
2075
+
1979
2076
  message GetInfoResponse {
1980
2077
  // The version of the LND software that the node is running.
1981
2078
  string version = 14;
@@ -2050,9 +2147,19 @@ message GetInfoResponse {
2050
2147
 
2051
2148
  // Indicates whether final htlc resolutions are stored on disk.
2052
2149
  bool store_final_htlc_resolutions = 22;
2150
+
2151
+ // Whether the wallet is fully synced to the best chain. This indicates the
2152
+ // wallet's internal sync state with the backing chain source.
2153
+ bool wallet_synced = 23;
2154
+
2155
+ // The current status of the in-memory graph cache.
2156
+ GraphCacheStatus graph_cache_status = 24;
2053
2157
  }
2054
2158
 
2055
2159
  message GetDebugInfoRequest {
2160
+ // If set to true, the log file content will be included in the response.
2161
+ // By default, only the config information is returned.
2162
+ bool include_log = 1;
2056
2163
  }
2057
2164
 
2058
2165
  message GetDebugInfoResponse {
@@ -2888,6 +2995,24 @@ message PendingChannelsResponse {
2888
2995
  // The raw hex encoded bytes of the closing transaction. Included if
2889
2996
  // include_raw_tx in the request is true.
2890
2997
  string closing_tx_hex = 5;
2998
+
2999
+ /*
3000
+ Remaining number of confirmations until the channel closure is
3001
+ considered final and removed from waiting close. Channel closes
3002
+ require multiple confirmations for reorg protection — the exact
3003
+ number scales with channel capacity. A closing transaction that
3004
+ gets reorganized out of the chain resets this counter. When the
3005
+ closing transaction is not yet confirmed, this value equals the
3006
+ total number of confirmations required.
3007
+ */
3008
+ uint32 blocks_til_close_confirmed = 6;
3009
+
3010
+ /*
3011
+ The block height at which the closing transaction was first confirmed.
3012
+ This will be zero if the closing transaction has not yet confirmed, or
3013
+ if this information is not available for older channels.
3014
+ */
3015
+ uint32 close_height = 7;
2891
3016
  }
2892
3017
 
2893
3018
  message Commitments {
@@ -2992,6 +3117,10 @@ message PendingChannelsResponse {
2992
3117
  message ChannelEventSubscription {
2993
3118
  }
2994
3119
 
3120
+ message ChannelCommitUpdate {
3121
+ Channel channel = 1;
3122
+ }
3123
+
2995
3124
  message ChannelEventUpdate {
2996
3125
  oneof channel {
2997
3126
  Channel open_channel = 1;
@@ -3001,6 +3130,7 @@ message ChannelEventUpdate {
3001
3130
  PendingUpdate pending_open_channel = 6;
3002
3131
  ChannelPoint fully_resolved_channel = 7;
3003
3132
  ChannelPoint channel_funding_timeout = 8;
3133
+ ChannelCommitUpdate updated_channel = 9;
3004
3134
  }
3005
3135
 
3006
3136
  enum UpdateType {
@@ -3011,6 +3141,7 @@ message ChannelEventUpdate {
3011
3141
  PENDING_OPEN_CHANNEL = 4;
3012
3142
  FULLY_RESOLVED_CHANNEL = 5;
3013
3143
  CHANNEL_FUNDING_TIMEOUT = 6;
3144
+ CHANNEL_UPDATE = 7;
3014
3145
  }
3015
3146
 
3016
3147
  UpdateType type = 5;
@@ -4459,6 +4590,10 @@ message ListPaymentsRequest {
4459
4590
  // If set, returns all payments with a creation date less than or equal to
4460
4591
  // it. Measured in seconds since the unix epoch.
4461
4592
  uint64 creation_date_end = 7;
4593
+
4594
+ // If set, omit hop-level route data for HTLC attempts to reduce query
4595
+ // cost and response size.
4596
+ bool omit_hops = 8;
4462
4597
  }
4463
4598
 
4464
4599
  message ListPaymentsResponse {
@@ -27,7 +27,7 @@ option go_package = "github.com/lightningnetwork/lnd/lnrpc/routerrpc";
27
27
  // Router is a service that offers advanced interaction with the router
28
28
  // subsystem of the daemon.
29
29
  service Router {
30
- /*
30
+ /* lncli: `sendpayment`
31
31
  SendPaymentV2 attempts to route a payment described by the passed
32
32
  PaymentRequest to the final destination. The call returns a stream of
33
33
  payment updates. When using this RPC, make sure to set a fee limit, as the
@@ -53,7 +53,7 @@ service Router {
53
53
  */
54
54
  rpc TrackPayments (TrackPaymentsRequest) returns (stream lnrpc.Payment);
55
55
 
56
- /*
56
+ /* lncli: `estimateroutefee`
57
57
  EstimateRouteFee allows callers to obtain a lower bound w.r.t how much it
58
58
  may cost to send an HTLC to the target end destination.
59
59
  */
@@ -70,7 +70,7 @@ service Router {
70
70
  option deprecated = true;
71
71
  }
72
72
 
73
- /*
73
+ /* lncli: `sendtoroute`
74
74
  SendToRouteV2 attempts to make a payment via the specified route. This
75
75
  method differs from SendPayment in that it allows users to specify a full
76
76
  route manually. This can be used for things like rebalancing, and atomic
@@ -195,6 +195,25 @@ service Router {
195
195
  */
196
196
  rpc XDeleteLocalChanAliases (DeleteAliasesRequest)
197
197
  returns (DeleteAliasesResponse);
198
+
199
+ /*
200
+ XFindBaseLocalChanAlias is an experimental API that looks up the base scid
201
+ for a local chan alias that was registered during the current runtime.
202
+ */
203
+ rpc XFindBaseLocalChanAlias (FindBaseAliasRequest)
204
+ returns (FindBaseAliasResponse);
205
+
206
+ /* lncli: `deletefwdhistory`
207
+ DeleteForwardingHistory allows the caller to delete forwarding history
208
+ events with a timestamp at or before a specified time. This is useful
209
+ for implementing data retention policies for privacy purposes. The call
210
+ deletes events in batches and returns statistics including the total number
211
+ of events deleted and the aggregate fees earned from those events. The
212
+ deletion is performed in a transaction-safe manner with configurable batch
213
+ sizes to avoid holding large database locks.
214
+ */
215
+ rpc DeleteForwardingHistory (DeleteForwardingHistoryRequest)
216
+ returns (DeleteForwardingHistoryResponse);
198
217
  }
199
218
 
200
219
  message SendPaymentRequest {
@@ -904,6 +923,11 @@ enum FailureDetail {
904
923
  INVALID_KEYSEND = 20;
905
924
  MPP_IN_PROGRESS = 21;
906
925
  CIRCULAR_ROUTE = 22;
926
+ INVOICE_ALREADY_SETTLED = 23;
927
+ HTLC_INVOICE_TYPE_MISMATCH = 24;
928
+ AMP_ERROR = 25;
929
+ AMP_RECONSTRUCTION = 26;
930
+ EXTERNAL_VALIDATION_FAILED = 27;
907
931
  }
908
932
 
909
933
  enum PaymentState {
@@ -1116,4 +1140,46 @@ message DeleteAliasesRequest {
1116
1140
 
1117
1141
  message DeleteAliasesResponse {
1118
1142
  repeated lnrpc.AliasMap alias_maps = 1;
1143
+ }
1144
+
1145
+ message FindBaseAliasRequest {
1146
+ // The alias we want to look up the base scid for.
1147
+ uint64 alias = 1;
1148
+ }
1149
+
1150
+ message FindBaseAliasResponse {
1151
+ // The base scid that resulted from the base scid look up.
1152
+ uint64 base = 1;
1153
+ }
1154
+
1155
+ message DeleteForwardingHistoryRequest {
1156
+ // Specify the cutoff time for deletion using one of the following options.
1157
+ // Events with a timestamp at or before the cutoff are deleted.
1158
+ oneof time_spec {
1159
+ // Absolute Unix timestamp (seconds). Events at or before this time
1160
+ // are deleted.
1161
+ uint64 delete_before_time = 1;
1162
+
1163
+ // Relative duration string indicating how far back to delete, e.g.
1164
+ // "-30d" deletes events at or before 30 days ago.
1165
+ // Standard Go: "-24h", "-1.5h"
1166
+ // Custom units: "-1d", "-1w", "-1M", "-1y"
1167
+ // Supported: ns, us/µs, ms, s, m, h, d (days), w (weeks),
1168
+ // M (months=30.44d), y (years=365.25d).
1169
+ // Use negative values to specify time in the past.
1170
+ string delete_before_duration = 2;
1171
+ }
1172
+ }
1173
+
1174
+ message DeleteForwardingHistoryResponse {
1175
+ // Number of forwarding events deleted.
1176
+ uint64 events_deleted = 1;
1177
+
1178
+ // Total fees earned from deleted events (in millisatoshis).
1179
+ // This is the sum of (amt_in - amt_out) for all deleted events, which
1180
+ // can be used for accounting purposes.
1181
+ int64 total_fee_msat = 2;
1182
+
1183
+ // Status message.
1184
+ string status = 3;
1119
1185
  }
@@ -106,6 +106,34 @@ service Signer {
106
106
  rpc MuSig2RegisterNonces (MuSig2RegisterNoncesRequest)
107
107
  returns (MuSig2RegisterNoncesResponse);
108
108
 
109
+ /*
110
+ MuSig2RegisterCombinedNonce (experimental!) registers a pre-aggregated
111
+ combined nonce for a signing session. This is an alternative to
112
+ MuSig2RegisterNonces and is used when a coordinator has already aggregated
113
+ all individual nonces and wants to distribute the combined nonce to
114
+ participants.
115
+
116
+ NOTE: This method is mutually exclusive with MuSig2RegisterNonces for the
117
+ same session. The MuSig2 BIP is not final yet and therefore this API must
118
+ be considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
119
+ releases. Backward compatibility is not guaranteed!
120
+ */
121
+ rpc MuSig2RegisterCombinedNonce (MuSig2RegisterCombinedNonceRequest)
122
+ returns (MuSig2RegisterCombinedNonceResponse);
123
+
124
+ /*
125
+ MuSig2GetCombinedNonce (experimental!) retrieves the combined nonce for a
126
+ signing session. This will be available after either all individual nonces
127
+ have been registered via MuSig2RegisterNonces, or a combined nonce has been
128
+ registered via MuSig2RegisterCombinedNonce.
129
+
130
+ NOTE: The MuSig2 BIP is not final yet and therefore this API must be
131
+ considered to be HIGHLY EXPERIMENTAL and subject to change in upcoming
132
+ releases. Backward compatibility is not guaranteed!
133
+ */
134
+ rpc MuSig2GetCombinedNonce (MuSig2GetCombinedNonceRequest)
135
+ returns (MuSig2GetCombinedNonceResponse);
136
+
109
137
  /*
110
138
  MuSig2Sign (experimental!) creates a partial signature using the local
111
139
  signing key that was specified when the session was created. This can only
@@ -645,6 +673,38 @@ message MuSig2RegisterNoncesResponse {
645
673
  bool have_all_nonces = 1;
646
674
  }
647
675
 
676
+ message MuSig2RegisterCombinedNonceRequest {
677
+ /*
678
+ The unique ID of the signing session the combined nonce should be registered
679
+ with.
680
+ */
681
+ bytes session_id = 1;
682
+
683
+ /*
684
+ The 66-byte combined public nonce that was aggregated externally. This is a
685
+ concatenation of two 33-byte compressed public keys (R1 || R2).
686
+ */
687
+ bytes combined_public_nonce = 2;
688
+ }
689
+
690
+ message MuSig2RegisterCombinedNonceResponse {
691
+ }
692
+
693
+ message MuSig2GetCombinedNonceRequest {
694
+ /*
695
+ The unique ID of the signing session to get the combined nonce for.
696
+ */
697
+ bytes session_id = 1;
698
+ }
699
+
700
+ message MuSig2GetCombinedNonceResponse {
701
+ /*
702
+ The 66-byte combined public nonce. This is a concatenation of two 33-byte
703
+ compressed public keys (R1 || R2).
704
+ */
705
+ bytes combined_public_nonce = 1;
706
+ }
707
+
648
708
  message MuSig2SignRequest {
649
709
  /*
650
710
  The unique ID of the signing session to use for signing.
@@ -328,7 +328,7 @@ service WalletKit {
328
328
  */
329
329
  rpc FundPsbt (FundPsbtRequest) returns (FundPsbtResponse);
330
330
 
331
- /*
331
+ /* lncli: `wallet psbt sign`
332
332
  SignPsbt expects a partial transaction with all inputs and outputs fully
333
333
  declared and tries to sign all unsigned inputs that have all required fields
334
334
  (UTXO information, BIP32 derivation information, witness or sig scripts)
@@ -1098,6 +1098,56 @@ enum WitnessType {
1098
1098
  counterparty's who broadcasts a revoked taproot commitment transaction.
1099
1099
  */
1100
1100
  TAPROOT_COMMITMENT_REVOKE = 35;
1101
+
1102
+ /*
1103
+ A witness type that allows us to spend our settled local commitment after a
1104
+ CSV delay when we force close a production taproot channel.
1105
+ */
1106
+ TAPROOT_LOCAL_COMMIT_SPEND_FINAL = 36;
1107
+
1108
+ /*
1109
+ A witness type that allows us to spend our settled local commitment after
1110
+ a CSV delay when the remote party has force closed a production taproot
1111
+ channel.
1112
+ */
1113
+ TAPROOT_REMOTE_COMMIT_SPEND_FINAL = 37;
1114
+
1115
+ /*
1116
+ A witness that allows us to timeout an HTLC we offered to the remote party
1117
+ on our production taproot commitment transaction. We use this when we need
1118
+ to go on chain to time out an HTLC.
1119
+ */
1120
+ TAPROOT_HTLC_OFFERED_TIMEOUT_SECOND_LEVEL_FINAL = 38;
1121
+
1122
+ /*
1123
+ A witness type that allows us to sweep an HTLC we accepted on our
1124
+ production taproot commitment transaction after we go to the second level
1125
+ on chain.
1126
+ */
1127
+ TAPROOT_HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL_FINAL = 39;
1128
+
1129
+ /*
1130
+ A witness that allows us to sweep an HTLC we offered to the remote party
1131
+ that lies on the production taproot commitment transaction for the remote
1132
+ party. We can spend this output after the absolute CLTV timeout of the
1133
+ HTLC as passed.
1134
+ */
1135
+ TAPROOT_HTLC_OFFERED_REMOTE_TIMEOUT_FINAL = 40;
1136
+
1137
+ /*
1138
+ A witness that allows us to sweep an HTLC that was offered to us by the
1139
+ remote party for a production taproot channel. We use this witness in the
1140
+ case that the remote party goes to chain, and we know the pre-image to the
1141
+ HTLC. We can sweep this without any additional timeout.
1142
+ */
1143
+ TAPROOT_HTLC_ACCEPTED_REMOTE_SUCCESS_FINAL = 41;
1144
+
1145
+ /*
1146
+ A witness type that allows us to sweep the settled output of a malicious
1147
+ counterparty's who broadcasts a revoked production taproot commitment
1148
+ transaction.
1149
+ */
1150
+ TAPROOT_COMMITMENT_REVOKE_FINAL = 42;
1101
1151
  }
1102
1152
 
1103
1153
  message PendingSweep {
@@ -1172,6 +1222,12 @@ message PendingSweep {
1172
1222
  The deadline height used for this output when perform fee bumping.
1173
1223
  */
1174
1224
  uint32 deadline_height = 14;
1225
+
1226
+ /*
1227
+ The block height which the input's locktime will expire at. Zero if the
1228
+ input has no locktime.
1229
+ */
1230
+ uint32 maturity_height = 15;
1175
1231
  }
1176
1232
 
1177
1233
  message PendingSweepsRequest {
@@ -1436,6 +1492,16 @@ message FundPsbtRequest {
1436
1492
 
1437
1493
  // The max fee to total output amount ratio that this psbt should adhere to.
1438
1494
  double max_fee_ratio = 12;
1495
+
1496
+ // The custom lock ID to use for the inputs in the funded PSBT. The value
1497
+ // if set must be exactly 32 bytes long. If empty, the default lock ID will
1498
+ // be used.
1499
+ bytes custom_lock_id = 13;
1500
+
1501
+ // If set, then the inputs in the funded PSBT will be locked for the
1502
+ // specified duration. The lock duration is specified in seconds. If not
1503
+ // set, the default lock duration will be used.
1504
+ uint64 lock_expiration_seconds = 14;
1439
1505
  }
1440
1506
  message FundPsbtResponse {
1441
1507
  /*
@@ -10,7 +10,6 @@ const bufferAsHex = buffer => buffer.toString('hex');
10
10
  hops: [{
11
11
  amt_to_forward_msat: <Millitokens to Forward String>
12
12
  chan_id: <Numeric Format Channel Id String>
13
- chan_capacity: <Channel Capacity Number>
14
13
  custom_records: {
15
14
  <UInt64 String>: <Record Data Buffer>
16
15
  }
@@ -37,7 +36,6 @@ const bufferAsHex = buffer => buffer.toString('hex');
37
36
  fee_mtokens: <Route Fee Millitokens String>
38
37
  hops: [{
39
38
  channel: <Standard Format Channel Id String>
40
- channel_capacity: <Channel Capacity Tokens Number>
41
39
  fee: <Fee Tokens Number>
42
40
  fee_mtokens: <Fee Millitokens String>
43
41
  forward: <Forward Tokens Number>
@@ -46,7 +46,7 @@ module.exports = ({lnd}, cbk) => {
46
46
 
47
47
  // Get configuration info
48
48
  getInfo: ['validate', ({}, cbk) => {
49
- return lnd[type][method]({}, (err, res) => {
49
+ return lnd[type][method]({include_log: true}, (err, res) => {
50
50
  if (!!err && err.details === errNotFound) {
51
51
  return cbk([501, 'GetDebugConfigurationInfoNotSupported']);
52
52
  }
@@ -47,8 +47,6 @@ export type GetRouteToDestinationArgs = AuthenticatedLightningArgs<{
47
47
  base_fee_mtokens?: string;
48
48
  /** Standard Format Channel Id */
49
49
  channel?: string;
50
- /** Channel Capacity Tokens */
51
- channel_capacity?: number;
52
50
  /** CLTV Delta Blocks */
53
51
  cltv_delta?: number;
54
52
  /** Fee Rate In Millitokens Per Million */
@@ -75,8 +73,6 @@ export type GetRouteToDestinationResult = {
75
73
  hops: {
76
74
  /** Standard Format Channel Id */
77
75
  channel: string;
78
- /** Channel Capacity Tokens */
79
- channel_capacity: number;
80
76
  /** Fee */
81
77
  fee: number;
82
78
  /** Fee Millitokens */
@@ -72,7 +72,6 @@ const trimByte = 0;
72
72
  [routes]: [[{
73
73
  [base_fee_mtokens]: <Base Routing Fee In Millitokens String>
74
74
  [channel]: <Standard Format Channel Id String>
75
- [channel_capacity]: <Channel Capacity Tokens Number>
76
75
  [cltv_delta]: <CLTV Delta Blocks Number>
77
76
  [fee_rate]: <Fee Rate In Millitokens Per Million Number>
78
77
  public_key: <Forward Edge Public Key Hex String>
@@ -90,7 +89,6 @@ const trimByte = 0;
90
89
  fee_mtokens: <Route Fee Millitokens String>
91
90
  hops: [{
92
91
  channel: <Standard Format Channel Id String>
93
- channel_capacity: <Channel Capacity Tokens Number>
94
92
  fee: <Fee Number>
95
93
  fee_mtokens: <Fee Millitokens String>
96
94
  forward: <Forward Tokens Number>
@@ -204,7 +202,7 @@ module.exports = (args, cbk) => {
204
202
  }],
205
203
 
206
204
  // Determine the outgoing channel
207
- outgoingChannel: ['validate', ({}, cbk) => {
205
+ outgoingChan: ['validate', ({}, cbk) => {
208
206
  // Exit early when there is no outgoing channel constraint
209
207
  if (!args.outgoing_channel) {
210
208
  return cbk();
@@ -246,7 +244,7 @@ module.exports = (args, cbk) => {
246
244
  'destinationCustomRecords',
247
245
  'destinationFeatures',
248
246
  'feeLimitMillitokens',
249
- 'outgoingChannel',
247
+ 'outgoingChan',
250
248
  'routeHints',
251
249
  ({
252
250
  amountMillitokens,
@@ -254,7 +252,7 @@ module.exports = (args, cbk) => {
254
252
  destinationFeatures,
255
253
  feeLimitMillitokens,
256
254
  cltvLimit,
257
- outgoingChannel,
255
+ outgoingChan,
258
256
  routeHints,
259
257
  },
260
258
  cbk) =>
@@ -274,7 +272,7 @@ module.exports = (args, cbk) => {
274
272
  ignored_nodes: ignoreAsIgnoredNodes({ignore}).ignored || undefined,
275
273
  ignored_pairs: ignoreAsIgnoredPairs({ignore}).ignored || undefined,
276
274
  last_hop_pubkey: bufFromHex(args.incoming_peer) || undefined,
277
- outgoing_chan_id: outgoingChannel || undefined,
275
+ outgoing_chan_ids: !!outgoingChan ? [outgoingChan] : undefined,
278
276
  pub_key: args.destination,
279
277
  route_hints: routeHints || undefined,
280
278
  source_pub_key: args.start || undefined,
@@ -98,8 +98,6 @@ export type SubscribeToRpcRequestsPayViaRouteRequestEvent =
98
98
  hops: {
99
99
  /** Standard Format Channel Id String */
100
100
  channel: string;
101
- /** Channel Capacity Tokens Number */
102
- channel_capacity: number;
103
101
  /** Fee Tokens Number */
104
102
  fee: number;
105
103
  /** Fee Millitokens String */
@@ -97,7 +97,6 @@ const type = 'default';
97
97
  fee_mtokens: <Route Fee Millitokens String>
98
98
  hops: [{
99
99
  channel: <Standard Format Channel Id String>
100
- channel_capacity: <Channel Capacity Tokens Number>
101
100
  fee: <Fee Tokens Number>
102
101
  fee_mtokens: <Fee Millitokens String>
103
102
  forward: <Forward Tokens Number>
@@ -18,8 +18,6 @@ export type AttemptRouteArgs = AuthenticatedLightningArgs<{
18
18
  hops: {
19
19
  /** Standard Format Channel Id String */
20
20
  channel: string;
21
- /** Channel Capacity Tokens Number */
22
- channel_capacity: number;
23
21
  /** Fee Number */
24
22
  fee: number;
25
23
  /** Fee Millitokens String */
@@ -13,7 +13,6 @@ const defaultPathTimeoutMs = 1000 * 60;
13
13
  fee_mtokens: <Total Fee Millitokens To Pay String>
14
14
  hops: [{
15
15
  channel: <Standard Format Channel Id String>
16
- channel_capacity: <Channel Capacity Tokens Number>
17
16
  fee: <Fee Number>
18
17
  fee_mtokens: <Fee Millitokens String>
19
18
  forward: <Forward Tokens Number>