How to intercept RPC requests made by Metamask

I want to programmatically intercept RPC requests made by Metamask. This is useful because I want to alert myself if the domain or the smart contract looks suspicious.

I have checked Metamask API but there doesn’t seem to be such a feature. I also check Metamask Snaps but this doesn’t seem to be available there as well.

Any help? Thanks

Hey @0xbe1, welcome to the MetaMask community! :fox_face:

Snaps is a part of MetaMask Flask which allows developers to build plugins within MetaMask. This is a feature that you can develop yourself as a Snaps plugin.

If you are interested, here is more information:


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.