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.
Make sure you meet the following requirements:
- Create a default wallet using the
cleos wallet createcommand. See the How to Create a Wallet section for instructions.
- Open and unlock the created wallet.
- Familiarize with the
cleos wallet importcommand.
Install the currently supported version of
- Understand what a public key and private key is.
See the following reference guide for
cleos command line usage and related options:
- cleos wallet import command and its parameters
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
- 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
By following these instructions, you are able to import a private key to the default wallet.