lnrpc/invoicesrpc: add is_key_send flag to rpc invoice
This commit is contained in:
4 files changed
+642
-618
No files matched your search
@@ -146,6 +146,7 @@ func CreateRPCInvoice(invoice *channeldb.Invoice,
|
|||||||
State: state,
|
State: state,
|
||||||
Htlcs: rpcHtlcs,
|
Htlcs: rpcHtlcs,
|
||||||
Features: CreateRPCFeatures(invoice.Terms.Features),
|
Features: CreateRPCFeatures(invoice.Terms.Features),
|
||||||
|
IsKeySend: len(invoice.PaymentRequest) == 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
if preimage != channeldb.UnknownPreimage {
|
if preimage != channeldb.UnknownPreimage {
|
||||||
|
|||||||
+630
-618
File diff suppressed because it is too large.
Load diff
@@ -2545,6 +2545,12 @@ message Invoice {
|
|||||||
|
|
||||||
/// List of features advertised on the invoice.
|
/// List of features advertised on the invoice.
|
||||||
map<uint32, Feature> features = 24 [json_name = "features"];
|
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 {
|
enum InvoiceHTLCState {
|
||||||
|
|||||||
@@ -2896,6 +2896,11 @@
|
|||||||
"$ref": "#/definitions/lnrpcFeature"
|
"$ref": "#/definitions/lnrpcFeature"
|
||||||
},
|
},
|
||||||
"description": "/ List of features advertised on the invoice."
|
"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]."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user