Skip to content

Latest commit

 

History

History
694 lines (432 loc) · 31.3 KB

CHANGELOG.md

File metadata and controls

694 lines (432 loc) · 31.3 KB

Changelog

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.

Fixed

  • Add name and state to ExecutionService and MultichainRouter (#3058)
  • Allow null in the endowment:assets handlers return value (#3056)
  • Rename ControllerMessenger to Messenger (#3053)

Added

  • Add MultichainRouter for SIP-26 (#2875)
  • Add onProtocolRequest support for SIP-26 (#2875)
  • Add getRunnableSnaps action to SnapController (#3049)

Fixed

  • Set name correctly for SnapController (#3052, #3054)

Added

  • Add support for onAssetsLookup and onAssetsConversion handlers (#3028)

Added

  • Added support for non-recurring cronjobs via snap_scheduleBackgroundEvent (#2941)

Changed

Fixed

  • Stop storing messenger manually in CronjobController (#3006)

Added

  • Add support for onSettingsPage export (#2911)

Fixed

  • Use BigInt for processing insight chain IDs (#2935)

Added

  • Add clientCryptography property for specifying custom cryptography functions (#2909)

Added

  • Emit snapInstalled and snapUpdated events for preinstalled Snaps (#2900)
    • This indirectly makes preinstalled Snaps trigger cronjobs and lifecycle hooks more reliably.

Added

  • Add interface persistence (#2856)

Changed

  • Use arrayBuffer for fetching local Snaps (#2884)
    • This fixes some incompatiblities with React Native.

Added

  • Add platform version field to manifest (#2803)

Changed

  • Bump MetaMask dependencies (#2853)

Fixed

  • Stop unnecesarily validating JSON for stored state (#2845)
  • Reduce unnecessary JSON validation (#2844)

Fixed

  • Pass full URLs to PhishingController (#2835)
  • Ignore Snap insight response if transaction or signature has already been signed (#2825)

Changed

  • Allow updating interface context (#2809)
    • snap_updateInterface now accepts a context parameter to update the context of an interface.

Removed

  • 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.

Changed

  • Add AccountSelector component (#2764, #2768, #2766)
  • Convert createWindow parameters to options bag (#2765)

Added

  • Add support for metamask: schemed URLs (#2719)

Added

  • Export WebViewMessageStream and related types (#2746)

Fixed

  • Fix invalid exports field (#2740)

Added

  • Add hideSnapBranding flag for preinstalled Snaps (#2713, #2717)

Fixed

  • Fix invalid types in type declaration in some cases (#2714)

Added

  • Add stopAllSnaps function to SnapController (#2674)

Fixed

  • 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)

Added

  • Add Selector component (#2645)
  • Add missing types for getState action & stateChange event (#2655, #2659)

Fixed

  • Fix fetch binding under LavaMoat (#2642)

Added

  • Add RadioGroup component (#2592)

Changed

  • Persist severity property in SnapInsightsController (#2612)

Changed

  • 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)

Added

  • Add snap_resolveInterface RPC method to the SnapInterfaceController (#2509)
  • Add SnapInsightsController (#2555)

Changed

  • 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)

Fixed

  • 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.

Added

  • Add feature flag to disable Snap installation (#2521)

Added

  • Add Checkbox component (#2501)
  • Add FileInput component (#2469)
  • Support additional components inside forms (#2497)

Changed

  • BREAKING: Defer creation of offscreen document in OffscreenExecutionService (#2473)
  • Update onNameLookup response to include domainName (#2484)
  • Bump MetaMask dependencies (#2460)

Fixed

  • Properly decrypt legacy state blobs (#2472)

Added

  • Add hidden flag for preinstalled Snaps (#2463)

Fixed

  • Use first Dropdown option as the default value (#2465)

Fixed

  • Fix react-native export for tools that don't support package.json exports (#2451)

Added

  • Add origin to lifecycle hooks (#2441)
    • Lifecycle hooks can now use the origin parameter to determine the origin of the installation or update.

Added

  • Add context field to snap_createInterface (#2413)
  • Add feature flag to disable platform (#2434)
  • Add support for Dropdown component (#2420)
  • Add initialConnections diff calculations needed for Snap update (#2424)

Fixed

  • Correctly merge caveats when using initial connections (#2419)

Fixed

  • Re-instantiate preinstalled Snaps after clearing state (#2393)

Added

  • Add JSX support for custom UI (#2258)

Changed

  • Bump @metamask/approval-controller from 6.0.1 to 6.0.2 (#2380)
  • Bump @metamask/base-controller from 5.0.1 to 5.0.2 (#2375)

Fixed

  • Fix an issue where certain types of executors would be timed out too quickly (#2389)

Changed

  • BREAKING: Move maxInitTime constructor argument from SnapController to ExecutionService (#2348)

Fixed

  • 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)

Fixed

  • Fix encryption key caching issues (#2326)

Changed

  • BREAKING: Refactor encryption to enable caching (#2316)
    • New required constructor arguments encryptor and getMnemonic have been added.
  • Include initialConnections in approval requestState (#2322)

Fixed

  • Delete unencrypted state when uninstalling a Snap (#2311)

Changed

  • Bump MetaMask dependencies (#2270)

Changed

  • 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)

Changed

  • Improve timeout handling when the execution environment fails to load (#2242)

Fixed

  • Fix minor build configuration problems (#2220)

Changed

  • 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)

Fixed

  • Add sizing limits for custom UI (#2199)

Fixed

  • Fix issue installing non-allowlisted Snaps in allowlist mode (#2196)

Added

  • 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.
  • Add WebViewExecutionService for mobile execution (#2005)

Changed

  • 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)

Removed

  • BREAKING: Remove endowment permission specifications from this package (#2155)
    • They can now be found in snaps-rpc-methods.

Added

  • Add support for signature insights (#2074)
  • Add support for initial connections (#2048)
  • Add support for preinstalled snaps (#2008)
  • Add additional install events (#2087)

Changed

  • Bump several MetaMask dependencies (#2086, #2100)

Changed

  • BREAKING: Remove :snapAdded event (#2073)
  • BREAKING: Remove :snapRemoved event (#2076)
  • Populate subject metadata when snaps are added to state (#2069)

Changed

  • Revert usage of DecompressionStream (#2052)
  • Refactor NpmLocation class (#2038)
    • Most logic is now located in BaseNpmLocation, making it easier to extend without duplication.
  • Bump several MetaMask dependencies (#2053, #2061, #2064, #2065, #2067)

Removed

  • Remove support for object-like syntax for cronjobs (#2057)
    • Since this never worked in the first place we aren't marking it as breaking.

Changed

  • Improve SnapController constructor types (#2023)
  • Bump snaps-registry (#2020)

Changed

  • 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)

Fixed

  • Fix idle snap timeout for unused snap (#2010)

Changed

  • Bump several MetaMask dependencies (#1964, #1961)

Fixed

  • Fix a few issues with passing non-JSON-serializable values (#1974)

Changed

  • 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.

Fixed

  • Fix support for transaction insight Snaps returning null (#1952)

Added

  • Add manifest localization functionality (#1889)
  • Add support for unencrypted storage using snap_manageState (#1902)
  • Add OnHomePage export (#1896)

Added

  • Add support for links in custom UI and notifications (#1814)

Fixed

  • Fix an issue where snaps throwing a SnapError would be allowed to run for longer than expected (#1897)

Fixed

  • Fix a few issues with allowlist version resolving (#1888)

Added

  • Add static file API (#1836)
    • This adds a snap_getFile method, which Snaps can use to load files.
  • Add origin parameter to snapInstalled and snapUpdated events (#1867)

Changed

  • Improve error handling (#1841)
    • Snaps can now throw a SnapError, without causing the Snap to crash.
  • 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)

Fixed

  • 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)

Added

  • Add keyring export and endowment (#1787)
  • Add optional allowedOrigins field to endowment:rpc (#1822)
    • This can be used to only accept certain origins in your Snap.

Changed

  • BREAKING: Bump minimum Node.js version to ^18.16.0 (#1741)

Added

  • Add SnapController:snapUninstalled event (#1800)

Fixed

  • Fix some issues with SnapController events (#1800)
  • Fix an issue where cronjobs would continually be executed on init (#1790)

Changed

  • Remove deprecated endowment:long-running (#1751)

Changed

  • Initial stable release from main branch (#1757)

Added

  • Add onNameLookup export (#1394)

Changed

  • Remove pump (#1730)
  • Bump metamask/utils and metamask/snaps-registry (#1738)

Fixed

  • Fix cronjob running on disabled snaps (#1743)

Changed

  • Bump @metamask/post-message-stream from 6.1.2 to 7.0.0 (#1707, #1724)
  • Bump @metamask/utils and @metamask/snaps-registry (#1694)

Fixed

  • Fix unpacking zero byte files from NPM (#1708)

Fixed

  • Remove unused dependencies (#1680)

Fixed

  • Fix parallel usage of registry (#1669)

Added

  • Add onInstall and onUpdate lifecycle hooks (#1643)

Changed

  • Make updateBlockedSnaps update the registry (#1625)
  • Move source code and snap state back to controller state (#1634)

Changed

  • Release package independently (#1600)
    • The version of the package no longer needs to match the version of all other MetaMask Snaps packages.