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

Allow Importing One-Off, Private Keys Into Accounts-v2 #6929

Merged
merged 14 commits into from
Aug 11, 2020

Conversation

rauljordan
Copy link
Contributor

What type of PR is this?

Feature

What does this PR do? Why is it needed?

A nice feature to have is to be able to import one-off private keys into the Prysm wallet, which would help for importing keys from other client teams or from any other source in the simplest way. The added feature is:

bazel run //validator -- accounts-v2 import --import-private-key-file=privkey.txt

Where privkey.txt contains a hex string representation of the private key

0x5716c24494e1892ab4169cec93a18c69414ca1830d12f9ded2070b20e7df5c84

Running the command results in

Importing accounts, this may take a while...
Importing accounts... 100% [============================================================================================]  [0s:0s]
Successfully imported account from private key, view all accounts by running accounts-v2 list

Which issues(s) does this PR fix?

Fixes #6805

@rauljordan rauljordan requested a review from a team as a code owner August 7, 2020 16:38
@rauljordan rauljordan self-assigned this Aug 7, 2020
@rauljordan rauljordan added AccountsV2 Enhancement New feature or request Ready For Review A pull request ready for code review labels Aug 7, 2020
@codecov
Copy link

codecov bot commented Aug 10, 2020

Codecov Report

Merging #6929 into master will increase coverage by 0.27%.
The diff coverage is 52.94%.

@@            Coverage Diff             @@
##           master    #6929      +/-   ##
==========================================
+ Coverage   61.91%   62.18%   +0.27%     
==========================================
  Files         395      393       -2     
  Lines       30914    30597     -317     
==========================================
- Hits        19139    19028     -111     
+ Misses       9050     8881     -169     
+ Partials     2725     2688      -37     

Copy link
Contributor

@farazdagi farazdagi left a comment

Choose a reason for hiding this comment

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

Tested locally, works great.

@prylabs-bulldozer prylabs-bulldozer bot merged commit 11c9699 into master Aug 11, 2020
@farazdagi farazdagi deleted the import-priv-key branch August 12, 2020 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Account V2 import private key
2 participants