Skip to content

UtxoProcessor (Class)

UTXO processor coordinating address tracking and UTXO updates.

is_active property

is_active: bool

Whether the processor is connected and running.

network_id property

network_id: Optional[NetworkId]

The network id used by the processor (if set).

rpc property

rpc: RpcClient

The associated RPC client.

__new__

__new__(rpc: RpcClient, network_id: NetworkId) -> UtxoProcessor

Create a new UtxoProcessor.

PARAMETER DESCRIPTION
rpc

The RPC client to use for network communication.

TYPE: RpcClient

network_id

Network identifier for UTXO processing.

TYPE: NetworkId

add_event_listener

add_event_listener(callback: Callable[..., Any], *args: Any, **kwargs: Any) -> None
add_event_listener(event_or_callback: str | UtxoProcessorEvent | Sequence[str | UtxoProcessorEvent], callback: Callable[..., Any], *args: Any, **kwargs: Any) -> None
add_event_listener(event_or_callback: Any, callback: Optional[Any] = None, *args: Any, **kwargs: Any) -> None

Register a callback for UtxoProcessor events.

PARAMETER DESCRIPTION
event_or_callback

Event target as string (kebab-case), UtxoProcessorEvent variant, a list of those, "*" / "all", or a callback (listen to all events).

TYPE: Any

callback

Function to call when event occurs (required when event_or_callback is an event target).

TYPE: Optional[Any] DEFAULT: None

*args

Additional arguments to pass to callback.

TYPE: Any DEFAULT: ()

**kwargs

Additional keyword arguments to pass to callback.

TYPE: Any DEFAULT: {}

RETURNS DESCRIPTION
None

None

Notes

Callback will be invoked as: callback(args, event, *kwargs) Where event is a dict like: {"type": str, "data": ...}

remove_all_event_listeners

remove_all_event_listeners() -> None

Remove all registered event listeners.

RETURNS DESCRIPTION
None

None

remove_event_listener

remove_event_listener(event_or_callback: Callable[..., Any]) -> None
remove_event_listener(event_or_callback: str | UtxoProcessorEvent | Sequence[str | UtxoProcessorEvent], callback: Optional[Callable[..., Any]] = None) -> None
remove_event_listener(event_or_callback: Any, callback: Optional[Any] = None) -> None

Remove an event listener.

PARAMETER DESCRIPTION
event_or_callback

Event target as string (kebab-case), UtxoProcessorEvent variant, a list of those, "*" / "all", or a callback (remove from all events).

TYPE: Any

callback

Specific callback to remove, or None to remove all callbacks for the event target(s).

TYPE: Optional[Any] DEFAULT: None

RETURNS DESCRIPTION
None

None

set_coinbase_transaction_maturity_daa staticmethod

set_coinbase_transaction_maturity_daa(network_id: NetworkId, value: int) -> None

Set the coinbase transaction maturity period DAA for a network.

set_network_id

set_network_id(network_id: NetworkId) -> None

Set the network id for the processor.

set_user_transaction_maturity_daa staticmethod

set_user_transaction_maturity_daa(network_id: NetworkId, value: int) -> None

Set the user transaction maturity period DAA for a network.

start

start() -> None

Start UTXO processing (async).

stop

stop() -> None

Stop UTXO processing (async).