UtxoEntryReference (Class)¶
A reference to a UTXO entry.
Provides access to UTXO data for transaction building and signing.
address
property
¶
address: Optional[Address]
The address associated with this UTXO, or None if not available.
from_dict
classmethod
¶
from_dict(dict: dict) -> UtxoEntryReference
Create a UtxoEntryReference from a dictionary.
Supports two formats:
Flat format
- 'address' (str | None): The address string
- 'outpoint' (dict): Transaction outpoint with 'transactionId' and 'index'
- 'amount' (int): The UTXO value in sompi
- 'scriptPublicKey' (dict | str): Dict with 'version' and 'script', or hex string
- 'blockDaaScore' (int): Block DAA score
- 'isCoinbase' (bool): Whether from coinbase transaction
Nested format
- 'address' (str | None): The address string
- 'outpoint' (dict): Transaction outpoint with 'transactionId' and 'index'
- 'utxoEntry' (dict): Nested dict containing amount, scriptPublicKey, blockDaaScore, isCoinbase
| RETURNS | DESCRIPTION |
|---|---|
UtxoEntryReference
|
A new UtxoEntryReference instance.
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
KeyError
|
If required keys are missing. |
ValueError
|
If values are invalid. |
to_dict
¶
Get a dictionary representation of the UtxoEntryReference. Note that this creates a second separate object on the Python heap.
| RETURNS | DESCRIPTION |
|---|---|
dict
|
the UtxoEntryReference in dictionary form.
TYPE:
|