@xo-cash/engine
    Preparing search index...

    Class BlockchainMonitor

    BlockchainMonitor class that provides blockchain monitoring operations.

    Index

    Constructors

    Methods

    • Handles the creation of a new unspent output by storing it in the state.

      Parameters

      • data: UnspentOutputData

        The unspent output data to store.

      Returns Promise<void>

      Resolves when the unspent output data is stored.

    • Initializes event listeners for electrum application events. Registers listeners for all available events from the electrum application, including system, chain status, block, transaction, output, and address events. This should be called after the electrum application is initialized. Note: Event data is not stored, listeners are registered but remain empty.

      Returns void

    • Handles script hash update notifications from the electrum protocol. When a script hash update is received, this method finds the scriptHash and updates the unspent outputs for it.

      Parameters

      • data: ScriptHashUpdate

        The script hash update data.

      Returns Promise<void>

      Resolves when the unspent outputs are updated.

    • Stops the blockchain monitor and releases resources.

      Returns Promise<void>

      Resolves when the blockchain monitor is stopped.