Developer (English)
  • Get Started
  • Wallet
    • ​Ready to start
    • Mobile SDK
      • iOS
      • Android
    • EOS MiniWallet SDK
      • iOS
      • Android
    • ​Pull up wallet with DeepLink
    • JS-SDK
    • EOS resource payment
    • Debug DApp
    • Clear Cache
  • Extension Wallet
    • Guide
      • Introduction
      • Getting Started
      • Common Terms
      • Initialize the DApp
      • Access account
      • Send transaction
    • API Reference
      • Ethereum Provider API
      • Tron Provider API
      • RPC API
      • Signing Data
  • QRCode Protocol
    • Dynamic QRCode
    • EVM network
    • TRON
    • EOSIO
    • Solana
    • BTC
  • TIP Protocol
  • Wallet Connect
  • Token
    • Token price display support
    • How to submit token
    • How to Submit a Token Logo
    • FAQ
  • DApp
    • How to Submit DApps
    • FAQ
  • Network
    • Blockchain Unique Identifier
    • Supported Chains
      • Transaction Data
    • New Blockchains
      • Lite add blockchain
      • Basic support introduction and demonstration
      • Adding Advanced blockchain
      • Adding custom blockchain
  • FAQ
Powered by GitBook
On this page
  1. Extension Wallet
  2. Guide

Access account

PreviousInitialize the DAppNextSend transaction

Last updated 2 years ago

User accounts can be used in various contexts on Ethereum, including as identifiers and to sign transactions. In order to request a user's signature or have the user approve a transaction, the user's account must be accessible. The following wallet methods involve signing or transaction approval, both of which require sending accounts as a function parameter.

  • eth_sendTransaction

  • eth_sign(Not safe and not recommended)

  • eth_personalSign

  • eth_signTypedData

, you can always recheck the current account with ethereum.selectedAddress. If you'd like to be notified when the address changes, we have an event you can subscribe to:

ethereum.on('accountsChanged', function (accounts) {
  // Time to reload your interface with accounts[0]!
});

If the first account in the returned array is not the one you expected, you should notify the user! In the future, the accounts array may contain multiple ones, but now not yet available. The first account in the array will always be considered the user's "selected" account.

After connecting to the user