laron-wallet

Crates.iolaron-wallet
lib.rslaron-wallet
version0.1.2
sourcesrc
created_at2022-09-22 10:56:54.358752
updated_at2023-05-02 21:12:46.850138
descriptionEthereum wallet library
homepage
repositoryhttps://github.com/laron-tech/laron-wallet
max_upload_size
id671637
size254,168
Ade M Ramdani (ademr0)

documentation

README

laron-wallet

build License: GPL v3 crates.io FOSSA Status

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

Commit count: 0

cargo fmt