I would like to import as well as delete the private key from go-ethereum (geth), using the web3.py client. Can you please suggest the appropriate functions? I have already generated the private key.
Thanks, Raja K
I would like to import as well as delete the private key from go-ethereum (geth), using the web3.py client. Can you please suggest the appropriate functions? I have already generated the private key.
Thanks, Raja K
The web3.py docs on using private keys has this example:
with open('~/.ethereum/keystore/UTC--...--5ce9454909639D2D17A3F753ce7d93fa0b9aB12E') as keyfile: encrypted_key = keyfile.read() private_key = w3.eth.account.decrypt(encrypted_key, 'correcthorsebatterystaple') # tip: do not save the key or password anywhere, especially into a shared source file
The process to "import as well as delete the private key from geth" is:
keystore folder in the geth data directoryw3.eth.account.decrypt(...)