What are the differences between web3.eth.personal.getAccounts()
and web3.eth.getAccounts()
?
environment
- truffle: v5.1.7
- using
truffle console
.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityWhat are the differences between web3.eth.personal.getAccounts()
and web3.eth.getAccounts()
?
truffle console
.The difference is what RPC method is being called under the hood. From the docs:
web3.persal.getAccounts
returns a list of accounts the node controls by using the provider and calling the RPC methodpersonal_listAccounts.
The results are the same as
web3.eth.getAccounts()
except that calls the RPC methodeth_accounts
.