Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: PONCHOELRUDO on August 18, 2019, 06:59:23 PM



Title: bitcoin core imp private key problems
Post by: PONCHOELRUDO on August 18, 2019, 06:59:23 PM
can I import private keys to a bitcoin core wallet from which once I already exported


Title: Re: bitcoin core imp private key problems
Post by: bL4nkcode on August 18, 2019, 07:08:30 PM
Yes, It will work apparently. You can visit this thread on stackexchange - How do I import a private key into Bitcoin-Core? (https://bitcoin.stackexchange.com/questions/5941/how-do-i-import-a-private-key-into-bitcoin-core) not unless if the new version 0.18.1 does not able to do that which I think is not a problem. Tho someone correct me if I'm wrong.


Title: Re: bitcoin core imp private key problems
Post by: PONCHOELRUDO on August 18, 2019, 07:23:20 PM
I already put the importprivkey myprivatekey and it doesnt work


if once months ago I importes my provate key is it cointinue be the same private key?


Title: Re: bitcoin core imp private key problems
Post by: BitMaxz on August 18, 2019, 08:48:02 PM
I already put the importprivkey myprivatekey and it doesnt work


if once months ago I importes my provate key is it cointinue be the same private key?
What did you do exactly?

If your bitcoin core wallet have walletpassphrase/password you need to enter this command line below

Code:
walletpassphrase "YourLongPassphrase" 600

Sample:

Code:
walletpassphrase mypassword123 600

After you do this import your private key using this command line below.

Code:
importprivkey "YourPrivateKey" "mylabel"

Sample:

Code:
importprivkey 5HriQ9XMNhb5mr8Pu19FpQCTMuBYjSF6KG4z3kidaUXiZiEAoL1 Mynewwallet


Now you should see the bitcoin address under receiving addresses.


Title: Re: bitcoin core imp private key problems
Post by: Thirdspace on August 18, 2019, 11:28:07 PM
OP are you trying to import segwit address? you need to use addwitnessaddress
after you've done importprivkey, do addwitnessaddress on the imported legacy address
try it and see if it does the job and shows the segwit address you want to import
note: there was a discussion about issue on using addwitnessaddress, but I can't remember what it was


Title: Re: bitcoin core imp private key problems
Post by: achow101 on August 19, 2019, 12:53:30 AM
OP are you trying to import segwit address? you need to use addwitnessaddress
after you've done importprivkey, do addwitnessaddress on the imported legacy address
try it and see if it does the job and shows the segwit address you want to import
note: there was a discussion about issue on using addwitnessaddress, but I can't remember what it was
addwitnessaddress is no longer an available RPC. Segwit addresses for a private key will automatically be tracked.


Title: Re: bitcoin core imp private key problems
Post by: nc50lc on August 19, 2019, 03:08:03 AM
can I import private keys to a bitcoin core wallet from which once I already exported
The question is quite vague, but this is what I get:
You're trying to re-import a private key to the same Bitcoin Core wallet where it was exported.

If that's the case, it wont work (nothing will happen) since that private key is still in that wallet.
Exporting a prv key won't delete the private key from your wallet.

If not, just carefully follow their guides (above replies).


Title: Re: bitcoin core imp private key problems
Post by: bob123 on August 20, 2019, 04:36:42 PM
What exactly are you trying to do, and for what reason ?

Can you explain what you previously did and in which situation you currently are ?
Because, as nc50lc already mentioned, private keys are not deleted when being exported. Why do you need to import it again into the same wallet ?

If you have an issue, feel free to describe it as precisely as you can. This makes it much easier for us to identify the cause and to solve it.