Skip to content

Commit f8b378b

Browse files
committed
Fix builder docs in offers module
1 parent 92c9763 commit f8b378b

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

lightning/src/offers/invoice_request.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,13 +456,12 @@ impl InvoiceRequest {
456456
self.signature
457457
}
458458

459-
/// Creates an [`Invoice`] for the request with the given required fields and using the
459+
/// Creates an [`InvoiceBuilder`] for the request with the given required fields and using the
460460
/// [`Duration`] since [`std::time::SystemTime::UNIX_EPOCH`] as the creation time.
461461
///
462462
/// See [`InvoiceRequest::respond_with_no_std`] for further details where the aforementioned
463463
/// creation time is used for the `created_at` parameter.
464464
///
465-
/// [`Invoice`]: crate::offers::invoice::Invoice
466465
/// [`Duration`]: core::time::Duration
467466
#[cfg(feature = "std")]
468467
pub fn respond_with(
@@ -475,7 +474,7 @@ impl InvoiceRequest {
475474
self.respond_with_no_std(payment_paths, payment_hash, created_at)
476475
}
477476

478-
/// Creates an [`Invoice`] for the request with the given required fields.
477+
/// Creates an [`InvoiceBuilder`] for the request with the given required fields.
479478
///
480479
/// Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after
481480
/// `created_at`, which is used to set [`Invoice::created_at`]. Useful for `no-std` builds where
@@ -491,7 +490,6 @@ impl InvoiceRequest {
491490
///
492491
/// Errors if the request contains unknown required features.
493492
///
494-
/// [`Invoice`]: crate::offers::invoice::Invoice
495493
/// [`Invoice::created_at`]: crate::offers::invoice::Invoice::created_at
496494
pub fn respond_with_no_std(
497495
&self, payment_paths: Vec<(BlindedPath, BlindedPayInfo)>, payment_hash: PaymentHash,

lightning/src/offers/offer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,8 @@ impl Offer {
482482
Ok(InvoiceRequestBuilder::deriving_metadata(self, payer_id, expanded_key, entropy_source))
483483
}
484484

485-
/// Creates an [`InvoiceRequest`] for the offer with the given `metadata` and `payer_id`, which
486-
/// will be reflected in the `Invoice` response.
485+
/// Creates an [`InvoiceRequestBuilder`] for the offer with the given `metadata` and `payer_id`,
486+
/// which will be reflected in the `Invoice` response.
487487
///
488488
/// The `metadata` is useful for including information about the derivation of `payer_id` such
489489
/// that invoice response handling can be stateless. Also serves as payer-provided entropy while

lightning/src/offers/refund.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,12 @@ impl Refund {
321321
self.contents.payer_note.as_ref().map(|payer_note| PrintableString(payer_note.as_str()))
322322
}
323323

324-
/// Creates an [`Invoice`] for the refund with the given required fields and using the
324+
/// Creates an [`InvoiceBuilder`] for the refund with the given required fields and using the
325325
/// [`Duration`] since [`std::time::SystemTime::UNIX_EPOCH`] as the creation time.
326326
///
327327
/// See [`Refund::respond_with_no_std`] for further details where the aforementioned creation
328328
/// time is used for the `created_at` parameter.
329329
///
330-
/// [`Invoice`]: crate::offers::invoice::Invoice
331330
/// [`Duration`]: core::time::Duration
332331
#[cfg(feature = "std")]
333332
pub fn respond_with(
@@ -341,7 +340,7 @@ impl Refund {
341340
self.respond_with_no_std(payment_paths, payment_hash, signing_pubkey, created_at)
342341
}
343342

344-
/// Creates an [`Invoice`] for the refund with the given required fields.
343+
/// Creates an [`InvoiceBuilder`] for the refund with the given required fields.
345344
///
346345
/// Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after
347346
/// `created_at`, which is used to set [`Invoice::created_at`]. Useful for `no-std` builds where
@@ -360,7 +359,6 @@ impl Refund {
360359
///
361360
/// Errors if the request contains unknown required features.
362361
///
363-
/// [`Invoice`]: crate::offers::invoice::Invoice
364362
/// [`Invoice::created_at`]: crate::offers::invoice::Invoice::created_at
365363
pub fn respond_with_no_std(
366364
&self, payment_paths: Vec<(BlindedPath, BlindedPayInfo)>, payment_hash: PaymentHash,

0 commit comments

Comments
 (0)