Skip to content

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.

amount property

amount: int

The amount in sompi (1 KAS = 100,000,000 sompi).

block_daa_score property

block_daa_score: int

The DAA score of the block containing this UTXO.

entry property

entry: UtxoEntry

The underlying UTXO entry.

is_coinbase property

is_coinbase: bool

Whether this UTXO is from a coinbase transaction.

outpoint property

The outpoint identifying this UTXO.

script_public_key property

script_public_key: ScriptPublicKey

The locking script for this UTXO.

__eq__

__eq__(other: object) -> bool

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

RAISES DESCRIPTION
KeyError

If required keys are missing.

ValueError

If values are invalid.

to_dict

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