feat(cold-wallet): choose ML-DSA-65 or ML-DSA-87 on create and import - #629
Merged
Conversation
Cold-wallet create defaulted to ML-DSA-65 with no way to pick ML-DSA-87. Add an "ADVANCED" disclosure on the recovery-phrase screen with a signature-type toggle, collapsed by default so normal users see nothing new and the default stays ML-DSA-65. The chosen scheme flows into the account built on continue; the rest of the create flow already carries the scheme end to end.
Add the ML-DSA-65 / ML-DSA-87 toggle to the import screen's ADVANCED section (the derivation field), matching create. Selecting the level sets the derivation path's trailing index, while a full custom path is still accepted and takes its scheme from the path. Import now brings in the one account the field names, replacing the previous behaviour of always adding both schemes.
n13
force-pushed
the
feat/cold-wallet-scheme-choice
branch
from
September 3, 2026 07:17
d2e7267 to
95b3e15
Compare
n13
commented
Sep 3, 2026
n13
left a comment
Collaborator
Author
There was a problem hiding this comment.
Reviewer model: GPT Sol
Verdict (advisory): Approve
No blocking findings. The create and import flows consistently carry the selected ML-DSA scheme through ColdAccount, key derivation, password setup, and vault persistence. Template paths follow the selected scheme, while an explicitly entered full path continues to determine its own scheme as intended.
Validation on exact head 95b3e152f7bea20d0a995e08e6b6b98c976998ef:
- Added create/derivation widget tests: 4 passed.
- Full cold-wallet test suite: 281 passed.
- Workspace formatting and
git diff --check: clean. - Local strict analysis: cold-wallet, miner, and SDK completed with no issues; the unrelated mobile package hit the required 10-second local cutoff. GitHub's full
Analyzecheck passed on this head.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The cold wallet defaulted to ML-DSA-65 with no way to choose ML-DSA-87 when creating or importing. This adds an explicit signature-type choice to both flows, under ADVANCED, default ML-DSA-65.
How
create_wallet_screen.dart): an "ADVANCED" disclosure on the recovery-phrase screen, collapsed by default, reveals aSegmentedControlstoggle (ML-DSA-65 / ML-DSA-87). The chosen scheme flows into the new account.derivation_field.dart): the same toggle in the field's existing ADVANCED section. Picking the level sets the derivation path's trailing index (65 →.../1', 87 →.../0'); the preview path updates to match. A full custom path is still accepted and takes its scheme from the path. Import now brings in the one account the field names, replacing the earlier behaviour of always adding both schemes.Default stays ML-DSA-65, so untouched create/import is unchanged.
SetPasswordScreen, the vault, and theColdAccountmodel already carry the scheme end to end, so no other files change.Tests
create_wallet_scheme_test.dart: default create yields a 65 account with the toggle hidden; choosing 87 under ADVANCED yields an 87 account (path ends/0').derivation_field_test.dart: the toggle sets the scheme and its path (65 →/1', 87 →/0'); a custom full path is still accepted and its scheme is read from the path.melos analyzeclean.