I would like to write a piece of code that takes input as UTC key store file and password, and returns decrypted Private Key. I am aware of options like "MyEtherWallet" but I would like to do using my code. Any help/resources that I can use is appreciated.
[Ethereum] How to decrypt private key form keystore file, without using third party applications?
private-key
Best Answer
You can use the Javascript library ethereumjs-wallet which allows to load a wallet from a private key, seed phrase or UTC JSON file (V1 or V3)
I have generated a UTC JSON file on MyEtherWallet and the sample code below shows how to decrypt it to sign transactions:
Output
I pushed some of the code here