diff --git a/crates/keyfork-shard/src/lib.rs b/crates/keyfork-shard/src/lib.rs index 4fbecaa..d930bef 100644 --- a/crates/keyfork-shard/src/lib.rs +++ b/crates/keyfork-shard/src/lib.rs @@ -173,7 +173,6 @@ pub trait Format { reader: impl Read + Send + Sync, ) -> Result<(), Box> { let mut pm = Terminal::new(stdin(), stdout())?; - let wordlist = Wordlist::default(); // parse input let private_keys = private_key_discovery @@ -207,12 +206,12 @@ pub trait Format { let validator = MnemonicSetValidator { word_lengths: [9, 24], }; - let [nonce_mnemonic, pubkey_mnemonic] = pm.prompt_validated_wordlist( - QRCODE_COULDNT_READ, - &wordlist, - 3, - validator.to_fn(), - )?; + let [nonce_mnemonic, pubkey_mnemonic] = pm + .prompt_validated_wordlist::( + QRCODE_COULDNT_READ, + 3, + validator.to_fn(), + )?; let nonce = nonce_mnemonic .as_bytes() @@ -228,8 +227,7 @@ pub trait Format { // create our shared key let our_key = EphemeralSecret::random(); - let our_pubkey_mnemonic = - Mnemonic::from_entropy(PublicKey::from(&our_key).as_bytes(), Default::default())?; + let our_pubkey_mnemonic = Mnemonic::from_bytes(PublicKey::from(&our_key).as_bytes())?; let shared_secret = our_key .diffie_hellman(&PublicKey::from(their_pubkey)) .to_bytes(); @@ -279,8 +277,7 @@ pub trait Format { } // safety: size of out_bytes is constant and always % 4 == 0 - let payload_mnemonic = - unsafe { Mnemonic::from_raw_entropy(&out_bytes, Default::default()) }; + let payload_mnemonic = unsafe { Mnemonic::from_raw_bytes(&out_bytes) }; #[cfg(feature = "qrcode")] {