From a699b6b4fe6f0e2567f7298fd8174e779f1bd43d Mon Sep 17 00:00:00 2001 From: Nicholas Rodrigues Lordello Date: Mon, 30 Nov 2020 19:11:36 +0100 Subject: hd wallet impl --- src/cmd/new.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/cmd/new.rs') 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(()) } -- cgit v1.2.3