Update docs regarding payment path privacy
authorJeffrey Czyz <jkczyz@gmail.com>
Wed, 25 Jan 2023 05:43:14 +0000 (23:43 -0600)
committerJeffrey Czyz <jkczyz@gmail.com>
Mon, 30 Jan 2023 21:44:39 +0000 (15:44 -0600)
lightning/src/offers/invoice.rs
lightning/src/offers/invoice_request.rs
lightning/src/offers/refund.rs

index 99a97368d92408f735db7509012bb44adc01a680..f423677fbc9dae50568a0d7b3569d0e261db16ab 100644 (file)
@@ -338,8 +338,10 @@ struct InvoiceFields {
 
 impl Invoice {
        /// Paths to the recipient originating from publicly reachable nodes, including information
-       /// needed for routing payments across them. Blinded paths provide recipient privacy by
-       /// obfuscating its node id.
+       /// needed for routing payments across them.
+       ///
+       /// Blinded paths provide recipient privacy by obfuscating its node id. Note, however, that this
+       /// privacy is lost if a public node id is used for [`Invoice::signing_pubkey`].
        pub fn payment_paths(&self) -> &[(BlindedPath, BlindedPayInfo)] {
                &self.contents.fields().payment_paths[..]
        }
index e34d9d9cff14c9d975da1d4f08d76300725c230e..5b15704ca5127f413a0a26f3958ada9899f6c3fc 100644 (file)
@@ -333,7 +333,9 @@ impl InvoiceRequest {
        /// for the invoice.
        ///
        /// The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It
-       /// must contain one or more elements.
+       /// must contain one or more elements ordered from most-preferred to least-preferred, if there's
+       /// a preference. Note, however, that any privacy is lost if a public node id was used for
+       /// [`Offer::signing_pubkey`].
        ///
        /// Errors if the request contains unknown required features.
        ///
index e022f12755d83e6e92739e86c9f8257ee56ad9e8..fff33873954a6f92ab55ad2de8d326447dafd0ac 100644 (file)
@@ -331,7 +331,9 @@ impl Refund {
        /// offer, which does have a `signing_pubkey`.
        ///
        /// The `payment_paths` parameter is useful for maintaining the payment recipient's privacy. It
-       /// must contain one or more elements.
+       /// must contain one or more elements ordered from most-preferred to least-preferred, if there's
+       /// a preference. Note, however, that any privacy is lost if a public node id is used for
+       /// `signing_pubkey`.
        ///
        /// Errors if the request contains unknown required features.
        ///