Skip to main content
Defined in EIP-1102
Requests that the user provides an Ethereum address to be identified by. This method will show a prompt to the user asking them to authorize the connection. Returns a promise that resolves to an array of accounts the user has authorized for the application.

Parameters

This method does not accept any parameters.

Returns

result
Array<string>
An array of Ethereum addresses (hexadecimal strings) that the user has authorized for the application. The array will typically contain a single address, which is the currently selected account in the wallet.

Error Handling

Always handle the case where the user rejects the connection request (error code 4001) gracefully in your application.