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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//! Tangle Extra - Producer/Consumer for Tangle v2 EVM contracts
//!
//! This crate provides the producer/consumer pattern for processing jobs on Tangle v2
//! EVM contracts. It uses EVM events and transactions.
//!
//! ## Overview
//!
//! - **Producer**: Polls for `JobSubmitted` events and converts them to `JobCall` streams
//! - **Consumer**: Submits job results via the `submitResult` contract function
//! - **Extractors**: Extract metadata from job calls (call_id, service_id, etc.)
//! - **Keepers**: Background services for lifecycle automation (epoch, round, stream)
//!
//! ## Usage
//!
//! ```rust,ignore
//! use blueprint_tangle_extra::{TangleProducer, TangleConsumer};
//! use blueprint_client_tangle::TangleClient;
//!
//! async fn example(client: TangleClient) {
//! // Create producer to receive job events
//! let producer = TangleProducer::new(client.clone(), service_id);
//!
//! // Create consumer to submit results
//! let consumer = TangleConsumer::new(client);
//!
//! // Process jobs with the blueprint runner...
//! }
//! ```
//!
//! ## Keepers (feature: `keepers`)
//!
//! Background services that automate lifecycle operations:
//!
//! ```rust,ignore
//! use blueprint_tangle_extra::services::{
//! EpochKeeper, RoundKeeper, StreamKeeper, KeeperConfig, BackgroundKeeper,
//! };
//!
//! // Configure keepers
//! let config = KeeperConfig::new(rpc_url, keystore)
//! .with_inflation_pool(inflation_pool_address)
//! .with_multi_asset_delegation(mad_address);
//!
//! // Start background services
//! let epoch_handle = EpochKeeper::start(config.clone(), shutdown.subscribe());
//! let round_handle = RoundKeeper::start(config.clone(), shutdown.subscribe());
//! ```
extern crate alloc;
/// Per-job RFQ quote signing and verification
///
/// Requires the `keepers` feature (provides `blueprint-crypto/k256` and `alloy`).
/// Lifecycle automation services (keepers)
///
/// Requires the `keepers` feature to be enabled.
pub use AggregatingConsumer;
pub use AggregationServiceConfig;
pub use ;
pub use ;
pub use TangleConsumer;
pub use TangleLayer;
pub use TangleProducer;
// Strategy exports
pub use HttpServiceConfig;
pub use P2PGossipConfig;
pub use ;