pub enum InterpreterError {
Show 18 variants UncompressedPubkey, UnexpectedStackEnd, UnexpectedStackElementPush, VerifyFailed, InsufficientSignaturesMultiSig, MissingExtraZeroMultiSig, MultiSigEvaluationError, InvalidSignature(PublicKey), CouldNotEvaluate, PkEvaluationError(PublicKey), ScriptSatisfactionError, PkHashVerifyFail(Hash), PubkeyParseError, HashPreimageLengthMismatch, UnexpectedStackBoolean, RelativeLocktimeNotMet(u32), AbsoluteLocktimeNotMet(u32), Secp(Error),
}
Expand description

Detailed Error type for Interpreter

Variants

UncompressedPubkey

An uncompressed public key was encountered in a context where it is disallowed (e.g. in a Segwit script or p2wpkh output)

UnexpectedStackEnd

Unexpected Stack End, caused by popping extra elements from stack

UnexpectedStackElementPush

Unexpected Stack Push StackElement::Push element when the interpreter was expecting a stack boolean StackElement::Satisfied or StackElement::Dissatisfied

VerifyFailed

Verify expects stack top element exactly to be StackElement::Satisfied. This error is raised even if the stack top is StackElement::Push.

InsufficientSignaturesMultiSig

MultiSig missing at least 1 witness elements out of k + 1 required

MissingExtraZeroMultiSig

MultiSig requires 1 extra zero element apart from the k signatures

MultiSigEvaluationError

Script abortion because of incorrect dissatisfaction for multisig. Any input witness apart from sat(0 sig …) or nsat(0 0 ..) leads to this error. This is network standardness assumption and miniscript only supports standard scripts

InvalidSignature(PublicKey)

Signature failed to verify

CouldNotEvaluate

General Interpreter error.

PkEvaluationError(PublicKey)

Script abortion because of incorrect dissatisfaction for Checksig. Any input witness apart from sat(sig) or nsat(0) leads to this error. This is network standardness assumption and miniscript only supports standard scripts

ScriptSatisfactionError

Miniscript requires the entire top level script to be satisfied.

PkHashVerifyFail(Hash)

The Public Key hash check for the given pubkey. This occurs in PkH node when the given key does not match to Hash in script.

PubkeyParseError

Parse Error while parsing a StackElement::Push as a Pubkey. Both 33 byte and 65 bytes are supported.

HashPreimageLengthMismatch

The preimage to the hash function must be exactly 32 bytes.

UnexpectedStackBoolean

Got StackElement::Satisfied or StackElement::Dissatisfied when the interpreter was expecting StackElement::Push

RelativeLocktimeNotMet(u32)

Could not satisfy, relative locktime not met

AbsoluteLocktimeNotMet(u32)

Could not satisfy, absolute locktime not met

Secp(Error)

Forward-secp related errors

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

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

Uses borrowed data to replace owned data, usually by cloning. Read more

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.