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 types for
onAssetsLookup
andonAssetsConversion
handlers (#3028) - Add
Skeleton
component (#3024) - Add border radius prop to
Image
(#3023)
- Add support for non-recurring cronjobs via
snap_scheduleBackgroundEvent
(#2941, #2975) - Add
snap_getState
,snap_setState
,snap_clearState
methods (#2916) - Add
backgroundColor
property toContainer
component (#2950) - Add
hideBalances
tosnap_getPreferences
(#2978)
- Bump MetaMask dependencies (#2946, #2989)
- Make
jobs
property fully optional in the cronjob endowment (#3005) - Allow usage of
Text
inValue
props (#2984)
- Add
onSettingsPage
export (#2911) - Add
Banner
component (#2961) - Support
fontWeight
prop onText
(#2959) - Support
size
prop onButton
(#2953) - Add loading state for
Button
(#2930)
- Improve
Field
validation errors (#2937)
- Add
size
prop toText
(#2908) - Add JSX
content
property tosnap_notify
(#2881)- This content will be displayed in an upcoming expanded view for notifications.
- Add
snap_getInterfaceContext
JSON-RPC method (#2902)
- Add support for
Address
inCard
title (#2894)
- Add
snap_getCurrencyRate
toSnapMethods
(#2843) - Add
truncate
,displayName
andavatar
props toAddress
component (#2833)
- Bump MetaMask dependencies (#2853)
- Add
sm
size variant toHeading
component (#2831) - Add
min
,max
andstep
props to numberInput
component (#2821) - Add
Avatar
component (#2820)
- Remove support for JSX in
snap_notify
notifications (#2837)- This is technically a breaking change, but this feature was never actually implemented, so it should not affect any existing code.
- This will be re-implemented in a future release.
- Add
snap_experimentalProviderRequest
JSON-RPC method (#2773)- This method is experimental and will likely be removed in a future release.
- Allow updating interface context (#2809)
snap_updateInterface
now accepts acontext
parameter to update the context of an interface.
- Remove
eth_sign
(#2772)- This method was removed from the MetaMask extension, so any references to it in Snaps can be 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.
- This is technically a breaking change, but the
- Add
snap_getCurrencyRate
JSON-RPC method (#2763) - Add
AccountSelector
component (#2764, #2768) - Add
size
prop to theHeading
component (#2759)
- Allow
Link
inRow
andAddress
inLink
(#2761)
- Add support for
metamask:
schemed URLs (#2719) - Add support for JSX in
snap_notify
notifications (#2706)
- Fix package exports (#2737)
- Add
center
prop toBox
component (#2716) - Add
form
prop toButton
component (#2712)- This allows the
Button
component to be used outside of forms, but still submit a form when clicked.
- This allows the
- Fix invalid types in type declaration in some cases (#2714)
- Fix type issue with
Field
children (#2715)Field
now accepts booleans andnull
as children, in addition to the existing types.
- Allow any element as the child of the
Container
component (#2698) - Disallow images and icons in footers (#2676)
- 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)
Button
children are now allowed to beImage
andIcon
(#2641)
- Add structs to
typedUnion
schema (#2623)
- Bump
@metamask/providers
from17.0.0
to^17.1.2
(#2598)
- Add non-restricted RPC method
snap_resolveInterface
(#2509)- This method allows a Snap to resolve a given user interface bound to a
snap_dialog
with a custom value. - Add new types
ResolveInterfaceParams
,ResolveInterfaceResult
.
- This method allows a Snap to resolve a given user interface bound to a
- Add
Card
component (#2480) - Add
BoxChildStruct
,FormChildStruct
,FieldChildUnionStruct
(#2409) - Add
Container
andFooter
components (#2517)
- Update
RootJSXElement
to allowContainer
orBox
at the root (#2526) - Bump
@metamask/key-tree
from^9.1.1
to^9.1.2
(#2445) - Bump
@metamask/rpc-errors
from^6.2.1
to^6.3.1
(#2445) - Bump
@metamask/utils
from^8.3.0
to^9.1.0
(#2445)
- Replace
superstruct
with ESM-compatible@metamask/superstruct
^3.1.0
(#2445)- This fixes the issue of this package being unusable by any TypeScript project that uses
Node16
orNodeNext
as itsmoduleResolution
option.
- This fixes the issue of this package being unusable by any TypeScript project that uses
- Set
@metamask/providers
from^17.0.0
to17.0.0
(#2445)17.1.0
and17.1.1
introduce regressions.
- BREAKING: Add
FileInput
component (#2469, #2504)FormSubmitEvent
may now contain values of typeFile
.
- BREAKING: Add
Checkbox
component (#2501)FormSubmitEvent
andInputChangeEvent
may now contain values of typeboolean
.
- Add
alignment
prop toText
(#2489) - Add
Tooltip
component (#2490) - Support additional components inside forms (#2497)
- Support conditional children in most JSX components (#2506)
- Update
onNameLookup
response types (#2484)
- BREAKING: Remove
parseSvg
andisSvg
internals (#2475)
- Correct Row variant in JSX (#2486)
- Revert requiring at least one child in JSX components (#2481, #2470)
- Correct docs for
Input
andDropdown
(#2479)
- Require at least 1 child in JSX components (#2466)
- Fix invalid
@metamask/snaps-sdk
imports (#2452)
- 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
- Bump
@metamask/providers
from16.1.0
to17.0.0
(#2442) - Bump
@metamask/key-tree
from9.1.0
to9.1.1
(#2431)
- Add
Value
component (#2435) - Add
Dropdown
component (#2420) - Add positioning props to
Box
(#2422) - Allow
Button
withinInput
(#2407) - Add
context
field tosnap_createInterface
(#2413, #2427)
- Correct validation for children of Box component (#2423)
- Add support for BIP-32-Ed25519 / CIP-3 key derivation (#2408)
- Add missing TypeScript declarations for JSX entry points (#2404)
- Add JSX support for custom UI (#2258, #2379)
- It's now possible to use JSX components from this package to build user interfaces for Snaps.
- This package now exports a custom JSX runtime that can be used to render
JSX components in Snaps. It can be used with the
react-jsx
andreact-jsxdev
JSX pragmas, using@metamask/snaps-sdk
as import source.- When using
@metamask/snaps-cli
to build Snaps, the Snaps JSX runtime will be used automatically.
- When using
- Allow
null
inFormSubmitEventStruct
form state (#2333)
- BREAKING: Remove broken
ethereum
properties (#2296)- Snaps can no longer access
on
andremoveListener
onethereum
. - This feature was already non-functional.
- Snaps can no longer access
- Add support for importing SVG, PNG, and JPEG files directly (#2284)
- Bump
@metamask/providers
to^15.0.0
(#2231)
- Fix address validation in row component (#2257)
- Fix minor build configuration problems (#2220)
- BREAKING: Update ESM build to be fully compliant with the ESM standard (#2210)
- Bump
@metamask/rpc-errors
to^6.2.1
(#2209)
- Improve support for Snap errors without a message (#2176)
- You can now add data to an error without having to specify a message. For example:
throw new MethodNotFoundError({ method: "some method name" });
- You can now add data to an error without having to specify a message. For example:
- Strip empty
data
from Snap errors (#2179)
- BREAKING: Update name lookup API types (#2113)
- The return value and the permission format has changed, see SIP-12 for more details.
- Add support for dynamic user interfaces (#1465, #2126, #2143)
- Add support for snap defined execution timeouts (#2098)
- Fix initial permissions types (#2111)
- Bump @metamask/utils from 8.2.1 to 8.3.0 (#2100)
- Fix missing
sensitive
property inCopyable
type (#2070)
- Export error wrappers (#2043)
- Add image fetching utility functions (#1995)
- This adds two functions:
getImageComponent
to get animage
component from a PNG or JPEG URL.getImageData
to get a base64 data string, which can be embedded in an SVG image.
- This adds two functions:
- Bump several MetaMask dependencies (#1964)
- Add Snap error wrappers of JSON-RPC errors (#1924)
- Initial release of this package.