mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-11-21 14:44:02 +01:00
avoid empty wallet seeds (#801)
* fix empty wallet seeds * mnemonic: return actual error with entropy size on recovering * seed: extend mnemonic error description * seed: clarify mnemonic errors * seed: clarify mnemonic errors, fix missing phrase test * Clean up seed handling add test --------- Co-authored-by: ardocrat <ardocrat@gri.mw>
This commit is contained in:
committed by
GitHub
co-authored by
ardocrat
parent
4a487390bd
commit
51ce8e2f2a
+4
-2
@@ -1726,8 +1726,10 @@ where
|
||||
/// * `name`: Reserved for future use, use `None` for the time being.
|
||||
/// * `mnemonic`: If present, restore the wallet seed from the given mnemonic instead of creating
|
||||
/// a new random seed.
|
||||
/// * `mnemonic_length`: Desired length of mnemonic in bytes (16 or 32, either 12 or 24 words).
|
||||
/// Use 0 if mnemonic isn't being used.
|
||||
/// * `mnemonic_length`: Entropy length in bytes: 16, 20, 24, 28 or 32
|
||||
/// (12, 15, 18, 21 or 24 words). Ignored when `mnemonic` is provided.
|
||||
/// For a new random seed, 0 is also accepted and defaults to 32 bytes.
|
||||
/// All other values return an error.
|
||||
/// * `password`: The password used to encrypt/decrypt the `wallet.seed` file
|
||||
///
|
||||
/// # Returns
|
||||
|
||||
Reference in New Issue
Block a user