V4 keystore single
This example demonstrates how to encrypt and decrypt keystore V4 single.
Import the Wallet class from the @kaiachain/ethers-ext/v5 package.
Define an encrypted keystore version 4
Specify the current password of the keystore and a new password.
Load the keystore with its current password
After decryped, you can access the public and private key.
You can generate a new keystore using the descrypted key and a new password. Note that the new encrypted key will be keystore v3.
Check the new keystore public and private key, it will differ from original one since keystore v3 does not support klaytn account system.