Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update keyring service's importKeyring method to accept private keys. #3070

Closed
1 task
0xDaedalus opened this issue Feb 22, 2023 · 1 comment · Fixed by #3089
Closed
1 task

Update keyring service's importKeyring method to accept private keys. #3070

0xDaedalus opened this issue Feb 22, 2023 · 1 comment · Fixed by #3089
Assignees
Labels
Priority: High High monetary / growth impact, time sensitive, large user impact. Status: Available Available to work on Type: Enhancement New feature or request

Comments

@0xDaedalus
Copy link
Contributor

0xDaedalus commented Feb 22, 2023

We want this method to be able to allow signing both importing a seed phrase and importing a private key.

Accomplishing this will probably involve either adding a path to sign transactions through an ethers Wallet in addition to the current hd-keyring implementation.

We will want to securely serialize and deserialize the Wallet in a similar fashion to how we currently treat our keyrings.

For this ticket to be closed - we should be able to:

  • Import a keyring via a private key and then successfully sign transactions and/or messages using that keyring
@0xDaedalus 0xDaedalus added Type: Enhancement New feature or request Priority: Medium Medium monetary / growth impact, long time frame for completion Status: Available Available to work on labels Feb 22, 2023
@0xDaedalus 0xDaedalus added this to the Private Key Import milestone Feb 22, 2023
@jagodarybacka jagodarybacka self-assigned this Feb 22, 2023
@0xDaedalus 0xDaedalus added Priority: High High monetary / growth impact, time sensitive, large user impact. and removed Priority: Medium Medium monetary / growth impact, long time frame for completion labels Feb 27, 2023
@jagodarybacka
Copy link
Contributor

Closing as this is done as a part of #3089

Shadowfiend added a commit that referenced this issue Jul 7, 2023
### About this PR
This PR will contain all changes for features:
- [x] allow importing private keys in the keyring service (initial scope
of this PR)
- [x] import private keys with plain text
(#3119)
- [x] import private keys with JSON
(#3177)
- [x] backup account with mnemonic and private key export
(#3252)
---

## Initial scope 
Resolves #3070

### What

Handle importing wallets with private keys in the keyring service:
* save pk imported accounts in the encrypted vault
* handle serialization and deserialization of pk imported wallets
* handle signing messages with both keyrings and pk wallets
* handle communication between service and redux store about pk wallets
* fix types and field names in the redux store

Cleanup and add more tests:
- move existing keyring integration tests to the right folder
- write more unit tests to cover private key imported wallets
- cleanup some duplicated tests
- add util functions to the test's `factories`
- add function to mock local storage

### Testing
- make sure unit tests and E2E are passing
- test manually adding accounts and signing transactions

Latest build:
[extension-builds-3089](https://github.com/tahowallet/extension/suites/14105826655/artifacts/789186059)
(as of Thu, 06 Jul 2023 12:56:07 GMT).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High High monetary / growth impact, time sensitive, large user impact. Status: Available Available to work on Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants