astra-lightning 1.0.2 → 1.1.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.
- 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 +107 -28
- package/grpc/protos/router.proto +91 -0
- package/grpc/protos/routerrpc/router.proto +56 -19
- package/grpc/protos/{taprootassetchannels.proto → tapchannelrpc.proto} +57 -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/lnd_responses/constants.json +1 -0
- package/lnd_responses/rpc_channel_as_channel.js +1 -0
- package/package.json +1 -1
- package/test.js +194 -0
|
@@ -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 {
|
|
@@ -138,6 +159,10 @@ message SendPaymentResponse {
|
|
|
138
159
|
}
|
|
139
160
|
}
|
|
140
161
|
|
|
162
|
+
message HodlInvoice {
|
|
163
|
+
bytes payment_hash = 1;
|
|
164
|
+
}
|
|
165
|
+
|
|
141
166
|
message AddInvoiceRequest {
|
|
142
167
|
// The asset ID to use for the invoice.
|
|
143
168
|
bytes asset_id = 1;
|
|
@@ -158,6 +183,11 @@ message AddInvoiceRequest {
|
|
|
158
183
|
// satoshi (or milli-satoshi) equivalent of the asset amount, after
|
|
159
184
|
// negotiating a quote with a peer that supports the given asset ID.
|
|
160
185
|
lnrpc.Invoice invoice_request = 4;
|
|
186
|
+
|
|
187
|
+
// If set, then this will make the invoice created a hodl invoice, which
|
|
188
|
+
// won't be settled automatically. Instead, users will need to use the
|
|
189
|
+
// invoicesrpc.SettleInvoice call to manually settle the invoice.
|
|
190
|
+
HodlInvoice hodl_invoice = 5;
|
|
161
191
|
}
|
|
162
192
|
|
|
163
193
|
message AddInvoiceResponse {
|
|
@@ -166,4 +196,31 @@ message AddInvoiceResponse {
|
|
|
166
196
|
|
|
167
197
|
// The result of the invoice creation.
|
|
168
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;
|
|
169
226
|
}
|