Update auto-generated bindings to LDK 0.0.123
[ldk-c-bindings] / lightning-c-bindings / src / lightning_invoice / mod.rs
index 4c8a964949725b44729296cd9aa44a9b3c905420..2a4da1270e84016f214090c6567d4fdbf2a42667 100644 (file)
@@ -2386,6 +2386,7 @@ pub extern "C" fn RawBolt11Invoice_private_routes(this_arg: &crate::lightning_in
        local_ret.into()
 }
 
+/// Returns `None` if no amount is set or on overflow.
 #[must_use]
 #[no_mangle]
 pub extern "C" fn RawBolt11Invoice_amount_pico_btc(this_arg: &crate::lightning_invoice::RawBolt11Invoice) -> crate::c_types::derived::COption_u64Z {
@@ -2588,6 +2589,15 @@ pub extern "C" fn Bolt11Invoice_recover_payee_pub_key(this_arg: &crate::lightnin
        crate::c_types::PublicKey::from_rust(&ret)
 }
 
+/// Recover the payee's public key if one was included in the invoice, otherwise return the
+/// recovered public key from the signature
+#[must_use]
+#[no_mangle]
+pub extern "C" fn Bolt11Invoice_get_payee_pub_key(this_arg: &crate::lightning_invoice::Bolt11Invoice) -> crate::c_types::PublicKey {
+       let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.get_payee_pub_key();
+       crate::c_types::PublicKey::from_rust(&ret)
+}
+
 /// Returns the Duration since the Unix epoch at which the invoice expires.
 /// Returning None if overflow occurred.
 #[must_use]