Create and register a new contract.
Implementations may validate that:
params.typeparams.script matches the script derived from params.paramsThe contract script is used as the unique identifier.
Delete a contract by script and stop watching it (if applicable).
Release resources (stop watching, clear listeners).
Get all possible spending paths for a contract.
Returns an empty array if the contract or its handler cannot be found.
List contracts with optional filters.
Optionalfilter: ContractFilterList contracts and their current virtual outputs.
If no filter is provided, returns all contracts with their virtual outputs.
Optionalfilter: ContractFilterGet all currently spendable paths for a contract.
Returns an empty array if the contract or its handler cannot be found.
Whether the underlying watcher is currently active.
Subscribe to contract events.
Unsubscribe function
Force a virtual output refresh from the indexer.
Without options, refreshes all contracts from scratch. With options, narrows the refresh to specific scripts and/or a time window.
Optionalopts: RefreshVtxosOptionsConvenience helper to update only the contract state.
Stamp raw virtual outputs with the correct per-contract tapscripts (forfeit, intent, tap tree).
Resolves each vtxo's
scriptto its owning contract via the contract repository and attaches the matching tapscripts. Throws when any vtxo references a script with no registered contract — callers are expected to register the contract before asking for annotation. This is the single shared path that replaces scatteredextendVirtualCoin*calls in wallet/handler code, and keeps the wallet from silently stamping the default tapscript onto a non-default vtxo.