All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Make implicit peer dependencies explicit (#4974)
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
@babel/runtime@^7.0.0
(required by@metamask/ethjs-unit
)
- These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
- Furthermore, we are assuming that clients already use these dependencies, since otherwise it would be impossible to consume this package in its entirety or even create a working build. Hence, the addition of these peer dependencies is really a formality and should not be breaking.
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
- Correct ESM-compatible build so that imports of the following packages that re-export other modules via
export *
are no longer corrupted: (#5011)bn.js
eth-ens-namehash
fast-deep-equal
- The
NetworkNickname
for mainnet is nowEthereum Mainnet
instead ofMainnet
. And the display name for Linea is nowLinea
instead ofLinea Mainnet
. (#4865)
- Move BigNumber.js from devDependencies to dependencies (#4873)
- Bump
@metamask/utils
from^9.1.0
to^10.0.0
(#4831)
- Add
isEqualCaseInsensitive
function for case-insensitive string comparison (#4811)
- Add types
TraceContext
,TraceRequest
,TraceCallback
(#4655)- Migrated from
@metamask/[email protected]
.
- Migrated from
- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files (#4648)
- Previously, this package shipped with only one variant of type declaration
files, and these files were only CommonJS-compatible, and the
exports
field inpackage.json
linked to these files. This is an anti-pattern and was rightfully flagged by the "Are the Types Wrong?" tool as "masquerading as CJS". All of the ATTW checks now pass.
- Previously, this package shipped with only one variant of type declaration
files, and these files were only CommonJS-compatible, and the
- Remove chunk files (#4648).
- Previously, the build tool we used to generate JavaScript files extracted common code to "chunk" files. While this was intended to make this package more tree-shakeable, it also made debugging more difficult for our development teams. These chunk files are no longer present.
- Add
BlockExplorerUrl
object and type for looking up the block explorer URL of any Infura network (#4268) - Add
NetworkNickname
object and type for looking up the common nickname for any Infura network (#4268) - Add
Partialize
type for making select keys in an object type optional (#4268) toHex
now supports converting abigint
into a hex string (#4268)
- Add default snap dialog to ApprovalType (#4630)
- Bump TypeScript version to
~5.0.4
and setmoduleResolution
option toNode16
(#3645) - Bump
@metamask/utils
from^9.0.0
to^9.1.0
(#4529)
- Bump
@metamask/rpc-errors
from6.2.1
to^6.3.1
(#4516) - Bump
@metamask/utils
from^8.3.0
to^9.0.0
(#4516)
- Add
NFT_API_VERSION
andNFT_API_TIMEOUT
constants (#4312)
- BREAKING: Bump minimum Node version to 18.18 (#3611)
- BREAKING: Remove
EthSign
fromApprovalType
(#4319)- This represented an
eth_sign
approval, but support for that RPC method is being removed, so this is no longer needed.
- This represented an
- BREAKING: Changed price and token API endpoints from
*.metafi.codefi.network
to*.api.cx.metamask.io
(#4301)
- Export new constant for the NFT API's url (#4030)
- Add support for wider range of SIWE messages (#4141)
- Bump TypeScript version to ~4.9.5 (#4084)
- Add guards against prototype-polluting assignments (#4041)
- Allow
toChecksumHexAddress
to take and handle non-string inputs again, which was removed in 8.0.4 (#4046)
- Fix
types
field inpackage.json
(#4047)
- BREAKING: Add ESM build (#3998)
- It's no longer possible to import files from
./dist
directly.
- It's no longer possible to import files from
- Add support for Linea Sepolia to various constants, types, and type guards (#3995)
- Add
LINEA_SEPOLIA
toTESTNET_TICKER_SYMBOLS
constant - Add
0xe705
toCHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP
constant - Add
linea-sepolia
toBUILT_IN_NETWORKS
constant andInfuraNetworkType
,NetworkType
,ChainId
, andNetworksTicker
types - Add
LineaSepolia
toBuiltInNetworkName
enum isNetworkType
andisInfuraNetworkType
now returntrue
when given "linea-sepolia"
- Add
- Update
normalizeEnsName
so that it does not attempt to normalize"."
(#4006) - Move
bn.js
fromdevDependencies
todependencies
(#4023)
- BREAKING: Narrow argument type for
BNToHex
andfractionBN
fromany
toBN
to enhance type safety (#3975) - BREAKING: Narrow argument type for
logOrRethrowError
fromany
tounknown
to enhance type safety (#3975) - BREAKING: Narrow argument type for
isNetworkType
fromany
tostring
to enhance type safety (#3975)
- Replace
ethereumjs-util
with@ethereumjs/util
(#3943)
- Bump
@metamask/ethjs-unit
to^0.3.0
(#3897)
- Bump
@metamask/utils
to^8.3.0
(#3769)
- There are no consumer-facing changes to this package. This version is a part of a synchronized release across all packages in our monorepo.
- BREAKING:
OPENSEA_PROXY_URL
now points to OpenSea's v2 API.OPENSEA_API_URL
+OPENSEA_TEST_API_URL
have been removed (#3654)
- BREAKING: Make
safelyExecute
generic so they preserve types (#3629) - Update
successfulFetch
so that a URL instance can now be passed to it (#3600) - Update
handleFetch
so that a URL instance can now be passed to it (#3600)
- Add
isInfuraNetworkType
type guard forInfuraNetworkType
(#2055)
- Restore missing dependency
eth-query
(#3578)- This was mistakenly recategorized as a devDependency in v6.0.0
- BREAKING: Bump
@metamask/eth-query
to ^4.0.0 (#2028)- This affects
query
: thesendAsync
method on the given EthQuery must now have a narrower type
- This affects
- Bump
@metamask/utils
from ^8.1.0 to ^8.2.0 (#1957) - Change
BUILT_IN_NETWORKS
so thatrpc
entry now has a dummyticker
(#1794) - Replace
ethjs-unit
^0.1.6 with@metamask/ethjs-unit
^0.2.1 (#2064)
- Move
@metamask/eth-query
from a development dependency to a runtime dependency (#1815)
- Bump dependency on
@metamask/utils
to ^8.1.0 (#1639) - Move
eth-rpc-errors@^4.0.2
dependency to@metamask/rpc-errors@^6.0.2
(#1743)
- Update linea goerli explorer url (#1666)
- Update TypeScript to v4.8.x (#1718)
- BREAKING: Rename
NETWORK_ID_TO_ETHERS_NETWORK_NAME_MAP
toCHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP
(#1633)- Change it to a map of
Hex
chain ID toBuiltInNetworkName
- Change it to a map of
- BREAKING: Remove
NetworkId
constant and type (#1633)
- There are no consumer-facing changes to this package. This version is a part of a synchronized release across all packages in our monorepo.
- Replace
eth-query
^2.1.2 with@metamask/eth-query
^3.0.1 (#1546)
- Add support for Linea networks (#1423)
- Add
LINEA_GOERLI
toTESTNET_TICKER_SYMBOLS
map - Add
linea-goerli
andlinea-mainnet
toBUILT_IN_NETWORKS
map, as well asNetworkType
,InfuraNetworkType
,ChainId
, andNetworkId
enums - Add
LineaGoerli
andLineaMainnet
toBuiltInNetworkName
enum
- Add
- Add approval types for result pages (#1442)
- Add dependencies
eth-query
andbabel-runtime
(#1447)
- Fix bug where query function failed to call built-in EthQuery methods (#1447)
- Add constants
BuiltInNetwork
andChainId
(#1354) - Add Aurora network to the
ChainId
constant (#1327) - Add
InfuraNetworkType
enum (#1264)
- BREAKING: Bump to Node 16 (#1262)
- BREAKING: The
isSafeChainId
chain ID parameter is now typeHex
rather thannumber
(#1367) - BREAKING: The
ChainId
enum and theGANACHE_CHAIN_ID
constant are now formatted as 0x-prefixed hex strings rather than as decimal strings. (#1367) - The
query
function has improved type checks for theethQuery
argument (#1266)- This type change could be breaking, but only if you were passing in an invalid
ethQuery
parameter. In that circumstance this would have thrown an error at runtime anyway. Effectively this should be non-breaking for any usage that isn't already broken.
- This type change could be breaking, but only if you were passing in an invalid
- Bump @metamask/utils from 5.0.1 to 5.0.2 (#1271)
- BREAKING: Remove
Json
type (#1370) - BREAKING: Remove
NetworksChainId
constant (#1354)- Use the new
ChainId
constant or the pre-existingNetworkId
constant instead
- Use the new
- BREAKING: Remove localhost network (#1313)
- Remove the entry for localhost from
BUILT_IN_NETWORKS
,NetworkType
,ChainId
, andNetworksTicker
- Remove the entry for localhost from
- BREAKING: Remove
hasProperty
function (#1275)- Use the
hasProperty
function from@metamask/utils
instead
- Use the
- BREAKING: Remove constants
MAINNET
andTESTNET_TICKER_SYMBOLS
(#1132)- These were actually removed in v3.1.0, but are listed here again because that release (and the minor releases following it) have been deprecated due to the breaking change
- We didn't discover this until many releases later, which is why this happened in a minor release
3.4.0 [DEPRECATED]
- add WalletConnect in approval type (#1240)
3.3.0 [DEPRECATED]
- Add Sign-in-with-Ethereum origin validation (#1163)
- Add
NetworkId
enum andNETWORK_ID_TO_ETHERS_NETWORK_NAME_MAP
constant that includes entries for each built-in Infura network (#1170)
3.2.0 [DEPRECATED]
- Improve return type of
toHex
(#1195)
3.1.0 [DEPRECATED]
- Add SIWE detection support for PersonalMessageManager (#1139)
- Add
NetworkType
(#1132) - Add
isSafeChainId
(#1064)
- BREAKING: Remove constants
MAINNET
andTESTNET_TICKER_SYMBOLS
(#1132)- We didn't discover this until many releases later, which is why this happened in a minor release
- BREAKING: Remove
isomorphic-fetch
(#1106)- Consumers must now import
isomorphic-fetch
or another polyfill themselves if they are running in an environment withoutfetch
- Consumers must now import
- Add Sepolia-related constants (#1041)
- Update
getBuyURL
function to return Sepolia faucet for Sepolia network (#1041)
- BREAKING:: Migrate from
metaswap
tometafi
subdomain for OpenSea proxy (#1060) - Rename this repository to
core
(#1031)
- BREAKING: Remove all constants associated with Ropsten, Rinkeby, and Kovan (#1041)
- BREAKING: Remove support for Ropsten, Rinkeby, and Kovan from
getBuyUrl
function (#1041)
-
Initial release
-
As a result of converting our shared controllers repo into a monorepo (#831), we've created this package from select parts of
@metamask/controllers
v33.0.0, namely:src/constants.ts
(but see below)src/util.ts
(but see below)src/util.test.ts
(but see below)NetworkType
andNetworkChainsId
fromsrc/network/NetworkController.ts
(viatypes.ts
)
-
ESTIMATE_GAS_ERROR
, which used to be exported bysrc/constants.ts
, is now available via the@metamask/gas-fee-controller
package. -
A number of functions and types that were previously exported by
src/util.ts
are now available via other packages. Here's a breakdown of these exports and their new locations:@metamask/assets-controllers
:SupportedTokenDetectionNetworks
addUrlProtocolPrefix
getFormattedIpfsUrl
getIpfsCIDv1AndPath
isTokenDetectionSupportedForNetwork
isTokenListSupportedForNetwork
removeIpfsProtocolPrefix
validateTokenToWatch
@metamask/message-manager
:normalizeMessageData
validateSignMessageData
validateTypedSignMessageDataV1
validateTypedSignMessageDataV3
@metamask/transaction-controller
:getEtherscanApiUrl
getIncreasedPriceFromExisting
getIncreasedPriceHex
handleTransactionFetch
isEIP1559Transaction
isFeeMarketEIP1559Values
isGasPriceValue
normalizeTransaction
validateGasValues
validateMinimumIncrease
validateTransaction
All changes listed after this point were applied to this package following the monorepo conversion.
-