-/// Send a spontaneous payment, which is a payment that does not require the recipient to have
-/// generated an invoice. Optionally, you may specify the preimage. If you do choose to specify
-/// the preimage, it must be a cryptographically secure random value that no intermediate node
-/// would be able to guess -- otherwise, an intermediate node may claim the payment and it will
-/// never reach the recipient.
-///
-/// Similar to regular payments, you MUST NOT reuse a `payment_preimage` value. See
-/// [`send_payment`] for more information about the risks of duplicate preimage usage.
-///
-/// [`send_payment`]: Self::send_payment
-///
-/// Note that payment_preimage (or a relevant inner pointer) may be NULL or all-0s to represent None
-#[must_use]
-#[no_mangle]
-pub extern "C" fn ChannelManager_send_spontaneous_payment(this_arg: &ChannelManager, route: &crate::lightning::routing::router::Route, mut payment_preimage: crate::c_types::ThirtyTwoBytes) -> crate::c_types::derived::CResult_PaymentHashPaymentSendFailureZ {
- let mut local_payment_preimage = if payment_preimage.data == [0; 32] { None } else { Some( { ::lightning::ln::PaymentPreimage(payment_preimage.data) }) };
- let mut ret = unsafe { &*this_arg.inner }.send_spontaneous_payment(unsafe { &*route.inner }, local_payment_preimage);
- let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::c_types::ThirtyTwoBytes { data: o.0 } }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::lightning::ln::channelmanager::PaymentSendFailure::native_into(e) }).into() };
- local_ret
-}
-