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 APIconsensus-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§
- Inputs
Index Error - Indexing error while computing a sighash.
- Interpreter
- High-level script verification context.
- Legacy
Sighash - Hash of a transaction according to the legacy signature algorithm.
- NonStandard
Sighash Type Error - Error returned for a non-standard sighash type.
- PqPublic
Key - A verification-only post-quantum public key.
- PqSignature
- A raw post-quantum signature without the appended sighash byte.
- Precomputed
Transaction Data - Precomputed transaction data for witness-aware verification.
- Script
Flags - Wrapper for script verification flags.
- Script
Stack - Minimal stack abstraction used by the interpreter.
- Segwit
V0Sighash - 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.
- Sighash
Cache - Efficiently calculates signature hash messages needed by consensus verification.
- Sighash
Type Parse Error - Error returned for failure during parsing one of the sighash types.
- Spend
Context - Input-specific data required to run the interpreter.
- Spent
Outputs - Typed spent outputs referenced by a transaction during verification.
- Transaction
Context - Borrows the transaction being verified.
- Verification
Failure - Detailed failure information for a typed verification call.
- Witness
Program - 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.
- Script
Error - Script validation errors produced by the Tidecoin validation engine.
- Tidecoin
Validation Error - High-level validation errors produced by the Tidecoin validation engine.
- TxSighash
Type - Hashtype of an input’s signature, encoded in the last byte of the signature.
- Witness
Execution Plan - Shared execution plan for a validated witness program.
- Witness
Program Class - Consensus classification for a parsed witness program.
- Witness
SigVersion - Signature-hash mode used by witness execution.
- Witness
Sigops - 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
scriptSigdata. - 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_inputbut also reports the final interpreter script error.