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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
//! # Neo Wallets
//!
//! Wallet management for the Neo N3 blockchain.
//!
//! ## Overview
//!
//! The neo_wallets module provides comprehensive wallet management functionality for the Neo N3 blockchain.
//! It includes:
//!
//! - Wallet creation and loading
//! - NEP-6 wallet standard support
//! - BIP-39 mnemonic phrase support
//! - Transaction signing
//! - Key management and derivation
//! - Hardware wallet integration (Ledger)
//! - Secure key storage
//! - Wallet backup and recovery
//!
//! This module enables secure management of private keys and accounts, allowing users to interact
//! with the Neo N3 blockchain in a secure manner.
//!
//! ## Examples
//!
//! ### Creating and using a wallet
//!
//! ```rust,no_run
//! use neo3::neo_wallets::Wallet;
//! use std::path::PathBuf;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create a new wallet
//! let mut wallet = Wallet::new();
//!
//! // Create a new account in the wallet
//! let account = wallet.create_new_account()?;
//! println!("New account address: {}", account.get_address());
//!
//! // Encrypt accounts before persisting to NEP-6 JSON.
//! wallet.encrypt_accounts("strong_password")?;
//!
//! // Save the wallet to a file
//! // SECURITY: Wallet files can contain private keys. Do not commit them to version control.
//! wallet.save_to_file(PathBuf::from("my_wallet.json"))?;
//!
//! Ok(())
//! }
//! ```
//!
//! ### Working with BIP-39 accounts
//!
//! ```no_run
//! use neo3::neo_wallets::Bip39Account;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create a new BIP-39 account
//! let account = Bip39Account::create("password123")?;
//! let _mnemonic = account.mnemonic().to_string();
//! // SECURITY: Store the mnemonic securely offline. Avoid logging it.
//!
//! // Recover an account from a mnemonic
//! let mnemonic = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art";
//! let recovered = Bip39Account::from_bip39_mnemonic("password123", mnemonic)?;
//!
//! Ok(())
//! }
//! ```
pub use ;
use NistP256;
pub use yubihsm;
use crateAccount;
pub use *;
pub use *;
pub use *;
pub use WalletSigner;
pub use WalletTrait;
/// A wallet instantiated with a locally stored private key
pub type LocalWallet = ;
// pub type LocalWallet = Wallet<ethers_core::k256::ecdsa::SigningKey>;
/// A wallet instantiated with a YubiHSM
pub type YubiWallet = ;
// #[cfg(all(feature = "yubihsm", not(target_arch = "wasm32")))]