You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implements the payjoin receiver part as describe in BIP77.
This would allow the on chain wallet linked to LDK node to receive payjoin
transactions.
Receiving a payjoin transaction requires first to enroll with the
configured Payjoin directory and listening to our enrolled subdirectory
for upcoming request. When a request received, we validate it as
specified in BIP78, prepare our Payjoin proposal and send it back to the
payjoin sender via the subdirectory.
Copy file name to clipboardExpand all lines: src/error.rs
+15
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,12 @@ pub enum Error {
97
97
PayjoinResponseProcessingFailed,
98
98
/// Payjoin request timed out.
99
99
PayjoinRequestTimeout,
100
+
/// Failed to access payjoin receiver object.
101
+
PayjoinReceiverUnavailable,
102
+
/// Failed to enroll payjoin receiver.
103
+
PayjoinReceiverEnrollementFailed,
104
+
/// Failed to validate an incoming payjoin request.
105
+
PayjoinReceiverRequestValidationFailed,
100
106
}
101
107
102
108
impl fmt::DisplayforError{
@@ -175,6 +181,15 @@ impl fmt::Display for Error {
175
181
Self::PayjoinRequestTimeout => {
176
182
write!(f,"Payjoin receiver did not respond to our request within the timeout period. Notice they can still broadcast the original PSBT we shared with them")
177
183
},
184
+
Self::PayjoinReceiverUnavailable => {
185
+
write!(f,"Failed to access payjoin receiver object. Make sure you have enabled Payjoin receiving support.")
186
+
},
187
+
Self::PayjoinReceiverRequestValidationFailed => {
188
+
write!(f,"Failed to validate an incoming payjoin request. Payjoin sender request didnt pass the payjoin validation steps.")
189
+
},
190
+
Self::PayjoinReceiverEnrollementFailed => {
191
+
write!(f,"Failed to enroll payjoin receiver. Make sure the configured Payjoin directory & Payjoin relay are available.")
0 commit comments