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 support for
base32private key encoding inexportAccount(#589)
- BREAKING: Removed ERC-4337 (account abstraction) support (#588)
- Removed
EthAccountType.Erc4337(eip155:erc4337) from theEthAccountTypeenum. - Removed
EthErc4337AccountStructandEthErc4337Accounttypes. - Removed
EthMethod.PrepareUserOperation,EthMethod.PatchUserOperation, andEthMethod.SignUserOperationfrom theEthMethodenum. - Removed
EthUserOperationStruct/EthUserOperation,EthBaseUserOperationStruct/EthBaseUserOperation,EthUserOperationPatchStruct/EthUserOperationPatch, andEthBaseTransactionStruct/EthBaseTransactiontypes.
- Removed
- Add
resolveAccountAddresstoKeyringSnapRpc(v2) (#585)- Add
snap.resolveAccountAddressboolean flag toKeyringCapabilitiesto declare support for this method.
- Add
- Bump
@metamask/superstructfrom^3.1.0to^3.3.0(#580)
- Add
KeyringRpcandKeyringSnapRpcRPC interfaces to v1 (#582)KeyringRpccovers the standard account-management and request-handling methods.KeyringSnapRpcextendsKeyringRpcwith optional snap-specific methods:listAccountAssets,listAccountTransactions,getAccountBalances, andsetSelectedAccounts.
- Add
KeyringSnapRpc,KeyringSnapRpcMethod,isKeyringSnapRpcMethod, and related request/response structs to keyring v2 (./v2) (#582)KeyringSnapRpcextendsKeyringRpc(v2) with four optional snap-specific methods:setSelectedAccounts,getAccountTransactions,getAccountAssets, andgetAccountBalances.KeyringSnapRpcMethodspreads all baseKeyringRpcMethodvalues and adds the four snap-specific method names.
- Add optional
snapcapability field toKeyringCapabilities(v2) (#582)- Flags:
snap.assets.metadata(keyring_getAccountAssets),snap.assets.balances(keyring_getAccountBalances),snap.transactions(keyring_getAccountTransactions),snap.selectedAccounts(keyring_setSelectedAccounts).
- Flags:
- Add
TransactionType.TokenDisapprovefor token disapproval transactions (#568) - Add optional
TransactionDetails.typeLabel(#568)- This can be used to display a custom label regarding the transaction type.
- Add
TransactionType.TokenApprovefor token approval transactions (#537)
- Workaround Browserify subpath export for
/v2(#516)
- Add Stellar (XLM) support (#483)
- Add
XlmScope,XlmAccountTypeandXlmAccount.
- Add
- Add keyring v2 RPC types and structs (
KeyringRpcV2,KeyringRpcV2Method,isKeyringRpcV2Method, and request/response structs) (#408) - Add
./v2subpath export for all keyring v2 types and structs (#513)
- BREAKING: Move and rename all keyring v2 types and structs to the new
./v2subpath export (#513)KeyringV2is nowKeyringfrom@metamask/keyring-api/v2.KeyringRpcV2,KeyringRpcV2Method, andisKeyringRpcV2Methodare nowKeyringRpc,KeyringRpcMethod, andisKeyringRpcMethodfrom@metamask/keyring-api/v2.KeyringCapabilities,KeyringType, account creation options (exceptCreateAccountOptions), and account export options are now exclusively available from@metamask/keyring-api/v2.CreateAccountOptionsand its subtypes (Bip44CreateAccountOptions,PrivateKeyCreateAccountOptions,CustomCreateAccountOptions) remain available from both@metamask/keyring-apiand@metamask/keyring-api/v2.
- Improve return type of
isKeyringRpcMethodto use type predicatemethod is KeyringRpcMethod(#408) - Bump
@metamask/utilsfrom^11.1.0to^11.11.0(#489, #483)
- BREAKING: Remove
EthKeyringWrapper,EthKeyringMethod,KeyringWrapper, andKeyringAccountRegistryexports (#478)- These have been moved to the new
@metamask/keyring-sdkpackage. @ethereumjs/tx,@metamask/eth-sig-util, andasync-mutexare no longer dependencies of this package.
- These have been moved to the new
- Add
KeyringType.Moneyvariant (#472) - Add optional
detailsfield toTransactiontype (#445)- Add
SecurityAlertResponseenum with values:benign,warning,malicious - Add optional
originfield (string) to track transaction request source - Add optional
securityAlertResponsefield for Security Alert API responses
- Add
- Add
EthAddressStrictStructstruct andEthAddressStricttypes (#465)- This is a stricter variant of
EthAddressStructwhich usesHexinstead ofstringfor its inferred type.
- This is a stricter variant of
- Add
assertCreateAccountOptionIsSupportedhelper (#464)- This helper can be used to implement
createAccountsand narrow down theoptionsto the supported types (based on the keyring capabilities).
- This helper can be used to implement
- Re-use
stringfor ERC4337 address-like fields (#465)- This change reverts that and keeps using
stringfor all address-like types. - Changes in #405 updated the associated type for
EthAddressStructfromstringtoHex, this was actually a small breaking change that went unnoticed and that would require some effort to adapt in upstream clients/controllers, for this reason, we are undoing this change for now. - Version 21.4.0 is marked as DEPRECATED, consumers are expected to use version 21.5.0 instead, that reverts this breaking change.
- This change reverts that and keeps using
21.4.0 - 2026-02-09 [DEPRECATED]
- Add
Keyring.createAccountsoptional method (#448)- This method is part of the keyring v2 specification and set as optional for backwards compatibility.
- This method can be used to create one or more accounts using the new keyring v2 account creation typed options.
- Add RPC support for this method through
KeyringRpcMethod.CreateAccounts.
- Add support for account derivations using range of indices in
KeyringV2(#451)- Add
bip44:derive-index-rangecapability toKeyringCapabilities. - Add
AccountCreationType.Bip44DeriveIndexRangeandCreateAccountBip44DeriveIndexRangeOptions.
- Add
- Add support for custom capabilities and entropy types in
KeyringV2(#415)- Add
customcapability toKeyringCapabilitiesfor keyrings with non-standardcreateAccountsmethod. - Add
KeyringAccountEntropyTypeOption.Customfor custom/opaque entropy sources. - Add
AccountCreationType.CustomandCreateAccountCustomOptionsfor custom account creation flows.
- Add
- Add
EthKeyringWrapperabstract class for Ethereum-basedKeyringV2implementations (#404)- Provides common Ethereum signing method routing (
submitRequest) for all Ethereum-based keyrings.
- Provides common Ethereum signing method routing (
- Add
KeyringWrapperbase class to adapt legacy keyrings toKeyringV2(#398, #402, #409, #410)
- Make BIP-44 capabilities optional in
KeyringCapabilities(#453)- The
derivePath,deriveIndex,deriveIndexRange, anddiscovercapabilities are now optional. - A capability set to
trueindicates support, whilefalseorundefinedindicates no support. - Keyrings no longer need to explicitly set unsupported capabilities to
false.
- The
- Change
KeyringWrapper.capabilitiesfrom a readonly property to a getter (#447)- Allows subclasses to override and return capabilities dynamically based on runtime state.
- Refine
EthAddressStructin order to make it compatible with theHextype from@metamask/utils(#405)
- Add initial
KeyringV2interface (#397)- This is an on-going work and should not be used for now.
- Add new Tron methods
signMessageandsignTransaction(#401)
- Deprecate Tron methods
signMessageV2andverifyMessageV2(#401)
- Add
stake:{deposit,withdraw}transaction types (#394)
- Add new optional
Keyring.setSelectedAccountsmethod (#387)- This method can be invoked by the MetaMask client to inform which accounts are now selected for this Snap.
- BREAKING: Add new bitcoin methods to
BtcMethodenum (#355, #356)- This change was not properly reported as breaking on the
20.1.1.
- This change was not properly reported as breaking on the
- BREAKING: Remove
BtcMethod.SendBitcoinmethod (#355)- This change was not properly reported as breaking on the
20.1.1.
- This change was not properly reported as breaking on the
- Add new bitcoin methods to
BtcMethodenum (#354)
- Add Tron support (#349)
- BREAKING: Add generic account type (#323)
- This change was not properly reported as breaking on the
19.1.0. - The
KeyringAccountTypeunion now has a new member typeany:account.
- This change was not properly reported as breaking on the
- Add generic account type (#318)
- This account type can be used during the integration of new chains.
- It's allowed only in Flask builds of MetaMask clients.
- BREAKING: Add typed
KeyringAccount.options(#316)- We still support the old
Record<string, Json>type foroptions, however we now constrain 2 fields (entropyandexportable) and type their shapes to meet new requirements.
- We still support the old
- BREAKING: Add
KeyringRequest.origin(#273)- This requires a
platformVersionversion7.0.0or newer. - This field will allow Snap to display the real
originof the caller (e.g dapp) when processing/confirming a keyring request (submitRequest).
- This requires a
- Add support for Bitcoin account type: p2pkh, p2sh, p2tr (#284)
- Add
bridge:{send,receive}transaction type (#251) - Add
unknowntransaction type (#251)- This type can be used when a transaction type cannot be identified.
- Add
discoverAccountskeyring method (#266) - Add
KeyringEventPayloadutility type to extract payloadKeyringEventenum (#203) - Add event payload types (#203)
- Add new
MetaMaskOptionsincreateAccount(#252)- This options object might contain a new
correlationIdthat MUST BE forwarded during thenotify:accountCreatedevent.
- This options object might contain a new
- Add missing
Transaction.statusfor'swap'(#229)
- Add
swaptransaction type (#218)
- Use
ts-bridge/cli@0.6.3(#214)- This new version fixes a bug regarding some missing exports.
- Add new
SolMethod.Sign{AndSendTransaction,Transaction,Message,In}methods (#191)
- Deprecates
SolMethod.SendAndConfirmTransactionmethod (#191)
- Re-export
CaipAccountIdtype and struct (#186)
- BREAKING: Use
CaipAccountIdforResolvedAccountAddress.address(#186)- This was missing from SIP-26, but we expect this address to be CAIP-10 compliant.
- Re-export
Caip*types and structs (#174)
- Add
resolveAccountAddresskeyring method (#157)
- BREAKING: Remove CAIP redefinitions (#167)
- We now rely on CAIP definitions coming
@metamask/utils.
- We now rely on CAIP definitions coming
- BREAKING: Enforce that
scopescontains CAIP-2 chain IDs (#165)- Initially
scopesaccepted CAIP-2 namespaces as well to address the EVM EOA accounts that supports all EVM chains. This has been dropped in favor ofeip155:0scope.
- Initially
- BREAKING: Rename
*Scopesenums to*Scope(#165) - Bump
@metamask/utilsfrom^11.0.1to^11.1.0(#167)
- Add
account{AssetList,Balances,Transactions}UpdatedEventStructkeyring events (#154)
- BREAKING: Make specific
*AccountStruct.scopesmore strict (#159)
- Add
listAccountAssetskeyring method (#148)
- BREAKING: Make
CaipAssetTypetype more restritive (#150)- It used to be a
stringbut it has been restricted with a template literal type that matches CAIP-19 asset type.
- It used to be a
- New scope constant values added for Ethereum, Bitcoin, and Solana (#101)
- BREAKING: Add
scopesfield toKeyringAccount(#101)
- Use
ts-bridge/cli@0.6.1(#118)- This new version fixes a bug with CJS re-exports.
- BREAKING: Split into several smaller packages (#24)
- This should improve dependencies management.
- Internal related types (internal to both clients) have been moved to
keyring-internal-*packages. - Keyring API clients (mainly used by dapps) have been moved to
keyring-snap-clientpackage. - Common utils have been moevd to
keyring-utilspackage.
- Add
listAccountTransactionskeyring method (#41)
- BREAKING: Add ESM build (#40)
- It's no longer possible to import files from
./distdirectly.
- It's no longer possible to import files from
- Add
solana:data-accountaccount support (#93)
- Add proprietary license (#83)
- BREAKING: Bump peer dependency
@metamask/providersfrom^17.2.0to^18.1.0(#76)
- BREAKING: Rename
btc_sendmanymethod tosendBitcoin(#73)
- Convert to monorepo
- Package name does not change (
@metamask/keyring-api) and sources have been moved to:packages/keyring-api. - You can find all the changes here.
- Package name does not change (
- Add optional
nameLastUpdatedAtmetadata field (#366)
- Bump @metamask/snaps-sdk from 6.1.0 to 6.2.0 (#367)
- Bump @metamask/providers from 17.1.1 to 17.1.2 (#362)
- Bump
@metamask/snaps-sdkfrom^6.0.0to^6.1.0(#358)
- Migrate to @metamask/superstruct and update required dependencies (#355).
- Bump @metamask/providers from 17.1.0 to 17.1.1 (#354).
- Bump @metamask/key-tree from 9.1.1 to 9.1.2 (#351).
- Bump @metamask/rpc-errors from 6.3.0 to 6.3.1 (#350).
- Bump @metamask/providers from 17.0.0 to 17.1.0 (#348).
- Bump @metamask/snaps-sdk from 4.4.2 to 6.0.0 (#347).
- Bump braces from 3.0.2 to 3.0.3 (#345).
- BREAKING: Revert allow multiple address per account (#342).
- Add
getAccountBalancestoKeyringClient(#340). - BREAKING: Allow multiple address per account (#315).
- BREAKING: Keep all ETH methods in the same
enum(#313). - Bump @metamask/snaps-sdk from 4.4.1 to 4.4.2 (#339).
- Bump @metamask/rpc-errors from 6.2.1 to 6.3.0 (#337).
- Bump @metamask/json-rpc-middleware-stream from 7.0.1 to 7.0.2 (#333).
- Bump @metamask/snaps-sdk from 4.4.0 to 4.4.1 (#334).
- Allow stale action to be run manually and fix permissions (#336).
- BREAKING: Keep all ETH methods in the same
enum(#313). - Add support for
@metamask/providersv17 (#329).
- BREAKING: Keep all ETH methods in the same
enum(#313).
- Export
Caip*types used in the API (#325).
- BREAKING: Keep all ETH methods in the same
enum(#313). - Bump @metamask/snaps-sdk from 4.2.0 to 4.3.0 (#323).
- Split
api.tsinto different files (#319). - Make the
KeyringAccounttype less rigid (#311).
- Bump @metamask/key-tree from 9.1.0 to 9.1.1 (#310).
- Use internal
objectfunction instead of the upstream one (#316).
- Add
accountNameSuggestionfield to theAccountCreatedEvent(#291) - Add
displayConfirmationfield to theAccountCreatedEvent(#307)
- Fix
isEvmAccountTypeaccountType type tostringorInternalAccountType(#304) - Bump @metamask/snaps-sdk from ^4.0.0 to ^4.2.0 (#305)
- Remove incorrect
SignTransactionfromEthErc4337Account(#300) - Bump @metamask/providers from 16.0.0 to 16.1.0 (#298)
- Bump @metamask/snaps-sdk from 4.0.0 to 4.0.1 (#292)
- Split account types (EOA + Erc4337) (#293)
- BREAKING: Add
importTimeproperty toInternalAccountmetadata (#289) - Bump tar from 6.1.15 to 6.2.1 (#286)
- Bump @metamask/snaps-sdk from 3.2.0 to 4.0.0 (#287)
- Add documentation for
eth_decodeUserOperationCallData(#254) - Bump @metamask/snaps-sdk from 3.1.1 to 3.2.0 (#284)
- Use @metamask/providers as a peer dependency (#282)
- Bump @metamask/utils from 8.3.0 to 8.4.0 (#280)
- Add stale CI workflow to close issues and PRs (#279)
- BREAKING: Add new
KeyringExecutionContextto user operation methods (#275) - Fix bundler type (defined as
stringnow) (#277) - Bump @metamask/providers from 15.0.0 to 16.0.0 (#276)
- Bump @metamask/safe-event-emitter from 3.1.0 to 3.1.1 (#274)
- Bump @metamask/snaps-sdk to ^3.1.1 (#271)
- Bump @metamask/safe-event-emitter from 3.0.0 to 3.1.0 (#270)
- Fix bundler URL validation (#262)
- Bump @metamask/providers to 15.0.0, @metamask/snaps-sdk to ^3.1.0 and @@metamask/utils to ^8.3.0(#266)
- Bump @metamask/json-rpc-engine from 7.3.2 to 7.3.3 (#264)
- Bump @metamask/snaps-sdk from 3.0.0 to 3.0.1 (#261)
- Bump @metamask/snaps-sdk from 1.4.0 to 3.0.0 (#259)
- Bump @metamask/rpc-errors from 6.1.0 to 6.2.1 (#258)
- BREAKING Update node min version to 18.x (#247)
- Update
eth_patchUserOperationto return optional gas limit values (#250) - Bump
ipfrom 2.0.0 to 2.0.1 (#253) - Bump
@metamask/json-rpc-enginefrom 7.3.1 to 7.3.2 (#246) - Bump
@metamask/snaps-sdkfrom 1.3.2 to 1.4.0 (#243)
- Bump
@metamask/utilsfrom 8.2.1 to 8.3.0 (#238) - Bump Snap dependencies (#236)
- Bump
@metamask/snaps-controllersto ^4.0.0 - Bump
@metamask/snaps-sdkto ^1.3.2 - Bump
@metamask/snaps-utilsto ^5.1.2
- Bump
- Bump
@metamask/approval-controllerfrom 5.0.0 to 5.1.1 (#225) - Bump
@metamask/base-controllerfrom 4.0.0 to 4.0.1 (#226) - Bump
@metamask/json-rpc-enginefrom 7.3.0 to 7.3.1 (#227) - Bump
@metamask/auto-changelogfrom 3.4.3 to 3.4.4 (#223) - Bump
@metamask/snaps-sdkfrom 1.3.0 to 1.3.1 (#222)
- BREAKING: remove
KeyringSnapControllerClientclass to fix dependency problems (#241)
- BREAKING: Add support for ERC-4337 transactions (#213)
- Enum
EthMethodshas been extended witheth_prepareUserOperation,eth_patchUserOperation,eth_signUserOperation - Enum
EthAccountTypehas been extended witheip155:erc4337
- Enum
- BREAKING: Update
@metamask/providersfrom^13.0.0to^14.0.1(#209)- Consolidation on
readable-stream@^3.6.2. Users should upgrade toextension-port-stream@^3.0.0andjson-rpc-middleware-stream@^5.0.0.
- Consolidation on
- Replace deprecated
@metamask/snaps-uiwith@metamask/snaps-sdk(#204)- Replace
@metamask/snaps-rpc-methodswith@metamask/snaps-sdk - Update
@metamask/snaps-controllersand@metamask/snaps-utilsto versions that don't rely on@metamask/snaps-ui
- Replace
- Documentation updates (#185) (#201)
- BREAKING
EthAccountType.Eip4337has been removed.eip155:eip4337should be replaced witherc:4337
UuidStructis now a named type (#159)- Migrate from
@metamask/rpc-methodsto@metamask/snaps-rpc-methods(#175)
- Allow the request ID to be a string, number or null (#156)
- Documentation fixes (#160) (#174) (#173) (#172)
- Use
UuidStructfor IDs in the internal API (#158) - Bump
@metamask/json-rpc-enginefrom^7.1.1to^7.2.0(#164)
- Document how to migrate from API 0.1.x to 0.2.x (#124).
- BREAKING: Use the
onKeyringRequestsnap export (#145). - BREAKING: Change the events' prefix to
notify:(#139).
- Export events types (#125)
- Remove unused lavamoat allowed scripts (#122).
- Update events in sequence diagram (#121).
- Update Snap and ESLint dependencies (#117).
- Bump @metamask/rpc-methods from 0.38.1-flask.1 to 2.0.0 (#120).
- Remove
buildHandlersChain(#114). - Update doc for
eth_signTransaction(#111). - Remove un-versioned
eth_signTypedDatamethod (#113).
- Fix linting and compatibility with older
tsc(#108).
- Add redirection message to snap async response (#102).
- Use
Omitinstead ofOmitUnion(#106). - Update
KeyringResponsecomment (#103). - Use
KeyringRpcMethodenum instead of string (#105). - Refactor tests to match superstruct examples (#104).
- Add
exactOptional()superstruct type (#100). - Bump @metamask/providers from 11.1.2 to 12.0.0 (#99).
- Bump @metamask/providers from 11.1.1 to 11.1.2 (#98).
- Make request
paramsoptional (#96). - Remove
lastActivefield from internal account model (#95). - Move request ID to outer request (#94).
- Set
snapobject keys to be mandatory and movenametometadata(#87).
- Add
InternalAccounttype and create submoduleinternal(#65). - Add keyring events and helper functions (#74).
- Add a
redirectfield to asynchronous request responses (#75). - Add
exportAccountmethod (#60). - Add
getControllerto client (#43).
- Rename
erc4337->eip4337(#42). - Make
optionsa mandatory field ofKeyringAccount(#30). - Make
approveRequestandrejectRequestoptional (#63). - Make
exportAccount,listRequestsandgetRequestoptional (#73). - Export enums with account methods and types (#66).
- Make
approveRequestaccept aresultargument (#59). - Remove account name from
KeyringAccounttype (#55). - Remove
eth_sendTransactionmethod (#50). - Rename
supportedMethodstomethods(#35).
- Downgrade snaps dependencies to
0.35.2-flask.1(#25).
- Update snaps dependencies (#21).
- Validate snap responses for type correctness (#15).
- Rename RPC handling functions (#16).
0.1.0 - 2023-06-20
- Usage examples to
README.md. - Keyring API definition.
- JSON-RPC snap keyring client. It is intended to be used by a snap's companion dapp to send requests to the snap.
- SnapController keyring client. It is intended to be used by MetaMask to talk to the snap.
- Helper functions to create keyring handler in the snap.