Enum bdk_chain::bitcoin::psbt::Error

#[non_exhaustive]
pub enum Error {
Show 32 variants InvalidMagic, MissingUtxo, InvalidSeparator, PsbtUtxoOutOfbounds, InvalidKey(Key), InvalidProprietaryKey, DuplicateKey(Key), UnsignedTxHasScriptSigs, UnsignedTxHasScriptWitnesses, MustHaveUnsignedTx, NoMorePairs, UnexpectedUnsignedTx { expected: Box<Transaction>, actual: Box<Transaction>, }, NonStandardSighashType(u32), InvalidHash(FromSliceError), InvalidPreimageHashPair { hash_type: PsbtHash, preimage: Box<[u8]>, hash: Box<[u8]>, }, CombineInconsistentKeySources(Box<Xpub>), ConsensusEncoding(Error), NegativeFee, FeeOverflow, InvalidPublicKey(FromSliceError), InvalidSecp256k1PublicKey(Error), InvalidXOnlyPublicKey, InvalidEcdsaSignature(Error), InvalidTaprootSignature(SigFromSliceError), InvalidControlBlock, InvalidLeafVersion, Taproot(&'static str), TapTree(IncompleteBuilderError), XPubKey(&'static str), Version(&'static str), PartialDataConsumption, Io(Error),
}
Expand description

Ways that a Partially Signed Transaction might fail.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

InvalidMagic

Magic bytes for a PSBT must be the ASCII for “psbt” serialized in most significant byte order.

§

MissingUtxo

Missing both the witness and non-witness utxo.

§

InvalidSeparator

The separator for a PSBT must be 0xff.

§

PsbtUtxoOutOfbounds

Returned when output index is out of bounds in relation to the output in non-witness UTXO.

§

InvalidKey(Key)

Known keys must be according to spec.

§

InvalidProprietaryKey

Non-proprietary key type found when proprietary key was expected

§

DuplicateKey(Key)

Keys within key-value map should never be duplicated.

§

UnsignedTxHasScriptSigs

The scriptSigs for the unsigned transaction must be empty.

§

UnsignedTxHasScriptWitnesses

The scriptWitnesses for the unsigned transaction must be empty.

§

MustHaveUnsignedTx

A PSBT must have an unsigned transaction.

§

NoMorePairs

Signals that there are no more key-value pairs in a key-value map.

§

UnexpectedUnsignedTx

Attempting to combine with a PSBT describing a different unsigned transaction.

Fields

§expected: Box<Transaction>

Expected

§actual: Box<Transaction>

Actual

§

NonStandardSighashType(u32)

Unable to parse as a standard sighash type.

§

InvalidHash(FromSliceError)

Invalid hash when parsing slice.

§

InvalidPreimageHashPair

The pre-image must hash to the corresponding psbt hash

Fields

§hash_type: PsbtHash

Hash-type

§preimage: Box<[u8]>

Pre-image

§hash: Box<[u8]>

Hash value

§

CombineInconsistentKeySources(Box<Xpub>)

Conflicting data during combine procedure: global extended public key has inconsistent key sources

§

ConsensusEncoding(Error)

Serialization error in bitcoin consensus-encoded structures

§

NegativeFee

Negative fee

§

FeeOverflow

Integer overflow in fee calculation

§

InvalidPublicKey(FromSliceError)

Parsing error indicating invalid public keys

§

InvalidSecp256k1PublicKey(Error)

Parsing error indicating invalid secp256k1 public keys

§

InvalidXOnlyPublicKey

Parsing error indicating invalid xonly public keys

§

InvalidEcdsaSignature(Error)

Parsing error indicating invalid ECDSA signatures

§

InvalidTaprootSignature(SigFromSliceError)

Parsing error indicating invalid taproot signatures

§

InvalidControlBlock

Parsing error indicating invalid control block

§

InvalidLeafVersion

Parsing error indicating invalid leaf version

§

Taproot(&'static str)

Parsing error indicating a taproot error

§

TapTree(IncompleteBuilderError)

Taproot tree deserilaization error

§

XPubKey(&'static str)

Error related to an xpub key

§

Version(&'static str)

Error related to PSBT version

§

PartialDataConsumption

PSBT data is not consumed entirely

§

Io(Error)

I/O error.

Trait Implementations§

§

impl Debug for Error

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for Error

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for Error

§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
§

impl From<Error> for Error

§

fn from(e: Error) -> Error

Converts to this type from the input type.
§

impl From<Error> for Error

§

fn from(e: Error) -> Error

Converts to this type from the input type.
§

impl From<FromSliceError> for Error

§

fn from(e: FromSliceError) -> Error

Converts to this type from the input type.
§

impl From<Infallible> for Error

§

fn from(never: Infallible) -> Error

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V