23 Commits

Author SHA1 Message Date
r4bbit
3e24ae2736 fix(wallet): use cryptographically secure entropy for mnemonic generation
The mnemonic/wallet generation was using a constant zero-byte array for entropy ([0u8; 32]), making all wallets deterministic based
solely on the password. This commit introduces proper random entropy using OsRng and enables users to back up their recovery phrase.

Changes:

- SeedHolder::new_mnemonic() now uses OsRng for 256-bit random entropy and returns the generated mnemonic
- Added SeedHolder::from_mnemonic() to recover a wallet from an existing mnemonic phrase
- WalletChainStore::new_storage() returns the mnemonic for user backup
- Added WalletChainStore::restore_storage() for recovery from a mnemonic
- WalletCore::new_init_storage() now returns the mnemonic
- Renamed reset_storage to restore_storage, which accepts a mnemonic for recovery
- CLI displays the recovery phrase when a new wallet is created
- RestoreKeys command now prompts for the mnemonic phrase via read_mnemonic_from_stdin()

Note: The password parameter is retained for future storage encryption but is no longer used in seed derivation (empty passphrase is used
 instead). This means the mnemonic alone is sufficient to recover accounts.

Usage:

On first wallet initialization, users will see:
IMPORTANT: Write down your recovery phrase and store it securely.
This is the only way to recover your wallet if you lose access.

Recovery phrase:
  word1 word2 word3 ... word24

To restore keys:
wallet restore-keys --depth 5
Input recovery phrase: <24 words>
Input password: <password>
2026-04-01 16:04:47 +02:00
Daniil Polyakov
bffc711470 refactor: move sequencer_ directories into sequencer 2026-03-20 00:36:07 +03:00
Daniil Polyakov
e3b93b6e9a feat: add restriction clippy lints 2026-03-17 21:25:30 +03:00
Daniil Polyakov
efe8393ba0 feat: add pedantic clippy lints 2026-03-17 21:25:30 +03:00
Daniil Polyakov
7296088005 feat: introduce parallel integration tests, wallet without global vars and etc 2025-12-31 04:30:22 +03:00
Pravdyvy
8e2b1c5993 Merge branch 'Pravdyvy/keys-restoration-from-mnemonic' into Pravdyvy/tree-ux-updates 2025-12-10 08:46:39 +02:00
Pravdyvy
1309185ecc Merge branch 'main' into Pravdyvy/keys-restoration-from-mnemonic 2025-12-10 08:34:01 +02:00
Daniil Polyakov
46ac451284 feat: add basic auth to wallet 2025-12-09 18:20:50 +03:00
Pravdyvy
b81aafbc23 feat: UX improvements 2025-12-03 13:10:07 +02:00
Pravdyvy
33264ba59a Merge branch 'main' into Pravdyvy/keys-restoration-from-mnemonic 2025-12-03 07:13:35 +02:00
Daniil Polyakov
df88d8bad6 feat: compute pinata solution in wallet 2025-12-02 01:21:34 +03:00
Daniil Polyakov
aee6f45a8b refactor: move some stuff to a more suitable place 2025-12-01 17:08:07 +03:00
Pravdyvy
0f617a8601 Merge branch 'Pravdyvy/deterministic-key-derivation' into Pravdyvy/keys-restoration-from-mnemonic 2025-12-01 12:01:45 +02:00
Pravdyvy
6c409b6fb1 Merge branch 'main' into Pravdyvy/deterministic-key-derivation 2025-11-27 13:46:35 +02:00
Daniil Polyakov
a714e3c563 feat: enhance rustfmt config 2025-11-26 00:33:09 +03:00
Daniil Polyakov
95ec42bba7 chore: left some comments 2025-11-20 15:40:32 +03:00
Pravdyvy
e92ad2132f feat: keys restoration from mnemonic 2025-11-12 08:26:25 +02:00
Pravdyvy
6cbc5028cf feat: tree construction 2025-11-11 17:25:08 +02:00
Pravdyvy
ec149d3227 feat: deterministic keys 2025-11-11 12:15:20 +02:00
Oleksandr Pravdyvyi
28c1fd39a4
fix: suggestions added 1 2025-10-20 10:01:54 +03:00
Oleksandr Pravdyvyi
88446b17f9
feat: automatic mode added 2025-10-15 15:17:30 +03:00
Oleksandr Pravdyvyi
7052bccfbc
fix: try edition 2024 2025-09-04 14:38:41 +03:00
Oleksandr Pravdyvyi
17b6851d00
fix: cleanup 2025-08-07 14:07:34 +03:00