npm / @metamask/utils
@metamask/utils
What changed in @metamask/utils 6 to 1438, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
7 breaking15 new APIs and options5 behavior and defaults1 tooling3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@metamask/utils 14387 changes
Breaking changes 1
Rejects buy URLs whose origin differs from the ramps API origin for the configured environment, before adding common params or requesting a bearer token; baseUrlOverride does not relax the check.
New APIs and options 4
Returns providers the user has completed a buy with, most recent first; also adds the RampsProviderHistoryEntry and SelectProviderForAssetOptions types.
Selects a provider for an asset using the user's pick, ahead-of-history list, recent completed buys, and API ranking, in that order.
Adds a userSelected option that sets userSelectedProviderId.
Adds non-persisted state for the user's selected provider; it is cleared by setSelectedProvider(null) and on region change.
Fixes and other changes 2
Provider selection and resolution now match orders with /providers/<id> provider IDs or text createdAt values, and exclude sell orders.
Polling publishes orderStatusChanged only when the new status is stored, preventing repeated events when fetched order IDs differ or an order is removed during an in-flight request.
@metamask/utils 14353 changes
New APIs and options 3
Adds a TransactionType identifying a Perps deposit that targets Lighter, so clients can distinguish it from existing Hyperliquid Perps types in metrics and confirmations.
Adds a TransactionType identifying a Lighter Perps deposit-and-order, so clients can distinguish it from existing Hyperliquid Perps types in metrics and confirmations.
Adds a TransactionType identifying a Perps withdrawal that targets Lighter, so clients can distinguish it from existing Hyperliquid Perps types in metrics and confirmations.
@metamask/utils 14195 changes
New APIs and options 2
Adds a feature flag to configure the buffer reserved on top of the probe's gas cost when reducing the source amount; it defaults to 1.0, meaning no buffer.
Adds a feature flag to disable gasless quotes in ServerStrategy; it is enabled by default.
Behavior and default changes 3
RelayStrategy tolerates small gas cost changes between probe and adjusted quotes by reserving a buffer; adjusted quote gas limit checks are removed because affordability checks cover gas cost changes.
Quote requests use non-atomic quotes when the transaction's from keyring requires MFA, avoiding a fresh delegation signature for every quote refresh.
Relay and Server quote simulation is skipped when the payer is an MPC Money account, avoiding delegation signing and MFA prompts during simulation.
@metamask/utils 101 changes
Breaking changes 1
The CurrencyRateController state field is now nullable after switching networks.
@metamask/utils 96 changes
Breaking changes 1
CurrencyRateController migrates to BaseControllerV2; the change is marked breaking.
New APIs and options 4
ComposableController gains support for BaseControllerV2.
BaseControllerV2 is exported.
ControllerMessenger is exported.
BaseControllerV2 adds a getState action.
Tooling 1
Restricted messenger types for controllers are improved.
@metamask/utils 84 changes
Breaking changes 2
Replaces the controller context, a breaking change for developers relying on the previous context.
Raises the minimum supported Node.js version to v12.
New APIs and options 1
Adds a restricted controller messenger.
Fixes and other changes 1
Collectibles are no longer removed during auto detection.
@metamask/utils 73 changes
New APIs and options 1
Adds the ability to indicate whether a transaction was added from the user's local device and the account creation time.
Behavior and default changes 2
Assets are now organized by chainid.
Supports longer token symbols via wallet_watchAsset.
@metamask/utils 62 changes
Breaking changes 2
The default approval controller type was removed.
NetworkController usage must use chainId instead of networkId.