Search code examples
ethereummetamask

Get all etc accounts in Metamask (version 9.0.4)


According to docs (https://docs.metamask.io/guide/getting-started.html#basic-considerations) I need to use eth_requestAccounts method. But it returns an array of ethereum addresses with one currently selected account. I have multiple accounts, so how can I get full array?


Solution

  • You cannot, because due to privacy reasons eth_requestAccounts was very bad idea in the first place. It has now been disabled.