Skip to content

Commit f7ff799

Browse files
committed
Mark BOLT 12 builders no-export in the new OffersMessageFlow
As move semantics do not map to bindings, the BOLT 12 object builders are marked no-export. In the new `OffersMesageFlow`, here, we also mark the methods which return these builders as no-export. Backport of 7fb0f2a Trivial conflicts resolved in: * lightning/src/offers/flow.rs
1 parent 48be54f commit f7ff799

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lightning/src/offers/flow.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,8 @@ where
599599
///
600600
/// Returns an error if the parameterized [`Router`] is unable to create a blinded path for the offer.
601601
///
602+
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
603+
///
602604
/// [`DefaultMessageRouter`]: crate::onion_message::messenger::DefaultMessageRouter
603605
pub fn create_offer_builder<ES: Deref>(
604606
&self, entropy_source: ES, peers: Vec<MessageForwardNode>,
@@ -620,6 +622,8 @@ where
620622
/// This gives users full control over how the [`BlindedMessagePath`] is constructed,
621623
/// including the option to omit it entirely.
622624
///
625+
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
626+
///
623627
/// See [`Self::create_offer_builder`] for more details on usage.
624628
pub fn create_offer_builder_using_router<ME: Deref, ES: Deref>(
625629
&self, router: ME, entropy_source: ES, peers: Vec<MessageForwardNode>,
@@ -646,6 +650,8 @@ where
646650
/// 2. Use [`Self::create_static_invoice_builder`] to create a [`StaticInvoice`] from this
647651
/// [`Offer`] plus the returned [`Nonce`], and provide the static invoice to the
648652
/// aforementioned always-online node.
653+
///
654+
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
649655
pub fn create_async_receive_offer_builder<ES: Deref>(
650656
&self, entropy_source: ES, message_paths_to_always_online_node: Vec<BlindedMessagePath>,
651657
) -> Result<(OfferBuilder<'_, DerivedMetadata, secp256k1::All>, Nonce), Bolt12SemanticError>
@@ -728,6 +734,8 @@ where
728734
/// - `amount_msats` is invalid, or
729735
/// - The parameterized [`Router`] is unable to create a blinded path for the refund.
730736
///
737+
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
738+
///
731739
/// [`Event::PaymentFailed`]: crate::events::Event::PaymentFailed
732740
/// [`RouteParameters::from_payment_params_and_value`]: crate::routing::router::RouteParameters::from_payment_params_and_value
733741
pub fn create_refund_builder<ES: Deref>(
@@ -764,6 +772,8 @@ where
764772
/// return an error if the provided [`MessageRouter`] fails to construct a valid
765773
/// [`BlindedMessagePath`] for the refund.
766774
///
775+
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
776+
///
767777
/// [`Refund`]: crate::offers::refund::Refund
768778
/// [`BlindedMessagePath`]: crate::blinded_path::message::BlindedMessagePath
769779
/// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
@@ -799,6 +809,8 @@ where
799809
/// # Nonce
800810
/// The nonce is used to create a unique [`InvoiceRequest::payer_metadata`] for the invoice request.
801811
/// These will be used to verify the corresponding [`Bolt12Invoice`] when it is received.
812+
///
813+
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
802814
pub fn create_invoice_request_builder<'a>(
803815
&'a self, offer: &'a Offer, nonce: Nonce, payment_id: PaymentId,
804816
) -> Result<InvoiceRequestBuilder<'a, 'a, secp256k1::All>, Bolt12SemanticError> {
@@ -814,6 +826,8 @@ where
814826

815827
/// Creates a [`StaticInvoiceBuilder`] from the corresponding [`Offer`] and [`Nonce`] that were
816828
/// created via [`Self::create_async_receive_offer_builder`].
829+
///
830+
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
817831
pub fn create_static_invoice_builder<'a, ES: Deref, R: Deref>(
818832
&self, router: &R, entropy_source: ES, offer: &'a Offer, offer_nonce: Nonce,
819833
payment_secret: PaymentSecret, relative_expiry_secs: u32,
@@ -886,6 +900,8 @@ where
886900
///
887901
/// Returns an error if the refund targets a different chain or if no valid
888902
/// blinded path can be constructed.
903+
///
904+
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
889905
pub fn create_invoice_builder_from_refund<'a, ES: Deref, R: Deref>(
890906
&'a self, router: &R, entropy_source: ES, refund: &'a Refund, payment_hash: PaymentHash,
891907
payment_secret: PaymentSecret, usable_channels: Vec<ChannelDetails>,

0 commit comments

Comments
 (0)