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

feat(signers): add Wallet::encrypt_keystore #2502

Merged
merged 4 commits into from
Jul 25, 2023

Conversation

0xZerohero
Copy link
Contributor

@0xZerohero 0xZerohero commented Jul 9, 2023

Motivation

This function is similar to Wallet::new_keystore, but instead of adding the a random private key to the file, it adds a key passed as a parameter.
This is handy when you want to safe an existing private key in an encrypted file.

This can also help with the implementation of foundry-rs/foundry#5057

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@0xZerohero 0xZerohero changed the title Feature/wallet encrypt keystore feat(signers) wallet encrypt keystore Jul 9, 2023
@0xZerohero 0xZerohero changed the title feat(signers) wallet encrypt keystore feat(signers): wallet encrypt keystore Jul 9, 2023
@0xZerohero 0xZerohero changed the title feat(signers): wallet encrypt keystore feat(signers): add Wallet::encrypt_keystore Jul 9, 2023
@DaniPopes DaniPopes merged commit fbf8ae1 into gakonst:master Jul 25, 2023
aathan pushed a commit to aathan/ethers-rs that referenced this pull request Jul 27, 2023
* feat(signers): add Wallet::encrypt_keystore

* chore(signers): use a non-random private key

* chore(signers): fix comment

* chore(signers): fix encrypted_json_keystore_from_pk test
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