@@ -13,6 +13,12 @@ pub enum Error {
13
13
ConnectionFailed ,
14
14
/// Invoice creation failed.
15
15
InvoiceCreationFailed ,
16
+ /// Invoice request creation failed.
17
+ InvoiceRequestCreationFailed ,
18
+ /// Offer creation failed.
19
+ OfferCreationFailed ,
20
+ /// Refund creation failed.
21
+ RefundCreationFailed ,
16
22
/// Sending a payment has failed.
17
23
PaymentSendingFailed ,
18
24
/// Sending a payment probe has failed.
@@ -47,6 +53,8 @@ pub enum Error {
47
53
InvalidPublicKey ,
48
54
/// The given secret key is invalid.
49
55
InvalidSecretKey ,
56
+ /// The given offer id is invalid.
57
+ InvalidOfferId ,
50
58
/// The given payment id is invalid.
51
59
InvalidPaymentId ,
52
60
/// The given payment hash is invalid.
@@ -59,12 +67,18 @@ pub enum Error {
59
67
InvalidAmount ,
60
68
/// The given invoice is invalid.
61
69
InvalidInvoice ,
70
+ /// The given offer is invalid.
71
+ InvalidOffer ,
72
+ /// The given refund is invalid.
73
+ InvalidRefund ,
62
74
/// The given channel ID is invalid.
63
75
InvalidChannelId ,
64
76
/// The given network is invalid.
65
77
InvalidNetwork ,
66
78
/// A payment with the given hash has already been initiated.
67
79
DuplicatePayment ,
80
+ /// The provided offer was denonminated in an unsupported currency.
81
+ UnsupportedCurrency ,
68
82
/// The available funds are insufficient to complete the given operation.
69
83
InsufficientFunds ,
70
84
/// The given operation failed due to the required liquidity source being unavailable.
@@ -83,6 +97,9 @@ impl fmt::Display for Error {
83
97
} ,
84
98
Self :: ConnectionFailed => write ! ( f, "Network connection closed." ) ,
85
99
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." ) ,
86
103
Self :: PaymentSendingFailed => write ! ( f, "Failed to send the given payment." ) ,
87
104
Self :: ProbeSendingFailed => write ! ( f, "Failed to send the given payment probe." ) ,
88
105
Self :: ChannelCreationFailed => write ! ( f, "Failed to create channel." ) ,
@@ -102,12 +119,15 @@ impl fmt::Display for Error {
102
119
Self :: InvalidSocketAddress => write ! ( f, "The given network address is invalid." ) ,
103
120
Self :: InvalidPublicKey => write ! ( f, "The given public key is invalid." ) ,
104
121
Self :: InvalidSecretKey => write ! ( f, "The given secret key is invalid." ) ,
122
+ Self :: InvalidOfferId => write ! ( f, "The given offer id is invalid." ) ,
105
123
Self :: InvalidPaymentId => write ! ( f, "The given payment id is invalid." ) ,
106
124
Self :: InvalidPaymentHash => write ! ( f, "The given payment hash is invalid." ) ,
107
125
Self :: InvalidPaymentPreimage => write ! ( f, "The given payment preimage is invalid." ) ,
108
126
Self :: InvalidPaymentSecret => write ! ( f, "The given payment secret is invalid." ) ,
109
127
Self :: InvalidAmount => write ! ( f, "The given amount is invalid." ) ,
110
128
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." ) ,
111
131
Self :: InvalidChannelId => write ! ( f, "The given channel ID is invalid." ) ,
112
132
Self :: InvalidNetwork => write ! ( f, "The given network is invalid." ) ,
113
133
Self :: DuplicatePayment => {
@@ -116,6 +136,9 @@ impl fmt::Display for Error {
116
136
Self :: InsufficientFunds => {
117
137
write ! ( f, "The available funds are insufficient to complete the given operation." )
118
138
} ,
139
+ Self :: UnsupportedCurrency => {
140
+ write ! ( f, "The provided offer was denonminated in an unsupported currency." )
141
+ } ,
119
142
Self :: LiquiditySourceUnavailable => {
120
143
write ! ( f, "The given operation failed due to the required liquidity source being unavailable." )
121
144
} ,
0 commit comments