@metamask/utils
Advanced tools
Changelog
[11.1.0]
CaipAsset{Namespace,Reference,TokenId}
support (#227)CaipAssetTypeOrId
(#229)
CaipAssetType
and CaipAssetId
to avoid relying on superstruct.union
, resulting in better error messages.definePattern
superstruct helper (#228)
superstruct.pattern
while naming the struct and enforcing its type.Changelog
[9.0.0]
getChecksumAddress
, numberToHex
, bigIntToHex
are narrowed from string
to Hex
(#193)@metamask/superstruct
from ^3.0.0
to ^3.1.0
(#194)
@metamask/utils
<=8.5.0
is used with @metamask/superstruct
>=3.1.0
the following error may be encountered:error TS2742: The inferred type of 'ExampleType' cannot be named without a reference to '@metamask/utils/node_modules/@metamask/superstruct'. This is likely not portable. A type annotation is necessary.
This can be resolved by updating @metamask/utils
to >=9.0.0
.