Hello @ujjwalmathur, welcome to MetaMask community!
Here is an older topic on the same subject as the one you’re inquiring about.
Also feel free to check the MetaMask Docs and MetaMask Github repository for anything that may prove helpful to your need.
https://docs.metamask.io/guide/ethereum-provider.html#table-of-contents
2 Likes