[][src]Enum bdk::Error

pub enum Error {
    InvalidU32Bytes(Vec<u8>),
    Generic(String),
    ScriptDoesntHaveAddressForm,
    SingleRecipientMultipleOutputs,
    SingleRecipientNoInputs,
    NoRecipients,
    NoUtxosSelected,
    OutputBelowDustLimit(usize),
    InsufficientFunds {
        needed: u64,
        available: u64,
    },
    BnBTotalTriesExceeded,
    BnBNoExactMatch,
    UnknownUTXO,
    TransactionNotFound,
    TransactionConfirmed,
    IrreplaceableTransaction,
    FeeRateTooLow {
        required: FeeRate,
    },
    FeeTooLow {
        required: u64,
    },
    MissingKeyOrigin(String),
    Key(KeyError),
    ChecksumMismatch,
    SpendingPolicyRequired(KeychainKind),
    InvalidPolicyPathError(PolicyError),
    Signer(SignerError),
    InvalidProgressValue(f32),
    ProgressUpdateError,
    InvalidOutpoint(OutPoint),
    Descriptor(Error),
    AddressValidator(AddressValidatorError),
    Encode(Error),
    Miniscript(Error),
    BIP32(Error),
    Secp256k1(Error),
    JSON(Error),
    Hex(Error),
    PSBT(Error),
    Electrum(Error),
    Esplora(EsploraError),
    CompactFilters(CompactFiltersError),
    Sled(Error),
}

Errors that can be thrown by the Wallet

Variants

InvalidU32Bytes(Vec<u8>)

Wrong number of bytes found when trying to convert to u32

Generic(String)

Generic error

ScriptDoesntHaveAddressForm

This error is thrown when trying to convert Bare and Public key script to address

SingleRecipientMultipleOutputs

Found multiple outputs when single_recipient option has been specified

SingleRecipientNoInputs

single_recipient option is selected but neither drain_wallet nor manually_selected_only are

NoRecipients

Cannot build a tx without recipients

NoUtxosSelected

manually_selected_only option is selected but no utxo has been passed

OutputBelowDustLimit(usize)

Output created is under the dust limit, 546 satoshis

InsufficientFunds

Wallet's UTXO set is not enough to cover recipient's requested plus fee

Fields of InsufficientFunds

needed: u64

Sats needed for some transaction

available: u64

Sats available for spending

BnBTotalTriesExceeded

Branch and bound coin selection possible attempts with sufficiently big UTXO set could grow exponentially, thus a limit is set, and when hit, this error is thrown

BnBNoExactMatch

Branch and bound coin selection tries to avoid needing a change by finding the right inputs for the desired outputs plus fee, if there is not such combination this error is thrown

UnknownUTXO

Happens when trying to spend an UTXO that is not in the internal database

TransactionNotFound

Thrown when a tx is not found in the internal database

TransactionConfirmed

Happens when trying to bump a transaction that is already confirmed

IrreplaceableTransaction

Trying to replace a tx that has a sequence >= 0xFFFFFFFE

FeeRateTooLow

When bumping a tx the fee rate requested is lower than required

Fields of FeeRateTooLow

required: FeeRate

Required fee rate (satoshi/vbyte)

FeeTooLow

When bumping a tx the absolute fee requested is lower than replaced tx absolute fee

Fields of FeeTooLow

required: u64

Required fee absolute value (satoshi)

MissingKeyOrigin(String)

In order to use the TxBuilder::add_global_xpubs option every extended key in the descriptor must either be a master key itself (having depth = 0) or have an explicit origin provided

Error while working with keys

ChecksumMismatch

Descriptor checksum mismatch

SpendingPolicyRequired(KeychainKind)

Spending policy is not compatible with this KeychainKind

InvalidPolicyPathError(PolicyError)

Error while extracting and manipulating policies

Signer(SignerError)

Signing error

InvalidProgressValue(f32)

Progress value must be between 0.0 (included) and 100.0 (included)

ProgressUpdateError

Progress update error (maybe the channel has been closed)

InvalidOutpoint(OutPoint)

Requested outpoint doesn't exist in the tx (vout greater than available outputs)

Descriptor(Error)

Error related to the parsing and usage of descriptors

AddressValidator(AddressValidatorError)

Error that can be returned to fail the validation of an address

Encode(Error)

Encoding error

Miniscript(Error)

Miniscript error

BIP32(Error)

BIP32 error

Secp256k1(Error)

An ECDSA error

JSON(Error)

Error serializing or deserializing JSON data

Hex(Error)

Hex decoding error

PSBT(Error)

Partially signed bitcoin transaction error

Electrum(Error)

Electrum client error

Esplora(EsploraError)

Esplora client error

CompactFilters(CompactFiltersError)

Compact filters client error)

Sled(Error)

Sled database error

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

impl From<AddressValidatorError> for Error[src]

impl From<CompactFiltersError> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for CompactFiltersError[src]

This is supported on crate feature compact_filters only.

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl From<EsploraError> for Error[src]

impl From<KeyError> for Error[src]

impl From<PolicyError> for Error[src]

impl From<SignerError> for Error[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,