Interface Watch.WatchInterface

  • Enclosing class:
    Watch

    public static interface Watch.WatchInterface
    • Method Detail

      • watch_channel

        ChannelMonitorUpdateStatus watch_channel​(OutPoint funding_txo,
                                                 ChannelMonitor monitor)
        Watches a channel identified by `funding_txo` using `monitor`. Implementations are responsible for watching the chain for the funding transaction along with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means calling [`block_connected`] and [`block_disconnected`] on the monitor. Note: this interface MUST error with [`ChannelMonitorUpdateStatus::PermanentFailure`] if the given `funding_txo` has previously been registered via `watch_channel`. [`get_outputs_to_watch`]: channelmonitor::ChannelMonitor::get_outputs_to_watch [`block_connected`]: channelmonitor::ChannelMonitor::block_connected [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected
      • update_channel

        ChannelMonitorUpdateStatus update_channel​(OutPoint funding_txo,
                                                  ChannelMonitorUpdate update)
        Updates a channel identified by `funding_txo` by applying `update` to its monitor. Implementations must call [`update_monitor`] with the given update. See [`ChannelMonitorUpdateStatus`] for invariants around returning an error. [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor
      • release_pending_monitor_events

        ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ[] release_pending_monitor_events()
        Returns any monitor events since the last call. Subsequent calls must only return new events. Note that after any block- or transaction-connection calls to a [`ChannelMonitor`], no further events may be returned here until the [`ChannelMonitor`] has been fully persisted to disk. For details on asynchronous [`ChannelMonitor`] updating and returning [`MonitorEvent::Completed`] here, see [`ChannelMonitorUpdateStatus::InProgress`].