Access Account in Ethereum

User accounts are used in a variety of contexts in Ethereum, including as identifiers and for signing transactions. To request a signature from a user or have a user approve a transaction, your dapp must access the user's accounts using the eth_requestAccounts RPC method.
When accessing a user's accounts:
  • Only initiate a connection request in response to direct user action, such as selecting a connect button.
  • Always disable the connect button while the connection request is pending.
  • Never initiate a connection request on page load.

Create a connect button

We recommend providing a button to allow users to connect Sender to your dapp. Selecting this button should call eth_requestAccounts to access the user's account.