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.
- Bump
@metamask/controller-utilsto^11.10.0(#5935)
- Bump
@metamask/api-specsto^0.14.0(#5817) - Bump
@metamask/controller-utilsto^11.9.0(#5583, #5765, #5812)
-
BREAKING:
getSessionScopes()now expects an additional hooks object as its last param. The hooks object should have agetNonEvmSupportedMethodsproperty whose value should be a function that accepts aCaipChainIdand returns an array of supported methods. (#5191) -
BREAKING:
caip25CaveatBuilder()now expects two additional properties it's singular param object. The param object should now also have aisNonEvmScopeSupportedproperty whose value should be a function that accepts aCaipChainIdand returns a boolean, and agetNonEvmAccountAddressesproperty whose value should be a function that accepts aCaipChainIdand returns an array of CAIP-10 account addresses. (#5191)- The CAIP-25 caveat specification now also validates if non-evm scopes and accounts are supported
-
BREAKING: The
wallet_getSessionhandler now expectsgetNonEvmSupportedMethodsto be provided in it's hooks. (#5191)- The handler now resolves methods for non-evm scopes in the returned
sessionScopesresult
- The handler now resolves methods for non-evm scopes in the returned
-
BREAKING: The
wallet_invokeMethodhandler now expectsgetNonEvmSupportedMethodsandhandleNonEvmRequestForOriginto be provided in it's hooks. (#5191)handleNonEvmRequestForOriginshould be a function with the following signature:handleNonEvmRequestForOrigin: (params: { connectedAddresses: CaipAccountId[]; scope: CaipChainId; request: JsonRpcRequest; }) => Promise<Json>;
-
BREAKING:
assertScopeSupported()now expects a new hooks object as its last param (#5191)- The new hooks object is:
{ isChainIdSupported: (chainId: Hex) => boolean; isEvmChainIdSupported: (chainId: Hex) => boolean; isNonEvmScopeSupported: (scope: CaipChainId) => boolean; getNonEvmSupportedMethods: (scope: CaipChainId) => string[]; }
- The new hooks object is:
-
BREAKING:
assertScopesSupported()now expects a new hooks object as its last param (#5191)- The new hooks object is:
{ isChainIdSupported: (chainId: Hex) => boolean; isEvmChainIdSupported: (chainId: Hex) => boolean; isNonEvmScopeSupported: (scope: CaipChainId) => boolean; getNonEvmSupportedMethods: (scope: CaipChainId) => string[]; }
- The new hooks object is:
-
BREAKING:
bucketScopes()now expects a new hooks object as its last param (#5191)- The new hooks object is:
{ isEvmChainIdSupported: (chainId: Hex) => boolean; isEvmChainIdSupportable: (chainId: Hex) => boolean; isNonEvmScopeSupported: (scope: CaipChainId) => boolean; getNonEvmSupportedMethods: (scope: CaipChainId) => string[]; }
- The new hooks object is:
-
BREAKING:
bucketScopesBySupport()now expects a new hooks object as its last param (#5191)- The new hooks object is:
{ isEvmChainIdSupported: (chainId: Hex) => boolean; isNonEvmScopeSupported: (scope: CaipChainId) => boolean; getNonEvmSupportedMethods: (scope: CaipChainId) => string[]; }
- The new hooks object is:
-
BREAKING:
getSessionScopes()now expects a hooks object as its last param. The hooks object should have agetNonEvmSupportedMethodsproperty whose value should be a function that accepts aCaipChainIdand returns an array of supported methods. (#5191) -
BREAKING:
isSupportedScopeString()now expects a new hooks object as its last param (#5191)- The new hooks object is:
{ isEvmChainIdSupported: (chainId: Hex) => boolean; isNonEvmScopeSupported: (scope: CaipChainId) => boolean; }
- The new hooks object is:
-
BREAKING:
isSupportedAccount()now expects a new hooks object as its last param (#5191)- The new hooks object is:
{ getEvmInternalAccounts: () => { type: string; address: Hex }[]; getNonEvmAccountAddresses: (scope: CaipChainId) => string[]; }
- The new hooks object is:
-
BREAKING:
isSupportedMethod()now expects a new hooks object as its last param:- The new hooks object is:
{ getNonEvmSupportedMethods: (scope: CaipChainId) => string[]; }
- The new hooks object is:
-
Added
wallet_invokeMethodhandler now supports non-EVM requests (#5191) -
Added
wallet_getPermissionshandler (originally migrated from extension repo) (#5420) -
Added
wallet_requestPermissionshandler (originally migrated from extension repo) (#5420) -
Added
wallet_revokePermissionshandler (originally migrated from extension repo) (#5420)
- BREAKING Renamed
mergeScopestomergeNormalizedScopes(#5283) - Added merger to CaveatSpecification returned by
caip25CaveatBuilder()(#5283) - Added
mergeInternalScopeswhich merges twoInternalScopesObjects (#5283)
- Bump
@metamask/utilsfrom ^11.1.0 to ^11.2.0 (#5301)
- Fixes scope creation to not insert accounts into
walletscope (#5374) - Fixes invalid type import path in
@metamask/multichain(#5313)
- Bump
@metamask/controller-utilsfrom^11.4.5to^11.5.0(#5272) - Bump
@metamask/utilsfrom^11.0.1to^11.1.0(#5223)
- Add key Multichain API methods (#4813)
- Adds
getInternalScopesObjectandgetSessionScopeshelpers for transforming betweenNormalizedScopesObjectandInternalScopesObject. - Adds handlers for
wallet_getSession,wallet_invokeMethod, andwallet_revokeSessionmethods. - Adds
multichainMethodCallValidatorMiddlewarefor validating Multichain API method params as defined in@metamask/api-specs. - Adds
MultichainMiddlewareManagerto multiplex a request to other middleware based on requested scope. - Adds
MultichainSubscriptionManagerto handle concurrent subscriptions across multiple scopes. - Adds
bucketScopeswhich groups the scopes in aNormalizedScopesObjectbased on if the scopes are already supported, could be supported, or are not supportable. - Adds
getSupportedScopeObjectshelper for getting only the supported methods and notifications from eachNormalizedScopeObjectin aNormalizedScopesObject.
- Adds
- Bump
@metamask/controller-utilsfrom^11.4.4to^11.4.5(#5012) - Bump
@metamask/permission-controllerfrom^11.0.4to^11.0.5(#5012) - Bump
@metamask/utilsto^11.0.1and@metamask/rpc-errorsto^7.0.2(#5080)
- Fixes
removeScopemutator incorrectly returning malformed CAIP-25 caveat values (#5183).
- Adds
caip25CaveatBuilderhelper that builds a specification for the CAIP-25 caveat that can be passed to the relevantPermissionControllerconstructor param(#5064).
- BREAKING: The validator returned by
caip25EndowmentBuildernow only verifies that there is single CAIP-25 caveat and nothing else(#5064).
- Bump
@metamask/eth-json-rpc-filtersfrom^7.0.0to^9.0.0(#5040)
- Bump
@metamask/controller-utilsfrom^11.4.3to^11.4.4(#5012) - Correct ESM-compatible build so that imports of the following packages that re-export other modules via
export *are no longer corrupted: (#5011)@metamask/api-specslodash
- Revoke the CAIP-25 endowment if the only eip155 account or scope is removed (#4978)
- Initial release (#4962)