I tested the interface 'getAccounts',return an empty array.
@TinyWJL which getAccounts method are you calling, web3.eth.getAccounts() or web3.eth.personal.getAccounts()`?
According to the documentation the method returns a Promise<array> so an empty array suggests that the node does not control any accounts.
@TinyWJL All addresses exist. Do you mean is there a way to know if someone owns a private key that maps to a particular address?
Or if you want to check if a given string is a valid Ethereum address or not you can use web3.utils.isAddress(); which returns boolean.
More info about it can be found here.
Closed because of the ongoing clean up of the issue list. Feel free to ask this in our gitter channel or on stackoverflow.
Most helpful comment
@TinyWJL All addresses exist. Do you mean is there a way to know if someone owns a private key that maps to a particular address?
Or if you want to check if a given string is a valid Ethereum address or not you can use
web3.utils.isAddress();which returns boolean.More info about it can be found here.