Lesson 5 : what contain encryptedKey.json #599
-
Hello,
generate the encryptedKey.json file who contain an object with some information about ... ( i don't know all the information inside ) But if we did delete the password from our |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@NinjaTurtles-cloud Writing important things that we do not want to show to others, we can write them to the The way we do this is that we first write our PRIVATE KEY in And the script this time gets the PRIVATE KEY from the encrypted file. Hope it clears the query. |
Beta Was this translation helpful? Give feedback.
@NinjaTurtles-cloud
Writing important things that we do not want to show to others, we can write them to the
.env
file and we do when it comes to URLs, API keys, etc. But when it comes to the wallet's private key (especially Original Wallet), we should avoid writing it inside and should write it in a more secure way. And that secure way Patric is shown with encrptedKye.json example.The way we do this is that we first write our PRIVATE KEY in
.env
file and generate the encrypted key with ethers package and secure it with a password (exact steps you can see in the video), after that we remove our private key form.env
file and we run our script with the help of terminal where we pass that …