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 include their current VTXOs.
If no filter is provided, returns all contracts with their VTXOs.
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
Convenience helper to update only the contract state.
Contract lifecycle and VTXO orchestration API.
Responsibilities:
Notes:
onContractEvent()is just for subscribing).Example