Enum miniscript::Error

source ·
pub enum Error {
Show 41 variants InvalidOpcode(Opcode), NonMinimalVerify(String), InvalidPush(Vec<u8>), Script(Error), AddrError(Error), CmsTooManyKeys(u32), MultiATooManyKeys(u64), Unprintable(u8), ExpectedChar(char), UnexpectedStart, Unexpected(String), MultiColon(String), MultiAt(String), AtOutsideOr(String), LikelyFalse, UnknownWrapper(char), NonTopLevel(String), Trailing(String), BadPubkey(Error), MissingHash(Hash), MissingSig(PublicKey), RelativeLocktimeNotMet(u32), AbsoluteLocktimeNotMet(u32), CouldNotSatisfy, TypeCheck(String), BadDescriptor(String), Secp(Error), PolicyError(PolicyError), LiftError(LiftError), ContextError(ScriptContextError), MaxRecursiveDepthExceeded, ScriptSizeTooLarge, NonStandardBareScript, AnalysisError(AnalysisError), ImpossibleSatisfaction, BareDescriptorAddr, PubKeyCtxError(KeyParseError, &'static str), TaprootSpendInfoUnavialable, TrNoScriptCode, TrNoExplicitScript, MultipathDescLenMismatch,
}
Expand description

Miniscript

Variants§

§

InvalidOpcode(Opcode)

Opcode appeared which is not part of the script subset

§

NonMinimalVerify(String)

Some opcode occurred followed by OP_VERIFY when it had a VERIFY version that should have been used instead

§

InvalidPush(Vec<u8>)

Push was illegal in some context

§

Script(Error)

rust-bitcoin script error

§

AddrError(Error)

rust-bitcoin address error

§

CmsTooManyKeys(u32)

A CHECKMULTISIG opcode was preceded by a number > 20

§

MultiATooManyKeys(u64)

A tapscript multi_a cannot support more than Weight::MAX_BLOCK/32 keys

§

Unprintable(u8)

Encountered unprintable character in descriptor

§

ExpectedChar(char)

expected character while parsing descriptor; didn’t find one

§

UnexpectedStart

While parsing backward, hit beginning of script

§

Unexpected(String)

Got something we were not expecting

§

MultiColon(String)

Name of a fragment contained : multiple times

§

MultiAt(String)

Name of a fragment contained @ multiple times

§

AtOutsideOr(String)

Name of a fragment contained @ but we were not parsing an OR

§

LikelyFalse

Encountered a l:0 which is syntactically equal to u:0 except stupid

§

UnknownWrapper(char)

Encountered a wrapping character that we don’t recognize

§

NonTopLevel(String)

Parsed a miniscript and the result was not of type T

§

Trailing(String)

Parsed a miniscript but there were more script opcodes after it

§

BadPubkey(Error)

Failed to parse a push as a public key

§

MissingHash(Hash)

Could not satisfy a script (fragment) because of a missing hash preimage

§

MissingSig(PublicKey)

Could not satisfy a script (fragment) because of a missing signature

§

RelativeLocktimeNotMet(u32)

Could not satisfy, relative locktime not met

§

AbsoluteLocktimeNotMet(u32)

Could not satisfy, absolute locktime not met

§

CouldNotSatisfy

General failure to satisfy

§

TypeCheck(String)

Typechecking failed

§

BadDescriptor(String)

General error in creating descriptor

§

Secp(Error)

Forward-secp related errors

§

PolicyError(PolicyError)

Errors related to policy

§

LiftError(LiftError)

Errors related to lifting

§

ContextError(ScriptContextError)

Forward script context related errors

§

MaxRecursiveDepthExceeded

Recursion depth exceeded when parsing policy/miniscript from string

§

ScriptSizeTooLarge

Script size too large

§

NonStandardBareScript

Anything but c:pk(key) (P2PK), c:pk_h(key) (P2PKH), and thresh_m(k,…) up to n=3 is invalid by standardness (bare)

§

AnalysisError(AnalysisError)

Analysis Error

§

ImpossibleSatisfaction

Miniscript is equivalent to false. No possible satisfaction

§

BareDescriptorAddr

Bare descriptors don’t have any addresses

§

PubKeyCtxError(KeyParseError, &'static str)

PubKey invalid under current context

§

TaprootSpendInfoUnavialable

Attempted to call function that requires PreComputed taproot info

§

TrNoScriptCode

No script code for Tr descriptors

§

TrNoExplicitScript

No explicit script for Tr descriptors

§

MultipathDescLenMismatch

At least two BIP389 key expressions in the descriptor contain tuples of derivation indexes of different lengths.

Trait Implementations§

source§

impl Debug for Error

source§

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

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

impl Display for Error

source§

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

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

impl Error for Error

source§

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

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
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()
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 PartialEq<Error> for Error

source§

fn eq(&self, other: &Error) -> 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 StructuralPartialEq for Error

Auto Trait Implementations§

§

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 Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere 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 Twhere 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 Twhere 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.