We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d70124c commit 53fc986Copy full SHA for 53fc986
lightning-invoice/src/lib.rs
@@ -1355,6 +1355,15 @@ impl Bolt11Invoice {
1355
self.signed_invoice.recover_payee_pub_key().expect("was checked by constructor").0
1356
}
1357
1358
+ /// Recover the payee's public key if one was included in the invoice, otherwise return the
1359
+ /// recovered public key from the signature
1360
+ pub fn get_payee_pub_key(&self) -> PublicKey {
1361
+ match self.payee_pub_key() {
1362
+ Some(pk) => *pk,
1363
+ None => self.recover_payee_pub_key()
1364
+ }
1365
1366
+
1367
/// Returns the Duration since the Unix epoch at which the invoice expires.
1368
/// Returning None if overflow occurred.
1369
pub fn expires_at(&self) -> Option<Duration> {
0 commit comments