pub enum BitcoinError {
Show 32 variants
Rpc(Error),
AddressGeneration(String),
TransactionNotFound(String),
InsufficientConfirmations {
current: u32,
required: u32,
},
InvalidAddress(String),
NetworkMismatch {
address_network: Network,
configured_network: Network,
},
ConnectionFailed(String),
ConnectionTimeout {
timeout_secs: u64,
},
ConnectionPoolExhausted,
Wallet(String),
PaymentMismatch {
expected: u64,
received: u64,
},
Underpayment {
expected: u64,
received: u64,
shortfall: u64,
},
Overpayment {
expected: u64,
received: u64,
excess: u64,
},
TransactionReplaced {
original_txid: String,
replacement_txid: String,
},
FeeEstimationFailed {
target_blocks: u32,
reason: String,
},
UtxoNotFound {
txid: String,
vout: u32,
},
BroadcastFailed(String),
Reorganization {
height: u64,
expected_hash: String,
actual_hash: String,
},
OrderNotFound {
address: String,
},
PaymentExpired {
created_at: String,
expiry_hours: u32,
},
InvalidTransaction(String),
MempoolRejection {
reason: String,
},
InvalidXpub(String),
DerivationFailed(String),
AddressNotInWallet(String),
LimitExceeded(String),
InsufficientFunds(String),
RpcError(String),
Validation(String),
Psbt(String),
NotFound(String),
InvalidInput(String),
}Variants§
Rpc(Error)
Bitcoin Core RPC communication error
AddressGeneration(String)
Address generation failed
TransactionNotFound(String)
Transaction not found in the blockchain
InsufficientConfirmations
Transaction does not have enough confirmations
InvalidAddress(String)
Invalid Bitcoin address format
NetworkMismatch
Network mismatch between address and configured network
ConnectionFailed(String)
Connection to Bitcoin Core failed
ConnectionTimeout
Connection timeout
ConnectionPoolExhausted
Connection pool exhausted
Wallet(String)
Wallet operation failed
PaymentMismatch
Payment amount mismatch
Underpayment
Underpayment detected
Overpayment
Overpayment detected
TransactionReplaced
Transaction was replaced (RBF)
FeeEstimationFailed
Fee estimation failed
UtxoNotFound
UTXO not found
BroadcastFailed(String)
Transaction broadcast failed
Reorganization
Block reorganization detected
OrderNotFound
Order not found for payment
PaymentExpired
Payment expired
InvalidTransaction(String)
Invalid transaction format
MempoolRejection
Mempool rejection
InvalidXpub(String)
Invalid extended public key (xpub/zpub)
DerivationFailed(String)
HD wallet derivation failed
AddressNotInWallet(String)
Address not found in wallet
LimitExceeded(String)
Transaction limit exceeded
InsufficientFunds(String)
Insufficient funds
RpcError(String)
Generic RPC error (for string-based errors)
Validation(String)
Validation error
Psbt(String)
PSBT error
NotFound(String)
Resource not found
InvalidInput(String)
Invalid input
Implementations§
Source§impl BitcoinError
impl BitcoinError
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if this error is recoverable (can be retried)
Sourcepub fn is_payment_error(&self) -> bool
pub fn is_payment_error(&self) -> bool
Check if this error indicates a payment issue
Sourcepub fn underpayment(expected: u64, received: u64) -> Self
pub fn underpayment(expected: u64, received: u64) -> Self
Create an underpayment error
Sourcepub fn overpayment(expected: u64, received: u64) -> Self
pub fn overpayment(expected: u64, received: u64) -> Self
Create an overpayment error
Trait Implementations§
Source§impl Debug for BitcoinError
impl Debug for BitcoinError
Source§impl Display for BitcoinError
impl Display for BitcoinError
Source§impl Error for BitcoinError
impl Error for BitcoinError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Error> for BitcoinError
impl From<Error> for BitcoinError
Source§impl From<Error> for BitcoinError
impl From<Error> for BitcoinError
Source§impl From<Error> for BitcoinError
impl From<Error> for BitcoinError
Source§impl From<ParseError> for BitcoinError
impl From<ParseError> for BitcoinError
Source§fn from(err: ParseError) -> Self
fn from(err: ParseError) -> Self
Auto Trait Implementations§
impl Freeze for BitcoinError
impl !RefUnwindSafe for BitcoinError
impl Send for BitcoinError
impl Sync for BitcoinError
impl Unpin for BitcoinError
impl !UnwindSafe for BitcoinError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.