Skip to content

chore: Update Web3Auth controllers to expose all methods through messenger#8219

Open
Mrtenz wants to merge 11 commits intomainfrom
mrtenz/web3auth-method-actions
Open

chore: Update Web3Auth controllers to expose all methods through messenger#8219
Mrtenz wants to merge 11 commits intomainfrom
mrtenz/web3auth-method-actions

Conversation

@Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Mar 17, 2026

Explanation

This updates the following controllers to expose all methods through the messenger in a standardised way:

  • SeedlessOnboardingController.
  • ShieldController.
  • SubscriptionController.
  • ClaimsController.

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
  • 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
Expands the messenger API surface for controllers (including seedless onboarding/auth flows), which could affect consumers and access patterns if action names/types are miswired. Core logic appears unchanged, but messaging wiring errors would break controller calls at runtime.

Overview
Exposes all public methods on ClaimsController and SeedlessOnboardingController through their messengers by registering method handlers and introducing auto-generated *-method-action-types.ts type unions for the new action names.

Updates @metamask/claims-controller exports to re-export the new action types, adds a generate-method-action-types script (and tsx devDependency) to both packages, and adjusts ClaimsController tests to call methods via rootMessenger.call('Controller:method', ...) instead of invoking controller methods directly. Changelogs are updated to document the newly available messenger actions and exported action types.

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

@Mrtenz Mrtenz marked this pull request as ready for review March 17, 2026 12:50
@Mrtenz Mrtenz requested review from a team as code owners March 17, 2026 12:50
export type SeedlessOnboardingControllerOptions<
EncryptionKey,
SupportedKeyDerivationParams,
EncryptionKey = encryptionUtils.EncryptionKey,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it necessary to change this?

Copy link
Member Author

Choose a reason for hiding this comment

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

The extraction script assumes we can use Controller['method'], but without these defaults that would result in a TypeScript error because the type parameters are missing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, right, I see. That makes sense.

@Mrtenz Mrtenz force-pushed the mrtenz/web3auth-method-actions branch from 8755821 to c1e8245 Compare March 18, 2026 12:53
GuillaumeRx
GuillaumeRx previously approved these changes Mar 18, 2026
@Mrtenz Mrtenz force-pushed the mrtenz/web3auth-method-actions branch from 3fa2720 to f18b535 Compare March 19, 2026 10:47
@mcmire
Copy link
Contributor

mcmire commented Mar 19, 2026

Looks good, other than the conflicts.

Sign up for free to 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.

3 participants