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

Commit

Permalink
Merge pull request #10072 from EOSIO/docs/cleos-docathon-4
Browse files Browse the repository at this point in the history
[docs] Update Import keys cleos How-to
  • Loading branch information
lparisc authored May 25, 2021
2 parents 784bca7 + 194e57c commit 95ccde6
Showing 1 changed file with 33 additions and 8 deletions.
41 changes: 33 additions & 8 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,22 +1,47 @@
## Goal
## Overview

Import an key pair
This how-to guide provides instructions on how to import a private key into the `keosd` default wallet. You can use the private key to authorize transactions in an EOSIO blockchain.

## 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 default 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 key](https://developers.eos.io/welcome/latest/glossary/index/#public-key) and [private key](https://developers.eos.io/welcome/latest/glossary/index/#private-key) is.

## Steps
## Command Reference

See the following reference guide for `cleos` command line usage and related options:
* [cleos wallet import](../03_command-reference/wallet/import.md) command and its parameters

## Procedure

The following steps show how to import a private key to an existing `keosd` default wallet:

1. Run the following command to import a private key into the default wallet. The command prompts to enter a private key:
```sh
cleos wallet import
```
```console
private key:
```

Type your private key. You should see something like this:
2. Enter the private key and hit Enter.
```sh
***
```

**Example Output**
The command confirms that the private key is imported correctly by displaying the corresponding public key:
```console
private key: imported private key for: EOS8FBXJUfbANf3xeDWPoJxnip3Ych9HjzLBr1VaXRQFdkVAxwLE7
imported private key for: EOS8FBXJUfbANf3xeDWPoJxnip3Ych9HjzLBr1VaXRQFdkVAxwLE7
```

## Summary

By following these instructions, you are able to import a private key to the default wallet.

0 comments on commit 95ccde6

Please sign in to comment.