41 Commits

Author SHA1 Message Date
r4bbit
a3983f5a89
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-02-17 13:06:38 +01:00
Daniil Polyakov
8b16318c38 fix: use base58 encoding for account in Explorer & some formatting chores 2026-02-14 00:23:34 +03:00
Daniil Polyakov
9bf3edbaad chore: remove risc0-zkvm dep from wallet 2026-02-12 16:39:23 +03:00
Daniil Polyakov
975cfb9ec6 feat: fully integrate Sequencer, Indexer and Explorer with Bedrock 2026-02-12 16:31:13 +03:00
jonesmarvin8
68254a835d fix license for amm and machete issue 2026-02-10 20:54:42 -05:00
jonesmarvin8
0930e4dd86 Merge branch 'main' into marvin/refactor-amm-program 2026-02-10 20:28:13 -05:00
jonesmarvin8
2367bf343b refactor AMM 2026-01-23 16:30:54 -05:00
Daniil Polyakov
652be426ae refactor: split token program into crates 2026-01-23 00:53:21 +03:00
Sergio Chouhy
8e131713de add tokio macros feature to wallet deps 2026-01-12 20:12:37 -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
0a1bbb9d21 fix: merge fix 2025-12-22 05:12:48 +02:00
Daniil Polyakov
ddf6e707ec feat: add cargo machete check to CI 2025-12-19 18:30:40 +03:00
Daniil Polyakov
87f45b8215 feat: move all crates into workspace 2025-12-19 18:30:40 +03:00
Daniil Polyakov
80a188e6a3 feat: remove print spam when running wallet account sync-private 2025-12-09 00:07:10 +03:00
Daniil Polyakov
6b26811229 feat: implement multiple blocks polling 2025-12-04 14:55:45 +03:00
Daniil Polyakov
91c898f19c refactor: split block polling 2025-12-03 18:30:22 +03:00
Daniil Polyakov
df88d8bad6 feat: compute pinata solution in wallet 2025-12-02 01:21:34 +03:00
Daniil Polyakov
d7331455fc feat: add list account subcommand 2025-11-27 04:22:49 +03:00
Oleksandr Pravdyvyi
4e36ae4679
fix; first refactor 2025-10-23 17:33:25 +03:00
Sergio Chouhy
f3fbae66b5 fmt 2025-10-16 16:20:29 -03:00
Sergio Chouhy
4bb8bc94ff Merge branch 'main' into schouhy/wallet-minor-improvements 2025-10-06 16:08:06 -03:00
Pravdyvy
468b669c14
Merge branch 'main' into Pravdyvy/serde-json-removal-from-db 2025-10-06 11:43:03 +03:00
Sergio Chouhy
9141fbf06c use random nonces for private accounts in wallet 2025-10-03 01:30:40 -03:00
Oleksandr Pravdyvyi
c58ef27224
feat: first db update 2025-09-25 11:53:42 +03:00
Oleksandr Pravdyvyi
f1de182ec6
fix: tests fix 2025-09-17 13:57:31 +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
Sergio Chouhy
d796d7baf1 add get-account wallet command. Small refactor 2025-09-15 18:13:08 -03:00
Oleksandr Pravdyvyi
eb9c45bbb7
feat: private token transfer 2025-09-12 16:00:57 +03:00
Oleksandr Pravdyvyi
00c76df04b
Merge branch 'main' into Pravdyvy/accounts-dump-fetch 2025-09-04 15:14:28 +03:00
Oleksandr Pravdyvyi
7052bccfbc
fix: try edition 2024 2025-09-04 14:38:41 +03:00
Sergio Chouhy
4f9ee9f19f remove unused dependencies 2025-09-02 16:29:56 -03:00
Oleksandr Pravdyvyi
4363a16a62
Merge branch 'Pravdyvy/key-protocol-update-public-part' into Pravdyvy/accounts-dump-fetch 2025-09-02 08:25:00 +03:00
Oleksandr Pravdyvyi
9993590d45
fix: comments fix 2 2025-09-02 07:32:39 +03:00
Oleksandr Pravdyvyi
fedf63b759
fix: risk0 bump 2025-08-22 16:36:38 +03:00
Oleksandr Pravdyvyi
914cbfb9dc
fix: complete cli intefaces 2025-08-21 15:58:31 +03:00
Oleksandr Pravdyvyi
80620b6aac
fix: wallet fix 2025-08-19 14:14:09 +03:00
Oleksandr Pravdyvyi
35b636a27d
fix: clearing and renaming 2025-08-15 14:27:36 +03:00
Oleksandr Pravdyvyi
74f0c983d3
fix: comments fix 2025-08-14 14:03:48 +03:00
Oleksandr Pravdyvyi
e589ddae5a
fix: test fix 2 2025-08-13 16:17:52 +03:00
Sergio Chouhy
20a7dad9a0 Merge branch 'Pravdyvy/node-wallet-rewrite' into schouhy/implement-nssa-v0.1-public-state-tmp 2025-08-09 18:00:58 -03:00
Oleksandr Pravdyvyi
17b6851d00
fix: cleanup 2025-08-07 14:07:34 +03:00