Metamask Permissions Storage

Hi all,

I am doing some research about Dapps and I wanted to know where does MetaMask stores the permissions of these Dapps. I have found that is in browser local storage but is difficult to digest the jsons.

Anyone knows anything?


Hello @Tu_pana_Miguel !
Welcome to the MetaMask community !

What exactly did you find in the browser’s local storage?

You can get the required information using the wallet_getPermissions method.

As written in the EIP-2255: Wallet Permissions System:

A proposed standard interface for restricting and permitting access to security-sensitive methods within a restricted web3 context like a website or “dapp”.

Web3 JavaScript wallet browsers may implement wallet_getPermissions and wallet_requestPermissions . This provides a standard interface for requesting permissions and checking a domain’s current permissions status.

The wallet_getPermissions method is used for getting an array of current permissions (empty by default):

const response = await provider.request({
  method: 'wallet_requestPermissions',
  params: [{
    'eth_accounts': {},