Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

[docs] Update Import keys cleos How-to #10072

Merged
merged 4 commits into from
May 25, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions docs/02_cleos/02_how-to-guides/how-to-import-a-key.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,41 @@
## Goal

Import an key pair
Import a private key into a wallet

## Before you begin
## Before you Begin

* Install the currently supported version of `cleos`
Make sure you meet the following requirements:

* Understand the following:
* What is a public and private key pair
* Create a wallet using the `cleos wallet create` command. See the [How to Create a Wallet](../02_how-to-guides/how-to-create-a-wallet.md) section for instructions.
* [Open]() and [unlock]() the created wallet.
* Familiarize with the [`cleos wallet import`](../03_command-reference/wallet/import.md) command.

* Install the currently supported version of `cleos`.

[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`.


* Understand what a [public](https://developers.eos.io/welcome/latest/glossary/index/#public-key) and [private](https://developers.eos.io/welcome/latest/glossary/index/#private-key) key pair is.

## Steps

Perform the following steps:

1. Run the following command to import a private key into an existing wallet:
```sh
cleos wallet import
```

Type your private key. You should see something like this:
2. Enter your private key.
```console
cleos wallet import
private key:
```

**Example Output**

The following example confirms that the private key is imported for the corresponding public key.

```console
private key: imported private key for: EOS8FBXJUfbANf3xeDWPoJxnip3Ych9HjzLBr1VaXRQFdkVAxwLE7
Expand Down