Skip to content

cmd/clef: add importraw feature to clef #26058

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

Merged
merged 3 commits into from
Nov 6, 2022
Merged

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Oct 28, 2022

This adds importraw as a subcommand to clef.

Walking the happy-path:

[user@work clef]$ go run . --suppress-bootwarn importraw ./hexkey
INFO [10-28|14:03:08.718] Starting clef                            keystore=/home/user/.ethereum/keystore light-kdf=false
DEBUG[10-28|14:03:08.719] FS scan times                            list="61.22µs" set="72.06µs" diff="6.886µs"
## Password

Please enter a password for the imported account
> 
-----------------------
## Password

Please repeat the password you just entered
> 
-----------------------
DEBUG[10-28|14:03:15.040] FS scan times                            list="78.702µs" set="74.598µs" diff="6.765µs"
## Info 
Key imported:
  Address 0x9160DC9105f7De5dC5E7f3d97ef11DA47269BdA6
  Keystore file: /home/user/.ethereum/keystore/UTC--2022-10-28T12-03-13.976383602Z--9160dc9105f7de5dc5e7f3d97ef11da47269bda6

The key is now encrypted; losing the password will result in permanently losing 
access to the key and all associated funds!

Make sure to backup keystore and passwords in a safe location.

@ligi ligi removed the status:triage label Nov 1, 2022
@holiman
Copy link
Contributor Author

holiman commented Nov 2, 2022

This PR now also adds clef CLI tests, covering the importraw, list-accounts and list-wallets commands. cc @jmcook1186

@holiman holiman force-pushed the clef_importraw branch 2 times, most recently from ff1c6ff to b11472b Compare November 3, 2022 07:42
@fjl fjl merged commit 1774463 into ethereum:master Nov 6, 2022
@fjl fjl added this to the 1.11.0 milestone Nov 6, 2022
shekhirin pushed a commit to shekhirin/go-ethereum that referenced this pull request Jun 6, 2023
This adds a subcommand that imports a raw secp256k1 key
into the keystore managed by clef.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants