My requirement is to create an eth account and do transaction.
In Web 0.20.0 I am able to create web3.personal.newAccount and able to get create contract object. When I am using that created contract object to call methods I am getting HTTP synchronous not supported. I am using a test private network.
In Web 1.0.0 I am not able to create account but I can get a contract and call its methods.
Can you help me how I can achieve both.
My code snippet
var data=web3.eth.accounts.create(web3.utils.randomHex(32));
alert("Response"+JSON.stringify(res));
or
web3.eth.accounts.create(web3.utils.randomHex(32),function(err,res){
if(err){
alert("creating account error "+err);
}else{
alert("creating account success "+JSON.stringify(res));
}
})