Module transaction
Expand description
Bitcoin transactions.
A transaction describes a transfer of money. It consumes previously-unspent transaction outputs and produces new ones, satisfying the condition to spend the old outputs (typically a digital signature with a specific key must be provided) and defining the condition to spend the new ones. The use of digital signatures ensures that coins cannot be spent by unauthorized parties.
This module provides the structures and functions needed to support transactions.
Structs§
- Index
OutOf Bounds Error - Error attempting to do an out of bounds access on a vector.
- Input
Weight Prediction - Weight prediction of an individual input.
- Inputs
Index Error - Error attempting to do an out of bounds access on the transaction inputs vector.
- OutPoint
- A reference to a transaction output.
- Outputs
Index Error - Error attempting to do an out of bounds access on the transaction outputs vector.
- Sequence
- Bitcoin transaction input sequence number.
- Transaction
- Bitcoin transaction.
- TxIn
- Bitcoin transaction input.
- TxOut
- Bitcoin transaction output.
- Txid
- A bitcoin transaction hash/transaction ID.
- Version
- The transaction version.
- Wtxid
- A bitcoin witness transaction ID.
Enums§
- Parse
OutPoint Error - An error in parsing an OutPoint.
Functions§
- effective_
value - Computes the value of an output accounting for the cost of spending it.
- predict_
weight - Predicts the weight of a to-be-constructed transaction.
- predict_
weight_ from_ slices - Predicts the weight of a to-be-constructed transaction in const context.