Enum psbt::PsbtError

source ·
pub enum PsbtError {
Show 30 variants UnexpectedEod, DataNotConsumed, InvalidMagic(Bytes<5>), UnexpectedKey(MapName, u8, PsbtVer), DeprecatedKey(MapName, u8, PsbtVer), RequiredKeyAbsent(MapName, u8, PsbtVer), RepeatedKey(MapName, u8), RepeatedPropKey(MapName, PropKey), RepeatedUnknownKey(MapName, u8), NonEmptyKeyData(MapName, u8, KeyData), UnsupportedVersion(PsbtUnsupportedVer), SignedTx, InvalidLockHeight(u32), InvalidLockTimestamp(u32), InvalidComprPubkey(Bytes<33>), InvalidUncomprPubkey(Bytes<65>), InvalidXonlyPubkey(Bytes<32>), InvalidSig(SigError), InvalidSighash(NonStandardValue<u8>), InvalidXub(XpubDecodeError), XpubUnhardenedOrigin, InvalidDerivationPath, UnrecognizedKeyFormat(u8), InvalidPorString(FromUtf8Error), InvalidTapLeafDepth(u8), InvalidTapLeafScriptSize(usize), InvalidTapLeafVer(InvalidLeafVer), InvalidTapTree(InvalidTree), Consensus(ConsensusDataError), Confinement(Error),
}
Expand description

TODO: Split error into classes

Variants§

§

UnexpectedEod

unexpected end of data.

§

DataNotConsumed

PSBT data are followed by some excessive bytes.

§

InvalidMagic(Bytes<5>)

invalid magic bytes {0}.

§

UnexpectedKey(MapName, u8, PsbtVer)

{0} key {1:#02x} must not be present in PSBT {2}.

§

DeprecatedKey(MapName, u8, PsbtVer)

{0} key {1:#02x} is deprecated not be present in PSBT {2}.

§

RequiredKeyAbsent(MapName, u8, PsbtVer)

{0} key {1:#02x} required for PSBT {2} is not present.

§

RepeatedKey(MapName, u8)

repeated {0} key {1:#02x}.

§

RepeatedPropKey(MapName, PropKey)

repeated proprietary {0} key {1}.

§

RepeatedUnknownKey(MapName, u8)

repeated unknown {0} key {1:#02x}.

§

NonEmptyKeyData(MapName, u8, KeyData)

{0} key {1:#02x} must not contain additional key data.

§

UnsupportedVersion(PsbtUnsupportedVer)

§

SignedTx

Provided transaction in PSBT_GLOBAL_UNSIGNED_TX contains non-empty sigScript.

§

InvalidLockHeight(u32)

invalid lock height value {0}.

§

InvalidLockTimestamp(u32)

invalid lock timestamp {0}.

§

InvalidComprPubkey(Bytes<33>)

invalid compressed pubkey data.

§

InvalidUncomprPubkey(Bytes<65>)

invalid compressed pubkey data.

§

InvalidXonlyPubkey(Bytes<32>)

invalid BIP340 (x-only) pubkey data.

§

InvalidSig(SigError)

§

InvalidSighash(NonStandardValue<u8>)

§

InvalidXub(XpubDecodeError)

§

XpubUnhardenedOrigin

one of xpubs has an unhardened derivation index

§

InvalidDerivationPath

derivation path has invalid length

§

UnrecognizedKeyFormat(u8)

unrecognized public key encoding starting with flag {0:#02x}.

§

InvalidPorString(FromUtf8Error)

proof of reserves is not a valid UTF-8 string. {0}.

§

InvalidTapLeafDepth(u8)

tap tree has invalid depth {0} exceeding 128 consensus restriction.

§

InvalidTapLeafScriptSize(usize)

tap tree has script which is tool arge ({0} bytes) and exceeds consensus script limits.

§

InvalidTapLeafVer(InvalidLeafVer)

§

InvalidTapTree(InvalidTree)

§

Consensus(ConsensusDataError)

§

Confinement(Error)

Trait Implementations§

source§

impl Clone for PsbtError

source§

fn clone(&self) -> PsbtError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PsbtError

source§

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

Formats the value using the given formatter. Read more
source§

impl Display for PsbtError

source§

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

Formats the value using the given formatter. Read more
source§

impl Error for PsbtError

1.30.0 · source§

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
source§

impl From<ConsensusDataError> for PsbtError

source§

fn from(v: ConsensusDataError) -> Self

Converts to this type from the input type.
source§

impl From<DecodeError> for PsbtError

source§

fn from(err: DecodeError) -> Self

Converts to this type from the input type.
source§

impl From<Error> for PsbtError

source§

fn from(v: Error) -> Self

Converts to this type from the input type.
source§

impl From<InvalidLeafVer> for PsbtError

source§

fn from(v: InvalidLeafVer) -> Self

Converts to this type from the input type.
source§

impl From<InvalidTree> for PsbtError

source§

fn from(v: InvalidTree) -> Self

Converts to this type from the input type.
source§

impl From<NonStandardValue<u8>> for PsbtError

source§

fn from(v: NonStandardValue<u8>) -> Self

Converts to this type from the input type.
source§

impl From<PsbtError> for DecodeError

source§

fn from(v: PsbtError) -> Self

Converts to this type from the input type.
source§

impl From<PsbtError> for PsbtParseError

source§

fn from(v: PsbtError) -> Self

Converts to this type from the input type.
source§

impl From<PsbtError> for String

source§

fn from(err: PsbtError) -> Self

Converts to this type from the input type.
source§

impl From<PsbtUnsupportedVer> for PsbtError

source§

fn from(v: PsbtUnsupportedVer) -> Self

Converts to this type from the input type.
source§

impl From<SigError> for PsbtError

source§

fn from(v: SigError) -> Self

Converts to this type from the input type.
source§

impl From<XpubDecodeError> for PsbtError

source§

fn from(v: XpubDecodeError) -> Self

Converts to this type from the input type.
source§

impl PartialEq for PsbtError

source§

fn eq(&self, other: &PsbtError) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for PsbtError

source§

impl StructuralEq for PsbtError

source§

impl StructuralPartialEq for PsbtError

Auto Trait Implementations§

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
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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<T> VerifyEq for T
where T: Eq,

§

fn verify_eq(&self, other: &T) -> bool

Verifies commit-equivalence of two instances of the same type.