blob: fa6e576cb2708833d5674db89e76d36f505cefcb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
mod account;
mod cmd;
mod hash;
mod hdk;
mod mnemonic;
mod rand;
use crate::cmd::*;
use std::process;
use structopt::StructOpt;
#[derive(Debug, StructOpt)]
#[structopt(
name = "hdwallet",
about = "Hierarchical deterministic wallet for Ethereum"
)]
enum Options {
Address(address::Options),
New(new::Options),
}
fn main() {
if let Err(err) = match Options::from_args() {
Options::Address(options) => address::run(options),
Options::New(options) => new::run(options),
} {
if cfg!(debug_assertions) {
eprintln!("ERROR: {:?}", err);
} else {
eprintln!("ERROR: {}", err);
}
process::exit(-1);
}
}
|