From: Jeffrey Czyz Date: Tue, 21 Mar 2023 01:24:54 +0000 (-0500) Subject: Fix builder docs in offers module X-Git-Tag: v0.0.115~12^2~7 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=9bd43e077fd00add0491960aeb5533a75d9d71d3;p=rust-lightning Fix builder docs in offers module --- diff --git a/lightning/src/offers/invoice_request.rs b/lightning/src/offers/invoice_request.rs index 26151dfbd..f617383fd 100644 --- a/lightning/src/offers/invoice_request.rs +++ b/lightning/src/offers/invoice_request.rs @@ -459,13 +459,12 @@ impl InvoiceRequest { self.signature } - /// Creates an [`Invoice`] for the request with the given required fields and using the + /// Creates an [`InvoiceBuilder`] for the request with the given required fields and using the /// [`Duration`] since [`std::time::SystemTime::UNIX_EPOCH`] as the creation time. /// /// See [`InvoiceRequest::respond_with_no_std`] for further details where the aforementioned /// creation time is used for the `created_at` parameter. /// - /// [`Invoice`]: crate::offers::invoice::Invoice /// [`Duration`]: core::time::Duration #[cfg(feature = "std")] pub fn respond_with( @@ -478,7 +477,7 @@ impl InvoiceRequest { self.respond_with_no_std(payment_paths, payment_hash, created_at) } - /// Creates an [`Invoice`] for the request with the given required fields. + /// Creates an [`InvoiceBuilder`] for the request with the given required fields. /// /// Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after /// `created_at`, which is used to set [`Invoice::created_at`]. Useful for `no-std` builds where @@ -494,7 +493,6 @@ impl InvoiceRequest { /// /// Errors if the request contains unknown required features. /// - /// [`Invoice`]: crate::offers::invoice::Invoice /// [`Invoice::created_at`]: crate::offers::invoice::Invoice::created_at pub fn respond_with_no_std( &self, payment_paths: Vec<(BlindedPath, BlindedPayInfo)>, payment_hash: PaymentHash, diff --git a/lightning/src/offers/offer.rs b/lightning/src/offers/offer.rs index 468018d55..617496d4b 100644 --- a/lightning/src/offers/offer.rs +++ b/lightning/src/offers/offer.rs @@ -484,8 +484,8 @@ impl Offer { Ok(InvoiceRequestBuilder::deriving_metadata(self, payer_id, expanded_key, entropy_source)) } - /// Creates an [`InvoiceRequest`] for the offer with the given `metadata` and `payer_id`, which - /// will be reflected in the `Invoice` response. + /// Creates an [`InvoiceRequestBuilder`] for the offer with the given `metadata` and `payer_id`, + /// which will be reflected in the `Invoice` response. /// /// The `metadata` is useful for including information about the derivation of `payer_id` such /// that invoice response handling can be stateless. Also serves as payer-provided entropy while diff --git a/lightning/src/offers/refund.rs b/lightning/src/offers/refund.rs index 999d68c44..4628c334f 100644 --- a/lightning/src/offers/refund.rs +++ b/lightning/src/offers/refund.rs @@ -321,13 +321,12 @@ impl Refund { self.contents.payer_note.as_ref().map(|payer_note| PrintableString(payer_note.as_str())) } - /// Creates an [`Invoice`] for the refund with the given required fields and using the + /// Creates an [`InvoiceBuilder`] for the refund with the given required fields and using the /// [`Duration`] since [`std::time::SystemTime::UNIX_EPOCH`] as the creation time. /// /// See [`Refund::respond_with_no_std`] for further details where the aforementioned creation /// time is used for the `created_at` parameter. /// - /// [`Invoice`]: crate::offers::invoice::Invoice /// [`Duration`]: core::time::Duration #[cfg(feature = "std")] pub fn respond_with( @@ -341,7 +340,7 @@ impl Refund { self.respond_with_no_std(payment_paths, payment_hash, signing_pubkey, created_at) } - /// Creates an [`Invoice`] for the refund with the given required fields. + /// Creates an [`InvoiceBuilder`] for the refund with the given required fields. /// /// Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after /// `created_at`, which is used to set [`Invoice::created_at`]. Useful for `no-std` builds where @@ -360,7 +359,6 @@ impl Refund { /// /// Errors if the request contains unknown required features. /// - /// [`Invoice`]: crate::offers::invoice::Invoice /// [`Invoice::created_at`]: crate::offers::invoice::Invoice::created_at pub fn respond_with_no_std( &self, payment_paths: Vec<(BlindedPath, BlindedPayInfo)>, payment_hash: PaymentHash,