Skip to content

feat(profile-metrics-service): add proof signing system#9016

Open
mathieuartu wants to merge 8 commits into
mainfrom
ma/profile-metrics-poo-step2
Open

feat(profile-metrics-service): add proof signing system#9016
mathieuartu wants to merge 8 commits into
mainfrom
ma/profile-metrics-poo-step2

Conversation

@mathieuartu
Copy link
Copy Markdown
Contributor

@mathieuartu mathieuartu commented Jun 5, 2026

Explanation

References

Related to: https://consensyssoftware.atlassian.net/browse/MUL-1844

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
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Introduces cryptographic signing paths through the keyring and silent snap client requests; behavior is well-tested but mistakes could affect account verification or snap trust boundaries.

Overview
Adds ProofOfOwnershipService so profile metrics can attach chain-native ownership proofs to AccountWithScopes.proof before ProfileMetricsService:submitMetrics.

The messenger action ProofOfOwnershipService:sign({ account, nonce }) picks the signer from the account’s first CAIP scope: EVM uses KeyringController:signPersonalMessage on metamask:proof-of-ownership:<nonce>:<canonical address>; Solana, Tron, and Bitcoin use silent SnapController:handleRequest (onClientRequest, origin: 'metamask') with JSON-RPC signProofOfOwnership on account.metadata.snap.id. Unsupported namespaces throw ProofUnsupportedNamespaceError for callers to omit proof.

Package exports add ProofOfOwnershipService, proofOfOwnershipServiceName, and profileMetricsServiceName (alias for the existing metrics serviceName). Dependencies add snaps packages and uuid; controller/service types import from dedicated *-method-action-types modules instead of the package barrel.

Reviewed by Cursor Bugbot for commit e376a1c. Bugbot is set up for automated code reviews on this repo. Configure here.

@mathieuartu mathieuartu self-assigned this Jun 5, 2026
@mathieuartu mathieuartu requested review from a team as code owners June 5, 2026 11:13
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Jun 5, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​snaps-utils@​12.2.0 ⏵ 12.2.198 +110076 +196100
Updated@​metamask/​snaps-sdk@​11.1.0 ⏵ 11.1.1981007893100

View full report

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Jun 5, 2026

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant