Skip to main content

eth_accounts

MetaMaskRestricted

Returns a list of addresses for the accounts owned by the user. This method requires calling wallet_requestPermissions for permission. We recommend using eth_requestAccounts, which internally calls wallet_requestPermission.

Params

(0)

Result

(AddressList)
array[string]
Match pattern:
^0x[0-9a-fA-F]{40}$

Example

Request

await window.ethereum.request({
"method": "eth_accounts",
"params": []
});

Result

"0xa77392123a1085f75e62eec7dea7e0e1e5142d5f"

Request

await window.ethereum.request({
"method": "eth_accounts",
"params": []
});