astra-lightning 1.1.0 → 1.1.2
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/protos/rfqrpc/rfq.proto +20 -4
- package/grpc/protos/tapchannelrpc.proto +48 -0
- package/grpc/protos/taprootassets.proto +1438 -0
- package/index.js +2 -0
- package/lnd_methods/index.js +2 -0
- package/lnd_methods/invoices/create_invoice.js +0 -1
- package/lnd_methods/offchain/decode_asset_pay_req.d.ts +57 -0
- package/lnd_methods/offchain/decode_asset_pay_req.js +126 -0
- package/lnd_methods/offchain/index.d.ts +2 -0
- package/lnd_methods/offchain/index.js +2 -0
- package/package.json +1 -1
- package/test.js +194 -0
|
@@ -236,12 +236,15 @@ message PeerAcceptedBuyQuote {
|
|
|
236
236
|
// The unique identifier of the quote request.
|
|
237
237
|
bytes id = 2;
|
|
238
238
|
|
|
239
|
-
//
|
|
240
|
-
//
|
|
239
|
+
// The short channel ID of the channel over which the payment for the quote
|
|
240
|
+
// should be made.
|
|
241
241
|
uint64 scid = 3;
|
|
242
242
|
|
|
243
|
-
//
|
|
244
|
-
|
|
243
|
+
// The maximum exchange amount denoted in the subject asset. This includes
|
|
244
|
+
// the user-configured maximum routing fees, so the actual payment amount
|
|
245
|
+
// will be less than this. This just defines the maximum volume that the
|
|
246
|
+
// edge node has accepted to divest with the given rate.
|
|
247
|
+
uint64 asset_max_amount = 4;
|
|
245
248
|
|
|
246
249
|
// ask_asset_rate is the asset to BTC conversion rate represented as a
|
|
247
250
|
// fixed-point number.
|
|
@@ -249,6 +252,12 @@ message PeerAcceptedBuyQuote {
|
|
|
249
252
|
|
|
250
253
|
// The unix timestamp in seconds after which the quote is no longer valid.
|
|
251
254
|
uint64 expiry = 6;
|
|
255
|
+
|
|
256
|
+
// The smallest amount of asset units that can be transported within a
|
|
257
|
+
// single HTLC over the Lightning Network with the given rate. This is the
|
|
258
|
+
// asset unit equivalent of 354 satoshis, which is the minimum amount for an
|
|
259
|
+
// HTLC to be above the dust limit.
|
|
260
|
+
uint64 min_transportable_units = 7;
|
|
252
261
|
}
|
|
253
262
|
|
|
254
263
|
message PeerAcceptedSellQuote {
|
|
@@ -271,6 +280,13 @@ message PeerAcceptedSellQuote {
|
|
|
271
280
|
|
|
272
281
|
// The unix timestamp in seconds after which the quote is no longer valid.
|
|
273
282
|
uint64 expiry = 6;
|
|
283
|
+
|
|
284
|
+
// The minimum amount of milli-satoshis that need to be sent out in order to
|
|
285
|
+
// transport a single asset unit over the Lightning Network with the given
|
|
286
|
+
// rate. This is the base amount of 354,000 milli-satoshi (the minimum
|
|
287
|
+
// amount for a non-dust HTLC) plus the equivalent of one asset unit in
|
|
288
|
+
// milli-satoshis.
|
|
289
|
+
uint64 min_transportable_msat = 7;
|
|
274
290
|
}
|
|
275
291
|
|
|
276
292
|
// QuoteRespStatus is an enum that represents the status of a quote response.
|
|
@@ -7,6 +7,7 @@ option go_package = "github.com/lightninglabs/taproot-assets/taprpc/tapchannelrp
|
|
|
7
7
|
import "rfqrpc/rfq.proto";
|
|
8
8
|
import "lightning.proto";
|
|
9
9
|
import "routerrpc/router.proto";
|
|
10
|
+
import "taprootassets.proto";
|
|
10
11
|
|
|
11
12
|
service TaprootAssetChannels {
|
|
12
13
|
/*
|
|
@@ -39,6 +40,13 @@ service TaprootAssetChannels {
|
|
|
39
40
|
to the specified asset amount.
|
|
40
41
|
*/
|
|
41
42
|
rpc AddInvoice (AddInvoiceRequest) returns (AddInvoiceResponse);
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
DecodeAssetPayReq is similar to lnd's lnrpc.DecodePayReq, but it accepts an
|
|
46
|
+
asset ID and returns the invoice amount expressed in asset units along side
|
|
47
|
+
the normal information.
|
|
48
|
+
*/
|
|
49
|
+
rpc DecodeAssetPayReq (AssetPayReq) returns (AssetPayReqResponse);
|
|
42
50
|
}
|
|
43
51
|
|
|
44
52
|
message FundChannelRequest {
|
|
@@ -121,6 +129,19 @@ message SendPaymentRequest {
|
|
|
121
129
|
// contain a valid keysend record (key 5482373484 and a 32-byte preimage
|
|
122
130
|
// that corresponds to the payment hash).
|
|
123
131
|
routerrpc.SendPaymentRequest payment_request = 4;
|
|
132
|
+
|
|
133
|
+
// The rfq id to use for this payment. If the user sets this value then the
|
|
134
|
+
// payment will immediately be dispatched, skipping the rfq negotiation
|
|
135
|
+
// phase, and using the following rfq id instead.
|
|
136
|
+
bytes rfq_id = 5;
|
|
137
|
+
|
|
138
|
+
// If a small invoice should be paid that is below the amount that always
|
|
139
|
+
// needs to be sent out to carry a single asset unit, then by default the
|
|
140
|
+
// payment is rejected. If this flag is set, then the payment will be
|
|
141
|
+
// allowed to proceed, even if it is uneconomical, meaning that more sats
|
|
142
|
+
// are sent out to the network than the invoice amount plus routing fees
|
|
143
|
+
// require to be paid.
|
|
144
|
+
bool allow_overpay = 6;
|
|
124
145
|
}
|
|
125
146
|
|
|
126
147
|
message SendPaymentResponse {
|
|
@@ -175,4 +196,31 @@ message AddInvoiceResponse {
|
|
|
175
196
|
|
|
176
197
|
// The result of the invoice creation.
|
|
177
198
|
lnrpc.AddInvoiceResponse invoice_result = 2;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
message AssetPayReq {
|
|
202
|
+
// The asset ID that will be used to resolve the invoice's satoshi amount.
|
|
203
|
+
bytes asset_id = 1;
|
|
204
|
+
|
|
205
|
+
// The normal LN invoice that whose amount will be mapped to units of the
|
|
206
|
+
// asset ID.
|
|
207
|
+
string pay_req_string = 2;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
message AssetPayReqResponse {
|
|
211
|
+
// The invoice amount, expressed in asset units.
|
|
212
|
+
uint64 asset_amount = 1;
|
|
213
|
+
|
|
214
|
+
// The decimal display corresponding to the asset_id.
|
|
215
|
+
taprpc.DecimalDisplay decimal_display = 2;
|
|
216
|
+
|
|
217
|
+
// The group the asset ID belong to, if applicable.
|
|
218
|
+
taprpc.AssetGroup asset_group = 3;
|
|
219
|
+
|
|
220
|
+
// Genesis information for the asset ID which includes the meta hash, and
|
|
221
|
+
// asset ID.
|
|
222
|
+
taprpc.GenesisInfo genesis_info = 4;
|
|
223
|
+
|
|
224
|
+
// The normal decoded payment request.
|
|
225
|
+
lnrpc.PayReq pay_req = 5;
|
|
178
226
|
}
|