Module feeless::wallet [−][src]
File storage for seeds and private keys.
Manager
A WalletManager is provided to store multiple Wallets of different types. The supported wallets are Wallet::Seed, Wallet::Private, and (TODO) Wallet::Phrase.
Example usage
use feeless::wallet::WalletManager; use feeless::wallet::WalletId; let manager = WalletManager::new("my.wallet"); // Create if the file doesn't exist. manager.ensure().await?; // Create a new wallet with a random seed. let wallet_id = WalletId::random(); let wallet = manager.add_random_seed(wallet_id.to_owned()).await?; // Use the 3rd Nano address. let address = wallet.address(2)?; // Grab an existing wallet let wallet = manager.wallet(&wallet_id).await?;
Structs
WalletId | A unique identifier for a wallet. This can be generated randomly and given to the user for future reference, or given by the user. |
WalletManager | Manages multiple Wallets of different types of Wallets. Warning: Wallet files are not locked (yet). |
WalletStorage | Storage for all wallets. |
Enums
Wallet | The secret of an individual wallet. |