Module consensus

Source
Expand description

Bitcoin consensus.

This module defines structures, functions, and traits that are needed to conform to Bitcoin consensus.

Modules§

encode
Bitcoin consensus-encodable types.
params
Bitcoin consensus parameters.
serdeserde
Serde serialization via consensus encoding
validationbitcoinconsensus
Transaction and script validation.

Structs§

Params
Parameters that influence chain consensus.

Enums§

DecodeError
Error when consensus decoding from an [IterReader].

Traits§

Decodable
Data which can be encoded in a consensus-consistent way.
Encodable
Data which can be encoded in a consensus-consistent way.
ReadExt
Extensions of Read to decode data as per Bitcoin consensus.
WriteExt
Extensions of Write to encode data as per Bitcoin consensus.

Functions§

deserialize
Deserializes an object from a vector, will error if said deserialization doesn’t consume the entire vector.
deserialize_partial
Deserializes an object from a vector, but will not report an error if said deserialization doesn’t consume the entire vector.
serialize
Encodes an object into a vector.
verify_scriptbitcoinconsensus
Verifies spend of an input script.
verify_script_with_flagsbitcoinconsensus
Verifies spend of an input script.
verify_transactionbitcoinconsensus
Verifies that this transaction is able to spend its inputs.
verify_transaction_with_flagsbitcoinconsensus
Verifies that this transaction is able to spend its inputs.