Expand description
Send a Payjoin
This module contains types and methods used to implement sending via BIP 78 Payjoin.
Usage is pretty simple:
- Parse BIP21 as
payjoin::Uri
- Construct URI request parameters, a finalized “Original PSBT” paying .amount to .address
- (optional) Spawn a thread or async task that will broadcast the original PSBT fallback after delay (e.g. 1 minute) unless canceled
- Construct the request using
RequestBuilder
with the PSBT and payjoin uri - Send the request and receive response
- Process the response with
Context::process_response()
- Sign and finalize the Payjoin Proposal PSBT
- Broadcast the Payjoin Transaction (and cancel the optional fallback broadcast)
This crate is runtime-agnostic. Data persistence, chain interactions, and networking may be
provided by custom implementations or copy the reference
payjoin-cli
for bitcoind,
nolooking
for LND, or
bitmask-core
BDK integration. Bring your own
wallet and http client.
Structs§
- Data required for validation of response.
- Error returned when request could not be created.
- Error that may occur when the response from receiver is malformed.
Enums§
- Represent an error returned by Payjoin receiver.