Importprivkey returning null


#1

I was given some physical litecoins (paper wallets, right?). I was able to import all of them to litecoin-qt, except for one, by following these steps:

  • generate 51 character private key with liteaddress.org

  • opening debug console and entering “importprivkey (key)”

Litecoin-qt would rescan and the coins would appear in my wallet, with the exception of the last one that I tried. The last one went all the way through the rescan process, but no litecoins ever showed up in the wallet after.

I checked explorer.litecoin.net and the physical coin appears to still hold 1 litecoin, so I tried the process again a few more times and the console only returns “null” as if it’s already imported that private key to my wallet.

I tried using dumpprivkey command as a last effort, but the console returns “Invalid litecoin address (code -5)”.

I would like to get this litecoin from the physical coin to my wallet if possible, so any help is greatly appreciated. Thanks in advance!


#2

usually happens to me (i think) when the wallet is not synched

are you typing it in by hand or using the scanner option on the paper wallet (try the other if you tried one)

not sure if you can do this…but IF you moved all of your wallet to another address would this show as moved

then?

all I got sorry


#3

Litecoin-qt is synched, but does not have a scanner as far as I know so I’ve been entering everything in the console by hand.

I guess I can try another wallet application, but the other 9 litecoins transferred from the physical silver coins to litecoin-qt worked fine.

I might just try uninstalling the wallet and reinstalling. The 9 coins I transferred from the physical silver coins to litecoin-qt have already all been transferred to Coinbase, so I’m not in danger of losing those.

Thank you for your reply!


#4

I think there was a way to import your private key on the blockchain.info wallet…i had this issue once with BTC…I am unsure if you can do the same with LTC…just remembered this…

a fresh install of a new wallet as you state would work or get a laptop with a camera and try the scanner way

let us know how it goes

brad


#5

I tried “importpubkey” as well just to see what would happen, and I got a message saying something to the effect of “this private key is already associated with your wallet” even though the LTC never left the physical coin and it never showed up in litecoin-qt. I also tried “rescanblockchain” command a few times as well, but that didn’t work either.

I downloaded another wallet that has a LTC import feature from litevault.net but when I put the key in it says “Warning: address already exists, skipping.”

I uninstalled litecoin-qt, but when I reinstalled it, my old wallet and passphrase were still there. I’m not sure where the blockchain data is stored on my computer (using OSX). I looked in Library > Application Support after reinstalling, but there is not a litecoin folder.

Any idea how to get rid of the wallet completely and start fresh? It’s the only thing I can think to do, this wallet thinks the private key is associated with it, but a blockchain explorer shows it’s never left the physical coin so I don’t think I’m in danger of losing it if I can manage to delete my current litecoin-qt wallet.

EDIT: I found the folder I needed to delete, mac hides the library folder. I uninstalled and deleted all associated files and am reinstalling application. Going to have to download entire blockchain again, so I’ll get back to you guys in 20 years when it finishes downloading lol.


#6

if importprivkey is returning “null” then the private key is already in your wallet!!


#7

That’s what I thought, but going to a block explorer like explorer.litecoin.net shows that the coin never left the physical silver coin. I downloaded litecoin-qt again with a fresh wallet, went through the same process and the litecoin never showed up in my wallet. It’s still not in either wallet I created.

Public address is LTC9XaNo if you want to check as well.


#8

it wont “leave the physical coin” because it was never there to begin with…
wallets don’t hold coins
wallets hold keys that unlock transactions on a blockchain…period

so if you import the private key that belongs to the “physical coin” into your wallet…the value is stil locked behind that private key…

you have to send the coins to a new address in order to spend them…thus creating a new transaction to a new address (new private key)
importing a private key does not spend the coins


#9

I’m new to this and only got into it because I was given these physical coins by a customer of mine as a gift, so I don’t know all the proper terminology.

The problem I’m having is that I followed the same process 9 other times and after finishing, litecoin-qt would change my balance and show that there were x amount of coins being held there. I’m not understanding why, if the private key is associated with my wallet, the coins aren’t showing up as part of my balance like they did for each of the other coins I unlocked from the blockchain.

Even though the key is associated with my wallet, I still cannot send the coins anywhere else because my balance doesn’t show they are there. The other 9 have already been transferred to another wallet but this 10th one isn’t behaving like the others. The others showed up in the “transactions” tab, but this one never does.


#10

wallets do not hold coins…they hold keys that nlock transactions on a blockchain…thats how it works
if there is a balance locked behind an address then your private key is the only way to spend the funds to a new wallet (address)
if your wallet is not showing an available balance then you must wait until the wallet is synced with the network

you can check the balance of any key at blockcypher.com or any other block explorer

if your transaction did not show up then its more than likely because you did not specify enough for the transaction fee


#11

“Wallets do not hold coins” … I appreciate the response, but again… this is not the issue…

Again, the issue is:
I imported all of the other keys to the wallet using the “importprivkey” command and the balance of my wallet would change, as far as i know there was not a way to specify a transaction fee when using the “importprivkey” command. The key would unlock 1 LTC and the balance would go up by 1 LTC as soon as the wallet was done rescanning. When importing this specific key, the balance never changed.

Now when sending them from the wallet to somewhere else, that’s when the transaction fee came into play, and I had no issue with any of that.

Also litecoin-qt is synced with the network and up to date so that is not the issue either.

I’ve checked multiple block explorers and they all say the same thing, “Recieved: 1 LTC, Sent: 0 LTC, Balance: 1 LTC”


#12

start litecoin-qt from command line using the -rescan flag
in windows:
litcoin.exe -rescan
linux / mac:
./litecoin-qt -rescan
you have not imported the input transaction is what the problem is
rescan should find it
otherwise do this in console…type: getrawtransaction “txid”
then importtransaciton “txid”

or you can just write a raw transaction sending the coins to a new address signing the transaction with the private key that is currently locking the coins