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.
- Add
name
andstate
toExecutionService
andMultichainRouter
(#3058) - Allow
null
in theendowment:assets
handlers return value (#3056) - Rename
ControllerMessenger
toMessenger
(#3053)
- Add
MultichainRouter
for SIP-26 (#2875) - Add
onProtocolRequest
support for SIP-26 (#2875) - Add
getRunnableSnaps
action toSnapController
(#3049)
- Add support for
onAssetsLookup
andonAssetsConversion
handlers (#3028)
- Added support for non-recurring cronjobs via
snap_scheduleBackgroundEvent
(#2941)
- Bump MetaMask dependencies (#2946, #3007, #2999, #3003, #2991, #2989)
- Cache snap state in memory for improved performance (#2980)
- Stop storing messenger manually in
CronjobController
(#3006)
- Add support for
onSettingsPage
export (#2911)
- Use
BigInt
for processing insight chain IDs (#2935)
- Add
clientCryptography
property for specifying custom cryptography functions (#2909)
- Emit
snapInstalled
andsnapUpdated
events for preinstalled Snaps (#2900)- This indirectly makes preinstalled Snaps trigger cronjobs and lifecycle hooks more reliably.
- Add interface persistence (#2856)
- Use
arrayBuffer
for fetching local Snaps (#2884)- This fixes some incompatiblities with React Native.
- Add platform version field to manifest (#2803)
- Bump MetaMask dependencies (#2853)
- Stop unnecesarily validating JSON for stored state (#2845)
- Reduce unnecessary JSON validation (#2844)
- Pass full URLs to
PhishingController
(#2835) - Ignore Snap insight response if transaction or signature has already been signed (#2825)
- Allow updating interface context (#2809)
snap_updateInterface
now accepts acontext
parameter to update the context of an interface.
- Remove
AccountSelector
component (#2794)- This is technically a breaking change, but the
AccountSelector
component was never actually implemented, so it should not affect any existing code.
- This is technically a breaking change, but the
- Add
AccountSelector
component (#2764, #2768, #2766) - Convert
createWindow
parameters to options bag (#2765)
- Add support for
metamask:
schemed URLs (#2719)
- Export
WebViewMessageStream
and related types (#2746)
- Fix invalid
exports
field (#2740)
- Fix invalid types in type declaration in some cases (#2714)
- Add
stopAllSnaps
function toSnapController
(#2674)
- Fix ESM version of the package (#2682)
- This fixes the ESM version of the package to be fully compliant with the ESM standard.
- Bump
@metamask/utils
from^9.1.0
to^9.2.1
(#2680) - Bump other MetaMask dependencies (#2703)
- Add
Selector
component (#2645) - Add missing types for
getState
action &stateChange
event (#2655, #2659)
- Fix
fetch
binding under LavaMoat (#2642)
- Add
RadioGroup
component (#2592)
- Persist
severity
property inSnapInsightsController
(#2612)
- Bump
@metamask/approval-controller
from^7.0.0
to^7.0.2
(#2593) - Bump
@metamask/base-controller
from^6.0.1
to^6.0.2
(#2593) - Bump
@metamask/json-rpc-engine
from^9.0.0
to^9.0.2
(#2593) - Bump
@metamask/json-rpc-middleware-stream
from^8.0.0
to^8.0.2
(#2593) - Bump
@metamask/permission-controller
from^10.0.1
to^11.0.0
(#2593) - Bump
@metamask/phishing-controller
from^10.0.0
to^10.1.1
(#2593) - Bump
@metamask/snaps-utils
from^7.8.0
to^7.8.1
(#2595)
- Add
snap_resolveInterface
RPC method to theSnapInterfaceController
(#2509) - Add
SnapInsightsController
(#2555)
- Bump
@metamask/base-controller
from^6.0.0
to^6.0.1
(#2445) - Bump
@metamask/permission-controller
from^10.0.0
to^10.0.1
(#2445) - Bump
@metamask/rpc-errors
from^6.2.1
to^6.3.1
(#2445) - Bump
@metamask/snaps-registry
from^3.1.0
to^3.2.1
(#2445) - Bump
@metamask/snaps-rpc-methods
to^10.0.0
(#2589) - Bump
@metamask/snaps-sdk
to^6.1.0
(#2589) - Bump
@metamask/snaps-utils
to^7.8.0
(#2589) - Bump
@metamask/utils
from^8.3.0
to^9.1.0
(#2445) - Bump peer dependency
@metamask/snaps-execution-environments
to^6.6.1
(#2589)
- Handle initial connections for preinstalled Snaps (#2591)
- Account for revoked origins when calculating the difference in
initialConnections
(#2535)- Fixes issue of revoking permissions that are already revoked.
- Enables revoked connections to be highlighted as being re-added in the UI.
- Enforce stricter size limits for source code, static auxiliary files, and
snap_getFile
return values (#2527)- Prevent communication failures by enabling compliance with JSON-RPC extension message requirements.
- Add feature flag to disable Snap installation (#2521)
- Add
Checkbox
component (#2501) - Add
FileInput
component (#2469) - Support additional components inside forms (#2497)
- BREAKING: Defer creation of offscreen document in
OffscreenExecutionService
(#2473) - Update
onNameLookup
response to includedomainName
(#2484) - Bump MetaMask dependencies (#2460)
- Properly decrypt legacy state blobs (#2472)
- Add
hidden
flag for preinstalled Snaps (#2463)
- Use first Dropdown option as the default value (#2465)
- Fix
react-native
export for tools that don't supportpackage.json
exports (#2451)
- Add origin to lifecycle hooks (#2441)
- Lifecycle hooks can now use the
origin
parameter to determine the origin of the installation or update.
- Lifecycle hooks can now use the
- Add
context
field tosnap_createInterface
(#2413) - Add feature flag to disable platform (#2434)
- Add support for
Dropdown
component (#2420) - Add
initialConnections
diff calculations needed for Snap update (#2424)
- Correctly merge caveats when using initial connections (#2419)
- Re-instantiate preinstalled Snaps after clearing state (#2393)
- Add JSX support for custom UI (#2258)
- Bump
@metamask/approval-controller
from6.0.1
to6.0.2
(#2380) - Bump
@metamask/base-controller
from5.0.1
to5.0.2
(#2375)
- Fix an issue where certain types of executors would be timed out too quickly (#2389)
- BREAKING: Move
maxInitTime
constructor argument fromSnapController
toExecutionService
(#2348)
- Increase max UI size limit from 250 KB to 10 MB (#2342)
- Consider caveats in permissions difference calculation (#2345)
- This fixes a bug where certain caveats would not be correctly applied when updating Snaps.
- Gracefully handle errors for multiple simultaneous failing requests (#2346)
- Properly handle termination of Snaps that are currently executing (#2304)
- Properly tear down partially initialized executors and improve stability when executor initialization fails (#2348)
- Fix encryption key caching issues (#2326)
- BREAKING: Refactor encryption to enable caching (#2316)
- New required constructor arguments
encryptor
andgetMnemonic
have been added.
- New required constructor arguments
- Include
initialConnections
in approvalrequestState
(#2322)
- Delete unencrypted state when uninstalling a Snap (#2311)
- Bump MetaMask dependencies (#2270)
- Handle unavailable registry more gracefully (#2256)
- Bump
@metamask/snaps-registry
to^3.0.1
(#2255) - Bump
@metamask/json-rpc-engine
to^7.3.3
(#2247)
- Improve timeout handling when the execution environment fails to load (#2242)
- Fix minor build configuration problems (#2220)
- BREAKING: Update ESM build to be fully compliant with the ESM standard (#2210)
- BREAKING: Move Node.js exports to separate export (#2210)
- The default export is now browser-compatible.
- Node.js APIs can be imported from
<package>/node
.
- Bump
@metamask/rpc-errors
to^6.2.1
(#2209)
- Add sizing limits for custom UI (#2199)
- Fix issue installing non-allowlisted Snaps in allowlist mode (#2196)
- Add support for dynamic user interfaces (#1465, #2126, #2144, #2152, #2143)
- Add support for Snap defined execution timeouts (#2098)
- A Snap can now define
maxRequestTime
to extend or shorten its execution timeout.
- A Snap can now define
- Add
WebViewExecutionService
for mobile execution (#2005)
- Loosen allowlist requirements (#1672)
- Snaps with certain permissions can now be installed without being allowlisted.
- Reintroduce
DecompressionStream
for improved installation performance (#2110) - Bump
tar-stream
(#2116)- This fixes a problem where Snaps would sometimes fail to download from NPM.
- Bump several MetaMask dependencies (#2129, #2132, #2130, #2139, #2142)
- Pass localized snap name to SubjectMetadataController (#2157)
- BREAKING: Remove endowment permission specifications from this package (#2155)
- They can now be found in
snaps-rpc-methods
.
- They can now be found in
- Add support for signature insights (#2074)
- Add support for initial connections (#2048)
- Add support for preinstalled snaps (#2008)
- Add additional install events (#2087)
- BREAKING: Remove
:snapAdded
event (#2073) - BREAKING: Remove
:snapRemoved
event (#2076) - Populate subject metadata when snaps are added to state (#2069)
- Revert usage of
DecompressionStream
(#2052) - Refactor
NpmLocation
class (#2038)- Most logic is now located in
BaseNpmLocation
, making it easier to extend without duplication.
- Most logic is now located in
- Bump several MetaMask dependencies (#2053, #2061, #2064, #2065, #2067)
- Remove support for object-like syntax for cronjobs (#2057)
- Since this never worked in the first place we aren't marking it as breaking.
- Reduce memory usage by removing source code and state from runtime (#2009)
- Improve base64 encoding/decoding speeds (#1985)
- Use
DecompressionStream
for NPM fetching when available (#1971) - Bump several MetaMask dependencies (#1989, #1993, #1987, #1983)
- Fix idle snap timeout for unused snap (#2010)
- Fix a few issues with passing non-JSON-serializable values (#1974)
- Use
SubtleCrypto
for checksum calculation if available (#1953)- This reduces the time of the checksum calculation by up to 95% in some environments.
- Use
@metamask/snaps-sdk
package (#1930, #1949)- This package replaces the
@metamask/snaps-types
and @metamask/snaps-ui
packages.
- This package replaces the
- Fix support for transaction insight Snaps returning
null
(#1952)
- Add manifest localization functionality (#1889)
- Add support for unencrypted storage using
snap_manageState
(#1902) - Add
OnHomePage
export (#1896)
- Add support for links in custom UI and notifications (#1814)
- Fix an issue where snaps throwing a
SnapError
would be allowed to run for longer than expected (#1897)
- Fix a few issues with allowlist version resolving (#1888)
- Add static file API (#1836)
- This adds a
snap_getFile
method, which Snaps can use to load files.
- This adds a
- Add
origin
parameter tosnapInstalled
andsnapUpdated
events (#1867)
- Improve error handling (#1841)
- Snaps can now throw a
SnapError
, without causing the Snap to crash.
- Snaps can now throw a
- Bump
tar-stream
from^2.2.0
to^3.1.6
(#1853) - Make
snaps-execution-environments
an optional peer dependency (#1845) - Remove snap errors from state (#1837)
- Try to match requested versions with an allowlisted version (#1877)
- Improve performance when installing snaps with a static version (#1878)
- Stop persisting snaps in the installing state (#1876)
- Add keyring export and endowment (#1787)
- Add optional
allowedOrigins
field toendowment:rpc
(#1822)- This can be used to only accept certain origins in your Snap.
- BREAKING: Bump minimum Node.js version to
^18.16.0
(#1741)
- Add
SnapController:snapUninstalled
event (#1800)
- Fix some issues with SnapController events (#1800)
- Fix an issue where cronjobs would continually be executed on init (#1790)
- Remove deprecated
endowment:long-running
(#1751)
- Initial stable release from main branch (#1757)
- Add
onNameLookup
export (#1394)
- Fix cronjob running on disabled snaps (#1743)
- Bump
@metamask/post-message-stream
from 6.1.2 to 7.0.0 (#1707, #1724) - Bump
@metamask/utils
and@metamask/snaps-registry
(#1694)
- Fix unpacking zero byte files from NPM (#1708)
- Remove unused dependencies (#1680)
- Fix parallel usage of registry (#1669)
- Add
onInstall
andonUpdate
lifecycle hooks (#1643)
- Make
updateBlockedSnaps
update the registry (#1625) - Move source code and snap state back to controller state (#1634)
- Release package independently (#1600)
- The version of the package no longer needs to match the version of all other MetaMask Snaps packages.