Skip to content

UtxoEntries (Class)

A collection of UTXO entry references.

Provides methods for managing and querying multiple UTXOs.

items property writable

items: list[UtxoEntryReference]

The list of UTXO entry references.

__eq__

__eq__(other: UtxoEntries) -> bool

Equality comparison.

PARAMETER DESCRIPTION
other

Another UtxoEntries collection to compare against.

TYPE: UtxoEntries

RETURNS DESCRIPTION
bool

True if both collections contain identical entries in the same order.

TYPE: bool

__repr__

__repr__() -> str

The detailed string representation.

RETURNS DESCRIPTION
str

The UtxoEntries as a repr string.

TYPE: str

amount

amount() -> int

Calculate the total amount of all UTXOs.

RETURNS DESCRIPTION
int

The sum of all UTXO values in sompi.

TYPE: int

sort

sort() -> None

Sort the UTXO entries by amount in ascending order.

to_dict

to_dict() -> dict

Get a dictionary representation of the UtxoEntries. Note that this creates a second separate object on the Python heap.

RETURNS DESCRIPTION
dict

the UtxoEntries in dictionary form.

TYPE: dict