Advice and answers from the BitPay Team

This is a bit advanced but if you follow the directions carefully, anyone can do this:


  • You've sent funds to a Bitcoin Core receiving address and then discovered that Bitcoin Core is NOT the wallet that you really want to use. Either because it takes a better part of a week to sync the blockchain and use your funds or you just don't like the wallet.
  • You don't want to wait for a full synchronization of the blockchain before transferring your funds
  • Here's the procedure in a nutshell:Install a new bitcoin wallet (like BitPay)Open bitcoin coreOpen the debug console inside bitcoin coreGather some informationCreate a raw transactionSign the raw transactionBroadcast the raw transaction


  • install a new wallet of choice, we recommend BitPay wallet, Electrum, or even Blockchain.inf
  • open a blank text file (in Notepad or TextEdit), we will be using this as a scratch pad
  • cut and paste a RECEIVING address from your new wallet. It is essential that this address be a receiving address from your NEW wallet
  • open bitcoin core (it is ok if it is not sync'ed) 
  • find the address that had funds sent to it, you might only have a few addresses under the "Receive" section of bitcoin core. Those addresses might show up as "Recent payments history". You want to double click on each entry, then click "copy address" and visit this web address: Paste each address into Insight to see if there are any unspent transactions to it. Unspent transactions is money that was sent to you that you haven't re-spent to someone else.  Note, that the "(U)" means "Unspent" and "(S)" means "Spent". A spent output has another bitcoin transaction that came later that used that output as an input. The following screenshot will show you what an unspent transaction output looks like:
  • if you found an address from your receiving window that has unspent funds, then proceed.
  • copy and paste the transaction id of the transaction that has your unspent funds into your scratch file. Also note which output in the transaction has your funds and the amount of bitcoin in the scratch file (see the screenshot above) 
  • now, we need to get a piece of data from the internet about your last transaction. Go here:
  • click the button that says "load url" and put in:<txid>   where txid is your transaction id
  • The resulting output in the right pane is what you want. Scroll down to the "vout" section. Look for the vout number (0 or 1 usually). Remember the vout index number is the one from the screenshot of the Insight Block Explorer above. If the output with your address and bitcoin amount was the first one listed in the transaction, then your vout is 0. If it was the second one, then your vout is 1 (the numbering is zero-based).  Under the correct vout section (0 or 1 usually) in the JSON viewer look for "scriptPubKey". Under the scriptPubKey section, there is a "hex" section. Copy this to your scratch file along with the what vout your output was. 
  • then again in bitcoin core, go to "Help" > "Debug Window", then click the "Console" tab
  • you should see a white window with a text entry box at the bottom:
  • in this window you are going to enter some commands and gather the output to your scratch text file (see step 2)
  • first we are going to create a "raw transaction" as follows, feel free to cut and paste this line into the small text entry box that has a ">" prompt to the left:createrawtransaction "[{\"txid\":\"f06feed8111dac8eebfd0f64157488e551a2d47f1c6679dbb0e77142c8f75290\",\"vout\":1}]" "{\"myeEsiV66AGaeoL8mQgDzJe8yQfCmNrtSX\":0.07}"BEFORE you paste this line, there are a couple of data items from your scratch file: replace the example txid, "f06feed8111dac8eebfd0f64157488e551a2d47f1c6679dbb0e77142c8f75290" with your transaction id, then replace the vout number 1 with your vout (vout's start at 0, then 1, etc.). Your vout will be 1 or 0, more than likely. Then replace the string, "myeEsiV66AGaeoL8mQgDzJe8yQfCmNrtSX" with your RECEIVING address from your NEW wallet. Be sure to retain the \"'s that surround the strings when replacing. Finally replace the 0.07 with the amount of bitcoin that you wish to send. IMPORTANT!!! This value MUST be slightly less than the total amount that you noted in step 5. The reason for this that you need to include a transaction fee. Here is an example of what to do. If you were sent 1.0 BTC and you want to re-send ALL of that bitcoin away from bitcoin core's wallet, then take 1.0 and subtract a reasonable transaction fee of .0001 BTC (about 4 cents), this leaves .9999 BTC to send. When this string is altered, paste it into the console window and hit "enter". If all goes well, you will get a  long string of characters representing a transaction. Paste this into your scratch text file. (this is an example):01000000019052f7c84271e7b0db79661c7fd4a251e5887415640ffdeb8eac1d11d8ee6ff00100000000ffffffff01c0cf6a00000000001976a914c6d30435b954bc0c245a3b38ff62266abc8744ec88ac00000000If you get an error, you probably removed a quote mark or backslash accidentally. Check over your string carefully and try again.
  • next, we will sign the transaction in preparation for broadcasting it. Copy the following line into the console after changing the key values (like before)signrawtransaction "01000000019052f7c84271e7b0db79661c7fd4a251e5887415640ffdeb8eac1d11d8ee6ff00100000000ffffffff01c0cf6a00000000001976a914c6d30435b954bc0c245a3b38ff62266abc8744ec88ac00000000" "[{\"txid\":\"f06feed8111dac8eebfd0f64157488e551a2d47f1c6679dbb0e77142c8f75290\",\"vout\":1,\"scriptPubKey\":\"76a9146692dcd58018576f4fd8466c70ded8b65520df8d88ac\"}]"the string in the example "01000000019052f7c84271e7b0db79661c7fd4a251e5887415640ffdeb8eac1d11d8ee6ff00100000000ffffffff01c0cf6a00000000001976a914c6d30435b954bc0c245a3b38ff62266abc8744ec88ac00000000" is the transaction that you created in step 13. The txid is the same one that you used in step 13 and also the same one you found in step 5. The vout is the same one that you used in step 13. The scriptPubKey is the one that you found in step 9. Copy that string into the console and hit "enter"If there were no errors, you should have a signed transaction! This was the though part. You just manually created a bitcoin transaction and used your private key to sign it. The output might look something like this: {"hex": "01000000019052f7c84271e7b0db79661c7fd4a251e5887415640ffdeb8eac1d11d8ee6ff0010000006b483045022100ded5b0407db31a8a807ea88200579afaeb3904b37dc59be1e5bd2c13be2bed04022073ea97ebb44182a721ebf610b7276ae8189eeeac43b665310643a8fa28f2c1d80121022a13f9cb0f5d9cf262afb16f7501b5f4eecbc87596189d8bbf4fe15745cc4ad6ffffffff01c0cf6a00000000001976a914c6d30435b954bc0c245a3b38ff62266abc8744ec88ac00000000", "complete": true}Common errors from this part include incorrectly choosing the scriptPubKey, missing a quote mark, or adding spaces in the string where there shouldn't be. In the case of errors, there will be an "errors" section in the output. An "unknown error" is indicative of not choosing the right scriptPubKey.This hex value can be sent directly to the Bitcoin network for inclusion in the blockchain. Copy that into your scratch text file.
  • now,  we need a way to broadcast this transaction without having a connection to the peer-to-peer network directly. Luckily Insight can also broadcast your transaction.
  • You should then see a new incoming transaction in your new wallet
  • You can repeat the process for each address sent to bitcoin core that has unspent outputs.
Did this answer your question?