TransactionOutpoint (Class)¶
Reference to a specific output in a previous transaction.
An outpoint uniquely identifies a UTXO by its transaction ID and output index.
transaction_id
property
¶
The ID of the transaction containing the referenced output.
__new__
¶
__new__(transaction_id: Hash, index: int) -> TransactionOutpoint
Create a new transaction outpoint.
| PARAMETER | DESCRIPTION |
|---|---|
transaction_id
|
The ID of the transaction containing the output.
TYPE:
|
index
|
The index of the output within the transaction.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
TransactionOutpoint
|
A new TransactionOutpoint instance.
TYPE:
|
from_dict
classmethod
¶
from_dict(dict: dict) -> TransactionOutpoint
Create a TransactionOutpoint from a dictionary.
| PARAMETER | DESCRIPTION |
|---|---|
dict
|
Dictionary containing transaction outpoint fields with keys: - 'transactionId' (str): The transaction ID as hex string - 'index' (int): The output index
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
TransactionOutpoint
|
A new TransactionOutpoint instance.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
KeyError
|
If required keys are missing. |
ValueError
|
If values are invalid. |
get_id
¶
Get the unique identifier string for this outpoint.
| RETURNS | DESCRIPTION |
|---|---|
str
|
A string in format "transaction_id-index".
TYPE:
|
to_dict
¶
Get a dictionary representation of the TransactionOutpoint. Note that this creates a second separate object on the Python heap.
| RETURNS | DESCRIPTION |
|---|---|
dict
|
the TransactionOutpoint in dictionary form.
TYPE:
|