Expand description
§zecscope-scanner
High-level Zcash shielded transaction scanner for viewing keys.
This crate provides a simple API to scan Zcash compact blocks using Unified Full Viewing Keys (UFVKs) and discover incoming shielded transactions in both the Sapling and Orchard pools.
§Features
- Simple API: Just provide a UFVK and compact blocks, get transactions
- Sapling + Orchard: Scans both shielded pools (Orchard requires
orchardfeature) - WASM-compatible: Use in browsers via WebAssembly (enable
wasmfeature) - Serde support: All types serialize/deserialize for easy JSON interop
§Example
ⓘ
use zecscope_scanner::{Scanner, ScanRequest, Network};
// Create a scanner for mainnet
let scanner = Scanner::new(Network::Mainnet);
// Scan blocks with a viewing key
let request = ScanRequest {
viewing_key: "uview1...".to_string(),
key_id: "my-wallet".to_string(),
compact_blocks: blocks, // Vec<CompactBlock>
};
let transactions = scanner.scan(&request)?;
for tx in transactions {
println!("{}: {} ZEC ({})", tx.txid, tx.amount_zec(), tx.pool);
}Structs§
- Chain
Metadata - Chain metadata from compact blocks.
- Compact
Block - A compact block from lightwalletd.
- Compact
Orchard Action - A compact Orchard action.
- Compact
Sapling Output - A compact Sapling output.
- Compact
Sapling Spend - A compact Sapling spend.
- Compact
Tx - A compact transaction.
- Scan
Request - Request to scan compact blocks with a viewing key.
- Scan
Summary - Result of scanning a range of blocks.
- Scanner
- High-level scanner for Zcash shielded transactions.
- ZecTransaction
- A discovered shielded transaction.
Enums§
- Network
- The enumeration of known Zcash networks.
- Scan
Error - Errors that can occur during scanning.
- Shielded
Pool - Which shielded pool a transaction belongs to.
- TxDirection
- Direction of a transaction relative to the viewing key.
Type Aliases§
- Scan
Result - Result type alias for scanner operations.