Skip to content

feat: added authenticated user storage#8260

Open
dovydas55 wants to merge 51 commits intomainfrom
MCA-83
Open

feat: added authenticated user storage#8260
dovydas55 wants to merge 51 commits intomainfrom
MCA-83

Conversation

@dovydas55
Copy link
Copy Markdown
Contributor

@dovydas55 dovydas55 commented Mar 20, 2026

Note

Medium Risk
Introduces a new SDK that makes authenticated, bearer-token-backed HTTP calls to user-storage endpoints and adds runtime response validation; correctness depends on API contract and error handling. Changes are additive but touch auth-adjacent data flows and caching behavior via BaseDataService.

Overview
Adds new package @metamask/authenticated-user-storage, providing an AuthenticatedUserStorageService (a BaseDataService) to call authenticated user-storage API endpoints for delegations (list/create/revoke) and notification preferences (get/put), including bearer-token header support and cache invalidation after mutations.

Includes runtime response validation via @metamask/superstruct, comprehensive nock-based tests/fixtures, and standard package scaffolding (exports, tsconfigs, typedoc, jest config, changelog/license). Repo metadata is updated to include the new package in README/dependency graph, TypeScript project references, CODEOWNERS, teams.json, and yarn.lock.

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

@dovydas55 dovydas55 requested a review from a team as a code owner March 20, 2026 10:50
@dovydas55 dovydas55 requested a review from a team as a code owner March 20, 2026 10:54
Comment thread packages/profile-sync-controller/src/sdk/index.ts Outdated
@dovydas55 dovydas55 marked this pull request as draft March 20, 2026 15:50
@dovydas55 dovydas55 marked this pull request as ready for review March 24, 2026 11:56
Comment thread teams.json Outdated
Comment thread packages/authenticated-user-storage/src/types.ts
Comment thread packages/authenticated-user-storage/src/types.ts Outdated
Comment thread packages/authenticated-user-storage/README.md
Comment thread packages/authenticated-user-storage/jest.config.js
Comment thread packages/authenticated-user-storage/src/authenticated-user-storage.ts Outdated
Comment thread packages/authenticated-user-storage/src/index.ts Outdated
Comment thread packages/authenticated-user-storage/src/index.ts Outdated
Comment thread packages/authenticated-user-storage/src/types.ts Outdated
Comment thread packages/authenticated-user-storage/src/authenticated-user-storage.ts Outdated
Comment thread packages/authenticated-user-storage/src/authenticated-user-storage.ts Outdated
Comment thread packages/authenticated-user-storage/src/env.ts Outdated
Comment thread packages/authenticated-user-storage/jest.config.js Outdated
Comment thread packages/authenticated-user-storage/jest.config.js Outdated
@dovydas55 dovydas55 requested a review from a team as a code owner April 10, 2026 15:01
Comment thread packages/transaction-pay-controller/src/utils/source-amounts.ts Outdated
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4be6409. Configure here.

@dovydas55 dovydas55 requested a review from mcmire April 10, 2026 15:52
mcmire
mcmire previously approved these changes Apr 15, 2026
Copy link
Copy Markdown
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

LGTM!


/**
* Matches a 0x-prefixed hex string with zero or more hex digits.
* Unlike `StrictHexStruct` from `@metamask/utils` (which requires at least
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.

Ah, good to know!

@mcmire mcmire dismissed their stale review April 15, 2026 13:20

Ah I forgot there is one more pending comment to address.

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.

6 participants