Overview
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
Make sure you meet the following requirements:
- Create a default wallet using the
cleos wallet create
command. See the How to Create a Wallet section for instructions. - Open and unlock the created wallet.
- Familiarize with the
cleos wallet import
command. -
Install the currently supported version of
cleos
. - Understand what a public key and private key is.
Command Reference
See the following reference guide for cleos
command line usage and related options:
- cleos wallet import command and its parameters
Procedure
The following steps show how to import a private key to an existing keosd
default wallet:
- Run the following command to import a private key into the default wallet. The command prompts to enter a private key:
cleos wallet import
private key:
- Enter the private key and hit Enter.
***
Example Output The command confirms that the private key is imported correctly by displaying the corresponding public key:
imported private key for: EOS8FBXJUfbANf3xeDWPoJxnip3Ych9HjzLBr1VaXRQFdkVAxwLE7
Summary
By following these instructions, you are able to import a private key to the default wallet.