You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
414 B

1 month ago
  1. ---
  2. title: eth_accounts
  3. description: 返回BUZZUP拥有的地址列表
  4. ---
  5. ---
  6. ### 参数
  7. - 该方法不接受任何参数
  8. ---
  9. ### 返回值
  10. - <div>AddressList<span style={{marginLeft:10,color:'#707070'}}>array</span></div>
  11. ---
  12. ### Request
  13. ```js
  14. async function getAccounts() {
  15. const accounts = await window.ethereum.request({ method: 'eth_accounts' });
  16. console.log('当前账户:', accounts[0]);
  17. }
  18. ```