28 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
975cfb9ec6 feat: fully integrate Sequencer, Indexer and Explorer with Bedrock 2026-02-12 16:31:13 +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
d4a471e948 feat: swaps, add/rem liq 2025-12-16 14:05:34 +02:00
Sergio Chouhy
9637b8b666 Merge branch 'main' into schouhy/add-wallet-deploy-command 2025-12-10 09:58:45 -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
Sergio Chouhy
79b4dc0333 Merge branch 'schouhy/add-wallet-deploy-command' of github.com:logos-blockchain/lssa into schouhy/add-wallet-deploy-command 2025-12-09 15:22:30 -03:00
Sergio Chouhy
ab6ea1f4c0 use pathbuf and context 2025-12-09 15:18:48 -03:00
Sergio Chouhy
8cfb586bee
Update wallet/src/cli/mod.rs
Co-authored-by: Daniil Polyakov <arjentix@gmail.com>
2025-12-09 14:55:12 -03:00
Daniil Polyakov
46ac451284 feat: add basic auth to wallet 2025-12-09 18:20:50 +03:00
Pravdyvy
26fb822da1 Merge branch 'Pravdyvy/keys-restoration-from-mnemonic' into Pravdyvy/tree-ux-updates 2025-12-09 10:46:28 +02:00
Pravdyvy
d0064a4b0b Merge branch 'main' into Pravdyvy/tree-ux-updates 2025-12-09 10:40:35 +02:00
Pravdyvy
40991cf6d1 fix: layered cleanup 2025-12-08 12:11:11 +02:00
Sergio Chouhy
cc08e0a614 add deploy program command 2025-12-05 17:54:51 -03:00
Pravdyvy
d2dc255bc5 fix: merge fix 2025-12-05 09:36:53 +02:00
Pravdyvy
f0066bc2aa Merge branch 'main' into Pravdyvy/keys-restoration-from-mnemonic 2025-12-05 09:32:54 +02:00
Pravdyvy
29c3737704 fix: lint fix comments addressed 2025-12-05 07:46:59 +02:00
Daniil Polyakov
91c898f19c refactor: split block polling 2025-12-03 18:30:22 +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
Oleksandr Pravdyvyi
9d31b143ed
feat: config command added 2025-11-03 15:45:50 +02:00
Oleksandr Pravdyvyi
f635f07ebd
feat: config subcommand 2025-10-31 16:23:01 +02:00
Oleksandr Pravdyvyi
28c1fd39a4
fix: suggestions added 1 2025-10-20 10:01:54 +03:00
Oleksandr Pravdyvyi
c39c9ad4ca
feat: cli refactor 2025-10-14 15:29:18 +03:00
Oleksandr Pravdyvyi
898c5e9bcf
fix: structured subcommand approach 2025-10-13 17:25:36 +03:00