Enum sapio_miniscript::interpreter::Error
source · [−]pub enum Error {
Show 26 variants
AbsoluteLocktimeNotMet(u32),
CouldNotEvaluate,
ExpectedPush,
HashPreimageLengthMismatch,
IncorrectPubkeyHash,
IncorrectScriptHash,
IncorrectWPubkeyHash,
IncorrectWScriptHash,
InsufficientSignaturesMultiSig,
InvalidSignature(PublicKey),
Miniscript(Error),
MissingExtraZeroMultiSig,
MultiSigEvaluationError,
NonEmptyWitness,
NonEmptyScriptSig,
PkEvaluationError(PublicKey),
PkHashVerifyFail(Hash),
PubkeyParseError,
RelativeLocktimeNotMet(u32),
Secp(Error),
ScriptSatisfactionError,
UncompressedPubkey,
UnexpectedStackBoolean,
UnexpectedStackEnd,
UnexpectedStackElementPush,
VerifyFailed,
}
Expand description
Detailed Error type for Interpreter
Variants
AbsoluteLocktimeNotMet(u32)
Could not satisfy, absolute locktime not met
CouldNotEvaluate
General Interpreter 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.
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
InvalidSignature(PublicKey)
Signature failed to verify
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(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
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.
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.
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
sourceimpl Error for Error
impl Error for Error
sourcefn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
replaced by Error::source, which can support downcasting
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more