eth_requestAccounts

Requests that the user provide an NeoLine address to be identified by. This method is specified by EIP-1102.

Params

None.

Result

array[string]

Match pattern: ^0x[0-9a-fA-F]{40}$

Errors

Code
Message

4001

User rejected the request.

4901

The current network is Neo Legacy or Neo N3. Please call wallet_switchEthereumChain to switch to the Neo X network.

Example

Request

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

Result

["0xE45e9AdC2B51514849ea5B38dF37d1a65e6D52f5"]

最后更新于