I made several accounts with some commands personal.newAccount()
and the accounts created were push to the list.
What I want to do is, get private key with public key that I've got with getAccount()
function because of security reason.
I don't want to show my owner address and public key so I want to get address from list using the function.
web3.eth.getAccounts();
//["0x407d73d8a49eeb85d32cf465507dd71d507100c1"]
Then, I want to get the private key with that address like this way below.
var publicKey = web3.eth.getAccounts();
var privateKey = extractPrivateKey(pulicKey);
Is there any way to do like this using web3?
Is there some way to access the keystore on javascript file?
I have to use sendTransaction()
function in javascript code but it needs the privateKey to sign. Now I'm storing the privateKey as static and I think is quite dangerous.
I'm figuring out to hide my owner public and private key in the code.