Skip to content

TransactionOutpoint (Class)

Reference to a specific output in a previous transaction.

An outpoint uniquely identifies a UTXO by its transaction ID and output index.

index property

index: int

The index of the output within the transaction.

transaction_id property

transaction_id: str

The ID of the transaction containing the referenced output.

__eq__

__eq__(other: TransactionOutpoint) -> bool

__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: Hash

index

The index of the output within the transaction.

TYPE: int

RETURNS DESCRIPTION
TransactionOutpoint

A new TransactionOutpoint instance.

TYPE: TransactionOutpoint

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: dict

RETURNS DESCRIPTION
TransactionOutpoint

A new TransactionOutpoint instance.

TYPE: TransactionOutpoint

RAISES DESCRIPTION
KeyError

If required keys are missing.

ValueError

If values are invalid.

get_id

get_id() -> str

Get the unique identifier string for this outpoint.

RETURNS DESCRIPTION
str

A string in format "transaction_id-index".

TYPE: str

to_dict

to_dict() -> 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: dict