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
SnapKeyring.createAccountsmethod (#448)- This method can be used to create one or more accounts using the new keyring v2 account creation typed options.
- Bump
@metamask/snaps-controllersfrom^14.0.1to^17.2.0(#422) - Bump
@metamask/snaps-sdkfrom^9.0.0to^10.3.0(#422) - Bump
@metamask/snaps-utilsfrom^11.0.0to^11.7.0(#422)
- BREAKING: Remove
KeyringVersionsupport (#423)- Both
getKeyringVersionFromPlatform,PLATFORM_VERSION_TO_KEYRING_VERSIONgot removed too.
- Both
- BREAKING: Rename
submitRequestV1method tosubmitRequestWithoutOrigin(#423)
- Make
notify:accountCreatedevent idempotent (#399)
- Bump
@metamask/keyring-apifrom^21.1.0to^21.2.0(#395) - Bump
@metamask/keyring-snap-sdkfrom^7.1.0to^7.2.0(#395)
- BREAKING: Migrate
SnapKeyringMessengerto newMessengertype from@metamask/messenger(#383)
- Add
SnapKeyring.setSelectedAccountsandsnap_manageAccounts.getSelectedAccountssupport (#387)- The
SnapKeyring.setSelectedAccountsmethod can be invoked by the MetaMask client to inform which accounts are now selected for this Snap. - The
snap_manageAccounts.getSelectedAccountsRPC method can be invoked by the Snap to get the currently selected accounts for this Snap.
- The
- Add dependency to
@metamask/keyring-snap-sdkversion^7.1.0(#387), (#388) - Bump
@metamask/keyring-apifrom^21.0.0to^21.1.0(#388)
- Add
nameandstateproperties toSnapKeyringto allow modular initialisation in the clients (#379)
SnapKeyringno longer extendEventEmitter(#379)
- Bump
@metamask/base-controllerfrom^7.1.1to^8.3.0(#364)
- Add Tron support (#349)
- BREAKING: Bump
@metamask/keyring-apifrom^19.0.0to^20.0.0(#347)- This is similar to version
15.0.0, but since the@metamask/keyring-apiwas not versioned as a new major, we have to re-bump it here again.
- This is similar to version
- BREAKING: Bump
@metamask/keyring-internal-apifrom^7.0.0to^8.0.0(#347)- This is similar to version
15.0.0, but since the@metamask/keyring-internal-apiwas not versioned as a new major, we have to re-bump it here again.
- This is similar to version
- BREAKING: Add
isAnyAccountTypeAllowedflag toSnapKeyringconstructor (#322)- The
SnapKeyringconstructor now accepts an options object instead of individual parameters. - The new
isAnyAccountTypeAllowedflag defaults tofalse. - This flag only affects account creation and update; account deletion is unaffected by it.
- The
- BREAKING: Bump
@metamask/keyring-apifrom^18.0.0to^19.0.0(#317)- The
KeyringAccount.optionsfield is now partially typed.
- The
- BREAKING: Bump
@metamask/keyring-internal-apifrom^6.2.0to^7.0.0(#317)- The
InternalAccount.optionsfield is now partially typed.
- The
- BREAKING: Now requires
originto be passed toSnapKeyring.submitRequest(#273)- Starting from
KeyringVersion.V2(platform version:7.0.0), Snaps will now have to use@metamask/keyring-api@18.0.0and use theoriginwhen processing keyring requests (submitRequest).
- Starting from
- Bump
@metamask/keyring-apifrom^17.6.0to^18.0.0(#291)
- Add support for Bitcoin account type: p2pkh, p2sh, p2tr (#284)
- Add new concept of "internal options" and add a new
SnapKeyring.createAccountmethod (#252), (#261)- Those internal options can be used by the caller of that method to customize the account creation flow.
- Add
setSelectedAccountinternal option (#257)
- BREAKING: The method
signTransactioncan now returns various type of transactions (#209)- Initially was supporting:
Transaction | AccessListEIP2930Transaction | FeeMarketEIP1559Transaction(types from@ethereumjs/tx). - Now also supports
BlobEIP4844Transaction | EOACodeEIP7702Transaction(types from@ethereumjs/tx).
- Initially was supporting:
- BREAKING: Bump
@ethereumjs/txfrom^4.2.0to^5.4.0(#209)
- Add
displayAccountNameSuggestionoption handling for"notify:accountCreated"(#213)
- BREAKING: Make account creation asynchronous (#207), (#211)
- We no longer wait for
saveStateto finish before resuming the Snap account execution. - Add
onceSaveddeferred promise toaddAccountcallback. This new promise is required so the callback canawaitthe account creation.
- We no longer wait for
- Use
ts-bridge/cli@0.6.3(#214)- This new version fixes a bug regarding some missing exports.
- Bump
@metamask/keyring-apifrom^17.0.0to^17.1.0(#212)
- BREAKING: Use
CaipAccountIdforResolvedAccountAddress.address(#186)- This was missing from SIP-26, but we expect this address to be CAIP-10 compliant.
- Bump
@metamask/keyring-apifrom^16.1.0to^17.0.0(#192) - Rename
ControllerMessengertoMessenger(#185) - Bump
@metamask/snaps-controllersdependency from^9.10.0to^9.18.0(#177) - Bump
@metamask/snaps-sdkdependency from^6.7.0to^6.16.0(#177) - Bump
@metamask/snaps-utilsdependency from^8.3.0to^8.9.1(#177)
- Bump
@metamask/keyring-apifrom^16.0.0to^16.1.0(#176)
- Add
submitRequestandresolveAccountAddressmethods (#157)- Those new methods are required by the new signing request routing system (see SIP-26).
- Bump
@metamask/keyring-apifrom^15.0.0to^16.0.0(#172) - Bump
@metamask/utilsfrom^11.0.1to^11.1.0(#167)
- Fix async Snap request leak (#171)
- There was a leak with the deferred promises when an asynchronous request was not allowed.
- Add
account{AssetList,Balances,Transactions}Updatedkeyring events and re-publish them through the newMessenger(#154)
- BREAKING: Use
Messengerinstead ofSnapsController(#152)- This allows to break the runtime dependency we had with some
snaps-*pacakges.
- This allows to break the runtime dependency we had with some
- BREAKING: Make
scopesmore strict (#159)- We now use specific
*AccountStuctswhen checking created/updated accounts to make thescopessent by the Snap are valid regarding their account type definition.
- We now use specific
- Bump
@metamask/keyring-apifrom^13.0.0to^14.0.0(#155)
- Add Snap keyring migrations (#147)
- This is required to support the new
scopesfield onKeyringAccount. The keyring state will now be automatically migrated upon deserialization to match the latestKeyringAccounttype requirements.
- This is required to support the new
- BREAKING: Bump
@metamask/keyring-apifrom^12.0.0to^13.0.0(#101)- This change was not properly reported as breaking on the
7.1.0. KeyringAccountandInternalAccounthave a new required field (scopes) and are part of the public API.
- This change was not properly reported as breaking on the
- BREAKING: Bump
@metamask/keyring-internal-apifrom^1.0.0to^2.0.0(#135)- This change was not properly reported as breaking on the
7.1.0. InternalAccountextendsKeyringAccountwhich has a new required field (scopes) and is part of the public API.
- This change was not properly reported as breaking on the
- BREAKING: Bump
@metamask/keyring-snap-internal-clientfrom^1.0.0to^2.0.0(#135)- This change was not properly reported as breaking on the
7.1.0. KeyringAccounthas a new required field (scopes) and is part of the public API.
- This change was not properly reported as breaking on the
- Bump
@metamask/keyring-apifrom^12.0.0to^13.0.0(#101)
- Use
ts-bridge/cli@0.6.1(#118)- This new version fixes a bug with CJS re-exports.
- Uses new
keyring-apisplitted packages (#24)
- BREAKING: Add ESM build (#40)
- It's no longer possible to import files from
./distdirectly.
- It's no longer possible to import files from
- Export type
JsonRpcRequest(#95)
- Do not lower address for non-EVM accounts during account creation (#90)
- Add proprietary license (#83)
- BREAKING: Bump
@metamask/eth-sig-utildependency from^7.0.3to^8.0.0(#79)signTypedDatano longer supportnumberfor addresses, see here.
- Sanitize redirect URL (#70)
- Bump
@metamask/*dependencies and add@lavamoat/preinstall-always-fail(#65), (#59), (#58) - Use TypeScript 5 (#55)
- Convert to monorepo
- Package name does not change (
@metamask/eth-snap-keyring) and sources have been moved to:packages/keyring-snap-bridge. - You can find all the changes here.
- Package name does not change (
- Bump
@metamask/snaps-controllersfrom^9.3.0to^9.6.0(#372, #389) - Bump
@metamask/snaps-sdkfrom^6.1.0to^6.4.0(#389) - Bump
@metamask/utilsfrom^9.1.0to^9.2.1(#385) - Bump
@metamask/keyring-apifrom^8.0.1to^8.1.0(#374, #376)
- Bump
@metamask/eth-sig-utilfrom^7.0.1to^7.0.3(#311) - Bump
@metamask/keyring-apifrom^8.0.0to^8.0.1(#311) - Bump
@metamask/snaps-controllersfrom^8.1.1to^9.3.0(#311, #363) - Bump
@metamask/snaps-sdkfrom^4.2.0to^6.1.0(#311, #363) - Bump
@metamask/snaps-utilsfrom^7.4.0to^7.8.0(#311, #363) - Bump
@metamask/utilsfrom^8.4.0to^9.1.0(#311) - Set tsconfig options
module,moduleResolutiontoNode16(#311)
- Replace
superstructwith ESM-compatible@metamask/superstruct^3.1.0(#311)- This fixes the issue of this package being unusable by any TypeScript project that uses
Node16orNodeNextas itsmoduleResolutionoption.
- This fixes the issue of this package being unusable by any TypeScript project that uses
- Bump @metamask/keyring-api from 6.3.1 to 8.0.0 (#331).
- Export
KeyringSnapControllerClient(#328).
- Bump @metamask/snaps-utils from 7.4.1 to 7.5.0 (#326).
- Bump @metamask/snaps-controllers from 8.3.1 to 8.4.0 (#325).
- Bump @metamask/snaps-sdk from 4.4.1 to 4.4.2 (#327).
- Bump @metamask/rpc-errors from 6.2.1 to 6.3.0 (#322).
- Bump @metamask/snaps-controllers from 8.2.0 to 8.3.1 (#321).
- Bump @metamask/snaps-sdk from 4.3.0 to 4.4.1 (#314).
- Bump @metamask/permission-controller from 9.1.0 to 9.1.1 (#316).
- Bump @metamask/snaps-utils from 7.4.0 to 7.4.1 (#319).
- Bump @metamask/keyring-api from 6.3.1 to 6.4.0 (#315).
- Bump @metamask/json-rpc-middleware-stream from 7.0.1 to 7.0.2 (#317).
- Bump @metamask/phishing-controller from 9.0.3 to 9.0.4 (#318).
- Bump @metamask/snaps-rpc-methods from 9.1.0 to 9.1.2 (#320).
- Bump @lavamoat/allow-scripts@^2.3.1->^3.0.4 (#296).
- Bump @metamask/key-tree from 9.1.0 to 9.1.1 (#298).
- Bump @metamask/phishing-controller from 9.0.2 to 9.0.3 (#302).
- Bump @metamask/json-rpc-engine from 8.0.1 to 8.0.2 (#291).
- Bump @metamask/snaps-controllers from 8.1.1 to 8.2.0 (#307).
- Fixed 4337 methods enum (#312)
- Bump @metamask/post-message-stream from 8.0.0 to 8.1.0 (#297)
- Bump @metamask/permission-controller from 9.0.2 to 9.1.0 (#306)
- Bump @metamask/snaps-sdk from 4.2.0 to 4.3.0 (#308)
- Add
accountNameSuggestionanddisplayConfirmationoptions handling for"notify:accountCreated"(#300) - Bump @metamask/keyring-api from 6.1.1 to 6.2.1 (#304)
- Bump @metamask/snaps-* and @metamask/keyring-api (#294)
- Bump @metamask/key-tree from 9.0.0 to 9.1.0 (#293)
- Bump @metamask/keyring-api to version 6.1.0 and introduce btc account types (#285)
- Bump @metamask/phishing-controller from 9.0.1 to 9.0.2 (#279)
- Bump @metamask/base-controller from 5.0.1 to 5.0.2 (#280)
- Bump @metamask/eth-sig-util from 7.0.1 to 7.0.2 (#281)
- Bump @metamask/approval-controller from 6.0.1 to 6.0.2 (#282)
- Bump @metamask/providers from 16.0.0 to 16.1.0 (#283)
- Bump @metamask/snaps-controllers from 7.0.1 to 8.0.0 (#278)
- Bump @metamask/snaps-utils from 7.1.0 to 7.2.0 (#277)
- BREAKING: Bump @metamask/keyring-api to version 6.0.0 (#275)
- Bump @metamask/snaps-controllers from 6.0.3 to 7.0.1 and @metamask/snaps-sdk 3.1.1 to 4.0.1 (#272)
- Bump @metamask/snaps-utils from 7.0.4 to 7.1.0 (#268)
- Bump @metamask/controller-utils from 9.0.2 to 9.1.0 (#270)
- Bump @metamask/snaps-controllers from 6.0.3 to 6.0.4 (#266)
- Bump @metamask/snaps-registry from 3.0.1 to 3.1.0 (#265)
- Bump @metamask/snaps-rpc-methods from 7.0.1 to 7.0.2 (#264)
- Bump @metamask/snaps-utils from 7.0.3 to 7.0.4 (#263)
- Bump @metamask/snaps-sdk from 3.1.1 to 3.2.0 (#262)
- Add logger and now log Snap requests (#254)
- BREAKING: Add KeyringExecutionContext to user ops methods (#253)
- Bump @metamask/utils from 8.3.0 to 8.4.0 (#260) (#256)
- Bump @metamask/keyring-api from 5.0.0 to 5.1.0 (#259)
- Bump @metamask/keyring-api from 4.0.2 to 5.0.0 (#255)
- Bump @metamask/safe-event-emitter from 3.1.0 to 3.1.1 (#251)
- Bump dependencies (#246)
- Bump @metamask/safe-event-emitter from 3.0.0 to 3.1.0 (#245)
- Fix enforcing responses of
prepareUserOperationandpatchUserOperationto be synchronous (#243) - Bump @metamask/snaps-registry from 3.0.0 to 3.0.1 (#244)
- Bump @metamask dependencies (#236)
- Extract logic in 'submitRequest' (#232)
- Bump @metamask/controller-utils from 8.0.3 to 8.0.4 (#233)
- Bump @metamask/json-rpc-engine from 7.3.2 to 7.3.3 (#234)
- Bump @metamask/approval-controller from 5.1.2 to 5.1.3 (#235)
- Bump update Snap and dev dependencies (#230)
- Bump @metamask/rpc-errors from 6.2.0 to 6.2.1 (#223)
- Bump @metamask/snaps-utils from 6.1.0 to 7.0.0 (#224)
- Bump @metamask/rpc-errors from 6.1.0 to 6.2.0 (#219)
- Bump ip from 2.0.0 to 2.0.1 (#218)
- Add
chainIdto Keyring API requests (transaction/typed message) (#231) - Enforce async request redirect URL is in the snaps 'allowedOrigins' (#228)
- Bump dependencies (#220)
- @metamask/snaps-controllers from ^4.1.0 to ^5.0.1
- @metamask/snaps-sdk from ^1.4.0 to ^2.1.0
- @metamask/snaps-utils from ^5.2.0 to ^6.1.0
- @metamask/utils from ^8.1.0 to ^8.3.0
- @metamask/keyring-api from ^2.0.0 to ^4.0.0
- Fixed inconsistent signature signing (#200)
- Reject unsupported account methods (#190)
- Add methods to support ERC-4337 accounts (#180).
- Use a
snapId-indexed map (#172). - Update CODEOWNERS and run CI on merge queues (#165).
- Bump min Node version to 18.18 and use LTS for dev (#183).
- BREAKING: Remove async from
listAccountsandgetAccountByAddress(#148).
- Bump
@metamask/keyring-apito 1.0.0 (#145). - Bump
semverandword-wrapdependencies (#144). - Bump @metamask/rpc-errors from 6.0.0 to 6.1.0 (#143).
- Add
redirectUsercallback (#136).
- Add
getAccountByAddressmethod (#134).
- Bump
word-wrapandsemver(#140). - Bump
@metamask/scure-bip39from 2.1.0 to 2.1.1 (#133). - Bump
postcssfrom 8.4.20 to 8.4.31 (#137). - Bump
@metamaskdependencies (#139).
- Add the
getAccountsBySnapIdmethod (#122).
- Remove the
removeAccountsBySnapIdmethod (#121). - Call external function with lowercase address (#120).
- Handle approval when adding/removing account with
handleUserInputcallback (#99).
- Add method to remove all accounts given a snap ID (#116).
- Don't allow duplicate accounts to be added (#115).
- Ignore event if account was already removed (#101).
- Add
removeAccountcallback to constructor (#96).
- Add
callbacksargument to constructor (#82). - Increase minimum Node.js version to 16 (default to 18) (#83).
- Migrate to the new
keyring-api(#78). - Upgrade dependencies.
- Add account and snap metadata (#75).
- Rename files to be more idiomatic (#42).
- Move internal state from objects to maps (#41).
- Remove promise if
submitRequest()throws (#43).
- BREAKING: Add
callbacksthat will be used to inject dependencies (#79, MetaMask/snaps#1725, MetaMask/metamask-extension#20786).
- Remove account from maps before calling the snap (#39).
- Remove unused
#listAccounts()method (#35).
- Use objects in snap -> controller methods (#28).
- Fix circular call when handling
'read'requests (#27). - Remove
saveSnapKeyringargument fromhandleKeyringSnapMessage(#26).
- Initial release.