Conversation
8b1785b to
be04334
Compare
mcmire
left a comment
There was a problem hiding this comment.
This looks pretty good so far! I just had a few comments.
| }); | ||
|
|
||
| this.#baseUrl = baseUrl; | ||
| this.#getAccessToken = getAccessToken; |
There was a problem hiding this comment.
Where will this access token come from in the clients? Will this come from another controller or service? If so, then it would be better to use the messenger to retrieve this value instead of taking a callback.
|
@metamaskbot publish-preview |
|
@metamaskbot publish-preview |
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
|
@metamaskbot publish-preview |
0e8c506 to
08b3d87
Compare
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
039faf6 to
2f413ac
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.
Reviewed by Cursor Bugbot for commit a820fad. Configure here.

Explanation
In this PR we create an API client to allow our client applications to use the chomp API. It fixes this ticket
References
Checklist
Note
Medium Risk
Introduces a new authenticated HTTP client/service that fetches JWT bearer tokens via messenger and performs write operations against an external API, so incorrect request/response handling could impact downstream flows but existing packages are largely untouched.
Overview
Adds a new
@metamask/chomp-api-servicepackage implementingChompApiService(aBaseDataService) to call the CHOMP API with JWT bearer auth sourced fromAuthenticationController:getBearerToken.The service exposes messenger-callable methods for address association, account upgrade create/get, delegation verification, intent create/list, withdrawal creation, and service-details lookup, with runtime response validation via
superstruct, explicit status handling (e.g.,409/404), and comprehensivenock-based tests.Repo wiring is updated to include the new package in TypeScript project references, the monorepo README package list/graph,
CODEOWNERS/teams.json, andyarn.lock.Reviewed by Cursor Bugbot for commit 0b15c9f. Bugbot is set up for automated code reviews on this repo. Configure here.