Enum miniscript::Error[][src]

pub enum Error {
Show 36 variants InvalidOpcode(All), NonMinimalVerify(Token), InvalidPush(Vec<u8>), Script(Error), CmsTooManyKeys(u32), Unprintable(u8), ExpectedChar(char), UnexpectedStart, Unexpected(String), MultiColon(String), MultiAt(String), AtOutsideOr(String), NonCanonicalTrue, NonCanonicalFalse, 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,
}
Expand description

Miniscript

Variants

InvalidOpcode

Opcode appeared which is not part of the script subset

Tuple Fields of InvalidOpcode

0: All
NonMinimalVerify

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

Tuple Fields of NonMinimalVerify

0: Token
InvalidPush

Push was illegal in some context

Tuple Fields of InvalidPush

0: Vec<u8>
Script

rust-bitcoin script error

Tuple Fields of Script

0: Error
CmsTooManyKeys

A CHECKMULTISIG opcode was preceded by a number > 20

Tuple Fields of CmsTooManyKeys

0: u32
Unprintable

Encountered unprintable character in descriptor

Tuple Fields of Unprintable

0: u8
ExpectedChar

expected character while parsing descriptor; didn’t find one

Tuple Fields of ExpectedChar

0: char
UnexpectedStart

While parsing backward, hit beginning of script

Unexpected

Got something we were not expecting

Tuple Fields of Unexpected

0: String
MultiColon

Name of a fragment contained : multiple times

Tuple Fields of MultiColon

0: String
MultiAt

Name of a fragment contained @ multiple times

Tuple Fields of MultiAt

0: String
AtOutsideOr

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

Tuple Fields of AtOutsideOr

0: String
NonCanonicalTrue

Fragment was an and_v(_, true) which should be written as t:

NonCanonicalFalse

Fragment was an or_i(_, false) or or_i(false,_) which should be written as u: or l:

LikelyFalse

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

UnknownWrapper

Encountered a wrapping character that we don’t recognize

Tuple Fields of UnknownWrapper

0: char
NonTopLevel

Parsed a miniscript and the result was not of type T

Tuple Fields of NonTopLevel

0: String
Trailing

Parsed a miniscript but there were more script opcodes after it

Tuple Fields of Trailing

0: String
BadPubkey

Failed to parse a push as a public key

Tuple Fields of BadPubkey

0: Error
MissingHash

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

Tuple Fields of MissingHash

0: Hash
MissingSig

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

Tuple Fields of MissingSig

0: PublicKey
RelativeLocktimeNotMet

Could not satisfy, relative locktime not met

Tuple Fields of RelativeLocktimeNotMet

0: u32
AbsoluteLocktimeNotMet

Could not satisfy, absolute locktime not met

Tuple Fields of AbsoluteLocktimeNotMet

0: u32
CouldNotSatisfy

General failure to satisfy

TypeCheck

Typechecking failed

Tuple Fields of TypeCheck

0: String
BadDescriptor

General error in creating descriptor

Tuple Fields of BadDescriptor

0: String
Secp

Forward-secp related errors

Tuple Fields of Secp

0: Error
PolicyError

Errors related to policy

Tuple Fields of PolicyError

0: PolicyError
LiftError

Errors related to lifting

Tuple Fields of LiftError

0: LiftError
ContextError

Forward script context related errors

Tuple Fields of ContextError

0: ScriptContextError
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

Analysis Error

Tuple Fields of AnalysisError

0: AnalysisError
ImpossibleSatisfaction

Miniscript is equivalent to false. No possible satisfaction

BareDescriptorAddr

Bare descriptors don’t have any addresses

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

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

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.