keyfork/crates/util/keyfork-mnemonic-util/src/bin/keyfork-mnemonic-from-seed.rs

17 lines
376 B
Rust

//!
use keyfork_mnemonic_util::Mnemonic;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let input = std::io::stdin();
let mut line = String::new();
input.read_line(&mut line)?;
let decoded = smex::decode(line.trim())?;
let mnemonic = unsafe { Mnemonic::from_raw_entropy(&decoded, Default::default()) };
println!("{mnemonic}");
Ok(())
}