How to import private key to wallet?

hi
i make a paper wallet from walletgenerator.net. But now i don’t know how to import my private key into my wallet. help me please!!!

If you encrypted your private key using the BIP38 method on walletgenerator, you will need to decrypt it before importing. You will also need to unlock your wallet if that is encrypted (full unlock, not just for minting).
In the wallet make sure you are looking at the unit that you want to create an address for with your new private key (NuBits or NuShares)
Then go to the debug window of the wallet client. (Help > Debug Window > Console) and enter

importprivkey [private key]

your private key will be imported and the associated address will be available in your wallet.

2 Likes

hi,
thank you for ur answer
but i have a problem the manip doesn’t work and i don’t know why?

on my debug window:

20:54:00
importprivkey <mypvtkey> [label]

20:54:00
Invalid private key (code -5)

20:55:33
importprivkey [mypvtkey]

20:55:33
Invalid private key (code -5)

please someone can help me?

Make sure your wallet is in nubits mode.

The wallet mode shouldn’t matter as a single private key can be hashed to either a NuBits or NuShares address. (Having both addresses from a single private key in your wallet can cause display issues though as NBT transactions will also show up as NSR transactions in the wallet UI even though no NSR were transacted, hence this isn’t recommended)

@xan I usually see the code -5 error if I’m attempting to import a private key that already exists in the wallet. could you check your available ‘Receive’ addresses to check if the address already exists?
Alternatively some users were saying that extra characters were being added to the front of the displayed private keys when using NuBippy. It’s on my todo list to take a look at why that is and fix it but, in the mean time, you could paste your private key into notepad (or equivalent) and make sure there are no odd characters there.

to check if an address is own by hte wallet, go to the console and type in

validateaddress <address>

my adress doesn’t exist because i don’t see the funds in my wallet.
i am sure there are no odd characters there.
Please someone can help me? i don’t understand.
do you try to import your private key? does it work? Maybe there are problems with the wallet client don’t you think?
thank you to woolly_sammoth and mhps
thank you for yours answers

xan

Hi xan. This is very difficult to troubleshoot through a message board. If you would like I can try to help you through chat. Do you have gmail? We could use google chat.

@xan as long as you are using the correct wallet (nushares, not nubits) the way to import privatekey is the same as with a bitcoin wallet or any satoshi wallet. You can find how to do it with google search.