Skip to content

Commit

Permalink
feat(crypto): mnemonic generation/encryption/decryption/storage (#2014)
Browse files Browse the repository at this point in the history
Introduce Wallet Name and Password for Enhanced Seed Management

This commit introduces a new optional parameter, `wallet_name`, to the mm2 configuration. This parameter, along with `wallet_password`, allows for enhanced seed management by MM2, reducing the need for GUIs to handle seed management. 

If `wallet_name` and `wallet_password` are provided, MM2 will handle the generation, encryption, and storage of the wallet's seed. If a `passphrase` is also provided, it will be used as the seed and then encrypted and stored. If no `passphrase` is provided, MM2 will generate a new seed, encrypt it, and store it. 

This commit also introduces a new API method `get_mnemonic` that allows for the retrieval of the wallet's seed, either in encrypted or plaintext format, depending on the provided parameters.

This change enhances the security and flexibility of seed management in MM2, allowing for different modes of operation depending on the user's needs.
  • Loading branch information
shamardy authored Apr 9, 2024
1 parent e0cd391 commit ffe761e
Show file tree
Hide file tree
Showing 37 changed files with 1,845 additions and 168 deletions.
192 changes: 138 additions & 54 deletions Cargo.lock

Large diffs are not rendered by default.

187 changes: 158 additions & 29 deletions mm2src/adex_cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ffe761e

Please sign in to comment.