Skip to main content

Import a Key Pair

Prerequisites

  • Install the currently supported version of clio
info

| The clio tool is bundled with the Wire software. Installing Wire Core will also install the clio tool.

REMINDER

The install process has already set up the wallet for the root user. To interact with clio, ensure you are on the root user. Run sudo su - to switch to the root user.

Steps

Method 1: Interactive import

Run the import command and enter your private key when prompted:

clio wallet import

Enter your private key at the prompt:

private key:

Example Output:

imported private key for: SYS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV

Method 2: Direct import with --private-key flag

You can also provide the private key directly on the command line:

New format (recommended):

clio wallet import --private-key PVT_K1_2bfGi9rYsXQSXXTvJbDAPhHLQUojjaNLomdm3cEJ1XTzMqUt3V

Example Output:

imported private key for: SYS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
note

The import command always outputs the public key in legacy SYS format, regardless of which private key format you use.

Legacy format:

clio wallet import --private-key 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3

Example Output:

imported private key for: SYS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
note

Both legacy format (5J..., 5K...) and new format (PVT_K1_...) private keys are accepted by the import command.

Import to a specific wallet

If you have multiple wallets, specify which wallet to import into:

clio wallet import -n my_wallet --private-key PVT_K1_2bfGi9rYsXQSXXTvJbDAPhHLQUojjaNLomdm3cEJ1XTzMqUt3V
danger

Never share your private keys. Keep them secure and backed up.

Reference