Commit Graph
139 Commits
Author SHA1 Message Date
jonesmarvin8 deccbc3ac0 initialize changes 2026-04-20 17:33:55 -04:00
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
jonesmarvin8 ffcbc15972 Issue 258 - remove secp256k1 for k256 (#399)
* initialize branch

* fix signatures to use k256

* fixed error

* lint fix

* lint fix

* clippy fixes

* clippy
2026-03-30 17:15:25 -04:00
Pravdyvy 9c90930bd6 Merge branch 'main' into Pravdyvy/hardcoded-initial-state 2026-03-20 14:55:42 +02:00
Daniil Polyakov 7b20a83379 fix: fixes after rebase & address comments 2026-03-20 00:48:04 +03:00
Daniil Polyakov b631ef02c6 fix: final fixes & polishing 2026-03-20 00:47:37 +03:00
Daniil Polyakov b254ebb185 feat: refactor sequencer RPC client-side 2026-03-20 00:41:05 +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
Daniil Polyakov c40c62a484 fix: satisfy clippy 2026-03-19 18:03:23 +03:00
jonesmarvin8 83ef789002 lint issues 2026-03-18 18:44:07 -04:00
jonesmarvin8 4fdefd3557 fix typo 2026-03-18 16:53:07 -04:00
jonesmarvin8 ce729f112d Merge branch 'main' into marvin/bip-32-comp 2026-03-18 16:47:39 -04:00
Pravdyvy a0ab6ad92d fix: lint fix 2026-03-18 18:32:05 +02:00
Pravdyvy 5ab7d40727 Merge branch 'main' into Pravdyvy/hardcoded-initial-state 2026-03-18 18:18:52 +02:00
Daniil Polyakov 252848a145 feat: update rust to 1.94.0 2026-03-17 21:25:30 +03:00
Daniil Polyakov aa462b66eb feat: add nursery clippy lints 2026-03-17 21:25:30 +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 756f2f4135 feat: add workspace lints to every crate 2026-03-17 15:13:44 +03:00
Pravdyvy b5afcba4c4 fix: moved constants into consts 2026-03-16 17:02:22 +02:00
Pravdyvy 02953999aa feat: general initial state 2026-03-13 18:23:39 +02:00
jonesmarvin8 b1747548b2 fix nullifer typo 2026-03-09 12:23:57 -04:00
jonesmarvin8 1cfc710024 Merge branch 'main' into marvin/bip-32-comp 2026-03-09 05:23:24 -04:00
Daniil Polyakov 0aec6028f6 fix: remove unused serde_json dev-dependency from key_protocol 2026-03-05 21:14:25 +03:00
Pravdyvy 4950c1277c fix: suggestions fix 2026-03-05 17:25:53 +02:00
Pravdyvy fa406e7a86 fix: removed redundant logging 2026-03-05 15:20:22 +02:00
Pravdyvy e3764e1911 fix: shared secret receiver fix 2026-03-05 12:35:18 +02: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 6a399ac36c Merge branch 'main' into marvin/private_keys 2026-02-11 11:49:57 -05:00
jonesmarvin8 f891f57cab Merge branch 'main' into marvin/public_keys 2026-02-10 09:19:45 -05:00
jonesmarvin8 8959b1652c Merge branch 'marvin/public_keys' into marvin/public_account_id 2026-02-08 14:00:14 -05:00
David Rusu 38f1f68030 feat(license): MIT/Apache2 license and add cargo deny config 2026-01-31 23:13:36 +04:00
jonesmarvin8 ff13c34027 update secret_holder
Removed definition of outgoingviewingsecretkey
2026-01-28 11:01:48 -05:00
jonesmarvin8 1dd0f16a5c fixed edge case 2026-01-27 16:19:56 -05:00
jonesmarvin8 752ad89ac7 fixed with unified approach 2026-01-27 16:00:42 -05:00
jonesmarvin8 a2d3d5ae0d Merge branch 'marvin/public_keys' into marvin/public_account_id 2026-01-26 16:08:33 -05:00
jonesmarvin8 c81ce363c1 Merge branch 'main' into marvin/public_keys 2026-01-26 16:06:40 -05:00
jonesmarvin8 e2d7906930 fixed hardcoded account ids 2026-01-24 10:28:41 -05:00
jonesmarvin8 6e18f46965 additional lint fix 2026-01-22 18:25:57 -05:00
jonesmarvin8 d1a2234cc5 lint fix 2026-01-22 18:24:19 -05:00
jonesmarvin8 2c9219bb0f relabel ipk to vpk 2026-01-21 17:58:45 -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 877f879af3 cargo fmt 2026-01-21 17:11:51 -05:00
jonesmarvin8 75beecc6b9 update tests
Update tests for LEE domain separator.
2026-01-21 17:03:43 -05:00
jonesmarvin8 0b8b1c89b8 Merge branch 'main' into marvin/private_keys 2026-01-21 16:52:11 -05:00
jonesmarvin8andSergio Chouhy eaee772c86 Update key_protocol/src/key_management/key_tree/keys_public.rs
Co-authored-by: Sergio Chouhy <41742639+schouhy@users.noreply.github.com>
2026-01-14 10:51:11 -05:00