Skip to main content

Crate tidecoin_consensus_core

Crate tidecoin_consensus_core 

Source
Expand description

Shared Tidecoin consensus-validation core types.

This crate is the shared validation/engine layer used by higher-level Tidecoin crates.

In particular, similarly named PQ and validation-side types may exist in both tidecoin and consensus-core:

  • tidecoin::* is the normal product-facing Rust API
  • consensus-core::* is the lower-level shared verifier/engine API

Most downstream application code should start with tidecoin. Reach for consensus-core directly when you intentionally need shared validation, sighash, or lower-level engine building blocks.

Structs§

InputsIndexError
Indexing error while computing a sighash.
Interpreter
High-level script verification context.
LegacySighash
Hash of a transaction according to the legacy signature algorithm.
NonStandardSighashTypeError
Error returned for a non-standard sighash type.
PqPublicKey
A verification-only post-quantum public key.
PqSignature
A raw post-quantum signature without the appended sighash byte.
PrecomputedTransactionData
Precomputed transaction data for witness-aware verification.
ScriptFlags
Wrapper for script verification flags.
ScriptStack
Minimal stack abstraction used by the interpreter.
SegwitV0Sighash
Hash of a transaction according to the SegWit version 0 signature algorithm.
Sighash512
Hash of a transaction according to the Tidecoin witness-v1 SHA-512 algorithm.
SighashCache
Efficiently calculates signature hash messages needed by consensus verification.
SighashTypeParseError
Error returned for failure during parsing one of the sighash types.
SpendContext
Input-specific data required to run the interpreter.
SpentOutputs
Typed spent outputs referenced by a transaction during verification.
TransactionContext
Borrows the transaction being verified.
VerificationFailure
Detailed failure information for a typed verification call.
WitnessProgram
Parsed witness program view over a scriptPubKey byte slice.

Enums§

PqError
Verification-side PQ parse/verify error.
PqScheme
Identifies which post-quantum signature scheme a key or signature belongs to.
ScriptError
Script validation errors produced by the Tidecoin validation engine.
TidecoinValidationError
High-level validation errors produced by the Tidecoin validation engine.
TxSighashType
Hashtype of an input’s signature, encoded in the last byte of the signature.
WitnessExecutionPlan
Shared execution plan for a validated witness program.
WitnessProgramClass
Consensus classification for a parsed witness program.
WitnessSigVersion
Signature-hash mode used by witness execution.
WitnessSigops
Sigop accounting mode required before executing a witness script.

Constants§

VERIFY_ALL_TIDECOIN
Tidecoin’s default verification flags.
VERIFY_CHECKLOCKTIMEVERIFY
Enforce CHECKLOCKTIMEVERIFY.
VERIFY_CHECKSEQUENCEVERIFY
Enforce CHECKSEQUENCEVERIFY.
VERIFY_CLEANSTACK
Require a single true stack item after execution.
VERIFY_CONST_SCRIPTCODE
Forbid mutating the script code during signature evaluation.
VERIFY_DISCOURAGE_UPGRADABLE_NOPS
Discourage upgradable NOPs.
VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM
Discourage unknown witness program versions.
VERIFY_MINIMALDATA
Require minimal push encodings.
VERIFY_MINIMALIF
Enforce MINIMALIF.
VERIFY_NONE
No verification flags.
VERIFY_NULLDUMMY
Require a null multisig dummy argument.
VERIFY_NULLFAIL
Enforce NULLFAIL.
VERIFY_P2SH
Verify pay-to-script-hash rules.
VERIFY_PQ_STRICT
Reject legacy Falcon-512 signatures.
VERIFY_SHA512
Enable Tidecoin OP_SHA512.
VERIFY_SIGPUSHONLY
Require push-only scriptSig data.
VERIFY_WITNESS
Enable witness-v0 validation.
VERIFY_WITNESS_V1_512
Enable Tidecoin witness-v1-512 validation.

Functions§

validate_verification_flags
Validates raw verification bits against the shared Tidecoin engine contract.
verify_script_input
Verifies a single typed spend and returns the shared-core validation error.
verify_script_input_detailed
Same as verify_script_input but also reports the final interpreter script error.