Creates a new Watcher
instance.
events_url
- The URL for transaction events.timeout_duration
- Optional duration in milliseconds for watching events. If not provided,
a default timeout of 60,000 milliseconds (1 minute) is used.A new Watcher
instance.
Optional
timeout_duration: bigintSubscribes to transaction events.
subscriptions
- Vector of deploy subscriptions to be added.Result indicating success or an error message.
Unsubscribes from transaction events based on the provided transaction hash.
transaction_hash
- The transaction hash to unsubscribe.This method removes the deploy subscription associated with the provided transaction hash.
Represents a deploy watcher responsible for monitoring transaction events.
This struct allows clients to subscribe to transaction events, start watching for events, or wait for an event and handle the received deploy event data.
Fields
events_url
- The URL for transaction events.subscriptions
- Vector containing deploy subscriptions.active
- Reference-counted cell indicating whether the deploy watcher is active.timeout_duration
- Duration representing the optional timeout for watching events.