@@ -13,6 +13,12 @@ pub enum Error {
1313 ConnectionFailed ,
1414 /// Invoice creation failed.
1515 InvoiceCreationFailed ,
16+ /// Invoice request creation failed.
17+ InvoiceRequestCreationFailed ,
18+ /// Offer creation failed.
19+ OfferCreationFailed ,
20+ /// Refund creation failed.
21+ RefundCreationFailed ,
1622 /// Sending a payment has failed.
1723 PaymentSendingFailed ,
1824 /// Sending a payment probe has failed.
@@ -47,6 +53,8 @@ pub enum Error {
4753 InvalidPublicKey ,
4854 /// The given secret key is invalid.
4955 InvalidSecretKey ,
56+ /// The given offer id is invalid.
57+ InvalidOfferId ,
5058 /// The given payment id is invalid.
5159 InvalidPaymentId ,
5260 /// The given payment hash is invalid.
@@ -59,12 +67,18 @@ pub enum Error {
5967 InvalidAmount ,
6068 /// The given invoice is invalid.
6169 InvalidInvoice ,
70+ /// The given offer is invalid.
71+ InvalidOffer ,
72+ /// The given refund is invalid.
73+ InvalidRefund ,
6274 /// The given channel ID is invalid.
6375 InvalidChannelId ,
6476 /// The given network is invalid.
6577 InvalidNetwork ,
6678 /// A payment with the given hash has already been initiated.
6779 DuplicatePayment ,
80+ /// The provided offer was denonminated in an unsupported currency.
81+ UnsupportedCurrency ,
6882 /// The available funds are insufficient to complete the given operation.
6983 InsufficientFunds ,
7084 /// The given operation failed due to the required liquidity source being unavailable.
@@ -83,6 +97,9 @@ impl fmt::Display for Error {
8397 } ,
8498 Self :: ConnectionFailed => write ! ( f, "Network connection closed." ) ,
8599 Self :: InvoiceCreationFailed => write ! ( f, "Failed to create invoice." ) ,
100+ Self :: InvoiceRequestCreationFailed => write ! ( f, "Failed to create invoice request." ) ,
101+ Self :: OfferCreationFailed => write ! ( f, "Failed to create offer." ) ,
102+ Self :: RefundCreationFailed => write ! ( f, "Failed to create refund." ) ,
86103 Self :: PaymentSendingFailed => write ! ( f, "Failed to send the given payment." ) ,
87104 Self :: ProbeSendingFailed => write ! ( f, "Failed to send the given payment probe." ) ,
88105 Self :: ChannelCreationFailed => write ! ( f, "Failed to create channel." ) ,
@@ -102,12 +119,15 @@ impl fmt::Display for Error {
102119 Self :: InvalidSocketAddress => write ! ( f, "The given network address is invalid." ) ,
103120 Self :: InvalidPublicKey => write ! ( f, "The given public key is invalid." ) ,
104121 Self :: InvalidSecretKey => write ! ( f, "The given secret key is invalid." ) ,
122+ Self :: InvalidOfferId => write ! ( f, "The given offer id is invalid." ) ,
105123 Self :: InvalidPaymentId => write ! ( f, "The given payment id is invalid." ) ,
106124 Self :: InvalidPaymentHash => write ! ( f, "The given payment hash is invalid." ) ,
107125 Self :: InvalidPaymentPreimage => write ! ( f, "The given payment preimage is invalid." ) ,
108126 Self :: InvalidPaymentSecret => write ! ( f, "The given payment secret is invalid." ) ,
109127 Self :: InvalidAmount => write ! ( f, "The given amount is invalid." ) ,
110128 Self :: InvalidInvoice => write ! ( f, "The given invoice is invalid." ) ,
129+ Self :: InvalidOffer => write ! ( f, "The given offer is invalid." ) ,
130+ Self :: InvalidRefund => write ! ( f, "The given refund is invalid." ) ,
111131 Self :: InvalidChannelId => write ! ( f, "The given channel ID is invalid." ) ,
112132 Self :: InvalidNetwork => write ! ( f, "The given network is invalid." ) ,
113133 Self :: DuplicatePayment => {
@@ -116,6 +136,9 @@ impl fmt::Display for Error {
116136 Self :: InsufficientFunds => {
117137 write ! ( f, "The available funds are insufficient to complete the given operation." )
118138 } ,
139+ Self :: UnsupportedCurrency => {
140+ write ! ( f, "The provided offer was denonminated in an unsupported currency." )
141+ } ,
119142 Self :: LiquiditySourceUnavailable => {
120143 write ! ( f, "The given operation failed due to the required liquidity source being unavailable." )
121144 } ,
0 commit comments