pub struct MaybeInputsSeen { /* private fields */ }Available on crate feature
v1 only.Expand description
Typestate to check that the original PSBT has no inputs that the receiver has seen before.
Call Self::check_no_inputs_seen_before to proceed.
Implementations§
Source§impl MaybeInputsSeen
impl MaybeInputsSeen
Sourcepub fn check_no_inputs_seen_before(
self,
is_known: &mut impl FnMut(&OutPoint) -> Result<bool, ImplementationError>,
) -> Result<OutputsUnknown, Error>
pub fn check_no_inputs_seen_before( self, is_known: &mut impl FnMut(&OutPoint) -> Result<bool, ImplementationError>, ) -> Result<OutputsUnknown, Error>
Check that the receiver has never seen the inputs in the original proposal before.
This check prevents the following attacks:
- Probing attacks, where the sender can use the exact same proposal (or with minimal change) to have the receiver reveal their UTXO set by contributing to all proposals with different inputs and sending them back to the receiver.
- Re-entrant payjoin, where the sender uses the payjoin PSBT of a previous payjoin as the original proposal PSBT of the current, new payjoin.
Trait Implementations§
Source§impl Clone for MaybeInputsSeen
impl Clone for MaybeInputsSeen
Source§fn clone(&self) -> MaybeInputsSeen
fn clone(&self) -> MaybeInputsSeen
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MaybeInputsSeen
impl RefUnwindSafe for MaybeInputsSeen
impl Send for MaybeInputsSeen
impl Sync for MaybeInputsSeen
impl Unpin for MaybeInputsSeen
impl UnsafeUnpin for MaybeInputsSeen
impl UnwindSafe for MaybeInputsSeen
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more