astra-lightning 1.0.2 → 1.1.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/grpc/grpc_services.json +1 -1
- package/grpc/protos/invoices.proto +10 -4
- package/grpc/protos/lightning.proto +81 -6
- package/grpc/protos/rfqrpc/rfq.proto +87 -24
- package/grpc/protos/router.proto +91 -0
- package/grpc/protos/routerrpc/router.proto +56 -19
- package/grpc/protos/{taprootassetchannels.proto → tapchannelrpc.proto} +9 -0
- package/lnd_responses/constants.json +1 -0
- package/lnd_responses/rpc_channel_as_channel.js +1 -0
- package/package.json +1 -1
package/grpc/grpc_services.json
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"WalletKit": "walletkit.proto",
|
|
35
35
|
"Watchtower": "watchtower.proto",
|
|
36
36
|
"WatchtowerClient": "wtclient.proto",
|
|
37
|
-
"TaprootAssetChannels":"
|
|
37
|
+
"TaprootAssetChannels":"tapchannelrpc.proto"
|
|
38
38
|
},
|
|
39
39
|
"protosDir": "../grpc/protos",
|
|
40
40
|
"serviceTypes": {
|
|
@@ -204,10 +204,10 @@ message LookupInvoiceMsg {
|
|
|
204
204
|
|
|
205
205
|
// CircuitKey is a unique identifier for an HTLC.
|
|
206
206
|
message CircuitKey {
|
|
207
|
-
|
|
207
|
+
// The id of the channel that the is part of this circuit.
|
|
208
208
|
uint64 chan_id = 1;
|
|
209
209
|
|
|
210
|
-
|
|
210
|
+
// The index of the incoming htlc in the incoming channel.
|
|
211
211
|
uint64 htlc_id = 2;
|
|
212
212
|
}
|
|
213
213
|
|
|
@@ -240,6 +240,12 @@ message HtlcModifyResponse {
|
|
|
240
240
|
// The modified amount in milli-satoshi that the exit HTLC is paying. This
|
|
241
241
|
// value can be different from the actual on-chain HTLC amount, in case the
|
|
242
242
|
// HTLC carries other valuable items, as can be the case with custom channel
|
|
243
|
-
// types.
|
|
244
|
-
uint64 amt_paid = 2;
|
|
243
|
+
// types.
|
|
244
|
+
optional uint64 amt_paid = 2;
|
|
245
|
+
|
|
246
|
+
// This flag indicates whether the HTLCs associated with the invoices should
|
|
247
|
+
// be cancelled. The interceptor client may set this field if some
|
|
248
|
+
// unexpected behavior is encountered. Setting this will ignore the amt_paid
|
|
249
|
+
// field.
|
|
250
|
+
bool cancel_set = 3;
|
|
245
251
|
}
|
|
@@ -1190,9 +1190,8 @@ message SendCoinsRequest {
|
|
|
1190
1190
|
int64 sat_per_byte = 5 [deprecated = true];
|
|
1191
1191
|
|
|
1192
1192
|
/*
|
|
1193
|
-
If set,
|
|
1194
|
-
|
|
1195
|
-
address.
|
|
1193
|
+
If set, the amount field should be unset. It indicates lnd will send all
|
|
1194
|
+
wallet coins or all selected coins to the specified address.
|
|
1196
1195
|
*/
|
|
1197
1196
|
bool send_all = 6;
|
|
1198
1197
|
|
|
@@ -1208,6 +1207,9 @@ message SendCoinsRequest {
|
|
|
1208
1207
|
|
|
1209
1208
|
// The strategy to use for selecting coins.
|
|
1210
1209
|
CoinSelectionStrategy coin_selection_strategy = 10;
|
|
1210
|
+
|
|
1211
|
+
// A list of selected outpoints as inputs for the transaction.
|
|
1212
|
+
repeated OutPoint outpoints = 11;
|
|
1211
1213
|
}
|
|
1212
1214
|
message SendCoinsResponse {
|
|
1213
1215
|
// The transaction ID of the transaction
|
|
@@ -3341,6 +3343,20 @@ message Route {
|
|
|
3341
3343
|
The total amount in millisatoshis.
|
|
3342
3344
|
*/
|
|
3343
3345
|
int64 total_amt_msat = 6;
|
|
3346
|
+
|
|
3347
|
+
/*
|
|
3348
|
+
The actual on-chain amount that was sent out to the first hop. This value is
|
|
3349
|
+
only different from the total_amt_msat field if this is a custom channel
|
|
3350
|
+
payment and the value transported in the HTLC is different from the BTC
|
|
3351
|
+
amount in the HTLC. If this value is zero, then this is an old payment that
|
|
3352
|
+
didn't have this value yet and can be ignored.
|
|
3353
|
+
*/
|
|
3354
|
+
int64 first_hop_amount_msat = 7;
|
|
3355
|
+
|
|
3356
|
+
/*
|
|
3357
|
+
Custom channel data that might be populated in custom channels.
|
|
3358
|
+
*/
|
|
3359
|
+
bytes custom_channel_data = 8;
|
|
3344
3360
|
}
|
|
3345
3361
|
|
|
3346
3362
|
message NodeInfoRequest {
|
|
@@ -3493,6 +3509,10 @@ message ChanInfoRequest {
|
|
|
3493
3509
|
output index for the channel.
|
|
3494
3510
|
*/
|
|
3495
3511
|
uint64 chan_id = 1 [jstype = JS_STRING];
|
|
3512
|
+
|
|
3513
|
+
// The channel point of the channel in format funding_txid:output_index. If
|
|
3514
|
+
// chan_id is specified, this field is ignored.
|
|
3515
|
+
string chan_point = 2;
|
|
3496
3516
|
}
|
|
3497
3517
|
|
|
3498
3518
|
message NetworkInfoRequest {
|
|
@@ -3882,6 +3902,48 @@ message Invoice {
|
|
|
3882
3902
|
Note: Output only, don't specify for creating an invoice.
|
|
3883
3903
|
*/
|
|
3884
3904
|
map<string, AMPInvoiceState> amp_invoice_state = 28;
|
|
3905
|
+
|
|
3906
|
+
/*
|
|
3907
|
+
Signals that the invoice should include blinded paths to hide the true
|
|
3908
|
+
identity of the recipient.
|
|
3909
|
+
*/
|
|
3910
|
+
bool is_blinded = 29;
|
|
3911
|
+
|
|
3912
|
+
/*
|
|
3913
|
+
Config values to use when creating blinded paths for this invoice. These
|
|
3914
|
+
can be used to override the defaults config values provided in by the
|
|
3915
|
+
global config. This field is only used if is_blinded is true.
|
|
3916
|
+
*/
|
|
3917
|
+
BlindedPathConfig blinded_path_config = 30;
|
|
3918
|
+
}
|
|
3919
|
+
|
|
3920
|
+
message BlindedPathConfig {
|
|
3921
|
+
/*
|
|
3922
|
+
The minimum number of real hops to include in a blinded path. This doesn't
|
|
3923
|
+
include our node, so if the minimum is 1, then the path will contain at
|
|
3924
|
+
minimum our node along with an introduction node hop. If it is zero then
|
|
3925
|
+
the shortest path will use our node as an introduction node.
|
|
3926
|
+
*/
|
|
3927
|
+
optional uint32 min_num_real_hops = 1;
|
|
3928
|
+
|
|
3929
|
+
/*
|
|
3930
|
+
The number of hops to include in a blinded path. This doesn't include our
|
|
3931
|
+
node, so if it is 1, then the path will contain our node along with an
|
|
3932
|
+
introduction node or dummy node hop. If paths shorter than NumHops is
|
|
3933
|
+
found, then they will be padded using dummy hops.
|
|
3934
|
+
*/
|
|
3935
|
+
optional uint32 num_hops = 2;
|
|
3936
|
+
|
|
3937
|
+
/*
|
|
3938
|
+
The maximum number of blinded paths to select and add to an invoice.
|
|
3939
|
+
*/
|
|
3940
|
+
optional uint32 max_num_paths = 3;
|
|
3941
|
+
|
|
3942
|
+
/*
|
|
3943
|
+
A list of node IDs of nodes that should not be used in any of our generated
|
|
3944
|
+
blinded paths.
|
|
3945
|
+
*/
|
|
3946
|
+
repeated bytes node_omission_list = 4;
|
|
3885
3947
|
}
|
|
3886
3948
|
|
|
3887
3949
|
enum InvoiceHTLCState {
|
|
@@ -3925,9 +3987,10 @@ message InvoiceHTLC {
|
|
|
3925
3987
|
// Details relevant to AMP HTLCs, only populated if this is an AMP HTLC.
|
|
3926
3988
|
AMP amp = 11;
|
|
3927
3989
|
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3990
|
+
/*
|
|
3991
|
+
Custom channel data that might be populated in custom channels.
|
|
3992
|
+
*/
|
|
3993
|
+
bytes custom_channel_data = 12;
|
|
3931
3994
|
}
|
|
3932
3995
|
|
|
3933
3996
|
// Details specific to AMP HTLCs.
|
|
@@ -4094,6 +4157,11 @@ enum PaymentFailureReason {
|
|
|
4094
4157
|
Insufficient local balance.
|
|
4095
4158
|
*/
|
|
4096
4159
|
FAILURE_REASON_INSUFFICIENT_BALANCE = 5;
|
|
4160
|
+
|
|
4161
|
+
/*
|
|
4162
|
+
The payment was canceled.
|
|
4163
|
+
*/
|
|
4164
|
+
FAILURE_REASON_CANCELED = 6;
|
|
4097
4165
|
}
|
|
4098
4166
|
|
|
4099
4167
|
message Payment {
|
|
@@ -4163,6 +4231,12 @@ message Payment {
|
|
|
4163
4231
|
uint64 payment_index = 15;
|
|
4164
4232
|
|
|
4165
4233
|
PaymentFailureReason failure_reason = 16;
|
|
4234
|
+
|
|
4235
|
+
/*
|
|
4236
|
+
The custom TLV records that were sent to the first hop as part of the HTLC
|
|
4237
|
+
wire message for this payment.
|
|
4238
|
+
*/
|
|
4239
|
+
map<uint64, bytes> first_hop_custom_records = 17;
|
|
4166
4240
|
}
|
|
4167
4241
|
|
|
4168
4242
|
message HTLCAttempt {
|
|
@@ -4339,6 +4413,7 @@ message PayReq {
|
|
|
4339
4413
|
bytes payment_addr = 11;
|
|
4340
4414
|
int64 num_msat = 12;
|
|
4341
4415
|
map<uint32, Feature> features = 13;
|
|
4416
|
+
repeated BlindedPaymentPath blinded_paths = 14;
|
|
4342
4417
|
}
|
|
4343
4418
|
|
|
4344
4419
|
enum FeatureBit {
|
|
@@ -8,6 +8,26 @@ service Rfq {
|
|
|
8
8
|
/* tapcli: `rfq buyorder`
|
|
9
9
|
AddAssetBuyOrder is used to add a buy order for a specific asset. If a buy
|
|
10
10
|
order already exists for the asset, it will be updated.
|
|
11
|
+
|
|
12
|
+
A buy order instructs the RFQ (Request For Quote) system to request a quote
|
|
13
|
+
from a peer for the acquisition of an asset.
|
|
14
|
+
|
|
15
|
+
The normal use of a buy order is as follows:
|
|
16
|
+
1. Alice, operating a wallet node, wants to receive a Tap asset as payment
|
|
17
|
+
by issuing a Lightning invoice.
|
|
18
|
+
2. Alice has an asset channel established with Bob's edge node.
|
|
19
|
+
3. Before issuing the invoice, Alice needs to agree on an exchange rate with
|
|
20
|
+
Bob, who will facilitate the asset transfer.
|
|
21
|
+
4. To obtain the best exchange rate, Alice creates a buy order specifying
|
|
22
|
+
the desired asset.
|
|
23
|
+
5. Alice's RFQ subsystem processes the buy order and sends buy requests to
|
|
24
|
+
relevant peers to find the best rate. In this example, Bob is the only
|
|
25
|
+
available peer.
|
|
26
|
+
6. Once Bob provides a satisfactory quote, Alice accepts it.
|
|
27
|
+
7. Alice issues the Lightning invoice, which Charlie will pay.
|
|
28
|
+
8. Instead of paying Alice directly, Charlie pays Bob.
|
|
29
|
+
9. Bob then forwards the agreed amount of the Tap asset to Alice over their
|
|
30
|
+
asset channel.
|
|
11
31
|
*/
|
|
12
32
|
rpc AddAssetBuyOrder (AddAssetBuyOrderRequest)
|
|
13
33
|
returns (AddAssetBuyOrderResponse);
|
|
@@ -67,26 +87,63 @@ message AssetSpecifier {
|
|
|
67
87
|
}
|
|
68
88
|
}
|
|
69
89
|
|
|
90
|
+
// FixedPoint is a scaled integer representation of a fractional number.
|
|
91
|
+
//
|
|
92
|
+
// This type consists of two integer fields: a coefficient and a scale.
|
|
93
|
+
// Using this format enables precise and consistent representation of fractional
|
|
94
|
+
// numbers while avoiding floating-point data types, which are prone to
|
|
95
|
+
// precision errors.
|
|
96
|
+
//
|
|
97
|
+
// The relationship between the fractional representation and its fixed-point
|
|
98
|
+
// representation is expressed as:
|
|
99
|
+
// ```
|
|
100
|
+
// V = F_c / (10^F_s)
|
|
101
|
+
// ```
|
|
102
|
+
// where:
|
|
103
|
+
//
|
|
104
|
+
// * `V` is the fractional value.
|
|
105
|
+
//
|
|
106
|
+
// * `F_c` is the coefficient component of the fixed-point representation. It is
|
|
107
|
+
// the scaled-up fractional value represented as an integer.
|
|
108
|
+
//
|
|
109
|
+
// * `F_s` is the scale component. It is an integer specifying how
|
|
110
|
+
// many decimal places `F_c` should be divided by to obtain the fractional
|
|
111
|
+
// representation.
|
|
112
|
+
message FixedPoint {
|
|
113
|
+
// The coefficient is the fractional value scaled-up as an integer. This
|
|
114
|
+
// integer is represented as a string as it may be too large to fit in a
|
|
115
|
+
// uint64.
|
|
116
|
+
string coefficient = 1;
|
|
117
|
+
|
|
118
|
+
// The scale is the component that determines how many decimal places
|
|
119
|
+
// the coefficient should be divided by to obtain the fractional value.
|
|
120
|
+
uint32 scale = 2;
|
|
121
|
+
}
|
|
122
|
+
|
|
70
123
|
message AddAssetBuyOrderRequest {
|
|
71
124
|
// asset_specifier is the subject asset.
|
|
72
125
|
AssetSpecifier asset_specifier = 1;
|
|
73
126
|
|
|
74
|
-
// The
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
// The maximum amount BTC to spend (units: millisats).
|
|
78
|
-
uint64 max_bid = 3;
|
|
127
|
+
// The maximum amount of the asset that the provider must be willing to
|
|
128
|
+
// offer.
|
|
129
|
+
uint64 asset_max_amt = 2;
|
|
79
130
|
|
|
80
131
|
// The unix timestamp in seconds after which the order is no longer valid.
|
|
81
|
-
uint64 expiry =
|
|
132
|
+
uint64 expiry = 3;
|
|
82
133
|
|
|
83
134
|
// peer_pub_key is an optional field for specifying the public key of the
|
|
84
135
|
// intended recipient peer for the order.
|
|
85
|
-
bytes peer_pub_key =
|
|
136
|
+
bytes peer_pub_key = 4;
|
|
86
137
|
|
|
87
138
|
// timeout_seconds is the number of seconds to wait for the peer to respond
|
|
88
139
|
// with an accepted quote (or a rejection).
|
|
89
|
-
uint32 timeout_seconds =
|
|
140
|
+
uint32 timeout_seconds = 5;
|
|
141
|
+
|
|
142
|
+
// If set, the check if a channel with the given asset exists with the peer
|
|
143
|
+
// will be skipped. An active channel with the peer is still required for
|
|
144
|
+
// the RFQ negotiation to work. This flag shouldn't be set outside of test
|
|
145
|
+
// scenarios.
|
|
146
|
+
bool skip_asset_channel_check = 6;
|
|
90
147
|
}
|
|
91
148
|
|
|
92
149
|
message AddAssetBuyOrderResponse {
|
|
@@ -109,22 +166,26 @@ message AddAssetSellOrderRequest {
|
|
|
109
166
|
// asset_specifier is the subject asset.
|
|
110
167
|
AssetSpecifier asset_specifier = 1;
|
|
111
168
|
|
|
112
|
-
// The maximum amount
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
// The minimum amount of BTC to accept (units: millisats).
|
|
116
|
-
uint64 min_ask = 3;
|
|
169
|
+
// The maximum msat amount that the responding peer must agree to pay
|
|
170
|
+
// (units: millisats).
|
|
171
|
+
uint64 payment_max_amt = 2;
|
|
117
172
|
|
|
118
173
|
// The unix timestamp in seconds after which the order is no longer valid.
|
|
119
|
-
uint64 expiry =
|
|
174
|
+
uint64 expiry = 3;
|
|
120
175
|
|
|
121
176
|
// peer_pub_key is an optional field for specifying the public key of the
|
|
122
177
|
// intended recipient peer for the order.
|
|
123
|
-
bytes peer_pub_key =
|
|
178
|
+
bytes peer_pub_key = 4;
|
|
124
179
|
|
|
125
180
|
// timeout_seconds is the number of seconds to wait for the peer to respond
|
|
126
181
|
// with an accepted quote (or a rejection).
|
|
127
|
-
uint32 timeout_seconds =
|
|
182
|
+
uint32 timeout_seconds = 5;
|
|
183
|
+
|
|
184
|
+
// If set, the check if a channel with the given asset exists with the peer
|
|
185
|
+
// will be skipped. An active channel with the peer is still required for
|
|
186
|
+
// the RFQ negotiation to work. This flag shouldn't be set outside of test
|
|
187
|
+
// scenarios.
|
|
188
|
+
bool skip_asset_channel_check = 6;
|
|
128
189
|
}
|
|
129
190
|
|
|
130
191
|
message AddAssetSellOrderResponse {
|
|
@@ -182,8 +243,9 @@ message PeerAcceptedBuyQuote {
|
|
|
182
243
|
// asset_amount is the amount of the subject asset.
|
|
183
244
|
uint64 asset_amount = 4;
|
|
184
245
|
|
|
185
|
-
//
|
|
186
|
-
|
|
246
|
+
// ask_asset_rate is the asset to BTC conversion rate represented as a
|
|
247
|
+
// fixed-point number.
|
|
248
|
+
FixedPoint ask_asset_rate = 5;
|
|
187
249
|
|
|
188
250
|
// The unix timestamp in seconds after which the quote is no longer valid.
|
|
189
251
|
uint64 expiry = 6;
|
|
@@ -203,8 +265,9 @@ message PeerAcceptedSellQuote {
|
|
|
203
265
|
// asset_amount is the amount of the subject asset.
|
|
204
266
|
uint64 asset_amount = 4;
|
|
205
267
|
|
|
206
|
-
//
|
|
207
|
-
|
|
268
|
+
// bid_asset_rate is the asset to BTC conversion rate represented as a
|
|
269
|
+
// fixed-point number.
|
|
270
|
+
FixedPoint bid_asset_rate = 5;
|
|
208
271
|
|
|
209
272
|
// The unix timestamp in seconds after which the quote is no longer valid.
|
|
210
273
|
uint64 expiry = 6;
|
|
@@ -212,9 +275,9 @@ message PeerAcceptedSellQuote {
|
|
|
212
275
|
|
|
213
276
|
// QuoteRespStatus is an enum that represents the status of a quote response.
|
|
214
277
|
enum QuoteRespStatus {
|
|
215
|
-
//
|
|
216
|
-
// invalid.
|
|
217
|
-
|
|
278
|
+
// INVALID_ASSET_RATES indicates that at least one asset rate in the
|
|
279
|
+
// quote response is invalid.
|
|
280
|
+
INVALID_ASSET_RATES = 0;
|
|
218
281
|
|
|
219
282
|
// INVALID_EXPIRY indicates that the expiry in the quote response is
|
|
220
283
|
// invalid.
|
|
@@ -306,4 +369,4 @@ message RfqEvent {
|
|
|
306
369
|
// RFQ service.
|
|
307
370
|
AcceptHtlcEvent accept_htlc = 3;
|
|
308
371
|
}
|
|
309
|
-
}
|
|
372
|
+
}
|
package/grpc/protos/router.proto
CHANGED
|
@@ -176,6 +176,25 @@ service Router {
|
|
|
176
176
|
*/
|
|
177
177
|
rpc UpdateChanStatus (UpdateChanStatusRequest)
|
|
178
178
|
returns (UpdateChanStatusResponse);
|
|
179
|
+
|
|
180
|
+
/*
|
|
181
|
+
XAddLocalChanAliases is an experimental API that creates a set of new
|
|
182
|
+
channel SCID alias mappings. The final total set of aliases in the manager
|
|
183
|
+
after the add operation is returned. This is only a locally stored alias,
|
|
184
|
+
and will not be communicated to the channel peer via any message. Therefore,
|
|
185
|
+
routing over such an alias will only work if the peer also calls this same
|
|
186
|
+
RPC on their end. If an alias already exists, an error is returned
|
|
187
|
+
*/
|
|
188
|
+
rpc XAddLocalChanAliases (AddAliasesRequest) returns (AddAliasesResponse);
|
|
189
|
+
|
|
190
|
+
/*
|
|
191
|
+
XDeleteLocalChanAliases is an experimental API that deletes a set of alias
|
|
192
|
+
mappings. The final total set of aliases in the manager after the delete
|
|
193
|
+
operation is returned. The deletion will not be communicated to the channel
|
|
194
|
+
peer via any message.
|
|
195
|
+
*/
|
|
196
|
+
rpc XDeleteLocalChanAliases (DeleteAliasesRequest)
|
|
197
|
+
returns (DeleteAliasesResponse);
|
|
179
198
|
}
|
|
180
199
|
|
|
181
200
|
message SendPaymentRequest {
|
|
@@ -339,6 +358,15 @@ message SendPaymentRequest {
|
|
|
339
358
|
being sent.
|
|
340
359
|
*/
|
|
341
360
|
bool cancelable = 24;
|
|
361
|
+
|
|
362
|
+
/*
|
|
363
|
+
An optional field that can be used to pass an arbitrary set of TLV records
|
|
364
|
+
to the first hop peer of this payment. This can be used to pass application
|
|
365
|
+
specific data during the payment attempt. Record types are required to be in
|
|
366
|
+
the custom range >= 65536. When using REST, the values must be encoded as
|
|
367
|
+
base64.
|
|
368
|
+
*/
|
|
369
|
+
map<uint64, bytes> first_hop_custom_records = 25;
|
|
342
370
|
}
|
|
343
371
|
|
|
344
372
|
message TrackPaymentRequest {
|
|
@@ -432,6 +460,15 @@ message SendToRouteRequest {
|
|
|
432
460
|
routes, incorrect payment details, or insufficient funds.
|
|
433
461
|
*/
|
|
434
462
|
bool skip_temp_err = 3;
|
|
463
|
+
|
|
464
|
+
/*
|
|
465
|
+
An optional field that can be used to pass an arbitrary set of TLV records
|
|
466
|
+
to the first hop peer of this payment. This can be used to pass application
|
|
467
|
+
specific data during the payment attempt. Record types are required to be in
|
|
468
|
+
the custom range >= 65536. When using REST, the values must be encoded as
|
|
469
|
+
base64.
|
|
470
|
+
*/
|
|
471
|
+
map<uint64, bytes> first_hop_custom_records = 4;
|
|
435
472
|
}
|
|
436
473
|
|
|
437
474
|
message SendToRouteResponse {
|
|
@@ -707,6 +744,15 @@ message BuildRouteRequest {
|
|
|
707
744
|
This is also called payment secret in specifications (e.g. BOLT 11).
|
|
708
745
|
*/
|
|
709
746
|
bytes payment_addr = 5;
|
|
747
|
+
|
|
748
|
+
/*
|
|
749
|
+
An optional field that can be used to pass an arbitrary set of TLV records
|
|
750
|
+
to the first hop peer of this payment. This can be used to pass application
|
|
751
|
+
specific data during the payment attempt. Record types are required to be in
|
|
752
|
+
the custom range >= 65536. When using REST, the values must be encoded as
|
|
753
|
+
base64.
|
|
754
|
+
*/
|
|
755
|
+
map<uint64, bytes> first_hop_custom_records = 6;
|
|
710
756
|
}
|
|
711
757
|
|
|
712
758
|
message BuildRouteResponse {
|
|
@@ -963,12 +1009,17 @@ message ForwardHtlcInterceptRequest {
|
|
|
963
1009
|
// The block height at which this htlc will be auto-failed to prevent the
|
|
964
1010
|
// channel from force-closing.
|
|
965
1011
|
int32 auto_fail_height = 10;
|
|
1012
|
+
|
|
1013
|
+
// The custom records of the peer's incoming p2p wire message.
|
|
1014
|
+
map<uint64, bytes> in_wire_custom_records = 11;
|
|
966
1015
|
}
|
|
967
1016
|
|
|
968
1017
|
/**
|
|
969
1018
|
ForwardHtlcInterceptResponse enables the caller to resolve a previously hold
|
|
970
1019
|
forward. The caller can choose either to:
|
|
971
1020
|
- `Resume`: Execute the default behavior (usually forward).
|
|
1021
|
+
- `ResumeModified`: Execute the default behavior (usually forward) with HTLC
|
|
1022
|
+
field modifications.
|
|
972
1023
|
- `Reject`: Fail the htlc backwards.
|
|
973
1024
|
- `Settle`: Settle this htlc with a given preimage.
|
|
974
1025
|
*/
|
|
@@ -999,12 +1050,36 @@ message ForwardHtlcInterceptResponse {
|
|
|
999
1050
|
// For backwards-compatibility reasons, TEMPORARY_CHANNEL_FAILURE is the
|
|
1000
1051
|
// default value for this field.
|
|
1001
1052
|
lnrpc.Failure.FailureCode failure_code = 5;
|
|
1053
|
+
|
|
1054
|
+
// The amount that was set on the p2p wire message of the incoming HTLC.
|
|
1055
|
+
// This field is ignored if the action is not RESUME_MODIFIED or the amount
|
|
1056
|
+
// is zero.
|
|
1057
|
+
uint64 in_amount_msat = 6;
|
|
1058
|
+
|
|
1059
|
+
// The amount to set on the p2p wire message of the resumed HTLC. This field
|
|
1060
|
+
// is ignored if the action is not RESUME_MODIFIED or the amount is zero.
|
|
1061
|
+
uint64 out_amount_msat = 7;
|
|
1062
|
+
|
|
1063
|
+
// Any custom records that should be set on the p2p wire message message of
|
|
1064
|
+
// the resumed HTLC. This field is ignored if the action is not
|
|
1065
|
+
// RESUME_MODIFIED.
|
|
1066
|
+
map<uint64, bytes> out_wire_custom_records = 8;
|
|
1002
1067
|
}
|
|
1003
1068
|
|
|
1004
1069
|
enum ResolveHoldForwardAction {
|
|
1070
|
+
// SETTLE is an action that is used to settle an HTLC instead of forwarding
|
|
1071
|
+
// it.
|
|
1005
1072
|
SETTLE = 0;
|
|
1073
|
+
|
|
1074
|
+
// FAIL is an action that is used to fail an HTLC backwards.
|
|
1006
1075
|
FAIL = 1;
|
|
1076
|
+
|
|
1077
|
+
// RESUME is an action that is used to resume a forward HTLC.
|
|
1007
1078
|
RESUME = 2;
|
|
1079
|
+
|
|
1080
|
+
// RESUME_MODIFIED is an action that is used to resume a hold forward HTLC
|
|
1081
|
+
// with modifications specified during interception.
|
|
1082
|
+
RESUME_MODIFIED = 3;
|
|
1008
1083
|
}
|
|
1009
1084
|
|
|
1010
1085
|
message UpdateChanStatusRequest {
|
|
@@ -1020,4 +1095,20 @@ enum ChanStatusAction {
|
|
|
1020
1095
|
}
|
|
1021
1096
|
|
|
1022
1097
|
message UpdateChanStatusResponse {
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
message AddAliasesRequest {
|
|
1101
|
+
repeated lnrpc.AliasMap alias_maps = 1;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
message AddAliasesResponse {
|
|
1105
|
+
repeated lnrpc.AliasMap alias_maps = 1;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
message DeleteAliasesRequest {
|
|
1109
|
+
repeated lnrpc.AliasMap alias_maps = 1;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
message DeleteAliasesResponse {
|
|
1113
|
+
repeated lnrpc.AliasMap alias_maps = 1;
|
|
1023
1114
|
}
|
|
@@ -179,17 +179,19 @@ service Router {
|
|
|
179
179
|
|
|
180
180
|
/*
|
|
181
181
|
XAddLocalChanAliases is an experimental API that creates a set of new
|
|
182
|
-
channel SCID alias mappings. The
|
|
183
|
-
returned. This is only a locally stored alias,
|
|
184
|
-
to the channel peer via any message. Therefore,
|
|
185
|
-
will only work
|
|
182
|
+
channel SCID alias mappings. The final total set of aliases in the manager
|
|
183
|
+
after the add operation is returned. This is only a locally stored alias,
|
|
184
|
+
and will not be communicated to the channel peer via any message. Therefore,
|
|
185
|
+
routing over such an alias will only work if the peer also calls this same
|
|
186
|
+
RPC on their end. If an alias already exists, an error is returned
|
|
186
187
|
*/
|
|
187
188
|
rpc XAddLocalChanAliases (AddAliasesRequest) returns (AddAliasesResponse);
|
|
188
189
|
|
|
189
190
|
/*
|
|
190
|
-
XDeleteLocalChanAliases is an experimental API that deletes a set of
|
|
191
|
-
|
|
192
|
-
deletion will not be communicated to the channel
|
|
191
|
+
XDeleteLocalChanAliases is an experimental API that deletes a set of alias
|
|
192
|
+
mappings. The final total set of aliases in the manager after the delete
|
|
193
|
+
operation is returned. The deletion will not be communicated to the channel
|
|
194
|
+
peer via any message.
|
|
193
195
|
*/
|
|
194
196
|
rpc XDeleteLocalChanAliases (DeleteAliasesRequest)
|
|
195
197
|
returns (DeleteAliasesResponse);
|
|
@@ -348,6 +350,15 @@ message SendPaymentRequest {
|
|
|
348
350
|
*/
|
|
349
351
|
double time_pref = 23;
|
|
350
352
|
|
|
353
|
+
/*
|
|
354
|
+
If set, the payment loop can be interrupted by manually canceling the
|
|
355
|
+
payment context, even before the payment timeout is reached. Note that the
|
|
356
|
+
payment may still succeed after cancellation, as in-flight attempts can
|
|
357
|
+
still settle afterwards. Canceling will only prevent further attempts from
|
|
358
|
+
being sent.
|
|
359
|
+
*/
|
|
360
|
+
bool cancelable = 24;
|
|
361
|
+
|
|
351
362
|
/*
|
|
352
363
|
An optional field that can be used to pass an arbitrary set of TLV records
|
|
353
364
|
to the first hop peer of this payment. This can be used to pass application
|
|
@@ -355,7 +366,7 @@ message SendPaymentRequest {
|
|
|
355
366
|
the custom range >= 65536. When using REST, the values must be encoded as
|
|
356
367
|
base64.
|
|
357
368
|
*/
|
|
358
|
-
map<uint64, bytes> first_hop_custom_records =
|
|
369
|
+
map<uint64, bytes> first_hop_custom_records = 25;
|
|
359
370
|
}
|
|
360
371
|
|
|
361
372
|
message TrackPaymentRequest {
|
|
@@ -449,6 +460,15 @@ message SendToRouteRequest {
|
|
|
449
460
|
routes, incorrect payment details, or insufficient funds.
|
|
450
461
|
*/
|
|
451
462
|
bool skip_temp_err = 3;
|
|
463
|
+
|
|
464
|
+
/*
|
|
465
|
+
An optional field that can be used to pass an arbitrary set of TLV records
|
|
466
|
+
to the first hop peer of this payment. This can be used to pass application
|
|
467
|
+
specific data during the payment attempt. Record types are required to be in
|
|
468
|
+
the custom range >= 65536. When using REST, the values must be encoded as
|
|
469
|
+
base64.
|
|
470
|
+
*/
|
|
471
|
+
map<uint64, bytes> first_hop_custom_records = 4;
|
|
452
472
|
}
|
|
453
473
|
|
|
454
474
|
message SendToRouteResponse {
|
|
@@ -724,6 +744,15 @@ message BuildRouteRequest {
|
|
|
724
744
|
This is also called payment secret in specifications (e.g. BOLT 11).
|
|
725
745
|
*/
|
|
726
746
|
bytes payment_addr = 5;
|
|
747
|
+
|
|
748
|
+
/*
|
|
749
|
+
An optional field that can be used to pass an arbitrary set of TLV records
|
|
750
|
+
to the first hop peer of this payment. This can be used to pass application
|
|
751
|
+
specific data during the payment attempt. Record types are required to be in
|
|
752
|
+
the custom range >= 65536. When using REST, the values must be encoded as
|
|
753
|
+
base64.
|
|
754
|
+
*/
|
|
755
|
+
map<uint64, bytes> first_hop_custom_records = 6;
|
|
727
756
|
}
|
|
728
757
|
|
|
729
758
|
message BuildRouteResponse {
|
|
@@ -981,8 +1010,8 @@ message ForwardHtlcInterceptRequest {
|
|
|
981
1010
|
// channel from force-closing.
|
|
982
1011
|
int32 auto_fail_height = 10;
|
|
983
1012
|
|
|
984
|
-
// The custom records of the peer's incoming wire message.
|
|
985
|
-
map<uint64, bytes>
|
|
1013
|
+
// The custom records of the peer's incoming p2p wire message.
|
|
1014
|
+
map<uint64, bytes> in_wire_custom_records = 11;
|
|
986
1015
|
}
|
|
987
1016
|
|
|
988
1017
|
/**
|
|
@@ -1022,22 +1051,30 @@ message ForwardHtlcInterceptResponse {
|
|
|
1022
1051
|
// default value for this field.
|
|
1023
1052
|
lnrpc.Failure.FailureCode failure_code = 5;
|
|
1024
1053
|
|
|
1025
|
-
//
|
|
1026
|
-
//
|
|
1027
|
-
|
|
1054
|
+
// The amount that was set on the p2p wire message of the incoming HTLC.
|
|
1055
|
+
// This field is ignored if the action is not RESUME_MODIFIED or the amount
|
|
1056
|
+
// is zero.
|
|
1057
|
+
uint64 in_amount_msat = 6;
|
|
1028
1058
|
|
|
1029
|
-
//
|
|
1030
|
-
//
|
|
1031
|
-
uint64
|
|
1059
|
+
// The amount to set on the p2p wire message of the resumed HTLC. This field
|
|
1060
|
+
// is ignored if the action is not RESUME_MODIFIED or the amount is zero.
|
|
1061
|
+
uint64 out_amount_msat = 7;
|
|
1032
1062
|
|
|
1033
|
-
//
|
|
1034
|
-
//
|
|
1035
|
-
|
|
1063
|
+
// Any custom records that should be set on the p2p wire message message of
|
|
1064
|
+
// the resumed HTLC. This field is ignored if the action is not
|
|
1065
|
+
// RESUME_MODIFIED.
|
|
1066
|
+
map<uint64, bytes> out_wire_custom_records = 8;
|
|
1036
1067
|
}
|
|
1037
1068
|
|
|
1038
1069
|
enum ResolveHoldForwardAction {
|
|
1070
|
+
// SETTLE is an action that is used to settle an HTLC instead of forwarding
|
|
1071
|
+
// it.
|
|
1039
1072
|
SETTLE = 0;
|
|
1073
|
+
|
|
1074
|
+
// FAIL is an action that is used to fail an HTLC backwards.
|
|
1040
1075
|
FAIL = 1;
|
|
1076
|
+
|
|
1077
|
+
// RESUME is an action that is used to resume a forward HTLC.
|
|
1041
1078
|
RESUME = 2;
|
|
1042
1079
|
|
|
1043
1080
|
// RESUME_MODIFIED is an action that is used to resume a hold forward HTLC
|
|
@@ -138,6 +138,10 @@ message SendPaymentResponse {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
message HodlInvoice {
|
|
142
|
+
bytes payment_hash = 1;
|
|
143
|
+
}
|
|
144
|
+
|
|
141
145
|
message AddInvoiceRequest {
|
|
142
146
|
// The asset ID to use for the invoice.
|
|
143
147
|
bytes asset_id = 1;
|
|
@@ -158,6 +162,11 @@ message AddInvoiceRequest {
|
|
|
158
162
|
// satoshi (or milli-satoshi) equivalent of the asset amount, after
|
|
159
163
|
// negotiating a quote with a peer that supports the given asset ID.
|
|
160
164
|
lnrpc.Invoice invoice_request = 4;
|
|
165
|
+
|
|
166
|
+
// If set, then this will make the invoice created a hodl invoice, which
|
|
167
|
+
// won't be settled automatically. Instead, users will need to use the
|
|
168
|
+
// invoicesrpc.SettleInvoice call to manually settle the invoice.
|
|
169
|
+
HodlInvoice hodl_invoice = 5;
|
|
161
170
|
}
|
|
162
171
|
|
|
163
172
|
message AddInvoiceResponse {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"LEGACY": "original",
|
|
20
20
|
"SCRIPT_ENFORCED_LEASE": "anchor_with_lease_constraint",
|
|
21
21
|
"SIMPLE_TAPROOT": "simplified_taproot",
|
|
22
|
+
"SIMPLE_TAPROOT_OVERLAY": "simplified_taproot_overlay",
|
|
22
23
|
"STATIC_REMOTE_KEY": "original_with_static_to_remote"
|
|
23
24
|
},
|
|
24
25
|
"commitmentTypes": {
|
|
@@ -279,6 +279,7 @@ module.exports = args => {
|
|
|
279
279
|
transaction_id: transactionId,
|
|
280
280
|
transaction_vout: Number(vout),
|
|
281
281
|
type: channelTypes[args.commitment_type],
|
|
282
|
+
commitment_type: args.commitment_type,
|
|
282
283
|
unsettled_balance: Number(args.unsettled_balance),
|
|
283
284
|
custom_channel_data: customChannelData,
|
|
284
285
|
};
|
package/package.json
CHANGED