refactor(api): expand and test api as stealth http interface

This commit is contained in:
Renato Britto
2026-04-05 20:16:24 -03:00
parent 1b06b64d98
commit 720342f880
13 changed files with 1001 additions and 39 deletions
+3 -3
View File
@@ -26,12 +26,12 @@ pub use stealth_model::scan::{EngineSettings, ScanTarget, UtxoInput};
///
/// Construct one per request (or per CLI invocation) and call
/// [`analyze`](Self::analyze).
pub struct AnalysisEngine<'a, G: BlockchainGateway> {
pub struct AnalysisEngine<'a, G: BlockchainGateway + ?Sized> {
gateway: &'a G,
settings: EngineSettings,
}
impl<G: BlockchainGateway> std::fmt::Debug for AnalysisEngine<'_, G> {
impl<G: BlockchainGateway + ?Sized> std::fmt::Debug for AnalysisEngine<'_, G> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("AnalysisEngine")
.field("settings", &self.settings)
@@ -39,7 +39,7 @@ impl<G: BlockchainGateway> std::fmt::Debug for AnalysisEngine<'_, G> {
}
}
impl<'a, G: BlockchainGateway> AnalysisEngine<'a, G> {
impl<'a, G: BlockchainGateway + ?Sized> AnalysisEngine<'a, G> {
pub fn new(gateway: &'a G, settings: EngineSettings) -> Self {
Self { gateway, settings }
}