Class ExitWatchtowerService
Monitors the blockchain for partial tree broadcasts and auto-starts unilateral exits when detected. If someone starts unrolling the tree but doesn't finish, previous owners may claim funds after their CSV timeout. The watchtower detects this and continues the exit automatically.
public class ExitWatchtowerService
- Inheritance
-
ExitWatchtowerService
- Inherited Members
Constructors
ExitWatchtowerService(IClientTransport, IVtxoStorage, IVirtualTxStorage, IBitcoinBlockchain, IContractStorage, IWalletProvider, IContractService, UnilateralExitService, ILogger<ExitWatchtowerService>?)
Monitors the blockchain for partial tree broadcasts and auto-starts unilateral exits when detected. If someone starts unrolling the tree but doesn't finish, previous owners may claim funds after their CSV timeout. The watchtower detects this and continues the exit automatically.
public ExitWatchtowerService(IClientTransport transport, IVtxoStorage vtxoStorage, IVirtualTxStorage virtualTxStorage, IBitcoinBlockchain broadcaster, IContractStorage contractStorage, IWalletProvider walletProvider, IContractService contractService, UnilateralExitService exitService, ILogger<ExitWatchtowerService>? logger = null)
Parameters
transportIClientTransportvtxoStorageIVtxoStoragevirtualTxStorageIVirtualTxStoragebroadcasterIBitcoinBlockchaincontractStorageIContractStoragewalletProviderIWalletProvidercontractServiceIContractServiceexitServiceUnilateralExitServiceloggerILogger<ExitWatchtowerService>
Methods
CheckAndRespondAsync(CancellationToken)
Check for partial tree broadcasts and auto-start exits. Call periodically or on block notifications.
public Task CheckAndRespondAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken