Skip to content

Commit 22ea505

Browse files
committed
Update docs regarding payment path privacy
1 parent 2d44dbe commit 22ea505

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

lightning/src/offers/invoice.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,10 @@ struct InvoiceFields {
338338

339339
impl Invoice {
340340
/// Paths to the recipient originating from publicly reachable nodes, including information
341-
/// needed for routing payments across them. Blinded paths provide recipient privacy by
342-
/// obfuscating its node id.
341+
/// needed for routing payments across them.
342+
///
343+
/// Blinded paths provide recipient privacy by obfuscating its node id. Note, however, that this
344+
/// privacy is lost if a public node id is used for [`Invoice::signing_pubkey`].
343345
pub fn payment_paths(&self) -> &[(BlindedPath, BlindedPayInfo)] {
344346
&self.contents.fields().payment_paths[..]
345347
}

lightning/src/offers/invoice_request.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,9 @@ impl InvoiceRequest {
333333
/// for the invoice.
334334
///
335335
/// The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It
336-
/// must contain one or more elements.
336+
/// must contain one or more elements ordered from most-preferred to least-preferred, if there's
337+
/// a preference. Note, however, that any privacy is lost if a public node id was used for
338+
/// [`Offer::signing_pubkey`].
337339
///
338340
/// Errors if the request contains unknown required features.
339341
///

lightning/src/offers/refund.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@ impl Refund {
331331
/// offer, which does have a `signing_pubkey`.
332332
///
333333
/// The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It
334-
/// must contain one or more elements.
334+
/// must contain one or more elements ordered from most-preferred to least-preferred, if there's
335+
/// a preference. Note, however, that any privacy is lost if a public node id is used for
336+
/// `signing_pubkey`.
335337
///
336338
/// Errors if the request contains unknown required features.
337339
///

0 commit comments

Comments
 (0)