|
10 | 10 | //! Contains bLIP-52 / LSPS2 event types
|
11 | 11 |
|
12 | 12 | use super::msgs::LSPS2OpeningFeeParams;
|
13 |
| -use crate::lsps0::ser::LSPSRequestId; |
| 13 | +use crate::lsps0::ser::{LSPSRequestId, LSPSResponseError}; |
14 | 14 | use alloc::string::String;
|
15 | 15 | use alloc::vec::Vec;
|
16 | 16 |
|
@@ -61,6 +61,40 @@ pub enum LSPS2ClientEvent {
|
61 | 61 | /// The initial payment size you specified.
|
62 | 62 | payment_size_msat: Option<u64>,
|
63 | 63 | },
|
| 64 | + /// A request previously issued via [`LSPS2ClientHandler::request_opening_params`] |
| 65 | + /// failed as the LSP returned an error response. |
| 66 | + /// |
| 67 | + /// [`LSPS2ClientHandler::request_opening_params`]: crate::lsps2::client::LSPS2ClientHandler::request_opening_params |
| 68 | + GetInfoFailed { |
| 69 | + /// The identifier of the issued LSPS2 `get_info` request, as returned by |
| 70 | + /// [`LSPS2ClientHandler::request_opening_params`]. |
| 71 | + /// |
| 72 | + /// This can be used to track which request this event corresponds to. |
| 73 | + /// |
| 74 | + /// [`LSPS2ClientHandler::request_opening_params`]: crate::lsps2::client::LSPS2ClientHandler::request_opening_params |
| 75 | + request_id: LSPSRequestId, |
| 76 | + /// The node id of the LSP. |
| 77 | + counterparty_node_id: PublicKey, |
| 78 | + /// The error that was returned. |
| 79 | + error: LSPSResponseError, |
| 80 | + }, |
| 81 | + /// A request previously issued via [`LSPS2ClientHandler::select_opening_params`] |
| 82 | + /// failed as the LSP returned an error response. |
| 83 | + /// |
| 84 | + /// [`LSPS2ClientHandler::select_opening_params`]: crate::lsps2::client::LSPS2ClientHandler::select_opening_params |
| 85 | + BuyRequestFailed { |
| 86 | + /// The identifier of the issued LSPS2 `buy` request, as returned by |
| 87 | + /// [`LSPS2ClientHandler::select_opening_params`]. |
| 88 | + /// |
| 89 | + /// This can be used to track which request this event corresponds to. |
| 90 | + /// |
| 91 | + /// [`LSPS2ClientHandler::select_opening_params`]: crate::lsps2::client::LSPS2ClientHandler::select_opening_params |
| 92 | + request_id: LSPSRequestId, |
| 93 | + /// The node id of the LSP. |
| 94 | + counterparty_node_id: PublicKey, |
| 95 | + /// The error that was returned. |
| 96 | + error: LSPSResponseError, |
| 97 | + }, |
64 | 98 | }
|
65 | 99 |
|
66 | 100 | /// An event which an bLIP-52 / LSPS2 server should take some action in response to.
|
|
0 commit comments