pub struct PayJoinReceiver { /* private fields */ }Expand description
PayJoin receiver - creates PayJoin proposals.
Implementations§
Source§impl PayJoinReceiver
impl PayJoinReceiver
Sourcepub fn new(output_script: Vec<u8>, expected_amount: u64) -> Self
pub fn new(output_script: Vec<u8>, expected_amount: u64) -> Self
Create a new PayJoin receiver.
Sourcepub fn add_utxos(&mut self, utxos: impl IntoIterator<Item = InputRef>)
pub fn add_utxos(&mut self, utxos: impl IntoIterator<Item = InputRef>)
Add multiple UTXOs.
Sourcepub fn create_request(&self, original_psbt: &str) -> Result<PayJoinRequest>
pub fn create_request(&self, original_psbt: &str) -> Result<PayJoinRequest>
Create PayJoin request from original PSBT.
The receiver selects inputs to contribute and modifies the transaction.
Sourcepub fn verify_proposal(&self, request: &PayJoinRequest) -> Result<()>
pub fn verify_proposal(&self, request: &PayJoinRequest) -> Result<()>
Verify a PayJoin proposal is valid.
Auto Trait Implementations§
impl Freeze for PayJoinReceiver
impl RefUnwindSafe for PayJoinReceiver
impl Send for PayJoinReceiver
impl Sync for PayJoinReceiver
impl Unpin for PayJoinReceiver
impl UnwindSafe for PayJoinReceiver
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