In my previous post I got answer but still I need some clarifications
let say when deploying contract with node js we have this line
try {
web3.personal.unlockAccount(web3.eth.coinbase, password);
} catch(e) {
console.log(e);
return;
}
which is unlocking account to make transaction for contract creation .
What if account is created with this way
web3.eth.accounts.create([entropy]);
And I have private key encyrpted somewhere on the system how I shall use it to unlock (or jsut use account) account let say after a week from it's creation ?
Also can u give details on what does entropy do
?
Is it like password in case of personal account ?
Thanks and sorry if questions are similar , there are not much resources to get more detailed info
Best Answer
Having a private key you can create a new account with web3.eth.accounts.wallet.add(account|privateKey)
You can use your account normally after.
In the
transactionObject
you can omit thefrom
parameter and the default account will be used.Make sure to read the documentation
web3.eth.signTransaction
Entropy in computing