Bitcoin Forum
September 21, 2018, 08:51:53 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 »  All
  Print  
Author Topic: Trying to get private key from Bitcoin QT core to import addresses into Electrum  (Read 215 times)
jwlBTC
Newbie
*
Offline Offline

Activity: 14
Merit: 1


View Profile
January 25, 2018, 02:50:56 PM
 #1

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
1537563113
Hero Member
*
Offline Offline

Posts: 1537563113

View Profile Personal Message (Offline)

Ignore
1537563113
Reply with quote  #2

1537563113
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
ranochigo
Legendary
*
Offline Offline

Activity: 1540
Merit: 1086


View Profile WWW
January 25, 2018, 03:09:02 PM
 #2

You can't place the signs to enclose the address. Try dumpprivkey 1ADDRESS

Replace 1ADDRESS with your desired address.

Xynerise
Sr. Member
****
Offline Offline

Activity: 280
Merit: 280

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
January 25, 2018, 03:09:46 PM
Merited by achow101 (1)
 #3

Code:
dumpprivkey <1765Qi3z1iFiATjgPCuVXvP2pD7SYuM37o>

Syntax is wrong.

It should be
 
Code:
dumpprivkey 1765Qi3z1iFiATjgPCuVXvP2pD7SYuM37o
instead
jwlBTC
Newbie
*
Offline Offline

Activity: 14
Merit: 1


View Profile
January 25, 2018, 03:57:14 PM
 #4

Thanks very much! that has worked

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

cheers
jwlBTC
Newbie
*
Offline Offline

Activity: 14
Merit: 1


View Profile
January 26, 2018, 09:22:04 AM
 #5

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
mocacinno
Legendary
*
Online Online

Activity: 1344
Merit: 1196


http://www.mocacinno.com


View Profile WWW
January 26, 2018, 09:24:24 AM
 #6

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...

LoyceV
Legendary
*
Online Online

Activity: 1246
Merit: 1971


Let's make Bitcointalk great again!


View Profile WWW
January 26, 2018, 09:30:38 AM
 #7

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.

jwlBTC
Newbie
*
Offline Offline

Activity: 14
Merit: 1


View Profile
January 26, 2018, 09:35:48 AM
 #8

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!
LoyceV
Legendary
*
Online Online

Activity: 1246
Merit: 1971


Let's make Bitcointalk great again!


View Profile WWW
January 26, 2018, 09:41:04 AM
 #9

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.

bob123
Hero Member
*****
Offline Offline

Activity: 686
Merit: 568



View Profile WWW
January 26, 2018, 10:16:13 AM
 #10

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

jwlBTC
Newbie
*
Offline Offline

Activity: 14
Merit: 1


View Profile
January 26, 2018, 10:21:33 AM
 #11

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?
mocacinno
Legendary
*
Online Online

Activity: 1344
Merit: 1196


http://www.mocacinno.com


View Profile WWW
January 26, 2018, 10:24:02 AM
 #12

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.

jwlBTC
Newbie
*
Offline Offline

Activity: 14
Merit: 1


View Profile
January 26, 2018, 10:35:08 AM
 #13

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
}
]
mocacinno
Legendary
*
Online Online

Activity: 1344
Merit: 1196


http://www.mocacinno.com


View Profile WWW
January 26, 2018, 10:39:13 AM
 #14

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 Wink
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!

jwlBTC
Newbie
*
Offline Offline

Activity: 14
Merit: 1


View Profile
January 26, 2018, 11:00:45 AM
 #15

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!
mocacinno
Legendary
*
Online Online

Activity: 1344
Merit: 1196


http://www.mocacinno.com


View Profile WWW
January 26, 2018, 11:10:40 AM
 #16

The technical side of bitcoin can be a bit challenging for new members, don't worry about it Smiley

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)


jwlBTC
Newbie
*
Offline Offline

Activity: 14
Merit: 1


View Profile
January 26, 2018, 11:15:32 AM
 #17

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
mocacinno
Legendary
*
Online Online

Activity: 1344
Merit: 1196


http://www.mocacinno.com


View Profile WWW
January 26, 2018, 12:08:13 PM
 #18

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)

jwlBTC
Newbie
*
Offline Offline

Activity: 14
Merit: 1


View Profile
January 26, 2018, 01:17:08 PM
 #19

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!


mocacinno
Legendary
*
Online Online

Activity: 1344
Merit: 1196


http://www.mocacinno.com


View Profile WWW
January 26, 2018, 01:19:32 PM
 #20

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 Sad (unless i'm missing something here).
Do you remember somebody paying you?

Pages: [1] 2 3 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!