pub struct ProvisionalProposal { /* private fields */ }Available on crate feature
v1 only.Expand description
Typestate for a checked proposal which had both the outputs and the inputs modified by the receiver. The receiver may sign and finalize the Payjoin proposal which will be sent to the sender for their signature.
Call Self::finalize_proposal to return a finalized PayjoinProposal.
Implementations§
Source§impl ProvisionalProposal
impl ProvisionalProposal
Sourcepub fn finalize_proposal(
self,
wallet_process_psbt: impl Fn(&Psbt) -> Result<Psbt, ImplementationError>,
) -> Result<PayjoinProposal, Error>
pub fn finalize_proposal( self, wallet_process_psbt: impl Fn(&Psbt) -> Result<Psbt, ImplementationError>, ) -> Result<PayjoinProposal, Error>
Finalizes the Payjoin proposal into a PSBT which the sender will find acceptable before they sign the transaction and broadcast it to the network.
Finalization consists of two steps:
- Remove all sender signatures which were received with the original PSBT as these signatures are now invalid.
- Sign and finalize the resulting PSBT using the passed
wallet_process_psbtsigning function.
Sourcepub fn psbt_to_sign(&self) -> Psbt
pub fn psbt_to_sign(&self) -> Psbt
The Payjoin proposal PSBT that the receiver needs to sign
In some applications the entity that progresses the typestate is different from the entity that has access to the private keys, so the PSBT to sign must be accessible to such implementers.
Trait Implementations§
Source§impl Clone for ProvisionalProposal
impl Clone for ProvisionalProposal
Source§fn clone(&self) -> ProvisionalProposal
fn clone(&self) -> ProvisionalProposal
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 moreSource§impl Debug for ProvisionalProposal
impl Debug for ProvisionalProposal
Source§impl<'de> Deserialize<'de> for ProvisionalProposal
impl<'de> Deserialize<'de> for ProvisionalProposal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ProvisionalProposal
impl PartialEq for ProvisionalProposal
Source§impl Serialize for ProvisionalProposal
impl Serialize for ProvisionalProposal
impl Eq for ProvisionalProposal
impl StructuralPartialEq for ProvisionalProposal
Auto Trait Implementations§
impl Freeze for ProvisionalProposal
impl RefUnwindSafe for ProvisionalProposal
impl Send for ProvisionalProposal
impl Sync for ProvisionalProposal
impl Unpin for ProvisionalProposal
impl UnsafeUnpin for ProvisionalProposal
impl UnwindSafe for ProvisionalProposal
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