lnrpc/invoicesrpc: add is_key_send flag to rpc invoice

This commit is contained in:
Joost Jager committed 2019-12-23 21:51:21 +01:00
1 parent 1d5844c196
commit c08865f4ae
4 files changed
+642 -618

No files matched your search

+1
View File
@@ -146,6 +146,7 @@ func CreateRPCInvoice(invoice *channeldb.Invoice,
State: state,
Htlcs: rpcHtlcs,
Features: CreateRPCFeatures(invoice.Terms.Features),
IsKeySend: len(invoice.PaymentRequest) == 0,
}
if preimage != channeldb.UnknownPreimage {
+630 -618
View File
File diff suppressed because it is too large. Load diff
+6
View File
@@ -2545,6 +2545,12 @@ message Invoice {
/// List of features advertised on the invoice.
map<uint32, Feature> features = 24 [json_name = "features"];
/**
Indicates if this invoice was a spontaneous payment that arrived via keysend
[EXPERIMENTAL].
*/
bool is_key_send = 25 [json_name = "is_key_send"];
}
enum InvoiceHTLCState {
+5
View File
@@ -2896,6 +2896,11 @@
"$ref": "#/definitions/lnrpcFeature"
},
"description": "/ List of features advertised on the invoice."
},
"is_key_send": {
"type": "boolean",
"format": "boolean",
"description": "*\nIndicates if this invoice was a spontaneous payment that arrived via keysend\n[EXPERIMENTAL]."
}
}
},