@@ -13,6 +13,10 @@ pub enum Error {
1313 ConnectionFailed ,
1414 /// Invoice creation failed.
1515 InvoiceCreationFailed ,
16+ /// Invoice request creation failed.
17+ InvoiceRequestCreationFailed ,
18+ /// Offer creation failed.
19+ OfferCreationFailed ,
1620 /// Sending a payment has failed.
1721 PaymentSendingFailed ,
1822 /// Sending a payment probe has failed.
@@ -61,12 +65,16 @@ pub enum Error {
6165 InvalidAmount ,
6266 /// The given invoice is invalid.
6367 InvalidInvoice ,
68+ /// The given offer is invalid.
69+ InvalidOffer ,
6470 /// The given channel ID is invalid.
6571 InvalidChannelId ,
6672 /// The given network is invalid.
6773 InvalidNetwork ,
6874 /// A payment with the given hash has already been initiated.
6975 DuplicatePayment ,
76+ /// The provided offer was denonminated in an unsupported currency.
77+ UnsupportedCurrency ,
7078 /// The available funds are insufficient to complete the given operation.
7179 InsufficientFunds ,
7280 /// The given operation failed due to the required liquidity source being unavailable.
@@ -85,6 +93,8 @@ impl fmt::Display for Error {
8593 } ,
8694 Self :: ConnectionFailed => write ! ( f, "Network connection closed." ) ,
8795 Self :: InvoiceCreationFailed => write ! ( f, "Failed to create invoice." ) ,
96+ Self :: InvoiceRequestCreationFailed => write ! ( f, "Failed to create invoice request." ) ,
97+ Self :: OfferCreationFailed => write ! ( f, "Failed to create offer." ) ,
8898 Self :: PaymentSendingFailed => write ! ( f, "Failed to send the given payment." ) ,
8999 Self :: ProbeSendingFailed => write ! ( f, "Failed to send the given payment probe." ) ,
90100 Self :: ChannelCreationFailed => write ! ( f, "Failed to create channel." ) ,
@@ -111,6 +121,7 @@ impl fmt::Display for Error {
111121 Self :: InvalidPaymentSecret => write ! ( f, "The given payment secret is invalid." ) ,
112122 Self :: InvalidAmount => write ! ( f, "The given amount is invalid." ) ,
113123 Self :: InvalidInvoice => write ! ( f, "The given invoice is invalid." ) ,
124+ Self :: InvalidOffer => write ! ( f, "The given offer is invalid." ) ,
114125 Self :: InvalidChannelId => write ! ( f, "The given channel ID is invalid." ) ,
115126 Self :: InvalidNetwork => write ! ( f, "The given network is invalid." ) ,
116127 Self :: DuplicatePayment => {
@@ -119,6 +130,9 @@ impl fmt::Display for Error {
119130 Self :: InsufficientFunds => {
120131 write ! ( f, "The available funds are insufficient to complete the given operation." )
121132 } ,
133+ Self :: UnsupportedCurrency => {
134+ write ! ( f, "The provided offer was denonminated in an unsupported currency." )
135+ } ,
122136 Self :: LiquiditySourceUnavailable => {
123137 write ! ( f, "The given operation failed due to the required liquidity source being unavailable." )
124138 } ,
0 commit comments