1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! Lifecycle automation services for Tangle v2 contracts
//!
//! This module provides background keepers that automate lifecycle operations
//! on Tangle v2 contracts. These can be run by blueprint operators to ensure
//! timely execution of periodic operations.
//!
//! ## Available Keepers
//!
//! - [`EpochKeeper`] - Monitors and triggers epoch distributions on InflationPool
//! - [`RoundKeeper`] - Advances rounds on MultiAssetDelegation when ready
//! - [`StreamKeeper`] - Drips streaming payments for operators
//! - [`SubscriptionBillingKeeper`] - Bills subscription services when payment intervals elapse
//!
//! ## Usage
//!
//! ```rust,ignore
//! use blueprint_tangle_extra::services::{
//! BackgroundKeeper, EpochKeeper, RoundKeeper, StreamKeeper,
//! KeeperConfig, KeeperHandle,
//! };
//!
//! // Create keepers with shared config
//! let config = KeeperConfig::new(http_rpc, keystore)
//! .with_inflation_pool(inflation_pool_address)
//! .with_multi_asset_delegation(mad_address)
//! .with_streaming_payment_manager(spm_address);
//!
//! // Start background services
//! let epoch_handle = EpochKeeper::start(config.clone(), shutdown.subscribe());
//! let round_handle = RoundKeeper::start(config.clone(), shutdown.subscribe());
//! let stream_handle = StreamKeeper::start(config.clone(), shutdown.subscribe());
//!
//! // Wait for shutdown
//! shutdown.send(()).ok();
//! epoch_handle.await?;
//! round_handle.await?;
//! stream_handle.await?;
//! ```
pub use SubscriptionBillingKeeper;
pub use EpochKeeper;
pub use ;
pub use RoundKeeper;
pub use StreamKeeper;