Skip to content

Commit b78abe4

Browse files
committed
Fix builder docs in offers module
1 parent 54b4624 commit b78abe4

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
@@ -459,13 +459,12 @@ impl InvoiceRequest {
459459
self.signature
460460
}
461461

462-
/// Creates an [`Invoice`] for the request with the given required fields and using the
462+
/// Creates an [`InvoiceBuilder`] for the request with the given required fields and using the
463463
/// [`Duration`] since [`std::time::SystemTime::UNIX_EPOCH`] as the creation time.
464464
///
465465
/// See [`InvoiceRequest::respond_with_no_std`] for further details where the aforementioned
466466
/// creation time is used for the `created_at` parameter.
467467
///
468-
/// [`Invoice`]: crate::offers::invoice::Invoice
469468
/// [`Duration`]: core::time::Duration
470469
#[cfg(feature = "std")]
471470
pub fn respond_with(
@@ -478,7 +477,7 @@ impl InvoiceRequest {
478477
self.respond_with_no_std(payment_paths, payment_hash, created_at)
479478
}
480479

481-
/// Creates an [`Invoice`] for the request with the given required fields.
480+
/// Creates an [`InvoiceBuilder`] for the request with the given required fields.
482481
///
483482
/// Unless [`InvoiceBuilder::relative_expiry`] is set, the invoice will expire two hours after
484483
/// `created_at`, which is used to set [`Invoice::created_at`]. Useful for `no-std` builds where
@@ -494,7 +493,6 @@ impl InvoiceRequest {
494493
///
495494
/// Errors if the request contains unknown required features.
496495
///
497-
/// [`Invoice`]: crate::offers::invoice::Invoice
498496
/// [`Invoice::created_at`]: crate::offers::invoice::Invoice::created_at
499497
pub fn respond_with_no_std(
500498
&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
@@ -484,8 +484,8 @@ impl Offer {
484484
Ok(InvoiceRequestBuilder::deriving_metadata(self, payer_id, expanded_key, entropy_source))
485485
}
486486

487-
/// Creates an [`InvoiceRequest`] for the offer with the given `metadata` and `payer_id`, which
488-
/// will be reflected in the `Invoice` response.
487+
/// Creates an [`InvoiceRequestBuilder`] for the offer with the given `metadata` and `payer_id`,
488+
/// which will be reflected in the `Invoice` response.
489489
///
490490
/// The `metadata` is useful for including information about the derivation of `payer_id` such
491491
/// 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)