Crates.io | laron-wallet |
lib.rs | laron-wallet |
version | 0.1.2 |
source | src |
created_at | 2022-09-22 10:56:54.358752 |
updated_at | 2023-05-02 21:12:46.850138 |
description | Ethereum wallet library |
homepage | |
repository | https://github.com/laron-tech/laron-wallet |
max_upload_size | |
id | 671637 |
size | 254,168 |
This is a library for generating and managing wallets. This library contains the following features:
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