mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01:00
lnrpc/invoicesrpc: add is_key_send flag to rpc invoice
This commit is contained in:
parent
1d5844c196
commit
c08865f4ae
4 changed files with 642 additions and 618 deletions
|
@ -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 {
|
||||||
|
|
1240
lnrpc/rpc.pb.go
1240
lnrpc/rpc.pb.go
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]."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue