rustywallet_checker/lib.rs
1//! # rustywallet-checker
2//!
3//! Cryptocurrency balance checker for Bitcoin and Ethereum addresses.
4//!
5//! This crate provides async functions to check address balances using
6//! public blockchain APIs.
7//!
8//! ## Features
9//!
10//! - Check Bitcoin address balances (legacy, segwit, taproot)
11//! - Check Ethereum address balances
12//! - Multiple API provider fallbacks
13//! - Async/await support with tokio
14//!
15//! ## Quick Start
16//!
17//! ```no_run
18//! use rustywallet_checker::prelude::*;
19//!
20//! #[tokio::main]
21//! async fn main() -> Result<(), CheckerError> {
22//! // Check Bitcoin balance
23//! let btc = check_btc_balance("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa").await?;
24//! println!("BTC Balance: {} satoshis", btc.balance);
25//!
26//! // Check Ethereum balance
27//! let eth = check_eth_balance("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045").await?;
28//! println!("ETH Balance: {} ETH", eth.balance_eth);
29//!
30//! Ok(())
31//! }
32//! ```
33//!
34//! ## API Providers
35//!
36//! ### Bitcoin
37//! - Primary: blockstream.info (supports all address types)
38//! - Fallback: blockchain.info (legacy addresses only)
39//!
40//! ### Ethereum
41//! - Multiple public RPC endpoints with automatic fallback
42
43pub mod bitcoin;
44pub mod error;
45pub mod ethereum;
46pub mod prelude;
47
48// Re-export main types at crate root
49pub use bitcoin::{check_btc_balance, BitcoinBalance};
50pub use error::CheckerError;
51pub use ethereum::{check_eth_balance, EthereumBalance};