aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/new.rs
diff options
context:
space:
mode:
authorNicholas Rodrigues Lordello <[email protected]>2020-11-30 19:11:36 +0100
committerNicholas Rodrigues Lordello <[email protected]>2020-11-30 19:11:36 +0100
commita699b6b4fe6f0e2567f7298fd8174e779f1bd43d (patch)
treee79f3927acc133cd05e06e22b1c95c776effe991 /src/cmd/new.rs
parent678d45e7ae09510796d27a80ecd894f6a1ad8279 (diff)
hd wallet impl
Diffstat (limited to 'src/cmd/new.rs')
-rw-r--r--src/cmd/new.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/cmd/new.rs b/src/cmd/new.rs
index 9110c34..699b825 100644
--- a/src/cmd/new.rs
+++ b/src/cmd/new.rs
@@ -1,7 +1,7 @@
-//! Module implementing the `new` command for generating a mnemonic for a new
+//! Module implementing the `new` subcommand for generating a mnemonic for a new
//! hierarchical deterministic wallet.
-use crate::mnemonic::{Language, Seed};
+use crate::mnemonic::{Language, Mnemonic};
use anyhow::Result;
use structopt::StructOpt;
@@ -18,8 +18,7 @@ pub struct Options {
}
pub fn run(options: Options) -> Result<()> {
- let seed = Seed::random(options.length)?;
- println!("{}", seed.to_mnemonic(options.language));
-
+ let mnemonic = Mnemonic::random(options.language, options.length)?;
+ println!("{}", mnemonic);
Ok(())
}