verifier/
lib.rs

1//! # Starknet Contract Verifier
2//!
3//! A Rust library for verifying Starknet smart contracts on block explorers.
4//! This library provides functionality to verify contract source code against
5//! deployed contracts on Starknet networks.
6//!
7//! ## Features
8//!
9//! - **Contract Verification**: Verify deployed contracts against source code
10//! - **Multi-network Support**: Support for Mainnet, Sepolia, and custom networks
11//! - **Type Safety**: Strong typing for class hashes and contract data
12//! - **Error Handling**: Comprehensive error types with actionable suggestions
13//! - **License Management**: Automated license detection and validation
14//! - **Project Resolution**: Automatic dependency resolution for Scarb projects
15//!
16//! ## Example Usage
17//!
18//! ```rust,no_run
19//! use verifier::{
20//!     api::ApiClient,
21//!     class_hash::ClassHash,
22//! };
23//! use url::Url;
24//!
25//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
26//! // Create an API client
27//! let client = ApiClient::new(Url::parse("https://api.voyager.online/beta")?)?;
28//!
29//! // Create a class hash
30//! let class_hash = ClassHash::new("0x044dc2b3239382230d8b1e943df23b96f52eebcac93efe6e8bde92f9a2f1da18")?;
31//!
32//! // Check if the class exists
33//! let exists = client.get_class(&class_hash)?;
34//! println!("Class exists: {}", exists);
35//! # Ok(())
36//! # }
37//! ```
38
39/// API client and types for interacting with verification services
40pub mod api;
41
42/// Type-safe class hash handling and validation
43pub mod class_hash;
44
45/// Comprehensive error types with actionable suggestions
46pub mod errors;
47
48/// License detection and management utilities
49pub mod license;
50
51/// Project dependency resolution and source file collection
52pub mod resolver;
53
54/// Voyager block explorer integration utilities
55pub mod voyager;