Add seed phrases

This commit is contained in:
Aditya Kulkarni
2019-09-08 19:52:25 -07:00
parent f9d0878a81
commit c08b51fde7
5 changed files with 94 additions and 57 deletions

View File

@@ -16,8 +16,21 @@ pub mod grpc_client {
pub fn main() {
use clap::{Arg, App};
let matches = App::new("Light Client")
.version("1.0")
.arg(Arg::with_name("seed")
.short("s")
.long("seed")
.value_name("seed_phrase")
.help("Create a new wallet with the given 24-word seed phrase. Will fail if wallet already exists")
.takes_value(true))
.get_matches();
let mut lightclient = LightClient::new(matches.value_of("seed")).unwrap();
println!("Starting Light Client");
let mut lightclient = LightClient::new();
// At startup, read the wallet.dat
commands::do_user_command(&"read".to_string(), &mut lightclient);