Skip to content

refactor: migrate KeyringController to @metamask/messenger - #6370

Merged
mikesposito merged 14 commits into
mainfrom
mikesposito/migrate-messenger
Oct 27, 2025
Merged

refactor: migrate KeyringController to @metamask/messenger#6370
mikesposito merged 14 commits into
mainfrom
mikesposito/migrate-messenger

Conversation

@mikesposito

@mikespositomikesposito commented Aug 25, 2025

Copy link
Copy Markdown
Member

Explanation

This PR migrates the KeyringController controller class to the new @metamask/messenger comm system, as opposed to the one exported from @metamask/base-controller.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Note

Migrates KeyringController to @metamask/messenger, updates metadata flag and tests, and adds new messenger dependency/config refs.

  • Keyring Controller:
    • Migrates messaging from RestrictedMessenger (@metamask/base-controller) to Messenger (@metamask/messenger); switches to BaseController from @metamask/base-controller/next.
    • Replaces messagingSystem.publish/registerActionHandler with messenger.publish/registerActionHandler and updates KeyringControllerMessenger type.
    • Renames metadata key anonymous to includeInDebugSnapshot and updates calls to deriveStateFromMetadata.
  • Tests:
    • Refactors to build a root Messenger and namespaced controller messenger; updates expectations for metadata snapshots and messaging APIs.
  • Repo/Config:
    • Adds dependency @metamask/messenger and TypeScript project references; updates README dependency graph to show keyring_controller --> messenger and eip_7702_internal_rpc_middleware --> controller_utils.
  • Changelog:
    • Notes BREAKING changes: switch to @metamask/messenger and metadata flag rename.

Written by Cursor Bugbot for commit 7ad33d9. This will update automatically on new commits. Configure here.

Gudahtt
Gudahtt previously approved these changes Aug 25, 2025

@GudahttGudahtt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good!

@mikesposito
mikesposito marked this pull request as ready for review August 25, 2025 13:25
@mikesposito
mikesposito requested review from a team as code ownersAugust 25, 2025 13:25
@mikespositomikesposito mentioned this pull request Aug 22, 2025
43 tasks
mcmire
mcmire previously approved these changes Oct 7, 2025

@mcmiremcmire left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cryptodev-2scryptodev-2s left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@FrederikBolding
FrederikBolding removed this pull request from the merge queue due to the queue being cleared Oct 27, 2025
@mikesposito
mikesposito added this pull request to the merge queueOct 27, 2025
Merged via the queue into main with commit 29dcbc8Oct 27, 2025
256 of 257 checks passed
@mikesposito
mikesposito deleted the mikesposito/migrate-messenger branch October 27, 2025 11:33
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@mikesposito@mcmire@Gudahtt@cryptodev-2s