1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! # Dig Wallet Rust
//!
//! A comprehensive Rust wallet implementation for Chia blockchain with full DataLayer-Driver integration.
//!
//! ## Features
//!
//! - **Complete Wallet Management**: Create, import, and manage multiple wallets
//! - **Cryptographic Operations**: BIP39 mnemonics, BLS signatures, key derivation
//! - **Blockchain Integration**: Connect to Chia peers, select coins, check spendability
//! - **Secure Storage**: AES-256-GCM encrypted keyring storage
//! - **Address Handling**: Bech32m encoding/decoding for XCH addresses
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use dig_wallet::{Wallet, WalletError};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), WalletError> {
//! // Create or load a wallet
//! let wallet = Wallet::load(Some("my_wallet".to_string()), true).await?;
//!
//! // Get wallet address
//! let address = wallet.get_owner_public_key().await?;
//! println!("Wallet address: {}", address);
//!
//! Ok(())
//! }
//! ```
//!
//! ## Peer Connection
//!
//! ```rust,no_run
//! use dig_wallet::Wallet;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Connect to a random mainnet peer
//! let peer = Wallet::connect_mainnet_peer().await?;
//!
//! // Use peer for blockchain operations
//! let wallet = Wallet::load(Some("my_wallet".to_string()), true).await?;
//! let coins = wallet.select_unspent_coins(&peer, 1000000, 1000, vec![]).await?;
//!
//! Ok(())
//! }
//! ```
// Core exports
pub use WalletError;
pub use ;
pub use Wallet;
// Re-export commonly used types from DataLayer-Driver
pub use ;
// Version information
pub const VERSION: &str = env!;