# Functions
IsErrorCode returns whether the provided error is a script error with the provided error code.
NewError creates an Error given a set of arguments.
# Constants
ErrCheckMultiSigVerify is returned when OP_CHECKMULTISIGVERIFY is encountered in a script and the top item on the data stack does not evaluate to true.
ErrCheckSigVerify is returned when OP_CHECKSIGVERIFY is encountered in a script and the top item on the data stack does not evaluate to true.
ErrCleanStack is returned when the ScriptVerifyCleanStack flag is set, and after evaluation, the stack does not contain only a single element.
ErrDisabledOpcode is returned when a disabled opcode is encountered in a script.
ErrDiscourageUpgradableNOPs is returned when the ScriptDiscourageUpgradableNops flag is set and a NOP opcode is encountered in a script.
ErrDivideByZero is returned when OP_DIV is invoked to divide a number by zero.
ErrEarlyReturn is returned when OP_RETURN is executed in the script.
ErrElementTooBig is returned if the size of an element to be pushed to the stack is over MaxScriptElementSize.
ErrEmptyStack is returned when the script evaluated without error, but terminated with an empty top stack element.
ErrEqualVerify is returned when OP_EQUALVERIFY is encountered in a script and the top item on the data stack does not evaluate to true.
ErrEvalFalse is returned when the script evaluated without error but terminated with a false top stack element.
ErrIllegalForkID is returned when either the ScriptEnableSighashForkID flag is set, but the transaction doesn't have a ForkID sighash flag, or when the transaction does have the ForkID set, but the ScriptEnableSighashForkID flag is not set.
ErrInternal is returned if internal consistency checks fail.
ErrInvalidFlags is returned when the passed flags to NewEngine contain an invalid combination.
ErrInvalidIndex is returned when an out-of-bounds index is passed to a function.
ErrInvalidInputLength is returned when an input to an opcode is not the correct length as required by that opcode.
ErrInvalidParams is returned when the ExectionParams passed to the Execute func have errors.
ErrInvalidProgramCounter is returned when an attempt to execute an opcode is made once all of them have already been executed.
ErrInvalidPubKeyCount is returned when the number of public keys specified for a multisig is either negative or greater than MaxPubKeysPerMultiSig.
ErrInvalidSigHashType is returned when a signature hash type is not one of the supported types.
ErrInvalidSignatureCount is returned when the number of signatures specified for a multisig is either negative or greater than the number of public keys.
ErrInvalidStackOperation is returned when a stack operation is attempted with a number that is invalid for the current stack size.
ErrMalformedPush is returned when a data push opcode tries to push more bytes than are left in the script.
ErrMinimalData is returned when the ScriptVerifyMinimalData flag is set and the script contains push operations that do not use the minimal opcode required.
ErrMinimalIf is returned when the ScriptVerifyMinimalIf flag is set and the script contains if operations that do not use the minimal opcode required.
ErrNegativeLockTime is returned when a script contains an opcode that interprets a negative lock time.
ErrNotMultisigScript is returned from CalcMultiSigStats when the provided script is not a multisig script.
ErrNotPushOnly is returned when a script that is required to only push data to the stack performs other operations.
ErrNullFail is returned when the ScriptVerifyNullFail flag is set and signatures are not empty on failed checksig or checkmultisig operations.
ErrNumberTooBig is returned when the argument for an opcode that expects numeric input is larger than the expected maximum number of bytes.
ErrNumberTooSmall is returned when the argument for an opcode that expects numeric input is smaller than the expected maximum number of bytes.
ErrNumEqualVerify is returned when OP_NUMEQUALVERIFY is encountered in a script and the top item on the data stack does not evaluate to true.
ErrOK represents successful execution.
ErrPubKeyType is returned when the ScriptVerifyStrictEncoding flag is set and the script contains invalid public keys.
ErrReservedOpcode is returned when an opcode marked as reserved is encountered in a script.
ErrScriptTooBig is returned if a script is larger than MaxScriptSize.
ErrScriptUnfinished is returned when CheckErrorCondition is called on a script that has not finished executing.
ErrSigHighS is returned when the ScriptVerifyLowS flag is set and the script contains any signatures whose S values are higher than the half order.
ErrSigInvalidDataLen is returned a signature that should be a canonically-encoded DER signature does not specify the correct number of remaining bytes for the R and S portions.
ErrSigInvalidRIntID is returned when a signature that should be a canonically-encoded DER signature does not have the expected ASN.1 integer ID for R.
ErrSigInvalidSeqID is returned when a signature that should be a canonically-encoded DER signature does not have the expected ASN.1 sequence ID.
ErrSigInvalidSIntID is returned when a signature that should be a canonically-encoded DER signature does not have the expected ASN.1 integer ID for S.
ErrSigInvalidSLen is returned a signature that should be a canonically-encoded DER signature does not specify the correct number of bytes for the S portion.
ErrSigMissingSLen is returned when a signature that should be a canonically-encoded DER signature does not provide the length of S.
ErrSigMissingSTypeID is returned a signature that should be a canonically-encoded DER signature does not provide the ASN.1 type ID for S.
ErrSigNegativeR is returned when a signature that should be a canonically-encoded DER signature has a negative value for R.
ErrSigNegativeS is returned when a signature that should be a canonically-encoded DER signature has a negative value for S.
ErrSigNullDummy is returned when the ScriptStrictMultiSig flag is set and a multisig script has anything other than 0 for the extra dummy argument.
ErrSigTooLong is returned when a signature that should be a canonically-encoded DER signature is too long.
ErrSigTooMuchRPadding is returned when a signature that should be a canonically-encoded DER signature has too much padding for R.
ErrSigTooMuchSPadding is returned when a signature that should be a canonically-encoded DER signature has too much padding for S.
ErrSigTooShort is returned when a signature that should be a canonically-encoded DER signature is too short.
ErrSigZeroRLen is returned when a signature that should be a canonically-encoded DER signature has an R length of zero.
ErrSigZeroSLen is returned when a signature that should be a canonically-encoded DER signature has an S length of zero.
ErrStackOverflow is returned when stack and altstack combined depth is over the limit.
ErrTooManyOperations is returned if a script has more than MaxOpsPerScript opcodes that do not push data.
ErrTooManyRequiredSigs is returned from MultiSigScript when the specified number of required signatures is larger than the number of provided public keys.
ErrTooMuchNullData is returned from NullDataScript when the length of the provided data exceeds MaxDataCarrierSize.
ErrUnbalancedConditional is returned when an OP_ELSE or OP_ENDIF is encountered in a script without first having an OP_IF or OP_NOTIF or the end of script is reached without encountering an OP_ENDIF when an OP_IF or OP_NOTIF was previously encountered.
ErrUnsatisfiedLockTime is returned when a script contains an opcode that involves a lock time and the required lock time has not been reached.
ErrUnsupportedAddress is returned when a concrete type that implements a bsvutil.Address is not a supported type.
ErrVerify is returned when OP_VERIFY is encountered in a script and the top item on the data stack does not evaluate to true.
# Type aliases
ErrorCode identifies a kind of script error.