feat(keyring-eth-hd)!: add legacyEntropySource#602
Open
ccharly wants to merge 7 commits into
Open
Conversation
ccharly
force-pushed
the
cc/feat/hd-keyring-legacy-entropy-source
branch
from
July 22, 2026 17:08
40ba82f to
ced99f2
Compare
ccharly
force-pushed
the
cc/feat/entropy
branch
3 times, most recently
from
July 22, 2026 17:26
d1ef1fe to
bdafc36
Compare
ccharly
force-pushed
the
cc/feat/hd-keyring-legacy-entropy-source
branch
from
July 22, 2026 17:26
ced99f2 to
200af20
Compare
legacyEntropySource
ccharly
marked this pull request as ready for review
July 22, 2026 19:47
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.
Introducing the new entropy source ID to the v2
HdKeyring.This will allow us to use it in combination with
:withKeyringV2to filter out HD keyrings with their new deterministic entropy source.This way we can have mapping between both:
Note
Medium Risk
Breaking rename/repurpose of
entropySourceaffects consumers that assumed the legacy keyring id; migration depends on correctly populatinglegacyEntropySource.Overview
Breaking change to v2
HdKeyringentropy identifiers: publicentropySourceis now the canonical fingerprintentropy:bip44:mnemonic:<uuid>(Bip44MnemonicEntropyId), and the previousKeyringControllerkeyring id moves to optional publiclegacyEntropySourceonHdKeyringOptionsfor migration-era bidirectional lookup viawithKeyringV2.@metamask/keyring-sdkaddsAsEntropyIdto narrow string template types toEntropyIdat compile time; tests use a real canonical entropy id and coverlegacyEntropySourcewhen set vs omitted.Reviewed by Cursor Bugbot for commit 8504e52. Bugbot is set up for automated code reviews on this repo. Configure here.