Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: jwlBTC on January 25, 2018, 02:50:56 PM



Title: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 25, 2018, 02:50:56 PM
Hi all,

i am not very tech-savvy but i have tried to follow various instructions including https://en.bitcoin.it/wiki/Transferring_coins_from_Bitcoin-Qt_to_Electrum but i get stuck when trying to dumpprivkey

This is what i have done in bitcoin core:

Click Help -> Debug. Click the Console tab.

getaccountaddress ""

this gave me an address which i tried to get a private key from:

14:02:00       dumpprivkey <1765Qi3z1iFiATjgPCuVXvP2pD7SYuM37o>

14:02:29       Invalid Bitcoin address (code -5)

i then tried to get more addresses:

getaddressesbyaccount ""

which gave me 6 more address

I tried to dumpprivkey with each but got the same message every time

Invalid Bitcoin address (code -5)

I have also tried to do the same thing with addresses i know i have had coins sent to in the past but i get the same problem

The reason i want to do this is that i cannot synchronize the wallet on my computer as i don't have enough space and i think it would take weeks anyway

any advice would be gratefully received and please remember i am fairly stupid so go easy on me!

Thanks


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: ranochigo on January 25, 2018, 03:09:02 PM
You can't place the signs to enclose the address. Try dumpprivkey 1ADDRESS

Replace 1ADDRESS with your desired address.


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: Xynerise on January 25, 2018, 03:09:46 PM
Code:
dumpprivkey <1765Qi3z1iFiATjgPCuVXvP2pD7SYuM37o>

Syntax is wrong.

It should be
 
Code:
dumpprivkey 1765Qi3z1iFiATjgPCuVXvP2pD7SYuM37o
instead


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 25, 2018, 03:57:14 PM
Thanks very much! that has worked

Now to see if i can 'sweep from addresses'!

cheers


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 09:22:04 AM
Hi all, i have another problem :

i have located all the private keys from my bitcoin core wallet and have then created a new Electrum wallet

i have then:

click Wallet -> Private Keys -> Sweep

i have tried to use the private key for 14G3Tr7PAb2L8xZKy2ib7MH9MscXHkQphj

it comes back saying: "no inputs found (note that inputs need to be confirmed)

i have read in this thread someone had the same problem and managed to solve it: https://bitcointalk.org/index.php?topic=2254231.0

"Sorted!
Evidentally I should have been using the "WIF compressed address", and not the "WIF address".
I'm not sure why, but, hey, it works!!"


i don't know what the above means, can anyone help?

thanks


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: mocacinno on January 26, 2018, 09:24:24 AM
Hi all, i have another problem :

i have located all the private keys from my bitcoin core wallet and have then created a new Electrum wallet

i have then:

click Wallet -> Private Keys -> Sweep

i have tried to use the private key for 14G3Tr7PAb2L8xZKy2ib7MH9MscXHkQphj

it comes back saying: "no inputs found (note that inputs need to be confirmed)

i have read in this thread someone had the same problem and managed to solve it: https://bitcointalk.org/index.php?topic=2254231.0

"Sorted!
Evidentally I should have been using the "WIF compressed address", and not the "WIF address".
I'm not sure why, but, hey, it works!!"


i don't know what the above means, can anyone help?

thanks

Well, to tell you the truth, as far as i can tell, electrum is correct: all unspent outputs funding that address HAVE been spent...

The address was funded with transaction 3fae9880f8a3dc9641a24114f5ab2fd502ae47a179478f5b360ee3c9156c1be1, but on 24/07/2013 the unspent output was spent in transaction 56e734f3f5df475f81469a339eb908e8f3e9f941f4ce36cf8d8febc6da24325c

https://blockchain.info/unspent?active=14G3Tr7PAb2L8xZKy2ib7MH9MscXHkQphj&format=html

So, if you try to sweep (or import) the private key belonging to 14G3Tr7PAb2L8xZKy2ib7MH9MscXHkQphj, it's logical electrum will give you an error...


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: LoyceV on January 26, 2018, 09:30:38 AM
i have read in this thread someone had the same problem and managed to solve it: https://bitcointalk.org/index.php?topic=2254231.0

Sorted!
Evidentally I should have been using the "WIF compressed address", and not the "WIF address".
I'm not sure why, but, hey, it works!!
i don't know what the above means, can anyone help?
(quote fixed, please use the quote button so it's obvious you're quoting someone)
This isn't what you need. You can either check all your addresses on an online block explorer, or just try to import all of them into Electrum.

Note that "sweep" means something else than "import": sweep means sending the funds to a new address within Electrum, while import means continuing to use the old address within Electrum.


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 09:35:48 AM
Hi, thanks for your replies

Perhaps i have not managed to extract all my private keys from my wallet and i am therefore not 'sweeping' the correct private key

the thing is, i can see i have a BTC balance in my wallet but i just don't know which address it is attributed to

i have tried sweeping the address it was originally sent to but i get the same error

does the wallet store the coins in a different address to the one that the coins were originally sent to?

If so, how do i know what this address is?

Apologies for my lack of understanding, you help is gratefully received!


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: LoyceV on January 26, 2018, 09:41:04 AM
i can see i have a BTC balance in my wallet but i just don't know which address it is attributed to
Type "listunspent" in the Console.


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: bob123 on January 26, 2018, 10:16:13 AM
the thing is, i can see i have a BTC balance in my wallet but i just don't know which address it is attributed to

If so, how do i know what this address is?

As LoyceV already mentioned, you can use the listunspent command to get all your unspent outputs (all "addresses with coins").
If you, afterwards, want to export your whole wallet you can use the following command: dumpwallet "C:\path_to_your\output_file.txt"



does the wallet store the coins in a different address to the one that the coins were originally sent to?

If you just recieve coins, they will 'stay on the same address'.
But if you are going to send some btc's, your transaction contains 2 output addresses (1 for the reciepent, 1 for your change).
You can read more about the change from BTC transactions here: https://en.bitcoin.it/wiki/Change (https://en.bitcoin.it/wiki/Change)


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 10:21:33 AM
hi, i tried the listunpsent command:


10:20:25

listunspent


10:20:26

[
]

does that mean there are no coins afterall? even though my wallet shows a balance?


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: mocacinno on January 26, 2018, 10:24:02 AM
hi, i tried the listunpsent command:


10:20:25

listunspent


10:20:26

[
]

does that mean there are no coins afterall? even though my wallet shows a balance?

Is your wallet completely synced?
If it is, you can always try "listunspent 0", just to make sure you also include unconfirmed unspent inputs.


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 10:35:08 AM
Hi, no it has not synced yet and i dont have the space which is why i want to use electrum instead

i tried listunspent 0 and it showed a couple of transactions

does that mean they have been sent sent form my wallet some how without me knowing?


[
{
"txid" : "62dc19dfe170b19f8d585b2cdfc68e6dd9f42261258089116c62b238404ab4e7",
"vout" : 0,
"scriptPubKey" : "REMOVED AS I DONT KNOW IF ITS SAFE TO SHOW?",
"amount" : XREMOVEDXX,
"confirmations" : 0
},
{
"txid" : "b916fe303317977033e0ef3ee14ec6cd3a20cd3c2050c257f87118ea2456f591",
"vout" : 1,
"scriptPubKey" : "REMOVED AS I DONT KNOW IF ITS SAFE TO SHOW?",
"amount" : XREMOVEDXX,
"confirmations" : 0
}
]


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: mocacinno on January 26, 2018, 10:39:13 AM
Hi, no it has not synced yet and i dont have the space which is why i want to use electrum instead

i tried listunspent 0 and it showed a couple of transactions

does that mean they have been sent sent form my wallet some how without me knowing?


[
{
"txid" : "62dc19dfe170b19f8d585b2cdfc68e6dd9f42261258089116c62b238404ab4e7",
"vout" : 0,
"scriptPubKey" : "REMOVED AS I DONT KNOW IF ITS SAFE TO SHOW?",
"amount" : XREMOVEDXX,
"confirmations" : 0
},
{
"txid" : "b916fe303317977033e0ef3ee14ec6cd3a20cd3c2050c257f87118ea2456f591",
"vout" : 1,
"scriptPubKey" : "REMOVED AS I DONT KNOW IF ITS SAFE TO SHOW?",
"amount" : XREMOVEDXX,
"confirmations" : 0
}
]


So, your wallet thinks it has 2 unspent outputs available, but since it's not sync'ed, it thinks both of those transactions have 0 confirmations.

In reality, the first unspent output (coming from 62dc19dfe170b19f8d585b2cdfc68e6dd9f42261258089116c62b238404ab4e7, vout 0) is no longer known to most nodes. It was probably never confirmed, and probably got pruned from most node's mempool.

The second transaction was confirmed a while ago, and once your sync process is done, you should be able to spend this unconfirmed output.

Since it's vout 1, 1F6kQA5wFyx7uRxho3Xz3PMYRGhetdcjMt  should be the funded address belonging to your wallet. You could try to dump the private key for this address, or like bob123 already said: dump the whole wallet at once ;)
BTW: if the problem forcing you to switch to an SPV wallet is space restrictions, i probably wouldn't sweep those addresses, just create a new wallet, and use the private keys to restore the wallet, that way, you won't have to spend BTC to pay the fees for the sweeping transaction (look at LoyceV's post for more info)

regarding the first unspent output, if i were you, i'd try to, i'd try to execute this command:
getrawtransaction 62dc19dfe170b19f8d585b2cdfc68e6dd9f42261258089116c62b238404ab4e7

Once you have the raw transaction, you should be able to rebroadcast it... However, there is a realistic chance the sender has re-used to unspent output used in this "forgotten" transaction to create a new transaction. If this new transaction confirmed, you've basically lost the unspent output.

Good luck!


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 11:00:45 AM
thanks mocacinno i have managed to sweep the 2nd transaction and its showing as unconfirmed in my electrum wallet

as for the 1st transaction i am very confused

is it a transaction i tried to send from my QT wallet to another address in the past?

If so, and it failed, should it not still be in my wallet?

i cannot work out what the private key is for that transaction

if i do as bob123 says will i get all the private keys?

i don't quite understand this: dumpwallet "C:\path_to_your\output_file.txt"

i guess i need to change it somehow but i am unsure of how

sorry, this is driving me a bit mental!


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: mocacinno on January 26, 2018, 11:10:40 AM
The technical side of bitcoin can be a bit challenging for new members, don't worry about it :)

I'll try to answer your questions (i removed the lines that weren're really questions):


is it a transaction i tried to send from my QT wallet to another address in the past?
answer: your wallet thinks it controlls one of the unspent outputs generated by this transaction, it could be a transaction you yourself created, in that case it'll be funding a change address. It can also be a transaction generated by a thirth party funding one of your addresses.

i cannot work out what the private key is for that transaction
answer: a private key is used to sign a transaction, but that's not really important right now... What is importing is that you try to get your hands on the raw transaction, so we can examine it and, if possible, rebroadcast it...

if i do as bob123 says will i get all the private keys?
answer: yes

i don't quite understand this: dumpwallet "C:\path_to_your\output_file.txt"
answer: it's a command you should execute from the debug console... It'll create a textfile, in this case on your c-drive, in the folder path_to_your, the textfile will be named output_file.txt. The file will include (amongst other things) all private keys for all addresses ever generated (+100 pregenerated keys)



Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 11:15:32 AM
thanks for stickign with me!

ok, i tried this


11:12:40

dumpwallet "C:\path_to_your\output_file.txt"


11:12:40

Method not found (code -32601)

i though maybe i should change it:


11:10:09

dumpwallet "C:\Users\james\Desktop\output_file.txt"


11:10:09

Method not found (code -32601)

so not sure what i am doing wrong there

I did the rawtransaction thing and got a big load of letters and numbers

what should i do with that and what effect will me doing it have?

thanks again for all your help!

i have to go out for a while now so will check back in a but

cheers


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: mocacinno on January 26, 2018, 12:08:13 PM
thanks for stickign with me!

ok, i tried this


11:12:40

dumpwallet "C:\path_to_your\output_file.txt"


11:12:40

Method not found (code -32601)

i though maybe i should change it:


11:10:09

dumpwallet "C:\Users\james\Desktop\output_file.txt"


11:10:09

Method not found (code -32601)

so not sure what i am doing wrong there

I did the rawtransaction thing and got a big load of letters and numbers

what should i do with that and what effect will me doing it have?

thanks again for all your help!

i have to go out for a while now so will check back in a but

cheers

Ok, first things first: the dumpwallet problem: there are only 2 options that come to my mind:
1) are you entering the command in the correct window (help => debug window => console)
2) are you using a version prior to 0.9.0? (https://bitcoin.org/en/release/v0.9.0)

To answer the second question:
those letters and numbers are normal, it's probably the raw, signed transaction. Could you post or PM this signed transaction? It's not a security thread to do so, the signed transaction should have been broadcasted to the network to begin with (and in all fairness: the odds are really big that it actually was broadcasted at some point, the odds are just rather big that it was broadcasted so long ago that it is now forgotten by most nodes of the network)


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 01:17:08 PM
hi, i am using v0.8 - i had not opened it for 3 years!

i tried the dump wallet again:


13:13:28

dumpwallet C:\Users\james\Desktop\output_file.txt


13:13:44

Method not found (code -32601)

here is the raw transaction:

13:16:09

getrawtransaction 62dc19dfe170b19f8d585b2cdfc68e6dd9f42261258089116c62b238404ab4e7


13:16:21

01000000013b42e0e07791116ade1c1dac98f0aa7d25d2beca59575827c562b579603cc64f01000 0006b483045022100d7941f5c8ae049ae6ff3f52839f6856dca6ff615ba374a05470d81affab794 1b02201eb51600cb26ecf6c7462f286efc1c8197d2180d4d4ca36511c004cce5445e98012102f3c b1e7405969a9bff0654ee2f6251edff6d881af90bc1ee9c242e1c011d7ca3ffffffff0259af8a08 000000001976a9143bb1574c54e3ce0abf20da59edc15cf49bd3bf4488ac40420f0000000000197 6a91434dcaea586fdaf251ec7460a79201374a490f62b88ac00000000


thanks again!




Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: mocacinno on January 26, 2018, 01:19:32 PM
hi, i am using v0.8 - i had not opened it for 3 years!

i tried the dump wallet again:


13:13:28

dumpwallet C:\Users\james\Desktop\output_file.txt


13:13:44

Method not found (code -32601)

here is the raw transaction:

13:16:09

getrawtransaction 62dc19dfe170b19f8d585b2cdfc68e6dd9f42261258089116c62b238404ab4e7


13:16:21

01000000013b42e0e07791116ade1c1dac98f0aa7d25d2beca59575827c562b579603cc64f01000 0006b483045022100d7941f5c8ae049ae6ff3f52839f6856dca6ff615ba374a05470d81affab794 1b02201eb51600cb26ecf6c7462f286efc1c8197d2180d4d4ca36511c004cce5445e98012102f3c b1e7405969a9bff0654ee2f6251edff6d881af90bc1ee9c242e1c011d7ca3ffffffff0259af8a08 000000001976a9143bb1574c54e3ce0abf20da59edc15cf49bd3bf4488ac40420f0000000000197 6a91434dcaea586fdaf251ec7460a79201374a490f62b88ac00000000


thanks again!




Like i tought, dumpwallet was introduced in v0.9.0, you could either upgrade, or export the private keys one by one (in your case, only 1 or 2 will be needed anyways).

EDIT:
I've decoded the raw transaction, and vout 0 is funding address 16SdKBs1i1i79uPg9T1iT7WnMdBvFrP4iM with a value of 143306585 satoshi's (1.4 BTC).
The problem is that the input of this forgotten transaction comes from transaction 4fc63c6079b562c527585759cabed2257daaf098ac1d1cde6a119177e0e0423b, this transaction is, in itself, unconfirmed and pruned.
I already checked my node, but i couldn't get the raw transaction 4fc63c6079b562c527585759cabed2257daaf098ac1d1cde6a119177e0e0423b, if you find this raw, signed transaction somewhere, and it uses only unspent outputs from confirmed transactions, and those outputs haven't been double spend, we can try to rebroadcast 4fc63c6079b562c527585759cabed2257daaf098ac1d1cde6a119177e0e0423b, then rebroadcast 62dc19dfe170b19f8d585b2cdfc68e6dd9f42261258089116c62b238404ab4e7 , but in all fairness, chances are getting slim at recovering this 1.4 BTC

In other words, i think you've lost 1,4 BTC :( (unless i'm missing something here).
Do you remember somebody paying you?


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 01:59:03 PM
Hi, i am not sure i should post this publicly so thoguht i would PM you if thats ok

i have exported the entire history of my wallet

Confirmed   Date   Type   Address   Amount   ID
FALSE   2018-01-26T10:47:16   Sent to   1MD9ARDM2yMJWK35krRnknNB7XGXVbRQnU   -0.01893046   2294cb80792a03cb6255961b6908b8254569a77c519eca460c197a49fd3f94e5-000
TRUE   2018-01-14T09:51:21   Sent to   15pWWFAPC7xGsTHNhaWcicRADnRGf63p1P   -0.0105   62dc19dfe170b19f8d585b2cdfc68e6dd9f42261258089116c62b238404ab4e7-000
TRUE   2018-01-13T21:04:04   Sent to   12uYtCkeNxMrJRrV5wfZhUCdDiJ79UA2mz   -0.1005   4fc63c6079b562c527585759cabed2257daaf098ac1d1cde6a119177e0e0423b-000
TRUE   2018-01-13T12:09:06   Sent to   1LccZXvhsMPHbKYMk2kGXxLYdo4piJNWGM   -0.0105   75312e248dba6e72b25d35e2df618aca5cbc43b72680922cd6c7264ac9cb4bdf-000
TRUE   2018-01-12T16:23:05   Sent to   16FHEPFYMiZ6eYnu3Mn6xQJrV88ctXHwYW   -0.01   831498f8ee2c210182b65862a51c931723e43122b019d20ab3bc6474fe2d5085-000
TRUE   2018-01-12T15:39:39   Sent to   16NsQfXHt93v88eS3Gt89KTQDMHsHdZm5Y   -0.0105   b916fe303317977033e0ef3ee14ec6cd3a20cd3c2050c257f87118ea2456f591-000
TRUE   2014-03-28T15:50:22   Sent to   15EC9F1PtcaJYAZhCRNqfMmB4qoFC4oCQ7   -0.0015   646b9f0b3da6daa9e960c6432f2fa35fe470ed15f5743a5cb7f04f7cfbfe1baa-000
TRUE   2013-11-13T19:53:39   Sent to   1FsdYR2AMwAxajx8SWExCvmGmQeUr5w9NE   -0.03474039   9732bc17cd2d3468a1af8e3c3f83a67e87e45b865f10dcc8e15904e1c80da955-000
TRUE   2013-08-30T16:49:06   Sent to   16GkT88ZPcRdsqSM4Bnd7exweRWDekJntV   -0.1185   d50f99784e8bf9fe2e1a504cf7c1074e08ac7de27a84769e19ca96cf095a917c-000
TRUE   2013-08-30T16:17:29   Sent to   1DQWptH63n35hU2LksPNU28CKrpLyCAnb   -0.13659029   2f87f095450b7427e1349e2bcd547d84da4fec01d01beb91cc7244c3d3e2abe3-000
TRUE   2013-07-24T09:05:18   Sent to   1CzyB8ja1EKvBNYEenHMcRh57DNakFQvLj   -0.17153829   56e734f3f5df475f81469a339eb908e8f3e9f941f4ce36cf8d8febc6da24325c-000
TRUE   2013-07-11T09:34:56   Sent to   1MJqiqJixPAF11RmUEEAxGbf6wnUEvoHoT   -0.43735742   5c58d346217aacc10e74c430ffc87863969a1522cc761d2be08ddbe11b00518d-000
TRUE   2013-07-10T12:52:46   Sent to   1HqWcLB86YQdrGWYKhfVoqo6zFqGXtyvvb   -0.2122773   70bb3f3aac2c44c17c0464ac754c3782af63fc55b1e2095affa074f18dec4180-000
TRUE   2013-06-14T15:27:38   Received with   14G3Tr7PAb2L8xZKy2ib7MH9MscXHkQphj   0.20246875   3fae9880f8a3dc9641a24114f5ab2fd502ae47a179478f5b360ee3c9156c1be1-000
TRUE   2013-06-14T15:09:15   Sent to   1EEbWG1ckF9FGPjL4FSM1wQJryv3pApmAT   -0.20296875   83e7b0b792ec52e144adf74a3a68892202863955f3fde8bb8f9619c3e8a06a06-000
TRUE   2013-05-14T16:41:20   Received with   12zMmbzU5VrfdsjqpN5gnwNt65kJW7HaKb   2.707   422c742829cc69aca4767536f659a7efbc5d88e5b58a3c52a425425240e2d17e-000

i am getting very confused to tell the truth

my wallet says i have a balance of 1.43306585 BTC

as you can see from the transaction history nothing much has come or gone since 2013


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: ranochigo on January 26, 2018, 02:02:12 PM
-Snip-
Your client is not synchronized. If it isn't synchronized, it would only display the correct transactions up to the point for which it is synchronized to. Your transaction was probably dropped by the mempool a long time ago and you can't use that input without first broadcasting the related transaction(s) on the network which is also likely impossible to get.


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 02:11:49 PM
oops, i posted publicly, oh well, hopefully thats ok

so does that mean i have lost the 1.4 BTC? how can that be?


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: mocacinno on January 26, 2018, 02:13:57 PM
Things actually start to become rather clear to me...

You started by funding your wallet using tx 422c742829cc69aca4767536f659a7efbc5d88e5b58a3c52a425425240e2d17e (2.707 BTC) and also with a second transaction funding it with ~0.2 BTC.
Then you made a series of payments,... The change was always sent back to a change address.
You sent ~1.48 BTC to several addresses, minus the fees... So the change sent to your change address in the last transaction you created should have been around ~1.4 BTC :).

SOOOO... long story short, i think the last transaction(s) you created didn't get included into a block... The person you were paying wasn't payed, but if you'd wait untill your wallet would synchronise, your balance should indeed be ~1.4 BTC, your wallet will probably rebroadcast the transactions that were dropped from the mempool to... Fixing about everything.

In your case, it might be a wise idear to install bitcoin core 0.9 or higher, copy your wallet.dat in the bitcoin data folder, dump your wallet, import all private keys into electrum and pay the person you were going to pay with those dropped transactions.
If you don't want to do this, you should export the private key belonging to the change address of the last transaction that was confirmed...


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 02:18:48 PM
so there is some hope?

i dont have space to synchronize my wallet so do i need to get an external harddrive or something?

sorry, i know nothing!



Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: mocacinno on January 26, 2018, 02:22:27 PM
so there is some hope?

i dont have space to synchronize my wallet so do i need to get an external harddrive or something?

sorry, i know nothing!



Not really, i think you should copy your wallet.dat on a thumbdrive, install a more recent version of bitcoin core that supports dumpwallet on a second PC, copy the wallet.dat to the bitcoin datadir on this second pc, then (without waiting for the full synchronisation) dump the private keys, and import them into electrum.

there are (much) faster ways of achieving this, but by using a secondary pc and a copy of your wallet.dat, you minimise the odds of an error.

To be honest, i didn't have the energy to crawl trough all those transactions and find out which inputs were used and which outputs were generated, nor did i have the energy to crossreference everything with the addresses you posted, so there's a chance i'm completely wrong... But the numbers do add up to support my hypothesis


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 02:28:40 PM
sorry, i missed the last part of your last reply

i will try and do that on another computer with more space

thanks so much, i will let you know if works!


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: mocacinno on January 26, 2018, 02:30:31 PM
sorry, i missed the last part of your last reply

i will try and do that on another computer with more space

thanks so much, i will let you know if works!

The idear of using a second computer is just to minimize the odds of a messup... The second computer doesn't have to have more space, you don't need to wait untill core is fully synce'd to dump the wallet, or a more recent version of bitcoin core can also be run in pruned mode so you'd only need about ~10Gb of diskspace.

Just make sure you use a COPY of your wallet.dat, and make sure you keep an original copy of the wallet.dat in a safe place. Things might go wrong, but as long as you have an untouched copy of your wallet.dat, all problems should be fixable.

EDIT:
rather important sidenode: AFTER you've moved your funds to a clean wallet, hold on to those private keys, they can be used to import into a bitcoin cash wallet, a bitcoin gold wallet, dig for clams,... An address funded with +1BTC before the blockheigts on which these altcoins forked is holding hundreds of USD (in fiat value) worth of altcoins on alternative blockchains!


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: LoyceV on January 26, 2018, 02:39:46 PM
TRUE   2018-01-13T12:09:06   Sent to   1LccZXvhsMPHbKYMk2kGXxLYdo4piJNWGM   -0.0105   75312e248dba6e72b25d35e2df618aca5cbc43b72680922cd6c7264ac9cb4bdf-000
~
as you can see from the transaction history nothing much has come or gone since 2013
This address had transactions 2 days ago (https://blockchain.info/address/1LccZXvhsMPHbKYMk2kGXxLYdo4piJNWGM) (in and out!). How did that happen if your wallet isn't synchronized? Did you import this address' private key into Electrum already?


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 02:45:50 PM
sorry, i missed the last part of your last reply

i will try and do that on another computer with more space

thanks so much, i will let you know if works!

The idear of using a second computer is just to minimize the odds of a messup... The second computer doesn't have to have more space, you don't need to wait untill core is fully synce'd to dump the wallet, or a more recent version of bitcoin core can also be run in pruned mode so you'd only need about ~10Gb of diskspace.

Just make sure you use a COPY of your wallet.dat, and make sure you keep an original copy of the wallet.dat in a safe place. Things might go wrong, but as long as you have an untouched copy of your wallet.dat, all problems should be fixable.

EDIT:
rather important sidenode: AFTER you've moved your funds to a clean wallet, hold on to those private keys, they can be used to import into a bitcoin cash wallet, a bitcoin gold wallet, dig for clams,... An address funded with +1BTC before the blockheigts on which these altcoins forked is holding hundreds of USD (in fiat value) worth of altcoins on alternative blockchains!

thanks, i will make sure to do that

i bet i will struggle with it all though! thanks again


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 02:55:28 PM
TRUE   2018-01-13T12:09:06   Sent to   1LccZXvhsMPHbKYMk2kGXxLYdo4piJNWGM   -0.0105   75312e248dba6e72b25d35e2df618aca5cbc43b72680922cd6c7264ac9cb4bdf-000
~
as you can see from the transaction history nothing much has come or gone since 2013
This address had transactions 2 days ago (https://blockchain.info/address/1LccZXvhsMPHbKYMk2kGXxLYdo4piJNWGM) (in and out!). How did that happen if your wallet isn't synchronized? Did you import this address' private key into Electrum already?

i dont know how that has happened, i sent them as tests over a week ago and they dropped into my coinbase account 2 days ago, i did not import the private keys

i am completely baffled!


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 04:14:58 PM
back for some more questions i am afraid

i have located the file on my PC

C:\Users\james\AppData\Roaming\Bitcoin

i have installed bitcoin core and it is running on my mac but no bitcoin folder has been created here:

~/Library/Application Support/Bitcoin

I have tried the same thing on another PC in the house and the same issue exists - no bitcoin folder in which to find and swap the wallet.dat file

i dont have to wait for it to sync for it to create this folder do i?

cheers


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: mocacinno on January 26, 2018, 04:19:17 PM
back for some more questions i am afraid

i have located the file on my PC

C:\Users\james\AppData\Roaming\Bitcoin

i have installed bitcoin core and it is running on my mac but no bitcoin folder has been created here:

~/Library/Application Support/Bitcoin

I have tried the same thing on another PC in the house and the same issue exists - no bitcoin folder in which to find and swap the wallet.dat file

i dont have to wait for it to sync for it to create this folder do i?

cheers

The data directory seems to be correct

https://en.bitcoin.it/wiki/Data_directory

You can always manually create it if it doesn't exist, or you can start bitcoin-qt with the command line paramater -datadir=<a completely different datadir containing your wallet.dat>


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: ranochigo on January 26, 2018, 04:21:25 PM
back for some more questions i am afraid

i have located the file on my PC

C:\Users\james\AppData\Roaming\Bitcoin

i have installed bitcoin core and it is running on my mac but no bitcoin folder has been created here:

~/Library/Application Support/Bitcoin

I have tried the same thing on another PC in the house and the same issue exists - no bitcoin folder in which to find and swap the wallet.dat file

i dont have to wait for it to sync for it to create this folder do i?

cheers
You do have to run the wallet for the data directory to be created, if you haven't ran it before.

I would really recommend you to just prune the Blockchain on your PC instead of moving it around, a lot less hassle. Can you create a file (not text file) and name it bitcoin.conf. Put the following inside of it:
Code:
 prune=550

The next time you start Bitcoin Core, the blocks will be pruned and the total size of the block files will not exceed 550mb.


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 04:25:38 PM
back for some more questions i am afraid

i have located the file on my PC

C:\Users\james\AppData\Roaming\Bitcoin

i have installed bitcoin core and it is running on my mac but no bitcoin folder has been created here:

~/Library/Application Support/Bitcoin

I have tried the same thing on another PC in the house and the same issue exists - no bitcoin folder in which to find and swap the wallet.dat file

i dont have to wait for it to sync for it to create this folder do i?

cheers

The data directory seems to be correct

https://en.bitcoin.it/wiki/Data_directory

You can always manually create it if it doesn't exist, or you can start bitcoin-qt with the command line paramater -datadir=<a completely different datadir containing your wallet.dat>

sorry, what i am saying is that no Bitcoin directory has been created at all on my MAC

it should be here - ~/Library/Application Support/Bitcoin but there is no /bitcoin folder


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: mocacinno on January 26, 2018, 04:27:50 PM
back for some more questions i am afraid

i have located the file on my PC

C:\Users\james\AppData\Roaming\Bitcoin

i have installed bitcoin core and it is running on my mac but no bitcoin folder has been created here:

~/Library/Application Support/Bitcoin

I have tried the same thing on another PC in the house and the same issue exists - no bitcoin folder in which to find and swap the wallet.dat file

i dont have to wait for it to sync for it to create this folder do i?

cheers

The data directory seems to be correct

https://en.bitcoin.it/wiki/Data_directory

You can always manually create it if it doesn't exist, or you can start bitcoin-qt with the command line paramater -datadir=<a completely different datadir containing your wallet.dat>

sorry, what i am saying is that no Bitcoin directory has been created at all on my MAC

it should be here - ~/Library/Application Support/Bitcoin but there is no /bitcoin folder

Like i said: you can always manually create one and put the copy of your wallet.dat in it, or you can put the wallet.dat in any other folder on your machine, and use the -datadir startup parameter.


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 04:37:08 PM
back for some more questions i am afraid

i have located the file on my PC

C:\Users\james\AppData\Roaming\Bitcoin

i have installed bitcoin core and it is running on my mac but no bitcoin folder has been created here:

~/Library/Application Support/Bitcoin

I have tried the same thing on another PC in the house and the same issue exists - no bitcoin folder in which to find and swap the wallet.dat file

i dont have to wait for it to sync for it to create this folder do i?

cheers

The data directory seems to be correct

https://en.bitcoin.it/wiki/Data_directory

You can always manually create it if it doesn't exist, or you can start bitcoin-qt with the command line paramater -datadir=<a completely different datadir containing your wallet.dat>

sorry, what i am saying is that no Bitcoin directory has been created at all on my MAC

it should be here - ~/Library/Application Support/Bitcoin but there is no /bitcoin folder

Like i said: you can always manually create one and put the copy of your wallet.dat in it, or you can put the wallet.dat in any other folder on your machine, and use the -datadir startup parameter.

sorry, i see what you have said now, its all way above my level of understanding so i am struggling to understand much!

i will have a look at that


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 04:43:11 PM
OMG i think i have done it!!

thanks mocacinno this worked:

If you don't want to do this, you should export the private key belonging to the change address of the last transaction that was confirmed...

I looked at the transaction, found the 'change address', dumped the private key for that and then went to electrum and did a sweep and its now showing as an unconfirmed transaction

the other address i swept earlier how now confirmed so hopefully this one will do the same

can i buy you a beer seeing as its friday night?



Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: mocacinno on January 26, 2018, 04:48:41 PM
OMG i think i have done it!!

thanks mocacinno this worked:

If you don't want to do this, you should export the private key belonging to the change address of the last transaction that was confirmed...

I looked at the transaction, found the 'change address', dumped the private key for that and then went to electrum and did a sweep and its now showing as an unconfirmed transaction

the other address i swept earlier how now confirmed so hopefully this one will do the same

can i buy you a beer seeing as its friday night?



I'm glad it worked, a tip isn't really necessary. That being said: i'm certainly happy when i receive a small tip.
My tipping address is in my profile, it's the same address for bitcoin and bitcoin cash (since you found the private key for your bitcoin address, and you swept the unspent outputs, you can safely import the private key in the electrum wallet for bitcoin cash and spend those BCH to ;)... Well, wait untill the sweeping transaction is confirmed just to be sure.


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 26, 2018, 04:53:02 PM
OMG i think i have done it!!

thanks mocacinno this worked:

If you don't want to do this, you should export the private key belonging to the change address of the last transaction that was confirmed...

I looked at the transaction, found the 'change address', dumped the private key for that and then went to electrum and did a sweep and its now showing as an unconfirmed transaction

the other address i swept earlier how now confirmed so hopefully this one will do the same

can i buy you a beer seeing as its friday night?



I'm glad it worked, a tip isn't really necessary. That being said: i'm certainly happy when i receive a small tip.
My tipping address is in my profile, it's the same address for bitcoin and bitcoin cash (since you found the private key for your bitcoin address, and you swept the unspent outputs, you can safely import the private key in the electrum wallet for bitcoin cash and spend those BCH to ;)... Well, wait untill the sweeping transaction is confirmed just to be sure.

cool, i will send a little bitcoin cash to the address in your profile then

is it safe to install the electrum cash wallet on the same machine? i have read you should empty your electrum wallet and do it on another machine. maybe thats over cautious?


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: mocacinno on January 26, 2018, 05:00:38 PM
OMG i think i have done it!!

thanks mocacinno this worked:

If you don't want to do this, you should export the private key belonging to the change address of the last transaction that was confirmed...

I looked at the transaction, found the 'change address', dumped the private key for that and then went to electrum and did a sweep and its now showing as an unconfirmed transaction

the other address i swept earlier how now confirmed so hopefully this one will do the same

can i buy you a beer seeing as its friday night?



I'm glad it worked, a tip isn't really necessary. That being said: i'm certainly happy when i receive a small tip.
My tipping address is in my profile, it's the same address for bitcoin and bitcoin cash (since you found the private key for your bitcoin address, and you swept the unspent outputs, you can safely import the private key in the electrum wallet for bitcoin cash and spend those BCH to ;)... Well, wait untill the sweeping transaction is confirmed just to be sure.

cool, i will send a little bitcoin cash to the address in your profile then

is it safe to install the electrum cash wallet on the same machine? i have read you should empty your electrum wallet and do it on another machine. maybe thats over cautious?

Personally, i have many machines running, i chose to use a different machine for electron cash just to be sure, so i can't really comment on this (sorry)


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: LoyceV on January 26, 2018, 07:53:23 PM
is it safe to install the electrum cash wallet on the same machine? i have read you should empty your electrum wallet and do it on another machine. maybe thats over cautious?
The safe approach is not trusting it, and taking precautions. You're talking about large amounts of money, so being very careful doesn't hurt.
I don't trust Electron Cash on my system (note the correct spelling, many phishing sites try to give you compromised wallets!), so I use it in a VM (https://www.virtualbox.org) just to be sure. It worked fine without problems though.
The real site: Electron Cash (https://electroncash.org/).


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 28, 2018, 08:04:18 PM
I am back again with another query

i am trying to claim my BCH from this old wallet but every time i try and sweep the private keys i have it says 'no input found'

i have tried using the 2 private keys i successfully swept for BTC in my new  electrum wallet but got the same result

are they not the correct keys? do i need to find some others?

thanks


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: TryNinja on January 28, 2018, 08:19:49 PM
I am back again with another query

i am trying to claim my BCH from this old wallet but every time i try and sweep the private keys i have it says 'no input found'

i have tried using the 2 private keys i successfully swept for BTC in my new  electrum wallet but got the same result

are they not the correct keys? do i need to find some others?

thanks
If you successfully swept BTC from them, then the private-keys are valid (the same private-key is valid for BTC and BCH).

My guess is that there is no BCH in the wallet, so there is no inputs to spend. Did you make sure the address isn't empty by searching them in a BCH explorer[1]?

[1] https://blockdozer.com/insight/

If the addresses aren't empty, import them in a Electron Cash wallet and see if there is any balance. Then, try to spend them normally.


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: Thirdspace on January 28, 2018, 08:58:19 PM
I am back again with another query

i am trying to claim my BCH from this old wallet but every time i try and sweep the private keys i have it says 'no input found'

i have tried using the 2 private keys i successfully swept for BTC in my new  electrum wallet but got the same result

are they not the correct keys? do i need to find some others?

thanks

in this transaction https://blockchain.info/tx/9732bc17cd2d3468a1af8e3c3f83a67e87e45b865f10dcc8e15904e1c80da955
you're sending to 1FsdYR2AMw... and 1PXpkd9fd... and I believe your address is 1PXpkd9fd...
try importing the key for 1PXpkd9fd... it should have balance in that address on BCH chain


Title: Re: Trying to get private key from Bitcoin QT core to import addresses into Electrum
Post by: jwlBTC on January 28, 2018, 09:24:24 PM
thanks third space, that did it!