Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions lightning-c-bindings/include/lightning.h
Original file line number Diff line number Diff line change
Expand Up @@ -54465,6 +54465,17 @@ MUST_USE_RES struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12Seman
*/
MUST_USE_RES struct LDKCResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ VerifiedInvoiceRequest_respond_using_derived_keys_no_std(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg, struct LDKCVec_BlindedPaymentPathZ payment_paths, struct LDKThirtyTwoBytes payment_hash, uint64_t created_at);

/**
* Fetch the [`InvoiceRequestFields`] for this verified invoice.
*
* These are fields which we expect to be useful when receiving a payment for this invoice
* request, and include the returned [`InvoiceRequestFields`] in the
* [`PaymentContext::Bolt12Offer`].
*
* [`PaymentContext::Bolt12Offer`]: crate::blinded_path::payment::PaymentContext::Bolt12Offer
*/
MUST_USE_RES struct LDKInvoiceRequestFields VerifiedInvoiceRequest_fields(const struct LDKVerifiedInvoiceRequest *NONNULL_PTR this_arg);

/**
* Serialize the UnsignedInvoiceRequest object into a byte array which can be read by UnsignedInvoiceRequest_read
*/
Expand Down
14 changes: 14 additions & 0 deletions lightning-c-bindings/src/lightning/offers/invoice_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,20 @@ pub extern "C" fn VerifiedInvoiceRequest_respond_using_derived_keys_no_std(this_
local_ret
}

/// Fetch the [`InvoiceRequestFields`] for this verified invoice.
///
/// These are fields which we expect to be useful when receiving a payment for this invoice
/// request, and include the returned [`InvoiceRequestFields`] in the
/// [`PaymentContext::Bolt12Offer`].
///
/// [`PaymentContext::Bolt12Offer`]: crate::blinded_path::payment::PaymentContext::Bolt12Offer
#[must_use]
#[no_mangle]
pub extern "C" fn VerifiedInvoiceRequest_fields(this_arg: &crate::lightning::offers::invoice_request::VerifiedInvoiceRequest) -> crate::lightning::offers::invoice_request::InvoiceRequestFields {
let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.fields();
crate::lightning::offers::invoice_request::InvoiceRequestFields { inner: ObjOps::heap_alloc(ret), is_owned: true }
}

#[no_mangle]
/// Serialize the UnsignedInvoiceRequest object into a byte array which can be read by UnsignedInvoiceRequest_read
pub extern "C" fn UnsignedInvoiceRequest_write(obj: &crate::lightning::offers::invoice_request::UnsignedInvoiceRequest) -> crate::c_types::derived::CVec_u8Z {
Expand Down
Loading