Skip to main content

Module types

Module types 

Source
Expand description

Essential Bitcoin types for consensus validation

Structsยง

Bip54BoundaryTimestamps
BIP54 timewarp: timestamps of boundary blocks for period-boundary checks.
Block
Block: โ„ฌ = โ„‹ ร— ๐’ฏ๐’ณ*
BlockContext
Block validation context
BlockHash
Block hash: newtype wrapper for type safety
BlockHeader
Block Header: โ„‹ = โ„ค ร— โ„ ร— โ„ ร— โ„• ร— โ„• ร— โ„•
BlockHeight
Block height: newtype wrapper for type safety
OutPoint
OutPoint: ๐’ช = โ„ ร— โ„•
ScriptContext
Script execution context
SharedByteString
Shareable script_pubkey for UTXO: small scripts use inline storage; longer use Arc<[u8]>. Clone is cheap (inline copies up to 64 bytes, shared is Arc::clone). Serde matches ByteString.
TimeContext
Time context for consensus validation
Transaction
Transaction: ๐’ฏ๐’ณ = โ„• ร— โ„* ร— ๐’ฏ* ร— โ„•
TransactionInput
Transaction Input: โ„ = ๐’ช ร— ๐•Š ร— โ„•
TransactionOutput
Transaction Output: ๐’ฏ = โ„ค ร— ๐•Š
UTXO
UTXO: ๐’ฐ = โ„ค ร— ๐•Š ร— โ„•

Enumsยง

ForkId
Stable identifier for each consensus-affecting fork (BIP or soft-fork bundle).
Network
Network type for consensus validation
ValidationResult
Validation result

Functionsยง

utxo_set_insert
Insert owned UTXO into UtxoSet (wraps in Arc). Convenience for tests and one-off inserts.

Type Aliasesยง

ByteString
Byte string type
Hash
Hash type: 256-bit hash
Integer
Integer type
Natural
Natural number type
UtxoSet
Witness
Witness data: stack of witness elements (SegWit/Taproot)