Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

ethers: decrypt keystore examples #617

Merged
merged 6 commits into from
May 17, 2024

Conversation

nohkwak
Copy link
Member

@nohkwak nohkwak commented May 13, 2024

These examples shows how to use decryptKeystoreListSync function for keystore V3 and V4.

@nohkwak nohkwak self-assigned this May 13, 2024
@blukat29
Copy link
Contributor

Thanks. But can you use the Wallet.fromEncryptedJsonSync instead? The decryptKeystore functions are too low-level for regular developers. The Wallet functions are the go-to options for decrypting a JSON keystore.

@nohkwak
Copy link
Member Author

nohkwak commented May 14, 2024

I updated examples to use Wallet.fromEncryptedJsonSync function.
But the example in case of multiple role-based key seems to be not working well.

@blukat29
Copy link
Contributor

  1. Can you name the files keystorev3.js keystorev4_single.js keystorev4_multi.js?
  2. Examples are not tests. Instead of comparing the results, you can just print account.address, account.privateKey please.

@nohkwak
Copy link
Member Author

nohkwak commented May 14, 2024

  1. Can you name the files keystorev3.js keystorev4_single.js keystorev4_multi.js?
  2. Examples are not tests. Instead of comparing the results, you can just print account.address, account.privateKey please.

Yes, I updated.

Copy link
Contributor

@blukat29 blukat29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect. Thanks!

@nohkwak nohkwak merged commit c27ed4e into klaytn:dev May 17, 2024
2 checks passed
@kjeom kjeom mentioned this pull request May 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants