question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot import private keys

See original GitHub issue

I am trying to import some private keys into the wallet, but it seems that electrum doesn’t support it. Here is what it tried:

[root@v48807 .bitcoin]# electrum version
3.3.4
[root@v48807 .bitcoin]# electrum importprivkey --help
usage: electrum importprivkey [-h] [-v [VERBOSITY]] [-D ELECTRUM_PATH] [-P]
                              [-w WALLET_PATH] [--testnet] [--regtest]
                              [--simnet] [-W PASSWORD]
                              privkey

Import a private key.

positional arguments:
  privkey               Private key. Type '?' to get a prompt.

optional arguments:
  -h, --help            show this help message and exit
  -W PASSWORD, --password PASSWORD
                        Password

global options:
  -v [VERBOSITY]        Set verbosity filter
  -D ELECTRUM_PATH, --dir ELECTRUM_PATH
                        electrum directory
  -P, --portable        Use local 'electrum_data' directory
  -w WALLET_PATH, --wallet WALLET_PATH
                        wallet path
  --testnet             Use Testnet
  --regtest             Use Regtest
  --simnet              Use Simnet
[root@v48807 .bitcoin]# electrum create --help
usage: electrum create [-h] [-v [VERBOSITY]] [-D ELECTRUM_PATH] [-P]
                       [-w WALLET_PATH] [--testnet] [--regtest] [--simnet]
                       [--passphrase PASSPHRASE] [-W PASSWORD]
                       [--encrypt_file ENCRYPT_FILE] [--segwit]

Create a new wallet

optional arguments:
  -h, --help            show this help message and exit
  --passphrase PASSPHRASE
                        Seed extension
  -W PASSWORD, --password PASSWORD
                        Password
  --encrypt_file ENCRYPT_FILE
                        Whether the file on disk should be encrypted with the
                        provided password
  --segwit              Create segwit seed

global options:
  -v [VERBOSITY]        Set verbosity filter
  -D ELECTRUM_PATH, --dir ELECTRUM_PATH
                        electrum directory
  -P, --portable        Use local 'electrum_data' directory
  -w WALLET_PATH, --wallet WALLET_PATH
                        wallet path
  --testnet             Use Testnet
  --regtest             Use Regtest
  --simnet              Use Simnet
[root@v48807 .bitcoin]# electrum create -w w/huge1
{
    "msg": "Please keep your seed in a safe place; if you lose it, you will not be able to restore your wallet.",
    "path": "/var/cryptobox/.bitcoin/w/huge1",
    "seed": "ice injury bubble leisure tumble harbor record measure fitness hire occur radio"
}
[root@v48807 .bitcoin]# electrum importprivkey -w w/huge1 ?
Error: This type of wallet cannot import private keys. Try to create a new wallet with that key.
[root@v48807 .bitcoin]#

How I can create a wallet which is able to import the keys?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
AbdussamadAcommented, Apr 1, 2019

sorry use restore:

electrum -w wallet-file restore <privkey>

1reaction
AbdussamadAcommented, Apr 1, 2019

Given that your GUI is a subject of phishing attacks,

Not anymore. Also if you don’t like electrum you shouldn’t use it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't import SSL private key certificate - Internet Information ...
This article helps you resolve an error that occurs when you try to import a Secure Sockets Layer (SSL) private key certificate (.pfx)...
Read more >
How do I fix "We couldn't import that private key" : r/Metamask
The 'Sync with extension' feature is temporarily disabled. If you want to use your extension wallet on MetaMask mobile, then on your mobile...
Read more >
How do I import a private key? - Exodus Support
1: First, navigate to the Bitcoin (BTC) wallet, and tap on the gear icon. ; 2: Then, tap Add Bitcoin from Private Keys...
Read more >
Importing your private keys into Electrum
You cannot import private keys into an existing HD wallet. Importing private keys requires you to create a new wallet file that will...
Read more >
Can't import any ssh private keys? - Manjaro Linux Forum
... I can't for the life of me figure out how to import/manage/use my remote server ssh keys. On windows I would convert...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found