From c5c828afc6bc7b4f379f8a2ff0ebef779fd7d522 Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 7 Nov 2022 13:31:48 +0000 Subject: [PATCH] add clef importraw to account page --- .../docs/fundamentals/account-management.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/pages/docs/fundamentals/account-management.md b/src/pages/docs/fundamentals/account-management.md index 41ad81a123..c88222b098 100644 --- a/src/pages/docs/fundamentals/account-management.md +++ b/src/pages/docs/fundamentals/account-management.md @@ -85,12 +85,27 @@ The newly generated key files can be viewed in `/keystore/`. The file n `UTC--2022-05-19T12-34-36.47413510Z--0b85e5a13e118466159b1e1b6a4234e5f9f784bb` -Note that there is also a Geth command for creating new accounts that will eventually be deprecated in favour of Clef. The following command will achieve the same as the RPC call suggested above: +An account can also be created by importing a raw private key (hex string) using `clef importraw` as follows: ```sh -geth account new +clef importraw ``` +The terminal will respond with the following message, indicating the account has been created successfully: + +```terminal +## 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. +``` + + ### Listing accounts The accounts in the keystore can be listed to the terminal using a simple CLI command as follows: