I am trying to get my Ethereum private key, so that I can create raw transactions to broadcast through infura. Currently, I have a keystore file that was created with Geth, but this is not directly compatible with creating raw transactions

Here is what I am trying to do

web3.eth.accounts.wallet.add(private_key) //how do I get private_key

walletOwnerAddress = '0x'+ethUtils.privateToAddress(ethUtils.toBuffer('0x' + private_key)).toString('hex')

web3.eth.defaultAccount = walletOwnerAddress

web3.eth.sendTransaction({ to: toAddr, value: web3.utils.toWei("0.1", "ether") })

How do I get my private key from my keystore file?

Browse other questions tagged or ask your own question.