This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10072 from EOSIO/docs/cleos-docathon-4
[docs] Update Import keys cleos How-to
- Loading branch information
Showing
1 changed file
with
33 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |