TransactionInput (Class)¶
A transaction input referencing a previous output.
Inputs reference UTXOs (unspent transaction outputs) that are being spent.
previous_outpoint
property
writable
¶
previous_outpoint: TransactionOutpoint
The outpoint referencing the UTXO being spent.
| RETURNS | DESCRIPTION |
|---|---|
TransactionOutpoint
|
The previous output reference.
TYPE:
|
sequence
property
writable
¶
The sequence number used for relative time locks.
| RETURNS | DESCRIPTION |
|---|---|
int
|
The sequence number.
TYPE:
|
sig_op_count
property
writable
¶
The number of signature operations in this input.
| RETURNS | DESCRIPTION |
|---|---|
int
|
The signature operation count.
TYPE:
|
signature_script_as_hex
property
¶
The unlocking script (signature) that proves ownership of the UTXO.
| RETURNS | DESCRIPTION |
|---|---|
Optional[str]
|
str | None: The signature script as a hex string, or None if not set. |
utxo
property
¶
utxo: Optional[UtxoEntryReference]
The UTXO entry reference for transaction signing.
| RETURNS | DESCRIPTION |
|---|---|
Optional[UtxoEntryReference]
|
UtxoEntryReference | None: The UTXO reference, or None if not set. |
__new__
¶
__new__(previous_outpoint: TransactionOutpoint, signature_script: Binary, sequence: int, sig_op_count: int, utxo: Optional[UtxoEntryReference] = None) -> TransactionInput
Create a new transaction input.
| PARAMETER | DESCRIPTION |
|---|---|
previous_outpoint
|
Reference to the UTXO being spent.
TYPE:
|
signature_script
|
The unlocking script (signature).
TYPE:
|
sequence
|
Sequence number for relative time locks.
TYPE:
|
sig_op_count
|
Number of signature operations.
TYPE:
|
utxo
|
Optional UTXO entry reference for signing.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
TransactionInput
|
A new TransactionInput instance.
TYPE:
|