pub enum Error {
Show 39 variants AbsoluteLocktimeNotMet(u32), CannotInferTrDescriptors, ControlBlockParse(TaprootError), ControlBlockVerificationError, CouldNotEvaluate, EcdsaSig(EcdsaSigError), ExpectedPush, HashPreimageLengthMismatch, TxTemplateHashLengthWrong, TxTemplateHashWrong, IncorrectPubkeyHash, IncorrectScriptHash, IncorrectWPubkeyHash, IncorrectWScriptHash, InsufficientSignaturesMultiSig, InvalidSchnorrSighashType(Vec<u8>), InvalidEcdsaSignature(PublicKey), InvalidSchnorrSignature(XOnlyPublicKey), NonStandardSighash(Vec<u8>), Miniscript(Error), MissingExtraZeroMultiSig, MultiSigEvaluationError, NonEmptyWitness, NonEmptyScriptSig, PkEvaluationError(PkEvalErrInner), PkHashVerifyFail(Hash), PubkeyParseError, XOnlyPublicKeyParseError, RelativeLocktimeNotMet(u32), Secp(Error), ScriptSatisfactionError, SchnorrSig(SchnorrSigError), SighashError(Error), TapAnnexUnsupported, UncompressedPubkey, UnexpectedStackBoolean, UnexpectedStackEnd, UnexpectedStackElementPush, VerifyFailed,
}
Expand description

Detailed Error type for Interpreter

Variants§

§

AbsoluteLocktimeNotMet(u32)

Could not satisfy, absolute locktime not met

§

CannotInferTrDescriptors

Cannot Infer a taproot descriptor Key spends cannot infer the internal key of the descriptor Inferring script spends is possible, but is hidden nodes are currently not supported in descriptor spec

§

ControlBlockParse(TaprootError)

Error parsing taproot control block

§

ControlBlockVerificationError

Tap control block(merkle proofs + tweak) verification error

§

CouldNotEvaluate

General Interpreter error.

§

EcdsaSig(EcdsaSigError)

EcdsaSig related error

§

ExpectedPush

We expected a push (including a OP_1 but no other numeric pushes)

§

HashPreimageLengthMismatch

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

§

TxTemplateHashLengthWrong

The txtemplate must be exactly 32 bytes.

§

TxTemplateHashWrong

The txtemplate must match the transaction

§

IncorrectPubkeyHash

Incorrect scriptPubKey (pay-to-pubkeyhash) for the provided public key

§

IncorrectScriptHash

Incorrect scriptPubKey for the provided redeem script

§

IncorrectWPubkeyHash

Incorrect scriptPubKey (pay-to-witness-pubkeyhash) for the provided public key

§

IncorrectWScriptHash

Incorrect scriptPubKey for the provided witness script

§

InsufficientSignaturesMultiSig

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

§

InvalidSchnorrSighashType(Vec<u8>)

Invalid Sighash type

§

InvalidEcdsaSignature(PublicKey)

ecdsa Signature failed to verify

§

InvalidSchnorrSignature(XOnlyPublicKey)

Signature failed to verify

§

NonStandardSighash(Vec<u8>)

Last byte of this signature isn’t a standard sighash type

§

Miniscript(Error)

Miniscript error

§

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

§

NonEmptyWitness

Witness must be empty for pre-segwit transactions

§

NonEmptyScriptSig

ScriptSig must be empty for pure segwit transactions

§

PkEvaluationError(PkEvalErrInner)

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

§

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 stack::Element::Push as a Pubkey. Both 33 byte and 65 bytes are supported.

§

XOnlyPublicKeyParseError

Parse Error while parsing a stack::Element::Push as a XOnlyPublicKey (32 bytes)

§

RelativeLocktimeNotMet(u32)

Could not satisfy, relative locktime not met

§

Secp(Error)

Forward-secp related errors

§

ScriptSatisfactionError

Miniscript requires the entire top level script to be satisfied.

§

SchnorrSig(SchnorrSigError)

Schnorr Signature error

§

SighashError(Error)

Errors in signature hash calculations

§

TapAnnexUnsupported

Taproot Annex Unsupported

§

UncompressedPubkey

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

§

UnexpectedStackBoolean

Got stack::Element::Satisfied or stack::Element::Dissatisfied when the interpreter was expecting stack::Element::Push

§

UnexpectedStackEnd

Unexpected Stack End, caused by popping extra elements from stack

§

UnexpectedStackElementPush

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

§

VerifyFailed

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

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

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 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.