Can anyone explain the difference between
`eth.accounts.create()` and `eth.personal.newAccount()`
and which one we should use and why? As I am new to ethereum so its very confusing for me. Thanks
From the documentation the definition for both is a little bit different
The web3.eth.accounts contains functions to generate Ethereum accounts and sign transactions and data.
There is only one paramater which is
eth.accounts.create() will return an object that contains
The web3.eth.personal package allows you to interact with the Ethereum node’s accounts.
There is also only one parameter but it allows you to set the password
And you only get a string as return which is
There is not much more information about it, but I guess you would use the one that suits your need the most. In most case you should probably use
eth.accounts because it gives you back much more information.