2 releases
0.1.2 | May 2, 2023 |
---|---|
0.1.1 | Sep 29, 2022 |
0.1.0 |
|
#8 in #hd-wallet
93KB
843 lines
laron-wallet
This is a library for generating and managing wallets. This library contains the following features:
- BIP39 Mnemonic and Seed Generation
- BIP32 HD Wallet Generation
TODO
- Add support RPC calls
- Add support for Contracts
Example
use laron_wallet::bips::bip39::{Mnemonic, MnemonicType};
use laron_wallet::bips::wordlists::Language;
use laron_wallet::bips::bip32::ExtendedKey;
use laron_wallet::bips::DerivationPath;
let mnemonic = Mnemonic::new(MnemonicType::Words12, Language::English);
let seed = mnemonic.to_seed("password");
let master_key = ExtendedKey::new_master(&seed).unwrap();
// define the path to derive, We will use ethereum path
let path = DerivationPath::parse("m/44'/60'/0'/0/0").unwrap();
let child_key = master_key.derive_path(&path).unwrap();
let private_key = child_key.private_key();
let public_key = private_key.public_key();
let address = public_key.address();
License: GPL-3.0-or-later
Dependencies
~5.5MB
~109K SLoC