From 388a1549ef81d018f63d25c5d35b5774202ad66d Mon Sep 17 00:00:00 2001 From: DanGould Date: Tue, 3 Dec 2024 17:10:24 -0500 Subject: [PATCH] Fix cargo doc warnings --- payjoin/src/receive/mod.rs | 2 +- payjoin/src/receive/v2/mod.rs | 4 ++-- payjoin/src/send/mod.rs | 15 ++++++++------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/payjoin/src/receive/mod.rs b/payjoin/src/receive/mod.rs index 4c98fb55..22b17e4a 100644 --- a/payjoin/src/receive/mod.rs +++ b/payjoin/src/receive/mod.rs @@ -518,7 +518,7 @@ impl WantsInputs { /// UIH1 and UIH2 according to the BlockSci practice /// BlockSci UIH1 and UIH2: /// if min(in) > min(out) then UIH1 else UIH2 - /// https://eprint.iacr.org/2022/589.pdf + /// fn avoid_uih( &self, candidate_inputs: impl IntoIterator, diff --git a/payjoin/src/receive/v2/mod.rs b/payjoin/src/receive/v2/mod.rs index b2d619f9..2881636d 100644 --- a/payjoin/src/receive/v2/mod.rs +++ b/payjoin/src/receive/v2/mod.rs @@ -216,7 +216,7 @@ impl Receiver { /// The sender's original PSBT and optional parameters /// /// This type is used to process the request. It is returned by -/// [`UncheckedProposal::from_request()`](super::::UncheckedProposal::from_request()). +/// [`Receiver::process_res()`]. /// /// If you are implementing an interactive payment processor, you should get extract the original /// transaction with extract_tx_to_schedule_broadcast() and schedule, followed by checking @@ -393,7 +393,7 @@ impl WantsInputs { /// UIH1 and UIH2 according to the BlockSci practice /// BlockSci UIH1 and UIH2: /// if min(in) > min(out) then UIH1 else UIH2 - /// https://eprint.iacr.org/2022/589.pdf + /// pub fn try_preserving_privacy( &self, candidate_inputs: impl IntoIterator, diff --git a/payjoin/src/send/mod.rs b/payjoin/src/send/mod.rs index 2292a00a..9fe2742b 100644 --- a/payjoin/src/send/mod.rs +++ b/payjoin/src/send/mod.rs @@ -10,7 +10,7 @@ //! 3. (optional) Spawn a thread or async task that will broadcast the original PSBT fallback after //! delay (e.g. 1 minute) unless canceled //! 4. Construct the [`Sender`] using [`SenderBuilder`] with the PSBT and payjoin uri -//! 5. Send the request(s) and receive response(s) by following on the extracted [`Context`] +//! 5. Send the request(s) and receive response(s) by following on the extracted Context //! 6. Sign and finalize the Payjoin Proposal PSBT //! 7. Broadcast the Payjoin Transaction (and cancel the optional fallback broadcast) //! @@ -70,8 +70,8 @@ impl<'a> SenderBuilder<'a> { /// Prepare an HTTP request and request context to process the response /// /// An HTTP client will own the Request data while Context sticks around so - /// a `(Request, Context)` tuple is returned from `RequestBuilder::build()` - /// to keep them separated. + /// a `(Request, Context)` tuple is returned from [`SenderBuilder::build_recommended()`] + /// (or other `build` methods) to keep them separated. pub fn from_psbt_and_uri(psbt: Psbt, uri: PjUri<'a>) -> Result { Ok(Self { psbt, @@ -339,6 +339,10 @@ impl Sender { pub fn endpoint(&self) -> &Url { &self.endpoint } } +/// Data required to validate the response. +/// +/// This type is used to process the response. Get it from [`Sender`]'s build methods. +/// Then call [`Self::process_response`] on it to continue BIP78 flow. #[derive(Debug, Clone)] pub struct V1Context { psbt_context: PsbtContext, @@ -451,10 +455,7 @@ impl V2GetContext { } } -/// Data required for validation of response. -/// -/// This type is used to process the response. Get it from [`RequestBuilder`]'s build methods. -/// Then you only need to call [`Self::process_response`] on it to continue BIP78 flow. +/// Data required to validate the response against the original PSBT. #[derive(Debug, Clone)] pub struct PsbtContext { original_psbt: Psbt,