Create a contract watcher with the given providers and polling settings.
Contract watcher configuration
Add a contract to be watched.
Active contracts are immediately subscribed.
All contracts are polled to discover any existing virtual outputs (which may cause them to be watched even if inactive).
Force a poll of all active contracts. Useful for manual refresh or after app resume.
Get all in-memory contracts.
Get current connection state.
Contracts the watcher is actually tracking:
vtxo_spent events for
those unspent outputs are still observed).This is the single source of truth for "contracts whose VTXO state we still care about" — callers and the subscription itself fan out over the same set so nothing is reconciled that isn't also watched.
Check if currently watching.
Remove a contract from watching.
Start watching for virtual output events across all active contracts.
Stop watching for events.
Watches multiple contracts for virtual output state changes with resilient connection handling.
Features:
Example