Skip to content

Commit

Permalink
f - fix/update pay_for_offer docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jkczyz committed Oct 5, 2023
1 parent a91a64d commit 7ddbd57
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lightning/src/ln/channelmanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7141,18 +7141,22 @@ where
/// Uses [`InvoiceRequestBuilder`] such that the [`InvoiceRequest`] it builds is recognized by
/// the [`ChannelManager`] when handling a [`Bolt12Invoice`] message for the request. The
/// optional parameters are used in the builder, if `Some`:
/// - `quantity` for [`InvoiceRequest::quantity`] which may be set if
/// - `quantity` for [`InvoiceRequest::quantity`] which must be set if
/// [`Offer::expects_quantity`] is `true`.
/// - `amount_msats` if overpaying what is required for the given `quantity` is desired, and
/// - `payer_note` for [`InvoiceRequest::payer_note`].
///
/// The provided `payment_id` is used to ensure that only one invoice is paid for the request.
/// The provided `payment_id` is used to ensure that only one invoice is paid for the request
/// when received. See [Avoiding Duplicate Payments] for other requirements once the payment has
/// been sent. Errors if a duplicate `payment_id` is provided given the caveats in the
/// aforementioned link.
///
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
/// [`InvoiceRequest::quantity`]: crate::offers::invoice_request::InvoiceRequest::quantity
/// [`InvoiceRequest::payer_note`]: crate::offers::invoice_request::InvoiceRequest::payer_note
/// [`InvoiceRequestBuilder`]: crate::offers::invoice_request::InvoiceRequestBuilder
/// [`Bolt12Invoice`]: crate::offers::invoice::Bolt12Invoice
/// [Avoiding Duplicate Payments]: #avoiding-duplicate-payments
pub fn pay_for_offer(
&self, offer: &Offer, quantity: Option<u64>, amount_msats: Option<u64>,
payer_note: Option<String>, payment_id: PaymentId, retry_strategy: Retry,
Expand Down

0 comments on commit 7ddbd57

Please sign in to comment.