Conversation
mathieuartu
reviewed
Dec 8, 2025
Co-authored-by: Mathieu Artu <mathieu.artu@gmail.com>
|
This PR is marked as stale because it has been open for 60 days with no activity. Please remove the stale label or leave a comment, or it will be closed in 14 days. |
25a340c to
eee7698
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
danroc
previously approved these changes
Apr 10, 2026
Contributor
danroc
left a comment
There was a problem hiding this comment.
Just nits, I'm approving in case you prefer to ignore them.
| GetAccounts = 'keyring_getAccounts', | ||
| CreateAccounts = 'keyring_createAccounts', | ||
| // Inherited from v1 (but method signatures may differ...): | ||
| // NOTE: We use literals here to avoid circular dependencies. |
Contributor
There was a problem hiding this comment.
Note: We should probably consider moving those definitions in the future.
danroc
approved these changes
Apr 10, 2026
montelaidev
pushed a commit
that referenced
this pull request
Apr 10, 2026
Similar implementation than `KeyringClient` but using the new unified keyring API (keyring v2) methods. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Introduces a parallel v2 JSON-RPC surface (including `exportAccount`) across API, clients, and snap dispatch logic; mistakes could break RPC compatibility or unintentionally affect account export/request routing. > > **Overview** > **Adds keyring v2 RPC support end-to-end.** `@metamask/keyring-api` now exports `KeyringRpcV2Method` plus superstruct-validated v2 request/response types and `isKeyringRpcV2Method`, and refines `isKeyringRpcMethod` to be a type predicate. > > **Introduces v2 client and dispatcher.** `@metamask/keyring-snap-client` adds `KeyringClientV2` (UUID ids, strict response masking) and `@metamask/keyring-internal-snap-client` adds `KeyringInternalSnapClientV2` (Messenger-backed). `@metamask/keyring-snap-sdk` adds `handleKeyringRequestV2` to validate and route v2 JSON-RPC calls, including guarding optional `exportAccount`. Tests and package exports/changelogs are updated accordingly. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit cc83c17. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Mathieu Artu <mathieu.artu@gmail.com>
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.

Similar implementation than
KeyringClientbut using the new unified keyring API (keyring v2) methods.Note
Medium Risk
Introduces a parallel v2 JSON-RPC surface (including
exportAccount) across API, clients, and snap dispatch logic; mistakes could break RPC compatibility or unintentionally affect account export/request routing.Overview
Adds keyring v2 RPC support end-to-end.
@metamask/keyring-apinow exportsKeyringRpcV2Methodplus superstruct-validated v2 request/response types andisKeyringRpcV2Method, and refinesisKeyringRpcMethodto be a type predicate.Introduces v2 client and dispatcher.
@metamask/keyring-snap-clientaddsKeyringClientV2(UUID ids, strict response masking) and@metamask/keyring-internal-snap-clientaddsKeyringInternalSnapClientV2(Messenger-backed).@metamask/keyring-snap-sdkaddshandleKeyringRequestV2to validate and route v2 JSON-RPC calls, including guarding optionalexportAccount. Tests and package exports/changelogs are updated accordingly.Reviewed by Cursor Bugbot for commit cc83c17. Bugbot is set up for automated code reviews on this repo. Configure here.