41 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
Pravdyvy
9c90930bd6 Merge branch 'main' into Pravdyvy/hardcoded-initial-state 2026-03-20 14:55:42 +02:00
Daniil Polyakov
b631ef02c6 fix: final fixes & polishing 2026-03-20 00:47:37 +03:00
Pravdyvy
dc3650edd7 Merge branch 'main' into Pravdyvy/hardcoded-initial-state 2026-03-19 19:02:19 +02:00
Pravdyvy
afa0a63c95 fix: suggestions fix 2 2026-03-19 18:01:15 +02:00
jonesmarvin8
83ef789002 lint issues 2026-03-18 18:44:07 -04:00
jonesmarvin8
ce729f112d Merge branch 'main' into marvin/bip-32-comp 2026-03-18 16:47:39 -04: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
jonesmarvin8
85dd5fae86 initialize bip-032 changes 2026-02-25 15:18:27 -05:00
jonesmarvin8
943efd1433 Merge branch 'main' into marvin/private_keys 2026-02-12 10:33:00 -05:00
Daniil Polyakov
975cfb9ec6 feat: fully integrate Sequencer, Indexer and Explorer with Bedrock 2026-02-12 16:31:13 +03:00
jonesmarvin8
ff13c34027 update secret_holder
Removed definition of outgoingviewingsecretkey
2026-01-28 11:01:48 -05:00
jonesmarvin8
752ad89ac7 fixed with unified approach 2026-01-27 16:00:42 -05:00
jonesmarvin8
d204f386bb fmt 2026-01-21 17:48:10 -05:00
jonesmarvin8
c6aa0c41b6 update tests 2026-01-21 17:27:23 -05:00
jonesmarvin8
ed373067fb fixed private keys 2025-12-22 19:50:03 -05:00
jonesmarvin8
2e0450bfcd private key protocol fixes 2025-12-15 17:24:59 -05:00
Pravdyvy
6c409b6fb1 Merge branch 'main' into Pravdyvy/deterministic-key-derivation 2025-11-27 13:46:35 +02:00
Pravdyvy
30f19b245d fix: suggestions fix 3 2025-11-26 14:53:26 +02:00
Pravdyvy
463942df80
Apply suggestions from code review 1
Co-authored-by: Daniil Polyakov <arjentix@gmail.com>
2025-11-26 07:07:58 +02:00
Daniil Polyakov
a714e3c563 feat: enhance rustfmt config 2025-11-26 00:33:09 +03:00
Daniil Polyakov
ea9c659fb1 refactor: rename Address to AccountId 2025-11-25 21:38:07 +03:00
Pravdyvy
ec149d3227 feat: deterministic keys 2025-11-11 12:15:20 +02:00
Pravdyvy
d9a130cc55 feat: private tree 2025-11-07 16:21:14 +02:00
Pravdyvy
9788f189b1 feat: stat of deterministic passwords 2025-11-04 16:09:04 +02:00
Sergio Chouhy
b93c0aa390 rename TreeHashType to HashType 2025-10-17 16:04:09 -03:00
Oleksandr Pravdyvyi
9336a6c130
Merge branch 'Pravdyvy/key-protocol-update-private' into Pravdyvy/wallet-privacy-preserving-transactions 2025-09-17 09:04:43 +03:00
Oleksandr Pravdyvyi
85a16a2f04
fix: revers of scalar dep 2025-09-17 08:59:14 +03:00
Oleksandr Pravdyvyi
08526d47bf
feat: shielded+deshielded token transfers 2025-09-16 14:53:00 +03:00
Oleksandr Pravdyvyi
d07b813739
fix: deviations adjustments 2025-09-15 14:04:49 +03:00
Oleksandr Pravdyvyi
93fcbb8f61
Merge branch 'Pravdyvy/sequencer-update' into Pravdyvy/key-protocol-update-private 2025-09-15 10:49:48 +03:00
Oleksandr Pravdyvyi
23e79d3e17
fix: fmt 2025-09-08 15:23:32 +03:00
Oleksandr Pravdyvyi
a5123992c9
Merge branch 'main' into Pravdyvy/key-protocol-update-private 2025-09-08 14:53:22 +03:00
Oleksandr Pravdyvyi
33783e06d8
fix: keys structures updates 2025-09-08 14:48:58 +03:00
Oleksandr Pravdyvyi
8ceb27421e
Merge branch 'main' into Pravdyvy/sequencer-update 2025-09-08 09:03:39 +03:00
Oleksandr Pravdyvyi
324f477b63
fix: keys corect generatin 2025-09-05 14:47:58 +03:00
Oleksandr Pravdyvyi
ebe616247f
fix: seed generation from mnemonic 2025-09-04 17:49:55 +03:00
Oleksandr Pravdyvyi
7052bccfbc
fix: try edition 2024 2025-09-04 14:38:41 +03:00
Oleksandr Pravdyvyi
b4f21b2f09
fix: checks added 2025-09-03 10:29:51 +03:00
Oleksandr Pravdyvyi
35b636a27d
fix: clearing and renaming 2025-08-15 14:27:36 +03:00