Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…2875) This PR adds a `MultichainRouter` that can handle routing of non-EVM requests received via the multichain API. The multichain API should integrate this by calling `MultichainRouter.handleRequest` for any requests that are not understood by our existing JSON-RPC stack. Additionally this PR implements `onProtocolRequest`, a new handler that Snaps can choose to register if they want to service protocol (non signing) requests for a given set of methods for one or more chains. The endowment is registered as follows: ```json5 "initialPermissions": { "endowment:protocol": { "scopes": { "<caip2_chainId>": { "methods": [ // List of supported methods ], "notifications": [ // List of supported notifications ] } } } } ``` This implementation follows https://metamask.github.io/SIPs/SIPS/sip-26 Closes #2898 --------- Co-authored-by: Maarten Zuidhoorn <maarten@zuidhoorn.com>
- Loading branch information