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