Skip to content
Merged
Changes from 1 commit
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
16 changes: 16 additions & 0 deletions lightning/src/offers/flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,8 @@ where
///
/// Returns an error if the parameterized [`Router`] is unable to create a blinded path for the offer.
///
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
///
/// [`DefaultMessageRouter`]: crate::onion_message::messenger::DefaultMessageRouter
pub fn create_offer_builder<ES: Deref>(
&self, entropy_source: ES, peers: Vec<MessageForwardNode>,
Expand All @@ -618,6 +620,8 @@ where
/// This gives users full control over how the [`BlindedMessagePath`] is constructed,
/// including the option to omit it entirely.
///
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
///
/// See [`Self::create_offer_builder`] for more details on usage.
pub fn create_offer_builder_using_router<ME: Deref, ES: Deref>(
&self, router: ME, entropy_source: ES, peers: Vec<MessageForwardNode>,
Expand All @@ -644,6 +648,8 @@ where
/// 2. Use [`Self::create_static_invoice_builder`] to create a [`StaticInvoice`] from this
/// [`Offer`] plus the returned [`Nonce`], and provide the static invoice to the
/// aforementioned always-online node.
///
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
pub fn create_async_receive_offer_builder<ES: Deref>(
&self, entropy_source: ES, message_paths_to_always_online_node: Vec<BlindedMessagePath>,
) -> Result<(OfferBuilder<'_, DerivedMetadata, secp256k1::All>, Nonce), Bolt12SemanticError>
Expand Down Expand Up @@ -726,6 +732,8 @@ where
/// - `amount_msats` is invalid, or
/// - The parameterized [`Router`] is unable to create a blinded path for the refund.
///
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
///
/// [`Event::PaymentFailed`]: crate::events::Event::PaymentFailed
/// [`RouteParameters::from_payment_params_and_value`]: crate::routing::router::RouteParameters::from_payment_params_and_value
pub fn create_refund_builder<ES: Deref>(
Expand Down Expand Up @@ -762,6 +770,8 @@ where
/// return an error if the provided [`MessageRouter`] fails to construct a valid
/// [`BlindedMessagePath`] for the refund.
///
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
///
/// [`Refund`]: crate::offers::refund::Refund
/// [`BlindedMessagePath`]: crate::blinded_path::message::BlindedMessagePath
/// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
Expand Down Expand Up @@ -797,6 +807,8 @@ where
/// # Nonce
/// The nonce is used to create a unique [`InvoiceRequest::payer_metadata`] for the invoice request.
/// These will be used to verify the corresponding [`Bolt12Invoice`] when it is received.
///
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
pub fn create_invoice_request_builder<'a>(
&'a self, offer: &'a Offer, nonce: Nonce, payment_id: PaymentId,
) -> Result<InvoiceRequestBuilder<'a, 'a, secp256k1::All>, Bolt12SemanticError> {
Expand All @@ -812,6 +824,8 @@ where

/// Creates a [`StaticInvoiceBuilder`] from the corresponding [`Offer`] and [`Nonce`] that were
/// created via [`Self::create_async_receive_offer_builder`].
///
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
pub fn create_static_invoice_builder<'a, ES: Deref, R: Deref>(
&self, router: &R, entropy_source: ES, offer: &'a Offer, offer_nonce: Nonce,
payment_secret: PaymentSecret, relative_expiry_secs: u32,
Expand Down Expand Up @@ -884,6 +898,8 @@ where
///
/// Returns an error if the refund targets a different chain or if no valid
/// blinded path can be constructed.
///
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
pub fn create_invoice_builder_from_refund<'a, ES: Deref, R: Deref, F>(
&'a self, router: &R, entropy_source: ES, refund: &'a Refund,
usable_channels: Vec<ChannelDetails>, get_payment_info: F,
Expand Down