Skip to content

Commit 7fb0f2a

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.
1 parent 16aabce commit 7fb0f2a

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
@@ -597,6 +597,8 @@ where
597597
///
598598
/// Returns an error if the parameterized [`Router`] is unable to create a blinded path for the offer.
599599
///
600+
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
601+
///
600602
/// [`DefaultMessageRouter`]: crate::onion_message::messenger::DefaultMessageRouter
601603
pub fn create_offer_builder<ES: Deref>(
602604
&self, entropy_source: ES, peers: Vec<MessageForwardNode>,
@@ -618,6 +620,8 @@ where
618620
/// This gives users full control over how the [`BlindedMessagePath`] is constructed,
619621
/// including the option to omit it entirely.
620622
///
623+
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
624+
///
621625
/// See [`Self::create_offer_builder`] for more details on usage.
622626
pub fn create_offer_builder_using_router<ME: Deref, ES: Deref>(
623627
&self, router: ME, entropy_source: ES, peers: Vec<MessageForwardNode>,
@@ -644,6 +648,8 @@ where
644648
/// 2. Use [`Self::create_static_invoice_builder`] to create a [`StaticInvoice`] from this
645649
/// [`Offer`] plus the returned [`Nonce`], and provide the static invoice to the
646650
/// aforementioned always-online node.
651+
///
652+
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
647653
pub fn create_async_receive_offer_builder<ES: Deref>(
648654
&self, entropy_source: ES, message_paths_to_always_online_node: Vec<BlindedMessagePath>,
649655
) -> Result<(OfferBuilder<'_, DerivedMetadata, secp256k1::All>, Nonce), Bolt12SemanticError>
@@ -726,6 +732,8 @@ where
726732
/// - `amount_msats` is invalid, or
727733
/// - The parameterized [`Router`] is unable to create a blinded path for the refund.
728734
///
735+
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
736+
///
729737
/// [`Event::PaymentFailed`]: crate::events::Event::PaymentFailed
730738
/// [`RouteParameters::from_payment_params_and_value`]: crate::routing::router::RouteParameters::from_payment_params_and_value
731739
pub fn create_refund_builder<ES: Deref>(
@@ -762,6 +770,8 @@ where
762770
/// return an error if the provided [`MessageRouter`] fails to construct a valid
763771
/// [`BlindedMessagePath`] for the refund.
764772
///
773+
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
774+
///
765775
/// [`Refund`]: crate::offers::refund::Refund
766776
/// [`BlindedMessagePath`]: crate::blinded_path::message::BlindedMessagePath
767777
/// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
@@ -797,6 +807,8 @@ where
797807
/// # Nonce
798808
/// The nonce is used to create a unique [`InvoiceRequest::payer_metadata`] for the invoice request.
799809
/// These will be used to verify the corresponding [`Bolt12Invoice`] when it is received.
810+
///
811+
/// This is not exported to bindings users as builder patterns don't map outside of move semantics.
800812
pub fn create_invoice_request_builder<'a>(
801813
&'a self, offer: &'a Offer, nonce: Nonce, payment_id: PaymentId,
802814
) -> Result<InvoiceRequestBuilder<'a, 'a, secp256k1::All>, Bolt12SemanticError> {
@@ -812,6 +824,8 @@ where
812824

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

0 commit comments

Comments
 (0)