UtxoEntry (Class)¶
An unspent transaction output (UTXO).
Represents a spendable output from a previous transaction. Contains information about the amount, locking script, and block position.
address
property
¶
address: Optional[Address]
The address associated with this UTXO, or None if not available.
from_dict
classmethod
¶
from_dict(dict: dict) -> UtxoEntry
Create a UtxoEntry from a dictionary.
| PARAMETER | DESCRIPTION |
|---|---|
dict
|
Dictionary containing utxo entry fields with keys: - 'address' (str | None): The address string - 'outpoint' (dict): Transaction outpoint with 'transactionId' and 'index' - 'amount' (int): The UTXO value in sompi - 'scriptPublicKey' (dict): Dict with 'version' (int) and 'script' (str) keys - 'blockDaaScore' (int): Block DAA score - 'isCoinbase' (bool): Whether from coinbase transaction
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
UtxoEntry
|
A new UtxoEntry instance.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
KeyError
|
If required keys are missing. |
ValueError
|
If values are invalid. |
to_dict
¶
Get a dictionary representation of the UtxoEntry. Note that this creates a second separate object on the Python heap.
| RETURNS | DESCRIPTION |
|---|---|
dict
|
the UtxoEntry in dictionary form.
TYPE:
|