pub struct Wallet { /* private fields */ }Expand description
A unified HD wallet that can derive keys for multiple cryptocurrencies.
This wallet holds a BIP39 mnemonic and derives a seed that can be used to generate addresses for Bitcoin, Ethereum, and other coins following BIP32/44/49/84 standards.
§Passphrase Support
The wallet supports an optional BIP39 passphrase (sometimes called “25th word”). This provides an extra layer of security - the same mnemonic with different passphrases will produce completely different wallets.
Implementations§
Source§impl Wallet
impl Wallet
Sourcepub fn mnemonic(&self) -> &str
pub fn mnemonic(&self) -> &str
Get the mnemonic phrase.
Security Warning: Handle this value carefully as it can reconstruct all derived keys.
Sourcepub fn seed(&self) -> &[u8; 64]
pub fn seed(&self) -> &[u8; 64]
Get the seed bytes for key derivation.
This seed can be used by chain-specific derivers (Bitcoin, Ethereum, etc.) to generate addresses following their respective standards.
Sourcepub const fn has_passphrase(&self) -> bool
pub const fn has_passphrase(&self) -> bool
Check if a passphrase was used to derive the seed.
Sourcepub fn word_count(&self) -> usize
pub fn word_count(&self) -> usize
Get the word count of the mnemonic.