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
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 community
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.