zecscope_scanner/
lib.rs

1//! # zecscope-scanner
2//!
3//! High-level Zcash shielded transaction scanner for viewing keys.
4//!
5//! This crate provides a simple API to scan Zcash compact blocks using
6//! Unified Full Viewing Keys (UFVKs) and discover incoming shielded transactions
7//! in both the Sapling and Orchard pools.
8//!
9//! ## Features
10//!
11//! - **Simple API**: Just provide a UFVK and compact blocks, get transactions
12//! - **Sapling + Orchard**: Scans both shielded pools (Orchard requires `orchard` feature)
13//! - **WASM-compatible**: Use in browsers via WebAssembly (enable `wasm` feature)
14//! - **Serde support**: All types serialize/deserialize for easy JSON interop
15//!
16//! ## Example
17//!
18//! ```rust,ignore
19//! use zecscope_scanner::{Scanner, ScanRequest, Network};
20//!
21//! // Create a scanner for mainnet
22//! let scanner = Scanner::new(Network::Mainnet);
23//!
24//! // Scan blocks with a viewing key
25//! let request = ScanRequest {
26//!     viewing_key: "uview1...".to_string(),
27//!     key_id: "my-wallet".to_string(),
28//!     compact_blocks: blocks, // Vec<CompactBlock>
29//! };
30//!
31//! let transactions = scanner.scan(&request)?;
32//!
33//! for tx in transactions {
34//!     println!("{}: {} ZEC ({})", tx.txid, tx.amount_zec(), tx.pool);
35//! }
36//! ```
37
38mod error;
39mod scanner;
40mod types;
41
42pub use error::{ScanError, ScanResult};
43pub use scanner::Scanner;
44pub use types::*;
45
46// Re-export useful types from zcash crates
47pub use zcash_protocol::consensus::Network;