Import encrypted private key (get Nubits for your help) (sorry I'm not an english native)

Hi!

I imported a private key using imporprivkey (using Nu) and sent directly funds to another address but it seems that no transaction hasn’t been broadcasted and that funds remain in the address attached to the paperwallet regarding the balance on nu-explorer. The point is that trying to import it again, I get the message :
"
Error adding key to wallet (code -4)
"

Also, by running validateaddress “public key” ; i got “isvalid” : true

My Nu Blance still is at zero. Has my fund really been imported? what should I do ? rescan or reinstall Nu ? Many thanks for your help

What does ‘getblockcount’ return? Can you find the address on here http://blockexplorer.nu/? Does it have a balance on the website?

“getbockcount” returns 697015. Yes I can check the balance on blockexplorer.nu No funds have been imported.

thx!

What about the rest of the validateaddress output?
Is there

"ismine" : true,

as well reported for that address?

You might need to rescan your local copy of the blockchain (which might take some time) to make the funds available. Your wallet isn’t aware of the balance, because you imported the key after the block, that contains transactions to that address, was processed.
Let me check the proper command.

nunjaedit:
have a look here: Minted Stake Accidentally on Old Client, Question

alternatively you can try to use http://ttutdxh-nubits.github.io/cointoolkit/?mode=nubits#newTransaction to send funds from that address.

If you want to erase the last post you edited, because of the contents, I recommend to delete it completely, because discourse (this forum software) has a kind of change history. If you click on the red pencil, you see the previous version of the post.

Actually, it seems that rescan command doesn’t work on my mac version.

Also, I get " There is a problem with one or more of your inputs, please check and try again " when signing my transaction with private key. (using the tool)

On Mac you might start the Nu wallet with the rescan option in a different way.
I’m not familiar with Nu on Mac, sorry.
The important thing is that you close the Nu wallet, wait until it’s terminated and start it again with the option.
Can you run the daemon on Mac? Is that available in the distribution? It should be called nud.
You might try executing nud -rescan in a shell. But maybe it’s better to wait for feedback from a Mac user.
I really have no clue about Nu on Mac…

So you can’t load the private key using cointoolkit?
I hoped that at least that would work.
If you could load the private key (it’s from a NBT address, right?), it would automatically detect the associated inputs, you could enter an output address (or addresses) and process the transaction.
There’s a guide (https://discuss.nubits.com/t/cointoolkit-flot-guide-and-changelog/3108) for the cointoolkit that was mainly made for dealing with multisig addresses, but singlesig addresses should work as well - as far as I can tell.

I don’t see any deamon on the mac version. At least, mine 2.0.3 Beta.

Cointoolkit detects correctly inputs amounts (NBT yes), and once I enter an output address (with amount to send), get the raw transaction to sign, on the sign page I get " There is a problem with one or more of your inputs, please check and try again" after loading the right private key though.

If I open your link, click on the “Continue to Sign” button

I’m asked for the key - which I don’t have, but you.
If you put in in the private key there and sign the transaction, you should be able to broadcast it in the next step and transfer the funds to the destination address.

Then I’m left clueless.
There’s only one thing left that I can say helping you. I forgot to mention that earlier and feel quite bad about it.
The link to cointoolkit was trustworthy. There are a lot of people here in the community using it. The person who forked cointoolkit is a member of this community. There are a lot of records here in the forum that report use of the website.
Cointoolkit and the code it uses have been checked - and were considered trustworthy.
I hope you made at least a superficial check of the website integrity.
If you ever meet non benevolent people, this is the type of website that might be suited to scam you…

Many thanks anyway! I really appreciate your help. Yes, I think cointoolkit is trustworthy and for sure checked the website integrity.

1 Like

I hope it is safe to post the screenshot below the line above. cointoolkit should be used by one who knows what he/she is doing.
@CoinGame knows better about the Mac version. Questions related to cointoolkit are better asked to @ttutdxh

I don’t know what could have happened to you Nu wallet, but the screenshot you provide about Cointoolkit basically says that your private key is invalid (I can see the top input field in red), and its value is really short (for what it can be seen from the screenshot) to be a real private key. By the way, in that field you have to input your private key in WIF format.

I suggest you first paste your private key in the verify tab and click verify. Your address, details and pubkey should appear. Then you can copy that WIF private key to the signing tab and sign the transaction you were trying to sign.

Also, as @mhps says, make sure to erase the private details completely when you post screenshots. For example in that last one we can see the bottom of the private key input field, that is a huge risk for you. Someone can calculate the characters with only that bottom line of pixels and stole your NBT. The good news though is that it is too short to be valid.

1 Like

Actually, the private key on the screenshot is voluntary wrong and hidden, no worries. (it only showed a non-signed transaction)

I finally got back my funds with command repairwallet and after waiting that Nu loads all blocks, I guess. This way, the balance was finally correct. I think that the reason why I could not used the toolkit was that my key was already imported in the wallet. Then, the transactions sent was in really not broadcasted to the network and that’s why I was allowed to partially sent funds shared within many shorts transactions. So I didn’t really understand what the hell was going on… Anyway, there is finally no losses

1 Like

Glad to read that everything finally panned out!