Skip to content

feat(core-backend): add /v5/multiaccount/transactions - #11194

Merged
Kriys94 merged 1 commit into
mainfrom
feature/Addv5Transaction
Oct 29, 2026
Merged

Kriys94 merged 1 commit into
mainfrom
feature/Addv5Transaction

Conversation

@Kriys94

@Kriys94 Kriys94 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Explanation

AccountsApiClient can already load multi-account transactions from GET /v4/multiaccount/transactions, which is EVM-only and returns the v1 transaction shape. Accounts API now exposes GET /v5/multiaccount/transactions, which returns transactions for EVM accounts and CAS-backed accounts (Solana, Bitcoin, Tron, Stellar) in a different record shape.

This adds that endpoint to @metamask/core-backend, following the existing v4 query helpers:

  • fetchV5MultiAccountTransactions(accountIds, queryOptions?)
  • getV5MultiAccountTransactionsQueryOptions(...) for useQuery
  • getV5MultiAccountTransactionsInfiniteQueryOptions(...) for useInfiniteQuery

Account IDs are CAIP-10. Pagination is forward-only: the next page is requested with after, set from pageInfo.endCursor. before is accepted by the API and ignored. Each row is a per-account record (tx, valueTransfers, fee, and optional logs and miscOperations), and accounts the API could not process are listed in unprocessedAccounts.

Filters match the API: networks, assetIds, includeLogs, includeTxMetadata, includeMiscOperations, filterSupportedTokens, filterIncomingTransfers, and filterSpamTokens.

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

Low Risk
Additive API client, types, tests, and docs with no changes to existing v4 behavior or breaking exports.

Overview
Adds AccountsApiClient support for GET /v5/multiaccount/transactions, extending multi-account transaction history beyond EVM-only v4 to CAIP-10 accounts (EVM plus CAS-backed chains such as Solana and Stellar).

Consumers get fetchV5MultiAccountTransactions, getV5MultiAccountTransactionsQueryOptions, and getV5MultiAccountTransactionsInfiniteQueryOptions, mirroring the existing v4 TanStack Query pattern. Responses use a new v5 record shape (accountId, nested tx, valueTransfers, optional logs/miscOperations, fee, and unprocessedAccounts). Pagination is forward-only via after / pageInfo.endCursor (not v4’s cursor).

New TypeScript types and package exports document query filters including assetIds, spam/supported-token/incoming-transfer filters, and includeMiscOperations. Changelog and README list the new method and clarify v4 as EVM-only; tests cover URL params, stable query keys, and infinite paging.

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

@Kriys94
Kriys94 marked this pull request as ready for review October 29, 2026 10:09
@Kriys94
Kriys94 requested review from a team as code owners October 29, 2026 10:09
@Kriys94
Kriys94 force-pushed the feature/Addv5Transaction branch from ff7e228 to c820ad3 Compare October 29, 2026 10:12

@dawnseeker8 dawnseeker8 left a comment

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.

LGTM, only small comments are getV5MultiAccountTransactionsQueryOptions and getV5MultiAccountTransactionsQueryOptions have getV5MultiAccountTransactionsInfiniteQueryOptions have some same parameters, and we can do small improvement to create a const variable to store the same paremeter and only use mixin in difference params.

@Kriys94
Kriys94 added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit d0a9ef5 Oct 29, 2026
98 checks passed
@Kriys94
Kriys94 deleted the feature/Addv5Transaction branch October 29, 2026 16:13
@Kriys94 Kriys94 mentioned this pull request Oct 29, 2026
1 of 2 tasks
Naz-Ovh pushed a commit to 0x-fork/metamask-core that referenced this pull request Nov 4, 2026
## Explanation

Release 1377.0.0. This PR only bumps versions, finalizes changelogs,
updates dependency ranges, and refreshes `yarn.lock`. The behavior
shipped here is already on `main`.

Three packages are major releases because their unreleased changelogs
include breaking changes:

- `@metamask/transaction-controller` `72.3.0` → `73.0.0`. Simulation now
goes through `SentinelApiService:simulateTransactions`. Consumers must
construct a `SentinelApiService` and delegate that action.
`getSimulationConfig` now returns `{ newUrl?: string }` only
([MetaMask#9476](MetaMask#9476)).
- `@metamask/core-backend` `12.3.0` → `13.0.0`.
`OHLCV_SERVICE_ALLOWED_ACTIONS` no longer includes
`BackendWebSocketService:getConnectionInfo` or
`BackendWebSocketService:findSubscriptionsByChannelPrefix`
([MetaMask#10884](MetaMask#10884)). This release
also adds `fetchV5MultiAccountTransactions`
([MetaMask#11194](MetaMask#11194)),
`LaunchpadTokenDetailsService`, and `ChannelSubscriptionManager`
([MetaMask#10884](MetaMask#10884)).
- `@metamask/wallet` `20.0.0` → `21.0.0`. Default initialization now
includes `NetworkEnablementController`, and the wallet messenger
delegates `SentinelApiService:simulateTransactions`. Clients must
register `MultichainNetworkController:getState` and
`SentinelApiService:simulateTransactions` on the wallet messenger
([MetaMask#10997](MetaMask#10997),
[MetaMask#9476](MetaMask#9476)).

These packages are included so they can depend on
`transaction-controller` `^73.0.0` and, where they use it,
`core-backend` `^13.0.0`:

| Package | Version |
| --- | --- |
| `@metamask/assets-controller` | `20.1.0` |
| `@metamask/assets-controllers` | `113.0.1` |
| `@metamask/bridge-controller` | `83.1.3` |
| `@metamask/bridge-status-controller` | `78.0.1` |
| `@metamask/client-utils` | `3.1.0` |
| `@metamask/eip-5792-middleware` | `4.1.0` |
| `@metamask/gator-permissions-controller` | `6.1.0` |
| `@metamask/money-account-utils` | `2.2.0` |
| `@metamask/network-enablement-controller` | `7.1.0` |
| `@metamask/phishing-controller` | `18.3.0` |
| `@metamask/profile-metrics-controller` | `5.2.1` |
| `@metamask/shield-controller` | `7.1.1` |
| `@metamask/smart-transactions-controller` | `27.2.1` |
| `@metamask/social-controllers` | `3.14.1` |
| `@metamask/subscription-controller` | `15.1.2` |
| `@metamask/transaction-pay-controller` | `30.3.2` |
| `@metamask/transaction-pay-middleware` | `2.0.1` |
| `@metamask/user-operation-controller` | `42.1.0` |

Notable changes besides the dependency bumps:

- `@metamask/assets-controller`: optional `pricePercentChange5m` and
`pricePercentChange4h` on `FungibleAssetPrice`
([MetaMask#11201](MetaMask#11201)).
- `@metamask/client-utils`: `predictionSettled` on `ActivityKind`
([MetaMask#11169](MetaMask#11169)), plus fee fixes
for contract-interaction fallback and OP Stack L1/operator fees
([MetaMask#11013](MetaMask#11013),
[MetaMask#9630](MetaMask#9630)).
- `@metamask/network-enablement-controller`: preserve enablement when a
config-registry network is auto-enabled
([MetaMask#10763](MetaMask#10763)).
- `@metamask/phishing-controller`: Arc (`0x13b2`) token scanning
([MetaMask#11144](MetaMask#11144)).
- `@metamask/transaction-pay-controller`: shared recipient resolution
and Hyperliquid perps deposit detection
([MetaMask#10887](MetaMask#10887),
[MetaMask#11026](MetaMask#11026)).

`@metamask/earn-controller`, `@metamask/money-account-mfa-whitelist`,
`@metamask/money-account-upgrade-controller`,
`@metamask/network-connection-banner-controller`,
`@metamask/perps-controller`, and `@metamask/signature-controller` only
have dependency ranges updated. They are not version-bumped and are not
published in this release.

## References

* [MetaMask#9476](MetaMask#9476)
* [MetaMask#9630](MetaMask#9630)
* [MetaMask#10763](MetaMask#10763)
* [MetaMask#10884](MetaMask#10884)
* [MetaMask#10887](MetaMask#10887)
* [MetaMask#10997](MetaMask#10997)
* [MetaMask#11013](MetaMask#11013)
* [MetaMask#11026](MetaMask#11026)
* [MetaMask#11144](MetaMask#11144)
* [MetaMask#11169](MetaMask#11169)
* [MetaMask#11194](MetaMask#11194)
* [MetaMask#11201](MetaMask#11201)

## 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
-->

- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> The diff is low-risk mechanically, but the published majors force
client upgrades around transaction simulation, backend WebSocket
actions, and wallet messenger registration—areas that affect core wallet
behavior.
> 
> **Overview**
> This PR cuts **release 1377.0.0** by bumping the root monorepo
version, publishing new semver tags for many `@metamask/*` packages,
moving unreleased changelog entries into versioned sections, updating
inter-package dependency ranges, and refreshing **`yarn.lock`**. There
is **no new application logic** in the diff—only release bookkeeping for
work already on `main`.
> 
> The release centers on three **major** packages whose changelogs
document breaking changes: **`@metamask/transaction-controller`
`73.0.0`** (simulation via `SentinelApiService:simulateTransactions`;
`getSimulationConfig` shape change), **`@metamask/core-backend`
`13.0.0`** (WebSocket allowed-actions cleanup plus new backend
APIs/services), and **`@metamask/wallet` `21.0.0`** (default
`NetworkEnablementController` wiring and Sentinel simulation delegation
on the wallet messenger). Dozens of other packages are **minor/patch
bumped** mainly to depend on **`transaction-controller` `^73.0.0`** and,
where applicable, **`core-backend` `^13.0.0`**.
> 
> Several workspaces only have **`package.json` dependency range
updates** (e.g. `earn-controller`, `money-account-upgrade-controller`,
`signature-controller`) without a version bump in this PR. A few
packages also document **feature fixes** in their new changelog sections
(e.g. `assets-controller` price change fields, `client-utils` activity
kinds/fees, `phishing-controller` Arc scanning) as part of the versions
being published here.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
5a253e4. 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: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Naz-Ovh pushed a commit to 0x-fork/metamask-core that referenced this pull request Nov 14, 2026
…11379)

<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## Explanation

`@metamask/core-backend` now exposes `GET /v5/multiaccount/transactions`
(MetaMask#11194), but the activity mappers in `@metamask/client-utils` only
accept the V1 shape (`V1TransactionByHashResponse`). This adds a V5
mapper without changing the V1 one, so clients can move from V4 to V5
one fetch path at a time.

**How it works**

- `mapApiTransaction` now adapts its input into an internal
`IndexedTransaction` shape (`helpers/indexed-transaction.ts`) and calls
a shared classifier. Its signature and output are unchanged.
- The new `mapV5ApiTransaction({ transaction: V5TransactionRecord,
getKnownTokenDecimals? })` adapts a V5 record into the same shape:
  - The subject address comes from the record's CAIP-10 `accountId`.
- `assetClass` and the CAIP-19 `assetId` namespace map to the V1
`transferType` values: `eip155Internal` becomes `internal`, `slip44`
becomes `normal`, and `erc20`/`erc721`/`erc1155` stay as they are. EVM
token contract addresses are read from the `assetId` reference, so asset
IDs come out checksummed exactly as they do from V1.
  - Fees come from `fee.asset` instead of `gasUsed × effectiveGasPrice`.
- `tx.status` maps `confirmed` to `success`, `failed` to `failed`, and
anything else to `pending`.
  - Non-EVM transfers keep the API `assetId`.


## References

- Related to MetaMask#11194
- Accounts API spec: https://accounts.api.cx.metamask.io/docs-json
(`/v5/multiaccount/transactions`)

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them
<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-7e6d8e2e-9423-410b-aaa6-df90813fb1b8?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-7e6d8e2e-9423-410b-aaa6-df90813fb1b8&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches shared activity classification and fee/token mapping used
across clients; risk is mainly parity bugs when migrating from V1 to V5,
not a breaking API change for existing `mapApiTransaction` callers.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
682aaea. 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: Cursor Agent <cursoragent@cursor.com>
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