Bitcoin Forum

Bitcoin => Electrum => Topic started by: ApproximateSunlight on December 09, 2017, 12:47:13 AM



Title: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: ApproximateSunlight on December 09, 2017, 12:47:13 AM
I see all over this forum that people are charging a lot of money (up to 100$/hour, that’s ridiculous) to recover your wallet and you even have to give them private keys so you can be scammed or if not, they can get your next coin because of forks. The Bitcoin community helps each other.
The process to extract Bitcoin Gold from a 2fa Electrum wallet is very simple, don’t be scared from codes etc, everyone is able to do that, but it needs time and patience and you just need a simpler guide which I’ll provide you, let’s start.



First, we need to disable 2fa.
On Electrum go to File->New/Restore
Call it: “2fa disabled
Select “Wallet with two-factor authentication”
Select I already have a seed
Insert your 12 words seed
Now, when it asks if you want to keep 2fa Trusted Coin select no
Here we are, you have a wallet with 2fa disabled wallet (you will see 2fa on the top but don’t worry)


Now, let’s create a note on the desktop, let’s call it “BTG.txt
Open it and paste this pastebin: https://pastebin.com/3LzufK6A
This is our txt now: https://i.imgur.com/SOigtZN.png
Now let’s see how to fill these spaces.



x1/ xprv and x2/ xprv:
Ok, go to C:\Users\User\AppData\Roaming\Electrum\wallets and open with block note the file “2fa disabled.dat” or whatever you called it (the wallet we just generated without 2fa)
Go full screen, go to the bottom of the note, you will see this:
https://i.imgur.com/L0NxPu0.png
Copy x1/ xprv and paste it in that note we created from pastebin
Copy x2/ xprv and paste in that note
Ok we have them, close 2fadisabled.dat, we have done with it.



Address:
Ok, now, in Electrum select View->Show Addresses, go to Addresses Tab and select “Receiving” and “Used”, ok now we take care only of “Receiving” and not “Change” addresses, we’ll take care of them afterwards (check the spoiler at the bottom of the tutorial*), one thing at a time.
Let’s do one address at a time, right click the first address, copy, and paste it in the note.



Transaction ID:
Then paste it here: https://btgexplorer.com we will see all the BTG balance in “Final Balance” and all the transactions.
Ok this is the first difficult part, we have to identify all the transactions ID we need to take care of, let’s suppose it’s only one transaction ID, I’ll explain afterwards separately too (check second spoiler at the bottom) if you have more than one transaction ID to keep the tutorial simpler and more orderly as possible.
Go to the previous note, paste the first transaction ID in the transaction ID space (make sure it has a “U” that means Unspent). I’ll try to explain this in this picture, I hope it’s clear (simplest way I can explain): https://i.imgur.com/EltO5QN.png
Ok now copy the transaction ID and paste it in the note we previously created.
 


Redeem script:
Right click on the address in Electrum, select “Details”, copy and paste the Redeems script of this address in the note.
https://i.imgur.com/7es6PRf.png

Ok we filled the note https://i.imgur.com/SJcgCVY.png with all we need for now.







Let’s proceed.

Open: https://coinb.in/#verify VERY IMPORTANT: use it offline or download it as HTML, right click on the page->Save with name
Paste your redeem script.
You will get 3 addresses that starts with “1”.
https://i.imgur.com/ZXWvPJJ.png
Keep this page open


Ok now go to https://iancoleman.io/bip39/ VERY IMPORTANT: use it offline or download it as HTML, right click on the page->Save with name
In "BIP32 Root Key" box paste the x1 /xprv from BTG.txt we created, select “BIP32” and in Client select “Custom derivation path”, in “BIP32 Derivation Path” leave “m/0
https://i.imgur.com/cPfdILb.png


Return to the opened page of coinb.in with redeem script etc
We have 3 addresses, right? Copy one of them, go to iancoleman again and click “CTRL+F” and paste it in search box and see if you can find it in that list, if not, try with the second address in coinb.in and do the same, if nothing with the third.
You will find one of them for sure
Look at here: https://i.imgur.com/am5EtOL.png
Keep this page open

Now, do the same with another address of the two in a new page of iancoleman but this time use the x2 /xprv instead of the x1 /xprv like before.

So, go to https://iancoleman.io/bip39/ (VERY IMPORTANT: use it offline or download it as HTML, right click on the page->Save with name)
In "BIP32 Root Key" box paste the x2 /xprv from BTG.txt we created, select “BIP32” and in Client select “Custom derivation path”, in “BIP32 Derivation Path” leave “m/0”
Use another address from coinb.in, search one of them in the list of address given by iancoleman, and keep this page opened.


Ok now go back to the famous note we created, add this at the bottom: https://pastebin.com/jaRAgMJB

We’ll have this: https://i.imgur.com/4BSS1gx.png

Fill the first “Address 1” space with the first address we matched between coinb.in and iancoleman, and the related private key.
Do the same with “Address 2” with the second address and the related private key.




Now we really have everything to start to sign the transaction.

Open Electrum, select “View”->”Show console”.

Run this command:
Code:
deserialize(gettransaction("TXID_HERE"))
Replace TXID_HERE with the transaction ID (leave the “ “)

You will get something like this: https://i.imgur.com/sKXBZNm.png
Go to the section in the bottom with where it says: "address": "our address",

Ok, now copy all that thing in the note at the bottom.
Now we have the prevout_n, the scriptPubKey, the type and the value of this transaction ID.
Now close Electrum.






We are almost finished, now open Bitcoin Gold Core wallet.
Create a wallet of course, click receive, generate an address in which we will receive our BTG, paste it in a new block note to not get confused.

Ok, go to “Help”->”Debug Window”->”Console"”, now run this command:
Code:
createrawtransaction '[{"txid": "INPUT_TRX_ID", "vout": PREVOUT }]' '{"YOUR_BTG_ADDRESS":  AMOUNT_TO_SEND}'
Replace INPUT_TRX_ID with the transaction ID we have in the note
Replace PREVOUT with prevout_n
Replace YOUR_BTG_ADDRESS with your BTG address
Replace AMOUNT_TO_SEND with the amount in BTC to send (not satoshi as we got, so convert in BTC), minus the fee (from 5 to 30 satoshi/byte is fine)

Quote
P.S. See this if you don’t know which amount to write:
Let’s suppose your “value” of the transaction is 9782200 (we have this in the note, took from Electrum console, remember).
We have it in Satoshi, we have to convert it in Bitcoin with this tool http://satoshitobitcoin.co/
Ok so, 9782200 satoshi is 0.09782200
Go to Electrum, “Tools”->”Preferences” and set this options exactly like this: https://i.imgur.com/6VSb3Zl.png
Now go to “Send” tab, paste the amount in BTC, and it will give you the fee. Subtract this fee from the original amount of BTC and you will have your AMOUNT_TO_SEND



After that Bitcoin Gold Core console will give us a Hex code, copy that on a new block note, this is called “RAW_TRANSACTION_HASH” that we will need for the next command

So, what is the next command?
Code:
signrawtransaction "RAW_TRANSACTION_HASH" '[{"txid": "INPUT_TRX_ID", "vout": PREVOUT, "scriptPubKey": "INPUT_SCRIPT_PUB_KEY", "redeemScript": "REDEEM_SCRIPT", "amount": "INPUT_VALUE_FIELD"}]' '["FIRST_PRIVATE_KEY_FOR_SIGNING"]'

Replace RAW_TRANSACTION_HASH with the hex code we got before
Replace INPUT_TRX_ID with the transaction ID
Replace PREVOUT with prevout_n
Replace INPUT_SCRIPT_PUB_KEY with the scriptPubKey we have in the note aswell
Replace REDEEM_SCRIPT with the redeem script
Replace INPUT_VALUE_FIELD with the amount without fee, so the first one not converted with the fee in BTC, not satoshi (use satoshitobitcoin.co to have the amount in BTC from Satoshi)
Replace FIRST_PRIVATE_KEY_FOR_SIGNING with the first private key of “Address 1” we have in the note

Click enter and you will get another Hex code (ignore the error message), in the block note in which we pasted the previous hex code, delete it and paste the new one.




Guess what? We need this new long Hex code (really long), for another command:
Code:
signrawtransaction "REALLYLONG _RAW_TRANSACTION_HASH" '[{"txid": "INPUT_TRX_ID", "vout": PREVOUT, "scriptPubKey": "INPUT_SCRIPT_PUB_KEY", "redeemScript": "REDEEM_SCRIPT", "amount": "INPUT_VALUE_FIELD"}]' '["SECOND_PRIVATE_KEY_FOR_SIGNING"]'

Replace REALLYLONG_RAW_TRANSACTION_HASH with the hex code we got at latest
Replace INPUT_TRX_ID with the transaction ID
Replace PREVOUT with prevout_n
Replace INPUT_SCRIPT_PUB_KEY with the scriptPubKey
Replace REDEEM_SCRIPT with the redeem script
Replace INPUT_VALUE_FIELD with the amount without fee just like before
Replace SECOND_PRIVATE_KEY_FOR_SIGNING with the second private key of “Address 2” we have in the note




And here we are, we have the final Hex code, this is the signed transaction. Let’s call it “FUCKING_CODE_FOR_FINALLY_SIGNING_THE_FUCKING_TRANSACTION

Now the final (I swear) command:
Code:
sendrawtransaction "FUCKING_CODE_FOR_FINALLY_SIGNING_THE_FUCKING_TRANSACTION"
Replace FUCKING_CODE_FOR_FINALLY_SIGNING_THE_FUCKING_TRANSACTION with the final Hex code

Here you are, you just signed a transaction, check on the BTG Explorer pasting your BTG address to which you sent the transaction to check confirmations.








WHAT TO DO WITH CHANGE ADDRESSES:
Ok I said that this was only for “Change” addresses, let’s discuss about “Change” addresses (https://i.imgur.com/aZ7XHJd.png):

There is only one simple thing that changes:
In the step where we paste the x1 /xprv and the x2 /xprv code in iancoleman website you need to select “m/1” instead of “m/0” in “BIP32 Derivation Path”.
That’s it.










MORE THAN ONE INPUT:
Ok, now let’s talk about address with more than one INPUT, so more than one transaction IDs to take care of.
What do I mean?
https://i.imgur.com/EltO5QN.png
Remember this?
You have to pick all the transaction IDs that has an “U” in parallel.
I take a random address on the internet to show you, I paste it on https://btgexplorer.com
https://i.imgur.com/vaX0FNt.png
As you see this address has more than one input and more than one “Unspent” voices so we take all the transaction IDs that we see.


Now, what we do when we have more than one transaction ID?
The only things that will change are the commands that we will run:
When we run
Code:
deserialize(gettransaction("TXID_HERE"))
in Electrum console, we have to run it once for each transaction ID and copy paste in a new note block each of this for each transaction ID:

prevout_n (remember, vout value)
scriptPubKey
value



Then, when we run in BTG Core Wallet this command:
Code:
createrawtransaction '[{"txid": "INPUT_TRX_ID", "vout": VOUT_VALUE}]' '{"YOUR_BTG_ADDRESS":  AMOUNT_TO_SEND}'

we replace:
Code:
{"txid": "INPUT_TRX_ID", "vout": VOUT_VALUE}
with:
Code:
{"txid": "INPUT_TRX_ID_1", "vout": PREVOUT _1}, {"txid": "INPUT_TRX_ID_2", "vout": PREVOUT_2}, {"txid": "INPUT_TRX_ID_3", "vout": PREVOUT _3}

Add as many
Code:
, {"txid": "INPUT_TRX_ID_X", "vout": VOUT _X}
as many transaction IDs you have.

Then, you have to:
Replace INPUT_TRX_ID_1 with the first transaction ID
Replace PREVOUT_1 with prevout_n of the first transaction ID

Replace INPUT_TRX_ID_2 with the second transaction ID
Replace VOUT_2 with prevout_n of the second transaction ID
And so on



Another thing that change, this time in these 2 commands:
Code:
signrawtransaction "RAW_TRANSACTION_HASH" '[{"txid": "INPUT_TRX_ID", "vout": PREVOUT, "scriptPubKey": "INPUT_SCRIPT_PUB_KEY", "redeemScript": "REDEEM_SCRIPT", "amount": "INPUT_VALUE_FIELD"}]' '["FIRST_PRIVATE_KEY_FOR_SIGNING"]'
Code:
signrawtransaction "REALLYLONG _RAW_TRANSACTION_HASH" '[{"txid": "INPUT_TRX_ID", "vout": PREVOUT, "scriptPubKey": "INPUT_SCRIPT_PUB_KEY", "redeemScript": " REDEEM_SCRIPT", "amount": "INPUT_VALUE_FIELD"}]' '["SECOND_PRIVATE_KEY_FOR_SIGNING"]'


Replace:
Code:
{"txid": "INPUT_TRX_ID", "vout": PREVOUT, "scriptPubKey": "INPUT_SCRIPT_PUB_KEY", "redeemScript": "REDEEM_SCRIPT", "amount": "INPUT_VALUE_FIELD"}
With:
Code:
{"txid": "INPUT_TRX_ID_1", "vout": PREVOUT_1, "scriptPubKey": "INPUT_SCRIPT_PUB_KEY_1", "redeemScript": "REDEEM_SCRIPT", "amount": "INPUT_VALUE_FIELD_1"}, {"txid": "INPUT_TRX_ID_2", "vout": PREVOUT_2, "scriptPubKey": "INPUT_SCRIPT_PUB_KEY_2", "redeemScript": "REDEEM_SCRIPT", "amount": "INPUT_VALUE_FIELD_2"}

Add as many
Code:
, {"txid": "INPUT_TRX_ID_X", "vout": PREVOUT_X, "scriptPubKey": "INPUT_SCRIPT_PUB_KEY_X", "redeemScript": "REDEEM_SCRIPT", "amount": "INPUT_VALUE_FIELD_X"}
And so on, just add a comma, a space and copy paste the rest if you have more than 2 transactions ID.

In this final command you have to:
Replace INPUT_TRX_ID_1 with the first transaction ID
Replace PREVOUT_1 with prevout_n of the first transaction ID
Replace INPUT_SCRIPT_PUB_KEY_1 with the scriptPubKey of the first transaction ID
Replace REDEEM_SCRIPT with the Redeem Script (always the same)
Replace INPUT_VALUE_FIELD_1 with the value of the first transaction ID

Replace INPUT_TRX_ID_2 with the second transaction ID
Replace PREVOUT_2 with prevout_n of the second transaction ID
Replace INPUT_SCRIPT_PUB_KEY_2 with the scriptPubKey of the second transaction ID
Replace REDEEM_SCRIPT with the Redeem Script (always the same)
Replace INPUT_VALUE_FIELD_2 with the value of the second transaction ID






Things to note before doing this
  • For extra security, you have to move your BTC to a new Electrum wallet, do this to protect them in case your seed/private keys get leaked as a result of this process, you should also ensure that all BitcoinCash has been claimed from these private keys aswell, it's strongly recommended! Don't skip this step.
  • You need Bitcoin Gold Core installed and the full blockchain (it will take a while to download but worth it, there is no rush)
  • It’s easy, it seems difficult but it’s only messy and it takes time, if you follow the tutorial precisely step by step you won’t have problems, in case of problems ask here in the thread, there are people willing to help you, including me. You can also ask me in PM and I’ll try to help you, I can give you my Skype, no problem at all, just know that it’s easy, you just need concentration, don't pay anyone to do this, never give your private key of one single address to anyone, neither the seeds, they can steal you coins from other forks even if you empty your wallet and of course BTG/BCH
  • As I already stated in the tutorial in bold, use the tools always offline or save a offline page of them. This is very important too.

Sorry if I wrote this tutorial late, but I couldn’t before, this took really a lot to write, I had time off for the holidays and I took a day to write this, enjoy it and good luck!
If you have suggestion to improve this tutorial, tell me


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: ApproximateSunlight on December 09, 2017, 12:55:03 AM
I know, the formatting sucks, I will adjust it tomorrow, promised, be patient please ;). It's kinda late here, I go to sleep, talk you tomorrow.


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 09, 2017, 03:58:21 AM
Firstly... awesome effort to write this all out! I had considered doing the same... but I'm in a middle of a 4 day rotation of 12 hour shifts so just haven't had time ;)

Secondly, I ran into a situation where a user had asked for my assistance, and they had their BTG spread across multiple inputs on multiple addresses (2 inputs on a receive, 1 input on a change address).

I know it complicates things a little, but have you thought about typing up a section on how to move ALL the inputs from ALL the addresses in ONE transaction? ;)


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: jerry0 on December 09, 2017, 05:31:25 AM
So you basically cannot claim bitcoin gold on a chromebook then right because there isn't enough space?  How much gb does the bitcoin gold care wallet take?  Because wouldn't that mean you need a computer with at least so and so gb?   And thus you not might not even have enough space in your hard drive if thats the case?


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 09, 2017, 07:59:46 PM
A BTG wallet is tiny... maybe 1 megabyte or so... the BTG blockchain however is currently running around 150+ Gigs of storage... but just like BTC, you can store it on an external USB drive. Although I suspect that a chromebook maybe be somewhat slow syncing up as it probably lacks a little in the CPU department.


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: adys11 on December 09, 2017, 09:38:29 PM
Great tutorial, I manged to get to the end, and I learned a lot.

But I get an error:

66: min relay fee not met (code -26)

I can't calc the fee in electrum, its emtpy, so it will not give me the total, only per byte:

https://i.imgur.com/BGOKizL.png

300 sat per byte.
So I gave 50,000 sat fee, to be on the safe side.

now I am getting

16: mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation) (code -26)

Address:
https://btgexplorer.com/address/AG6JFd6GebjuDRCB8SMvjhTqgehXLDRveR (https://btgexplorer.com/address/AG6JFd6GebjuDRCB8SMvjhTqgehXLDRveR)

I did it for this transaction:
a4c64944cfc57822c460436d7fd359bb641cf63e86ba95f50bf5789516bd160b


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 09, 2017, 10:03:04 PM
First up... you don't need a huge fee for BTG... the blocks are almost empty... 5 sats/byte should be more than enough to get a confirmation in next block :P

You can calculate your rough transaction size as: (#inputs * 148) + (#outputs * 34) + 10

That should be fairly close to your final transaction size. So in you case, you'll have one input and should be sending to one address, so your transaction size will be:

(1 * 148) + (1 * 34) + 10 = ~192 bytes... at 5 sats/byte -> 5 * 192 = 960 sats.... or 0.00000960 BTG

The error message you are getting sounds like you are trying to broadcast a transaction that has not been signed by the minimum number of private keys required for the multiSig. Are you sure that you signed your transaction with the 2nd private key?? ???


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Ayms on December 10, 2017, 12:13:21 PM
I would update slightly the above method to mention that the tools links must be used offline (which is: just disconnect from the network when you use them)

The min fees are 1000 satoshis, if you put an amount below nodes will not accept neither relay your transactions, I tried with my bgold client, modified the minfees so it accepts a tx with less than 1000 satoshis and then of course the tx remained stucked in my node (because others just did not accept the tx)

Or you have to find a miner with a client with minfees<1000s that would accept your tx and mine it, which probably is unlikely

Currently modifying https://github.com/Ayms/bitcoin-transactions to handle multisig

The command would be something like:

node tx.js BTG create prevtx= prevaddr= prevamount= previndex= privkey=<privkey1>-<privkey2>-<redeem script>-<two of two> or <two of three> addr= fees=0.00001001

and probably before

node tx.js BTG decode <redeem script> --> gives you the pub keys to find the associated priv keys + two of something info

while it could be simply

node tx.js BTG create prevtx= prevaddr= prevamount= previndex= privkey=<privkey1>-<privkey2> addr= fees=0.00001001

if Electrum made things easy...

But still people have to find the redeem script, the priv keys, so I am wondering if the tool worth the effort, on another hand with the tool :

- you don't have to sync a full node + wallet (most painful part)

- you don't have to make the complicate cli commands above (painful too)

- you don't have to make calculations for the amount and fees (not very difficult but easy to make mistakes)


Opinion?




Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Ayms on December 10, 2017, 09:25:49 PM
See https://github.com/BTCGPU/BTCGPU/issues/238#issuecomment-350555210

Beware, many things are dubious in this tutorial (and in this thread), don't use it or at your own risks


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: ApproximateSunlight on December 10, 2017, 09:34:18 PM
See https://github.com/BTCGPU/BTCGPU/issues/238#issuecomment-350555210

Beware, many things are dubious in this tutorial (and in this thread), don't use it or at your own risks

The method I posted works like a charm, many people, including me, got their BTG with this without any problem, so I don't know what you are talking about but ok, people like to criticize randomly.
You can all stay safe, you can use the tutorial above.
And if you find a simpler and faster way, well, would be great.

P.S. When you say don't move your BTC to a new wallet I hope you are not serious.


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 11, 2017, 01:03:58 AM
The min fees are 1000 satoshis, if you put an amount below nodes will not accept neither relay your transactions, I tried with my bgold client, modified the minfees so it accepts a tx with less than 1000 satoshis and then of course the tx remained stucked in my node (because others just did not accept the tx)
The min fees are 1000 satoshis PER KILOBYTE... which is 1 satoshi/byte

Check this: https://btgexplorer.com/tx/d0edcd2491d5f609125afdd1aa02c6974b9b7c787f98e8f698a2bed57e8ae550

they only paid 0.00000137 BTG or 137 satoshis... it confirmed fine.  :P



Quote
- you don't have to sync a full node + wallet (most painful part)
- you don't have to make the complicate cli commands above (painful too)
- you don't have to make calculations for the amount and fees (not very difficult but easy to make mistakes)
Opinion?
You forgot to mention:
- You have to pay 0.78% to the developer ;)

Seriously tho, I can see how this would be a little easier for some folks who don't want to (or can't) figure out how to use createrawtransaction and signrawtransaction... or don't want to wait a few days to download the BTG blockchain (or don't have the space).



See https://github.com/BTCGPU/BTCGPU/issues/238#issuecomment-350555210
Beware, many things are dubious in this tutorial (and in this thread), don't use it or at your own risks
Can you please expand on what you think is "dubious" exactly? It is easy to make such claims... but I don't see anything obviously wrong with this method. In fact, I have used pretty much the same method at least twice to help different different people "rescue" their BTG from an Electrum 2FA wallet.

Or is it just that you're worried you're not getting your 0.78% cut? ::)



Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Ayms on December 11, 2017, 11:19:31 AM
The 0.78% are clearly mentioned in the git repo, and they are not 10%, 20% or whatever people are claiming to help

At least we can see in both answers that there is an interest for the tool (....(or don't have the space), I would add "and/or the computing capability to sync the chain", that's the most difficult part)

What I find dubious is:

- you don't tell people to use the tools where they put their seeds offline, they are js tools and everything stays local, ok, but you never know, so it does not cost anything to tell them to disconnect when they use them, and to clear everything in their browser after they have used them before they reconnect

- you tell them to "move all their BTC" to another wallet, what does it mean and why?

But indeed pasting a BTC address into btgexplorer.com works (not with btgexp.com) and you get the equivalent BTG address, and yes the 1000s min fees are per kB


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 11, 2017, 01:21:57 PM
- you don't tell people to use the tools where they put their seeds offline, they are js tools and everything stays local, ok, but you never know, so it does not cost anything to tell them to disconnect when they use them, and to clear everything in their browser after they have used them before they reconnect
Huh... to be honest, I didn't even notice that he hadn't included a warning to run all the tools offline. That's pretty much a standard warning! Should definitely be added into the beginning of the Tutorial... in NICE BIG LETTERS ;)


Quote
- you tell them to "move all their BTC" to another wallet, what does it mean and why?
By moving your BTC off the old private keys/seed before you start "exposing" them, you are reducing the possibility of losing your BTC due to your private keys/seed being leaked... only your BTG is potentially at risk (and any other fork coins still on the old private keys).

If ALL the users of mybtgwallet.com had moved their BTC off their private keys/seeds and into new wallets prior to entering the old private keys/seeds into the scam wallet... how much BTC would the scammer have got? 0.0 BTC :P


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: sirmcruz on December 11, 2017, 02:27:31 PM
Hi!

Thanks for all the work, but it did not work for me...

After inserting the final code (with the final hex) i get this message: "Missing inputs (code -25)"

Can you help me please?

Thanks!


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Ayms on December 11, 2017, 04:27:19 PM
@HCP

Yes for the first point, to make things easy the tutorial should just say to disconnect from the internet after you have loaded the tool, and if the tool is not working offline, don't insist and certainly do not use it online

Mybtgwallet stole the private keys and then made transactions both on bitcoin core and bitcoin gold (and bitcoin cash), then people lost everything

I think that you could advise to send your coins first to reduce the possibility of such attack but it's not mandatory, neither very important and can give the strange feeling that I got about the whole thing (not talking about the fact that @approximatesunlight is unknown which does not help to trust a sensitive tutorial)

That's not a technical explaination neither and people deserve to know what they are doing

The only issue I see is that you expose the redeem script (and therefore the public keys), that someone else could replay on bitcoin core to steal you coins

Fortunately, this is not possible, because the signatures are not the same between the two networks and then the attacker would need the two private keys to sign the transaction on bitcoin core, which today is quite unlikely to get (unless you mess up, back to point 1)

So I would modify the tutorial accordingly, I will reference it once multisig is implemented for my tool, to get the keys and the redeem script, and so people can decide what they want to use

Then I will modify my comments on github

Question: I am implementing both, but do you know what is the most used between two of two and two of three? (the rationale of the question is that in the first case you don't need to find the redeem script, not sure if it helps a lot since it looks easy to get it from his wallet)



Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 11, 2017, 09:34:42 PM
Thanks for all the work, but it did not work for me...
After inserting the final code (with the final hex) i get this message: "Missing inputs (code -25)"
This means the "inputs" you are trying to spend, have already been spent in a BTG transaction. Check your addresses on www.btgexplorer.com and make sure that the "Final Balance" is greater than 0.00000000. If it isn't, then that address is empty and does not contain any BTG.


Mybtgwallet stole the private keys and then made transactions both on bitcoin core and bitcoin gold (and bitcoin cash), then people lost everything
And like I said... if those private keys contained NO BTC or BCH before people put them into the scam wallet... would the thief have got 260+ BTC? no... he would only have got the BTG.

Would you rather have lost 0.01 BTG AND 1 BTC+0.1 BCH ... or just 0.01 BTG? ;)


Quote
I think that you could advise to send your coins first to reduce the possibility of such attack but it's not mandatory, neither very important and can give the strange feeling that I got about the whole thing (not talking about the fact that @approximatesunlight is unknown which does not help to trust a sensitive tutorial)

That's not a technical explaination neither and people deserve to know what they are doing
It has been a recommended practice by pretty much EVERYONE since BitcoinCash was announced to have replay protection. Hell, some folks were advocating claiming coins on a completely separate computer/device! In any case, I don't know why moving your coins from one Electrum wallet to a new Electrum wallet with a new seed is such a big deal? ??? (aside from the transaction fees)


Quote
The only issue I see is that you expose the redeem script (and therefore the public keys), that someone else could replay on bitcoin core to steal you coins
You are typing the seed into your computer... and exporting the xprvs for your 2FA wallet in plaintext. In my opinion, that is reason enough to make sure they contain as little value as possible.



Question: I am implementing both, but do you know what is the most used between two of two and two of three? (the rationale of the question is that in the first case you don't need to find the redeem script, not sure if it helps a lot since it looks easy to get it from his wallet)
2FA wallets (which this tutorial is aimed at) is ALWAYS "2-of-3". No idea about MultiSig, but the most common ones seem to be "2-of-3" and "2-of-2".


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: adys11 on December 11, 2017, 11:16:26 PM
First up... you don't need a huge fee for BTG... the blocks are almost empty... 5 sats/byte should be more than enough to get a confirmation in next block :P

You can calculate your rough transaction size as: (#inputs * 148) + (#outputs * 34) + 10

That should be fairly close to your final transaction size. So in you case, you'll have one input and should be sending to one address, so your transaction size will be:

(1 * 148) + (1 * 34) + 10 = ~192 bytes... at 5 sats/byte -> 5 * 192 = 960 sats.... or 0.00000960 BTG

The error message you are getting sounds like you are trying to broadcast a transaction that has not been signed by the minimum number of private keys required for the multiSig. Are you sure that you signed your transaction with the 2nd private key?? ???

Thanks,

I did it again now, its the second address for sure. Same error:
66: min relay fee not met (code -26)

Am I suppose to sign more than one transaction?

https://btgexplorer.com/address/AG6JFd6GebjuDRCB8SMvjhTqgehXLDRveR

I did it for this transaction, am I right?
a4c64944cfc57822c460436d7fd359bb641cf63e86ba95f50bf5789516bd160b


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 12, 2017, 01:34:00 AM
I did it again now, its the second address for sure. Same error:
66: min relay fee not met (code -26)
No... it just sounds like you're not setting the amounts properly... and your "fee" is too low... I'm sent you a PM regarding this.


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: bjohanso on December 12, 2017, 01:39:59 AM

Thank you for writing up this guide.  It is much easier to follow than the other one I found from the folks selling their services to get multisig BTG from BTC.

I'm running into a problem when using https://iancoleman.io/bip39/ to try and use the xprv keys to find the private key for the address from coinb.in.  At the start there are only 20 addresses and keys generated and none of the keys I expect are in the 20, so I generate more rows.  I've now generated about 100,000 addresses and still am not finding any of the three addresses from the coinb.in step.  Do I just need to keep trying more until I find it, or is it likely that I'm doing something wrong?

Thanks for any suggestions!

-Brad


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: bjohanso on December 12, 2017, 01:56:26 AM
Okay, I figured it out.  I was using a "Change" address and forgot to use "m/1" for the derivation path (I didn't read the fine print at the bottom about change addresses).

Now to see if I can get through the rest of it...

-Brad


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Ayms on December 12, 2017, 10:39:44 AM
Thanks for all the work, but it did not work for me...
After inserting the final code (with the final hex) i get this message: "Missing inputs (code -25)"
This means the "inputs" you are trying to spend, have already been spent in a BTG transaction. Check your addresses on www.btgexplorer.com and make sure that the "Final Balance" is greater than 0.00000000. If it isn't, then that address is empty and does not contain any BTG.


Mybtgwallet stole the private keys and then made transactions both on bitcoin core and bitcoin gold (and bitcoin cash), then people lost everything
And like I said... if those private keys contained NO BTC or BCH before people put them into the scam wallet... would the thief have got 260+ BTC? no... he would only have got the BTG.

Would you rather have lost 0.01 BTG AND 1 BTC+0.1 BCH ... or just 0.01 BTG? ;)


Quote
I think that you could advise to send your coins first to reduce the possibility of such attack but it's not mandatory, neither very important and can give the strange feeling that I got about the whole thing (not talking about the fact that @approximatesunlight is unknown which does not help to trust a sensitive tutorial)

That's not a technical explaination neither and people deserve to know what they are doing
It has been a recommended practice by pretty much EVERYONE since BitcoinCash was announced to have replay protection. Hell, some folks were advocating claiming coins on a completely separate computer/device! In any case, I don't know why moving your coins from one Electrum wallet to a new Electrum wallet with a new seed is such a big deal? ??? (aside from the transaction fees)


Quote
The only issue I see is that you expose the redeem script (and therefore the public keys), that someone else could replay on bitcoin core to steal you coins
You are typing the seed into your computer... and exporting the xprvs for your 2FA wallet in plaintext. In my opinion, that is reason enough to make sure they contain as little value as possible.



Question: I am implementing both, but do you know what is the most used between two of two and two of three? (the rationale of the question is that in the first case you don't need to find the redeem script, not sure if it helps a lot since it looks easy to get it from his wallet)
2FA wallets (which this tutorial is aimed at) is ALWAYS "2-of-3". No idea about MultiSig, but the most common ones seem to be "2-of-3" and "2-of-2".

As I said you can recommend to people to move their coins, as you do, assuming they don't mess up doing this  :)

Now the rationale of a wallet derived from a seed is supposed to be that you have one wallet that you can recover, not 100 wallets with 100 different seeds...

But there are no technical/security reasons to do this, replay protection is implemented everywhere and if you use the tools offline there are no reasons that your keys leak

Anyway, people know about it and can decide


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: oliversh on December 13, 2017, 03:22:28 PM
Hey I dont see any tips on your BTG/BTC addresses.... has this not helped anyone or are they all skinflints?


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 13, 2017, 09:23:21 PM
Hey I dont see any tips on your BTG/BTC addresses.... has this not helped anyone or are they all skinflints?
Most likely the later... Personally, I work on the "pay what it's worth to you" basis... if people don't want to pay, that's OK, I enjoy the good karma from helping people. I've actually had some VERY generous tips before.

I just really dislike the ones who say "I'll pay a generous tip for help!" and then quickly disappear after you actually do help. :-\ That's just a dick move... just be honest and say you can't afford or don't want to pay anything.

Anyway, I can vouch that this method works. I have basically done the same thing to help a couple of people get their BTG...


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Ayms on December 18, 2017, 06:56:27 PM
Here is the tool mentioned previously https://github.com/Ayms/bitcoin-transactions "add multisig support"

Should work for BCH too but needs to be tested


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: sirmcruz on December 19, 2017, 12:15:30 PM
Thanks for all the work, but it did not work for me...
After inserting the final code (with the final hex) i get this message: "Missing inputs (code -25)"
This means the "inputs" you are trying to spend, have already been spent in a BTG transaction. Check your addresses on www.btgexplorer.com and make sure that the "Final Balance" is greater than 0.00000000. If it isn't, then that address is empty and does not contain any BTG.

Thanks for the warning but the Final Balance is greater than 0.00000.
What now?

Thanks!


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 19, 2017, 08:41:02 PM
Thanks for the warning but the Final Balance is greater than 0.00000.
What now?
Then you need to identify which UTXOs were actually valid at the time of the fork...

I assume that after Oct 24, you have sent BTC? If so, to need to check on the BTG block explorer (like btgexplorer.com) what the exact values were at the time of the fork and what transactions these UTXOs were created by.

The easiest way to determine the total value of BTG you *should* have, is to check your Electrum history, and see what the balance was as the time of the fork (hopefully you didn't have tooooo many transactions around the 24th October! :P)

In Electrum look for all the addresses on the addresses tab (check receiving and change, and set to All) that have a tx value > 0. Put each address into BTGexplorer.com and find all the ones that have final balance > 0... Until you've found all the balances that add up to the total you expect.

You should be able to see "unspent" coins for each one of these addresses (marked with a "U")... These are the inputs you need to put into your createrawtransaction and signrawtransaction commands.

If you're struggling, you can feel free to PM me the "xpub" from your 2FA wallet (DO NOT send me or anyone else the private keys or xprvs!!)... And I can create a list of the transactions you need to include etc...

I can probably actually give you the createrawtransaction command that you will just need to put your BTG address into... And the signrawtransaction commands that you will need to add the redeemscript and private keys to. :)


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: ycir on December 20, 2017, 05:44:19 AM
Hi! First off - thanks so much for this tutorial! However, when I open my electrum text file, my x2 priv key states "null" and does not give me anything, (neither does x3). I can't regenerate my wallet with the 12 seeded pass phrase, but I was able to regenerate the wallet and disable 2fa (I believe?) Or is this my problem?

Please let me know asap - thanks!


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 20, 2017, 09:57:52 AM
You can only disable 2FA by restoring from the 12 word seed... If your wallet has an empty X2 xprv, then you have NOT disabled 2FA correctly.

When disabled, both the X1 and X2 will be populated... This is what enables you to sign transactions without using TrustedCoin, as you would have 2 of the 3 private keys in the wallet file.


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: k3malb3y on December 21, 2017, 09:01:33 AM
Hello, thank you for this tutorial and your effort.

I'm having "Missing inputs (code -25)" error aswell.

https://btgexplorer.com/address/AXSLazZPnfi6ECHqxuKNdWhRKVpTz4FTpr
My btc adress in electrum: 3HMUs3CD1RNKWPnHXMKduFoFzRBVCFjNE7

So the TXID is: 278d8dfe8ef4d77ee919ddc233cfa211a9a412dc0c2138d1ac7022249e7f4726
and "value": 3.57583411 (satoshi to BTC format)

I've tried: createrawtransaction, AMOUNT_TO_SEND: 3.57583111 (-300 satoshi)
and put the same value for signrawtransaction, INPUT_VALUE_FIELD
also tried different combinations of values, still having "Missing inputs (code -25)" error

My BTG wallet still synchronizing tho and I'm not sure if this error is related to wallet synchronization..


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 21, 2017, 10:56:59 AM
In createrawtransaction, the amount needs to be: (total amount of inputs - fee)

In signrawtransaction, the amount needs to be the actual original amount of the input... So it should be set to 3.57583411


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: k3malb3y on December 21, 2017, 11:25:35 AM
In createrawtransaction, the amount needs to be: (total amount of inputs - fee)

In signrawtransaction, the amount needs to be the actual original amount of the input... So it should be set to 3.57583411

createrawtransaction : 3.57583011
signrawtransactions   : 3.57583411

still getting Missing inputs (code -25)

I did all steps exactly from the start again and again :(


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 21, 2017, 11:23:48 PM
Sounds like the transaction IDs or vout/prevout values might not be right...

If you want, you can PM me the createrawtransaction... And I'll take a look... And maybe your signrawtransactions WITHOUT the private keys obviously!! ;) :P

I'll see if I can see anything "obvious"...



Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: k3malb3y on December 25, 2017, 10:05:44 AM
Sounds like the transaction IDs or vout/prevout values might not be right...

If you want, you can PM me the createrawtransaction... And I'll take a look... And maybe your signrawtransactions WITHOUT the private keys obviously!! ;) :P

I'll see if I can see anything "obvious"...




Problem was wallet synchronization, I had to wait till full sync. Then transaction complated without error.
Thank you so much


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: DK13 on December 25, 2017, 01:41:30 PM
I get stuck when I have to put x1/ xprv code on Mnemonic Code Converter. It shows "Invalid root Key". Tried it couple of times, with and without commas etc.
https://ibb.co/cBiv76


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: ApproximateSunlight on December 25, 2017, 02:55:27 PM
I get stuck when I have to put x1/ xprv code on Mnemonic Code Converter. It shows "Invalid root Key". Tried it couple of times, with and without commas etc.
https://ibb.co/cBiv76


Have you done this?


Quote
In "BIP32 Root Key" box paste the x1 /xprv from BTG.txt we created, select “BIP32” and in Client select “Custom derivation path”, in “BIP32 Derivation Path” leave “m/0”

Quote
WHAT TO DO WITH CHANGE ADDRESSES:
Ok I said that this was only for “Change” addresses, let’s discuss about “Change” addresses (https://i.imgur.com/aZ7XHJd.png):

There is only one simple thing that changes:
In the step where we paste the x1 /xprv and the x2 /xprv code in iancoleman website you need to select “m/1” instead of “m/0” in “BIP32 Derivation Path”.
That’s it.


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: ApproximateSunlight on December 25, 2017, 06:00:39 PM
Hi!

Looks like I am stuck at the beginning. So I have created the 2fadisabled wallet, but when I am trying to open it with text editor the file looks like a mess and it does not have any "xprv" values in it. I do the cmd+F search and nothing pops up for xprv. I am using Mac OS HS and Electrum 3.0.3 Can anyone help, please?

Very strange, I don't really know how Mac works honestly, never had it but I guess it opens the files just like the .txt of Windows.
Btw, don't use CMD+F, just go on the very bottom of the text file, if you want PM me a screen of the very bottom of the txt obscuring the sensible datas, I can check


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: ApproximateSunlight on December 25, 2017, 06:45:52 PM
Hi!

Looks like I am stuck at the beginning. So I have created the 2fadisabled wallet, but when I am trying to open it with text editor the file looks like a mess and it does not have any "xprv" values in it. I do the cmd+F search and nothing pops up for xprv. I am using Mac OS HS and Electrum 3.0.3 Can anyone help, please?

Very strange, I don't really know how Mac works honestly, never had it but I guess it opens the files just like the .txt of Windows.
Btw, don't use CMD+F, just go on the very bottom of the text file, if you want PM me a screen of the very bottom of the txt obscuring the sensible datas, I can check

I will try to replicate it on Windows maybe. Electrum for Mac might create different wallet files or something. Honestly, there is no xprv in the file whatsoever - neither at the bottom nor at the top.

You can try with Parallels Desktop or Virtual Box to emulate Windows on Mac OS, if you need help tell me, I can also come on Skype


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 25, 2017, 07:06:54 PM
Hi!

Looks like I am stuck at the beginning. So I have created the 2fadisabled wallet, but when I am trying to open it with text editor the file looks like a mess and it does not have any "xprv" values in it. I do the cmd+F search and nothing pops up for xprv. I am using Mac OS HS and Electrum 3.0.3 Can anyone help, please?
Did you set a wallet password? It sounds like you're opening an encrypted file...

To successfully extract the X1 and X2 xprvs, your wallet file must not be encrypted, nor should the sensitive records be encrypted... The only way to achieve this is to NOT use a wallet password.

If you've already set a password, you can unset it by "changing the password" and just leaving the "new" password fields empty


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: RickIVcone on December 25, 2017, 07:39:59 PM
Hmm what if a get an error like this:

 "TX decode failed (code -22)"


When trying to sign the transaction with this input

signrawtransaction "REALLYLONG _RAW_TRANSACTION_HASH" '[{"txid": "INPUT_TRX_ID", "vout": PREVOUT, "scriptPubKey": "INPUT_SCRIPT_PUB_KEY", "redeemScript": "REDEEM_SCRIPT", "amount": "INPUT_VALUE_FIELD"}]' '["SECOND_PRIVATE_KEY_FOR_SIGNING"]'


Trying to figure this out, any help is appreciated


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 26, 2017, 05:18:12 AM
Then it sounds like the "REALLYLONG_RAW_TRANSACTION_HASH" you have used has not copy/pasted properly or is incomplete or something... that would be the only "TX" that it is attempting to decode at that point...


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Kikiaoe on December 26, 2017, 12:43:29 PM
First of all thank you so much for putting this together. I can see how much work it was and mistakes can happen easily with that many variables.

I cannot complete however and can't figure out why. I have gone through every step meticulously and have been able to generate all hashes etc. without problem.

The point where I get stuck is when I am trying to sign the first transaction. The BTC Core Console gives me

13:22:39

Invalid private key (code -5)

I have of course used the xprv as instructed from the rebuilt Electrum wallet and have managed to get all other transaction IDs and hashes etc.

Any ideas?

Thanks a lot
Kikiaoe


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: RickIVcone on December 26, 2017, 01:43:32 PM
Then it sounds like the "REALLYLONG_RAW_TRANSACTION_HASH" you have used has not copy/pasted properly or is incomplete or something... that would be the only "TX" that it is attempting to decode at that point...

Solved this, it was just me being dumb, thanks anyway.


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 26, 2017, 08:10:33 PM
The point where I get stuck is when I am trying to sign the first transaction. The BTC Core Console gives me

13:22:39

Invalid private key (code -5)

I have of course used the xprv as instructed from the rebuilt Electrum wallet and have managed to get all other transaction IDs and hashes etc.
Are you typing in the xprv for the signrawtransaction command or are you going in the WIF private key (starts with "5", "K" or "L")? ???

You cannot type in the xprv... You need to get the individual WIF private keys


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: DK13 on December 28, 2017, 09:47:07 PM
I get stuck when I have to put x1/ xprv code on Mnemonic Code Converter. It shows "Invalid root Key". Tried it couple of times, with and without commas etc.
https://ibb.co/cBiv76


Have you done this?


Quote
In "BIP32 Root Key" box paste the x1 /xprv from BTG.txt we created, select “BIP32” and in Client select “Custom derivation path”, in “BIP32 Derivation Path” leave “m/0”

Quote
WHAT TO DO WITH CHANGE ADDRESSES:
Ok I said that this was only for “Change” addresses, let’s discuss about “Change” addresses (https://i.imgur.com/aZ7XHJd.png):

There is only one simple thing that changes:
In the step where we paste the x1 /xprv and the x2 /xprv code in iancoleman website you need to select “m/1” instead of “m/0” in “BIP32 Derivation Path”.
That’s it.

It doesn't work. I tried many ways but it always shows 'Invalid root key'. I don't understand, I check the x1/ xprv in the wallet file few times...


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 28, 2017, 10:23:44 PM
are you pasting the whole line from the wallet file? like this:
"xprv": "xprv9uEDMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcDp3boP"

or are you just copy/pasting the actual text... NO " marks etc: xprv9uEDMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcDp3boP

???

NOTE: it should be just the actual text: xprvblahBlaHblAH




Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: evngstar on December 28, 2017, 11:29:30 PM
btgexplorer.com is currently not working. Is there any alternative that also shows the tx id, final balance and the unspent amount?


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on December 29, 2017, 12:09:15 AM
Give btgexp.com a go... Although that won't work if you put a BTC address in... But will work if you put in TXIDs from your BTC wallet and will show the BTG addresses, so you can then search using that address and see the final balance. Bit tricky to work out what is spent and what isn't tho


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: DK13 on December 29, 2017, 04:38:44 PM
are you pasting the whole line from the wallet file? like this:
"xprv": "xprv9uEDMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcDp3boP"

or are you just copy/pasting the actual text... NO " marks etc: xprv9uEDMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcDp3boP

???

NOTE: it should be just the actual text: xprvblahBlaHblAH




I tried only the actual text. I mean I tried many ways but I know it has to be only the text without " ".  But it just shows invalid root :/


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: bambus002 on January 04, 2018, 05:24:28 PM
@ApproximateSunlight

Thank you very much! That guide is a master piece. Super easy to follow and do the steps by yourself! Thats need to be tipped so here u have my small piece!

I need to say it one more time: This is really great work! Even the guy that doesn't know anything about computer would do this but it seemed like a Pro-level thing to do when i was reading other "guides". Great work one more time!!


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Komodor on January 04, 2018, 05:34:09 PM
are you pasting the whole line from the wallet file? like this:
"xprv": "xprv9uEDMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcDp3boP"

or are you just copy/pasting the actual text... NO " marks etc: xprv9uEDMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcDp3boP

???

NOTE: it should be just the actual text: xprvblahBlaHblAH





HCP, we meet again :)


I have the same problem: the xprv seems not to have a normal format even though the file is not encrypted. It does not start with xprv, but instead contains "+" or "/" in between and ends with "="

Interesstingly, the x1/ and x2/ private keys are different with every electrum version i use even though I'm using the same seed words to restore the walletevery time.


EDIT: I'm a fucking idiot: I always created a unencrypted wallet, but still set a password. Leaving the password field empty solves all problems.



Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: mr.dimus on January 04, 2018, 10:32:11 PM
Then it sounds like the "REALLYLONG_RAW_TRANSACTION_HASH" you have used has not copy/pasted properly or is incomplete or something... that would be the only "TX" that it is attempting to decode at that point...


Do u have Telegram? Write me your Telegram ID? Cant find you in Skype ..


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: k9thiago on January 04, 2018, 10:58:55 PM
can someone help? im stucked on last step and got this message..

mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation) (code -26)

what can i do? =/



Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on January 04, 2018, 11:03:31 PM
can someone help? im stucked on last step and got this message..

mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation) (code -26)
Sounds like you only signed the transaction with 1 private key... you need to sign with at least two private keys as it is a "2-of-3" wallet.

Also, when signing with the 2nd key (2nd signrawtransaction), make sure you use the output from the 1st signrawtransaction command as the HEX, so the flow is:

createrawtransaction -> unsignedHEX -> 1st signrawtransaction -> partially_signedHEX -> 2nd signrawtransaction -> fully_signedHEX -> sendrawtransaction


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: k9thiago on January 04, 2018, 11:17:32 PM
i was doing correctly...

i ran a code again, but on first signrawtransation is returning an error:
 "error": "Operation not valid with the current stack size"

this should be ignored? and move on hex code for next sign?
 


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on January 05, 2018, 12:01:07 AM
Yes, that "error" is normal... it is basically telling you that the transaction is only "partially signed"... so it is "not valid" (ie. you cannot broadcast it)... when you do the second signrawtransaction you should see the big "HEX"... and then:

"complete": true

https://talkimg.com/images/2023/11/15/zDe3b.png


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: theeagle_ on January 05, 2018, 06:06:28 AM
HCP, could you maybe help me?

I followed this tutorial and I'm on the step where you run commands in the Bitcoin Gold Debug window. I am able to create a transaction just fine. But when I try to sign it for the first time I get:

Error: std::bad_alloc


I have verified my command several times and everything appears to be correct. I have no clue what this error message means or how to fix it.

Thanks!


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: theeagle_ on January 05, 2018, 06:24:07 AM
HCP, could you maybe help me?

I followed this tutorial and I'm on the step where you run commands in the Bitcoin Gold Debug window. I am able to create a transaction just fine. But when I try to sign it for the first time I get:

Error: std::bad_alloc


I have verified my command several times and everything appears to be correct. I have no clue what this error message means or how to fix it.

Thanks!


Well I guess you have to ask for help in order to figure it out yourself. For some reason it worked if I decreased by BTG amount in the Create Transaction command. I was sure to leave a little off of it for miner fee, but when I took a little more off of it it worked.


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: k9thiago on January 06, 2018, 01:37:26 AM
Thankyou but i figured out what was wrong...

You cant reduce fee amount from signrawtransaction... only on createrawtransaction..


So the correct step is

Amount from createrawtransaction = Amount - Fee

Amount from signrawtrasaction = total amount from transactionid where you can

I claimed my btg with success..



regards



Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Spendulus on January 06, 2018, 05:57:34 PM
....
I claimed my btg with success..



regards



Question.

I set up Ethereum wallets in September for three of my relatives and put some bitcoin in them. They have had no activity, hence they all only have one key pair of interest.

One later set up 2FA - I am not sure if this was done before or after the 10-24 fork date.

Now I'm getting around to helping them with the BTG retrieval.

The non-2FA wallets are easy.

The one that was converted to 2FA - if this was done AFTER 10-24, wouldn't a pre 2FA seed word set work to recreate the one private key that is of interest?

(not sure how a conversion to 2FA works but it seems it would require a new seed word sequence and hence an entirely new set of key pairs)


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on January 07, 2018, 07:03:16 AM
The one that was converted to 2FA - if this was done AFTER 10-24, wouldn't a pre 2FA seed word set work to recreate the one private key that is of interest?
In short... yes, if they moved their coins to the 2FA wallet AFTER the fork, then their old, original "Standard" seed would allow them to get the private key. Note that with a Standard Electrum wallet, you don't even need to use the seed+BIP39 tool, you can just goto the "Addresses" tab ("View -> Show Addresses"), right click on the address you are interested in and select "Private Key" ;)


Quote
(not sure how a conversion to 2FA works but it seems it would require a new seed word sequence and hence an entirely new set of key pairs)
You don't "convert" to 2FA as such... you generate a completely new wallet with a completely new seed... and then send all your coins to the new 2FA wallet... so yes, you are correct, the 2FA wallet will indeed have a new seed mnemonic and entirely new sets of key pairs.




Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: leninsaccountant on January 12, 2018, 12:46:53 PM
Has anyone else recieved the error:

>> Traceback (most recent call last):
                                                                                              ^
SyntaxError: invalid syntax



when inputting this command into Electrum's console:

deserialize(gettransaction(Transtion_ID))



I think I've tried pretty much everything.


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on January 13, 2018, 04:16:30 AM
Going to go ahead and guess you have not wrapped the transactionID in "" marks have you?

try: deserialize(gettransaction("TransactionID"))

like this: deserialize(gettransaction("028a1dfd086b851f03d7d853616247ae0da865f086c49679c885529bdd4dd191"))

the " (quote) marks are important ;)


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Futuristic_Kid on January 14, 2018, 07:56:39 PM
When I type deserialize(gettransaction("TXID_HERE"))
into the Electroum's wallet, it crashes..I updated to the latest version and it still crash

Also, do I have have to download the full core wallet (150GB)??
Just spent like 3 hours on this..idk if it's worth the 0.27 bcg that I have there  ???


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: teukka79 on January 14, 2018, 08:05:54 PM
I get this 16: mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation) (code -26)
when typing last command sendrawtransaction "HASH"


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on January 15, 2018, 10:08:43 AM
When I type deserialize(gettransaction("TXID_HERE"))
into the Electroum's wallet, it crashes..I updated to the latest version and it still crash
Weird... I would not have expected that... what happens if you just use: gettransaction("TXID_HERE")

Does it still crash? or do you get the raw transaction hex? if you get the hex... put it into: https://coinb.in/#verify (it will give you the same info as derserialize(), txid, address, amount, scriptpubkey, and you can calculate the vout by counting which "output" it is, starting at 0)


Quote
Also, do I have have to download the full core wallet (150GB)??
Just spent like 3 hours on this..idk if it's worth the 0.27 bcg that I have there  ???
Apparently not... one of the explorers has a transaction broadcast feature now! https://btgexplorer.com/tx/send

After you create your raw transaction, try broadcasting using that. NOTE: I've not personally tested this



I get this 16: mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation) (code -26)
when typing last command sendrawtransaction "HASH"
This means you have not properly signed the transaction with the minimum number of private keys as specified in the MultiSig wallet... if Electrum 2FA... then you need to sign with 2-of-3. If you see that message, it means you have only signed it with ONE of the required keys... so while it is possible you did signrawtransaction twice with different keys... one of those keys might be wrong.


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: teukka79 on January 15, 2018, 05:24:12 PM
I get this 16: mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation) (code -26)
when typing last command sendrawtransaction "HASH"
This means you have not properly signed the transaction with the minimum number of private keys as specified in the MultiSig wallet... if Electrum 2FA... then you need to sign with 2-of-3. If you see that message, it means you have only signed it with ONE of the required keys... so while it is possible you did signrawtransaction twice with different keys... one of those keys might be wrong.
[/quote]

When i'm signing first time i get this

https://i.imgur.com/TW9DBs6.jpg

and second time

https://i.imgur.com/Du3FhHM.jpg


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Futuristic_Kid on January 15, 2018, 06:23:24 PM
When I type deserialize(gettransaction("TXID_HERE"))
into the Electroum's wallet, it crashes..I updated to the latest version and it still crash
Weird... I would not have expected that... what happens if you just use: gettransaction("TXID_HERE")

Does it still crash? or do you get the raw transaction hex? if you get the hex... put it into: https://coinb.in/#verify (it will give you the same info as derserialize(), txid, address, amount, scriptpubkey, and you can calculate the vout by counting which "output" it is, starting at 0)


Still crashing, I guess I'm gonna hodl that for life


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on January 16, 2018, 01:38:55 AM
When i'm signing first time i get this
https://talkimg.com/images/2023/11/15/zDvSP.jpeg
Looks good.... that error is "normal"... basically telling you it is only partially signed.


Quote
This means that the transaction is signed with 2 keys... it doesn't mean they're the CORRECT 2 keys. Double check the "1" addresses that were used in the redeemscript and then make sure you are using the matching private keys.


Still crashing, I guess I'm gonna hodl that for life
that must be some huge trnasaction... if you put the TXID into blockchain.info, how big (in bytes) is that transaction?

Also, you can also get the raw transaction by using blockchain.info:
https://blockchain.info/tx/TXID_HERE?format=hex

like this: https://blockchain.info/tx/d3648194d94cbf3501e57b4a5f81d0759cc40ef213262e15cf6915bfb0f01d94?format=hex


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: teukka79 on January 16, 2018, 08:21:10 PM
I figured it out. I had to minus fee only on createrawtransaction command and leave signtransaction values without fee. Now all BTG claimed ;D


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: DK13 on January 19, 2018, 11:31:17 PM
Finally after two weeks my BTG wallet got synced. Now i get this error while trying to run createrawtransaction:


Error: Error parsing JSON:[{"txid": "ff8d8bec90611603b8aa9d19772aa7aa6d0991de4e8bc6c8c1a3436a1340bc11", "vout": 17◄ }]
 

??? ???


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on January 20, 2018, 01:40:31 AM
Did you type that "17" into the command? or did you copy/paste that? Just wondering what the weird symbol after the 17 is? Also, did you remember to use the ' marks?

Highlighted for emphasis ;)
Quote
createrawtransaction '[{"txid": "INPUT_TRX_ID", "vout": PREVOUT }]' '{"YOUR_BTG_ADDRESS":  AMOUNT_TO_SEND}'


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on January 29, 2018, 08:54:19 PM
     "error": "Operation not valid with the current stack size"

This same error is present in the first signrawtransaction output as well. I am not sure why it happens.
The "error" generally occurs for a MultiSig transaction when it has not been signed with the minimum required number of private keys (for Electrum 2FA, this is 2-of-3)... Obviously, after the first "signrawtransaction", it's only been signed with one key... However, if you are getting that on the second "signrawtransaction" then one of two things had occurred:

1. You have used the wrong private key (or keys) to sign the transaction... So the redeemscript is not evaluating correctly
Or
2. You didn't use the output from the first signrawtransaction as the TX_HASH for the second signrawtransaction, so you've still only signed it with one key


Quote
In your guide, you do not specify anything for AMOUNT_TO_SEND in the createrawtransaction for wallets with more than 1 input. So I decided to add together all the 'value' amounts from 4 transaction IDs, minus fee (100000 satoshi) and converted it to BTC. If I did it wrong, please, correct me.
Just a note, it's not "my" guide ;)

But yes, same rules apply... Simply tally up the values from the inputs, subtract the fee you wish to pay (100,000 seems like a LOT!!?! :o) and put the value in BTC!

You can easily use 10sats/byte fee on BTG... So unless your transaction is HUGE with more than 50 inputs you shouldn't need more than around (10*148*number of inputs)+44 sats as a fee

Ie. 5 inputs = (10*148*5) + 44 = 7444 sats.

Quote
However, there was one VERY interesting and also confusing moment along the way, at the very beginning. When I ran the deserialize(gettransaction("dc7995b5b2756c85657803519569c2203e7d18ff3bae7679f1a4b579cf9fca6c")) I got two outputs and none of them matched the address I was considering (even though in your guide you say it has to). However, the very first output actually matched my other address from the 'Change' section. And this transaction ID(dc7995b5b2756c85657803519569c2203e7d18ff3bae7679f1a4b579cf9fca6c) is also related to that other wallet.  So this particular moment was agains the plan and I simply decided to take the data from this first output, even though it did not match they address I considered.
If you used an input from a different (change) address, then you obviously also need to use the private keys for THAT address... They will be different.

Also, if you are using inputs from multiple addresses in one transaction (ie. Your address "that you considered" and your change address) them you need to sign the transaction with keys from BOTH addresses like so:

Code:
signrawtransaction "RAW_TRANSACTION_HASH" '[{"txid": "INPUT_TRX_ID_AddressA", "vout": PREVOUT_AddressA, "scriptPubKey": "INPUT_SCRIPT_PUB_KEY_AddressA", "redeemScript": "REDEEM_SCRIPT_AddressA", "amount": "INPUT_VALUE_FIELD_Trans1"},{"txid": "INPUT_TRX_ID_AddressB", "vout": PREVOUT_AddressB, "scriptPubKey": "INPUT_SCRIPT_PUB_KEY_AddressB", "redeemScript": "REDEEM_SCRIPT_AddressB", "amount": "INPUT_VALUE_FIELD_Trans2"}]' '["FIRST_PRIVATE_KEY_FOR_SIGNING_AddressA","FIRST_PRIVATE_KEY_FOR_SIGNING_AddressB"]'


You then feed the output of this to the second signrawtransaction and use the 2nd key for each address (note that everything else stays the same, ONLY the private keys and the input hash will be different:
Code:
signrawtransaction "HASH_OUTPUT_FROM_FIRST_SIGNRAWTX" '[{"txid": "INPUT_TRX_ID_AddressA", "vout": PREVOUT_AddressA, "scriptPubKey": "INPUT_SCRIPT_PUB_KEY_AddressA", "redeemScript": "REDEEM_SCRIPT_AddressA", "amount": "INPUT_VALUE_FIELD_Trans1"},{"txid": "INPUT_TRX_ID_AddressB", "vout": PREVOUT_AddressB, "scriptPubKey": "INPUT_SCRIPT_PUB_KEY_AddressB", "redeemScript": "REDEEM_SCRIPT_AddressB", "amount": "INPUT_VALUE_FIELD_Trans2"}]' '["SECOND_PRIVATE_KEY_FOR_SIGNING_AddressA","SECOND_PRIVATE_KEY_FOR_SIGNING_AddressB"]'


Quote
I have digged further and tried excluding the txid mentioned above from the 'createrawtransaction' and use the remaining 3 txid's and a sum of their balances for AMOUNT_TO_SEND. Just pretending this txid does not exist. Eventually I do get "complete":true in the end. However, when I try to send this transaction I get Missing inputs (code -25). So I have tried various combinations and still cannot figure it out.
"Missing inputs" means the inputs you are attempting to spend don't exist in the current UTXO set. This is generally because either:

1. The parent transaction never confirmed and has been dropped (so the input doesn't exist)
Or
2. The input has already been spent (so that input doesn't exist anymore)


Also, one thing that has tripped people up previously... You ONLY subtract the fee in the "createrawtransaction" when calculating AMOUNT_TO_SPEND. When putting the amounts in "signrawtransaction" commands, these need to match the original amount!


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: asdlolciterquit on February 06, 2018, 01:39:21 PM
i'm sorry if i up this thread, but it seems now clear to me that will never be a electrum wallet make for electrum gold, like electron cash for BCC. Is this correct? or they are still developing a btg version?


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: TryNinja on February 06, 2018, 04:33:05 PM
i'm sorry if i up this thread, but it seems now clear to me that will never be a electrum wallet make for electrum gold, like electron cash for BCC. Is this correct? or they are still developing a btg version?
I don't think so. Bitcoin Gold has no community and it's not like their dev really want the coin to succeed. Soemone would need to care enough to make and support a fork (which I think is unlikely to happens)


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: the_crazy88 on February 21, 2018, 12:40:48 AM
This is realy a great tutorial, but for me me it is to complicated to
create for all forks a wallet and download the blockchain.
I used the following service for a lot of coins BCH, BCH, BCD ...
for my electrum 2fa wallet
https://dig.walleting.services/#/aff/g0NlUXlciy4gwkabmMnd
OK it cost a 10% fee but worked great for me and saved a lot of time.
But it's your choice


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on February 21, 2018, 09:31:24 PM
I don't think you got me right. I did not use anything from different address for another address, I did everything by the guide. However, please, take a look at what I initially had:
The address I can't handle is this: 3JuPB27nMEHvXuu9dmHQVrwHh5Wym8CJso
And if you run it through https://btgexplorer.com you will see that it has the same transaction ID (dc7995b5b2756c85657803519569c2203e7d18ff3bae7679f1a4b579cf9fca6c) as my other address from Electrum Change section: 3JuwWAhRRqa8EQsp5DnoRP8rkBxCjuyZcv

Thus we have two different addresses that share the same transaction ID. And that is where it gets tricky - when you run the first one (3JuPB27nMEHvXuu9dmHQVrwHh5Wym8CJso) with "deserialize" it has 2 outputs but NONE of them have the "address" field that matches the address in question.
It seems you might be a little confused as to which address(es) your coins are/were in. The transaction you are looking at (dc799... (https://btgexplorer.com/tx/dc7995b5b2756c85657803519569c2203e7d18ff3bae7679f1a4b579cf9fca6c)), was sending FROM the 3JuPB address TO the 3JuwW address... so the only address of yours that had a UTXO from that transaction was 3JuwW (ps. this UTXO has already been spent on BTG chain)

So 3JuwW address is now EMPTY on BTG chain (https://btgexplorer.com/address/AYzoE84cD5utxDPNWmnY9e325GbBc4h2Y6): Final Balance = 0.00 BTG

Your address: 3JuPB27nMEHvXuu9dmHQVrwHh5Wym8CJso (https://btgexplorer.com/address/AYzEtyUy8UdhFiQi5KH9E7qT2A9xVrNHmD)
currently has TWO unspent BTG outputs... from two other transactions:
UTXO1 - 0.35977155 BTG
TXID1: https://btgexplorer.com/tx/28341395c82cfeb645eaa0ad2741b4b22b3df1ba2475153da8d43e7fe78049dd

UTXO2 - 0.33523 BTG
TXID2: https://btgexplorer.com/tx/9925465a2eeb0adbc2d5e21ada0900f32951ad72394afb73710f5cda8ee345ea


So, if you want to claim those BTG, you need to get the all the relevant information for those two transactions:
Code:
        {
            "address": "3JuPB27nMEHvXuu9dmHQVrwHh5Wym8CJso",
            "prevout_n": 9,
            "scriptPubKey": "a914bcd0de3ddeeaba6c3f9dd4fab6882d19cded030187",
            "type": 0,
            "value": 35977155
        }
and
Code:
        {
            "address": "3JuPB27nMEHvXuu9dmHQVrwHh5Wym8CJso",
            "prevout_n": 8,
            "scriptPubKey": "a914bcd0de3ddeeaba6c3f9dd4fab6882d19cded030187",
            "type": 0,
            "value": 33523000
        }

And then use that info to create your raw transaction: (NOTE: 5000 sat fee)
Code:
createrawtransaction '[{"txid": "28341395c82cfeb645eaa0ad2741b4b22b3df1ba2475153da8d43e7fe78049dd", "vout": 9 },{"txid": "9925465a2eeb0adbc2d5e21ada0900f32951ad72394afb73710f5cda8ee345ea", "vout": 8 }]' '{"YOUR_BTG_ADDRESS":  0.69495155}'

That will spit out the big long hex string (RAW_TRANSACTION_HASH)... you then sign it with the two private keys that you should have got from your "X1" and "X2" wallets that matches the "1" addresses that should have been found from the redeemscript for the 3JuPB address (ie. 2 of these 3 addresses: 1BQtSp5FGMMUKxSGMHWE7YRARDBA5vLYu5, 15F8E7e2faxDeB6F19ZX2UTS65BmassJT4 or 1XsXYJJxEaVN3m4P9ZRmPRgXseWwjP267).

Code:
signrawtransaction "RAW_TRANSACTION_HASH" '[{"txid": "28341395c82cfeb645eaa0ad2741b4b22b3df1ba2475153da8d43e7fe78049dd", "vout": 9, "scriptPubKey": "a914bcd0de3ddeeaba6c3f9dd4fab6882d19cded030187", "redeemScript": "522102b12e4dbbfc4690630efd2d5b7e4843945ada831dc15dc1dbb5b9d577dd8e76b421032ef6597db919e099d42c248f616477a5cae78fcfce64a2b12760d4dd68ce3bfb21037cb10abf43adc77e9da2879320357daaf002a68c06b2ade4e2e6ca4685bfdf8753ae", "amount": "0.35977155"},{"txid": "9925465a2eeb0adbc2d5e21ada0900f32951ad72394afb73710f5cda8ee345ea", "vout": 8, "scriptPubKey": "a914bcd0de3ddeeaba6c3f9dd4fab6882d19cded030187", "redeemScript": "522102b12e4dbbfc4690630efd2d5b7e4843945ada831dc15dc1dbb5b9d577dd8e76b421032ef6597db919e099d42c248f616477a5cae78fcfce64a2b12760d4dd68ce3bfb21037cb10abf43adc77e9da2879320357daaf002a68c06b2ade4e2e6ca4685bfdf8753ae", "amount": "0.33523000"}]' '["X1_PRIVKEY-3JuPB","X2_PRIVKEY-3JuPB"]'

That *should* spit out the hex string and say that it is complete (I'm fairly sure that you don't actually have to do two signrawtransactions, you can just do it once and provide all the required keys).

You should then be able to sendrawtransaction.





Things get a little more complicated when you are attempting to send multiple UTXOs from multiple addresses and multiple transactions. You need to make sure that you get all the transactionIDs, redeemscripts, scriptpubkeys etc sorted out... and just step through it logically.

The number of private keys required will change based on how many 2FA addresses you are claiming from. Each 2FA address involved requires TWO private keys. So, for the transaction I've outlined above where you have 2 UTXOs, but only 1 address... you need TWO private keys.

If you had 2 UTXOs and they were from 2 addresses, you would need FOUR private keys.


For instance... lets assume that the output from transaction (dc799... (https://btgexplorer.com/tx/dc7995b5b2756c85657803519569c2203e7d18ff3bae7679f1a4b579cf9fca6c)) had not yet been spent... and you wanted to include that as well... Now we have THREE UTXOs... and TWO addresses...

3rd UTXO:
Code:
        {
            "address": "3JuwWAhRRqa8EQsp5DnoRP8rkBxCjuyZcv",
            "prevout_n": 0,
            "scriptPubKey": "a914bcebdb20e40d359009993dae5ea9b273c49ab34287",
            "type": 0,
            "value": 262924200
        },

So, the createrawtransaction would have been something like:
Code:
createrawtransaction '[{"txid": "28341395c82cfeb645eaa0ad2741b4b22b3df1ba2475153da8d43e7fe78049dd", "vout": 9 },{"txid": "9925465a2eeb0adbc2d5e21ada0900f32951ad72394afb73710f5cda8ee345ea", "vout": 8 },{"txid": "dc7995b5b2756c85657803519569c2203e7d18ff3bae7679f1a4b579cf9fca6c", "vout": 0 }]' '{"YOUR_BTG_ADDRESS":  3.32419355}'


and the signrawtransaction would have been something like:
Code:
signrawtransaction "RAW_TRANSACTION_HASH" '[{"txid": "28341395c82cfeb645eaa0ad2741b4b22b3df1ba2475153da8d43e7fe78049dd", "vout": 9, "scriptPubKey": "a914bcd0de3ddeeaba6c3f9dd4fab6882d19cded030187", "redeemScript": "522102b12e4dbbfc4690630efd2d5b7e4843945ada831dc15dc1dbb5b9d577dd8e76b421032ef6597db919e099d42c248f616477a5cae78fcfce64a2b12760d4dd68ce3bfb21037cb10abf43adc77e9da2879320357daaf002a68c06b2ade4e2e6ca4685bfdf8753ae", "amount": "0.35977155"},{"txid": "9925465a2eeb0adbc2d5e21ada0900f32951ad72394afb73710f5cda8ee345ea", "vout": 8, "scriptPubKey": "a914bcd0de3ddeeaba6c3f9dd4fab6882d19cded030187", "redeemScript": "522102b12e4dbbfc4690630efd2d5b7e4843945ada831dc15dc1dbb5b9d577dd8e76b421032ef6597db919e099d42c248f616477a5cae78fcfce64a2b12760d4dd68ce3bfb21037cb10abf43adc77e9da2879320357daaf002a68c06b2ade4e2e6ca4685bfdf8753ae", "amount": "0.33523000"},{"txid": "dc7995b5b2756c85657803519569c2203e7d18ff3bae7679f1a4b579cf9fca6c", "vout": 0, "scriptPubKey": "a914bcebdb20e40d359009993dae5ea9b273c49ab34287", "redeemScript": "5221038256ab0ff75ec35e8d8796da1f3c4740daffd3b20a3a0ddf4e9ad2d232e7eaff2103b2972991bf628c8dc80f9921241371fed1181f5f6dab0cdacbc72e531cc539892103f7637f9b89436d14455f1771d10e6f539606b5e650b1ac828aada72ad0f1503d53ae", "amount": "2.629242"}]' '["X1_PRIVKEY-3JuPB","X2_PRIVKEY-3JuPB","X1-PRIVKEY-3JuwW","X2-PRIVKEY-3JuwW"]'

See how the 3rd "TX" block has a different scriptpubkey and redeemscript? Also, note the four private keys required... 2 privkeys for 3JuPB address... and 2 privkeys for 3JuwW

Again, the privkeys for 3JuwW should have come from two of the addresses from the 3JuwW redeemscript (15rhdRoyuM9XA3wEpJpwx3w6EDCPhjjz25, 1PZQJMxvVWzjd8agCCgDVDD87SEFej85h3 and 14r64vr5MxHE7wfrBZcrZMjnNr3edpx3Wr) and would have been in your X1 and x2 wallets.


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Futuristic_Kid on March 13, 2018, 10:19:32 PM
Quote
Also, do I have have to download the full core wallet (150GB)??
Just spent like 3 hours on this..idk if it's worth the 0.27 bcg that I have there  ???
Apparently not... one of the explorers has a transaction broadcast feature now! https://btgexplorer.com/tx/send

After you create your raw transaction, try broadcasting using that. NOTE: I've not personally tested this


Fuck..I'm downloading it now. 150GB and slowwww, it will probably take me at least 7 days.


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on March 14, 2018, 12:35:35 PM
Seems like a bad quote there... ???

Did the explorer not allow you to broadcast the transaction? So you had to download BitcoinGold Core? If so, that sucks...


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Futuristic_Kid on March 14, 2018, 04:52:13 PM
Seems like a bad quote there... ???

Did the explorer not allow you to broadcast the transaction? So you had to download BitcoinGold Core? If so, that sucks...

Sorry for the bad quote, I'm downloading the BitcoinGold Core right now, but I'd rather not to.
How can I make this work without downloading it? I don't know how to create a transaction, I did everything till "We are almost finished, now open Bitcoin Gold Core wallet."


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on March 14, 2018, 11:18:03 PM
I'm not even sure if you need to have BitcoinGold Core fully synced to be able to create the transaction or not... Have you tried doing it now while you wait for the sync to complete? There is no harm in trying to create the raw transaction... at worst it just won't work.

The only downside to not syncing, is that if you use a BTG receive address generated by your copy of BitcoinGold Core, you won't be able to see your coins until it is fully synced... but you can create the transaction to send to any BTG address, it doesn't have to be from your copy of BTG Core, so you can send to an exchange address etc.


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: oliversh on March 15, 2018, 06:56:10 AM
Hey I dont see any tips on your BTG/BTC addresses.... has this not helped anyone or are they all skinflints?


Hi OP, sent you 0.5 BTG just now as thanks. Sorry it took a while to get around to it but wanted to acknowledge your help.

Sent to GeCXRytvTjXRyZg8pNkhve4PHs4ZSbRxFW

Cheers


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Futuristic_Kid on March 16, 2018, 12:25:53 AM
I'm not even sure if you need to have BitcoinGold Core fully synced to be able to create the transaction or not... Have you tried doing it now while you wait for the sync to complete? There is no harm in trying to create the raw transaction... at worst it just won't work.

The only downside to not syncing, is that if you use a BTG receive address generated by your copy of BitcoinGold Core, you won't be able to see your coins until it is fully synced... but you can create the transaction to send to any BTG address, it doesn't have to be from your copy of BTG Core, so you can send to an exchange address etc.

OK it worked, thanks dude.

Btw I also have Bitcore on the same address..Can I claim it as well?


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on March 16, 2018, 04:30:23 AM
OK it worked, thanks dude.
Thanks for confirming that you don't need to have it synced... that will be very useful for anyone else who needs to claim.


Btw I also have Bitcore on the same address..Can I claim it as well?
Theoretically yes... Try reading: https://steemit.com/crypto-news/@xwerk/bitcore-btx-guide-the-2nd-snapshot-for-btc-hodlers-free-btx-or-how-it-works

Basically, it's the same process as with BitcoinGold... createrawtransction and signrawtransaction... It's just finding the correct inputs etc is slightly more difficult as they are completely different transaction IDs due to Bitcore being a so-called "hybrid fork" where they manually created the transactions to credit coins to addresses etc


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Futuristic_Kid on March 31, 2018, 11:51:12 PM
OK it worked, thanks dude.
Thanks for confirming that you don't need to have it synced... that will be very useful for anyone else who needs to claim.


Btw I also have Bitcore on the same address..Can I claim it as well?
Theoretically yes... Try reading: https://steemit.com/crypto-news/@xwerk/bitcore-btx-guide-the-2nd-snapshot-for-btc-hodlers-free-btx-or-how-it-works

Basically, it's the same process as with BitcoinGold... createrawtransction and signrawtransaction... It's just finding the correct inputs etc is slightly more difficult as they are completely different transaction IDs due to Bitcore being a so-called "hybrid fork" where they manually created the transactions to credit coins to addresses etc

I have 0.16 btx on my address..but when I try to import the private ket into btx wallet it says that "nothing was found" , like you have no fund


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on April 01, 2018, 01:03:28 AM
I have 0.16 btx on my address..but when I try to import the private ket into btx wallet it says that "nothing was found" , like you have no fund
If it's on a 2FA address, you can't just "export the private key" from Electrum due to the 2FA wallet in Electrum being a multi-sig wallet and each address being constructed from THREE private keys.

If you simply select "Wallet -> Private Keys -> Export" (or right click an Address in 2FA wallet and select "private key"), you will only get ONE key for each address...

The ONLY way to access these addresses in other coins (or wallets) is if:

1. The other coin (or wallet) supports Multi-Signature addresses
2. You export the 2 private keys from your disabled 2FA wallet
3. You recreate the multi-sig address in the new coin (or wallet) by combining the two private keys you exported and the public key the matches the 3rd private key (held by TrustedCoin)

Or

You manually create a transaction that sends the coins from the 2FA wallet address to new address of the forkcoin, as per the instructions in this thread.


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: pfrtlpfmpf on April 01, 2018, 05:03:45 AM
I know, off topic, but didn´t know, where to ask my question, please mods move me to where i belong.
I have my BTCP installed. Where exactly do i get my private keys in electrum, only BTC, from the fork, to insert into my BTCPrivate wallet ? ?
And how do i do that ?
I have moved my old Bitcoins to another wallet, so all clear, i just need this last step and don´t want to fuck it up . . .



Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on April 01, 2018, 05:56:52 AM
I have my BTCP installed. Where exactly do i get my private keys in electrum, only BTC, from the fork, to insert into my BTCPrivate wallet ? ?
Is it a standard Electrum wallet or a 2FA wallet?

If it is a standard Electrum wallet... you can simply right click on the address(es) on the "Addresses" tab (View -> Show Addresses) that you're trying to get the keys for and select "Private Key" from the menu or you can goto "Wallet -> Private Keys -> Export" and you'll get ALL the private keys.

NOTE: If your wallet is a 2FA wallet... you CAN NOT do this! You need to follow the long and complicated process over extracting all the components of your multiSig addresses and creating a transaction manually to move your BTCP



Quote
I know, off topic, but didn´t know, where to ask my question, please mods move me to where i belong.
Next time, just start a "new topic", link is in the top right when you're looking at the list of threads:
https://talkimg.com/images/2023/11/15/zbcxZ.png


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: pfrtlpfmpf on April 01, 2018, 06:39:13 AM
I have my BTCP installed. Where exactly do i get my private keys in electrum, only BTC, from the fork, to insert into my BTCPrivate wallet ? ?
Is it a standard Electrum wallet or a 2FA wallet?

If it is a standard Electrum wallet... you can simply right click on the address(es) on the "Addresses" tab (View -> Show Addresses) that you're trying to get the keys for and select "Private Key" from the menu or you can goto "Wallet -> Private Keys -> Export" and you'll get ALL the private keys.

NOTE: If your wallet is a 2FA wallet... you CAN NOT do this! You need to follow the long and complicated process over extracting all the components of your multiSig addresses and creating a transaction manually to move your BTCP



Quote
I know, off topic, but didn´t know, where to ask my question, please mods move me to where i belong.
Next time, just start a "new topic", link is in the top right when you're looking at the list of threads:
https://i.imgur.com/lWqWFS2.png

Oh, no, a new topic is way over my head, can´t do that  :)





Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: pfrtlpfmpf on April 01, 2018, 09:37:41 AM
I know, off topic, but didn´t know, where to ask my question, please mods move me to where i belong.
I have my BTCP installed. Where exactly do i get my private keys in electrum, only BTC, from the fork, to insert into my BTCPrivate wallet ? ?
And how do i do that ?
I have moved my old Bitcoins to another wallet, so all clear, i just need this last step and don´t want to fuck it up . . .



Wham, i just opened up a new BTCP-Wallet from Electrum  (Github, from the original website, carefull here, Scams).
Yes, i have a seed already. Put in my old seed (from the now empty Bitcoin-Wallet, Electrum), and what can i tell you (after 15 Minutes loading, without telling me), i have more BTCP, than i thought.

I really don´t know why the fuck around with private keys, and such. You all have your seed backed up anyway ! No ?

Now, where to sell it ?



Ok, off topic, i piss myself out of here  :)




Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on April 01, 2018, 12:20:34 PM
Also... good news for anyone who still has their BTG in an Electrum 2FA wallet... you no longer need to worry about extracting private keys and creating transactions manually.

BitcoinGold dev team have released ElectrumG... a BTG compatible fork of Electrum!

You can see the ElectrumG release here on the BitcoinGold Github: https://github.com/BTCGPU/electrum/releases/tag/3.2-beta
BitcoinGold blog post regarding ElectrumG: https://bitcoingold.org/electrumg-spv-bitcoin-gold/

NOTE: This is still BETA software!


I've tested it, and it looks like you can recreate your "disabled 2FA" wallet in ElectrumG as a normal 2-of-3 MultiSig wallet and it will find all your addresses, transactions and coins! :)

Simply use: "File -> New\Restore -> Multi-Signature Wallet -> From 3 co-signers, require 2 signatures -> Use a master key -> Copy/Paste your X1 xprv from your unencrypted disabled 2fa wallet file -> Use a co-signer key -> Copy/paste the X2 xprv from your unencrypted, disabled 2fa wallet file -> use a co-signer key -> copy/paste the x3 xpub from your unencrypted, disabled 2fa wallet file"

NOTE: if required, see the OP for instructions on creating your unencrypted, disabled 2fa wallet file.

Also, they only have 2 servers up and running at the moment, so the network can be a bit flaky and sync times can be quite slow.


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Futuristic_Kid on April 18, 2018, 03:46:04 PM
OK it worked, thanks dude.
Thanks for confirming that you don't need to have it synced... that will be very useful for anyone else who needs to claim.


Btw I also have Bitcore on the same address..Can I claim it as well?
Theoretically yes... Try reading: https://steemit.com/crypto-news/@xwerk/bitcore-btx-guide-the-2nd-snapshot-for-btc-hodlers-free-btx-or-how-it-works

Basically, it's the same process as with BitcoinGold... createrawtransction and signrawtransaction... It's just finding the correct inputs etc is slightly more difficult as they are completely different transaction IDs due to Bitcore being a so-called "hybrid fork" where they manually created the transactions to credit coins to addresses etc

Hey bro, I'm trying to do this atm.
This is the address: https://chainz.cryptoid.info/btx/address.dws?3NAA6mHnBANnP1CiNFzaajs8Q77Cxv7DTQ.htm

I thingn that this is the transection id.. but I'm not sure : Transaction ID: 343576cdcf4a89d9ccc27d661d0b1d42ab83a80f3252c5637a0c8c1a4e9bd863

This is where I'm stuck now:


18:53:02

deserialize(gettransaction("343576cdcf4a89d9ccc27d661d0b1d42ab83a80f3252c5637a0c8c1a4e9bd863"))


18:53:02

Invalid or non-wallet transaction id (code -5)


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on April 19, 2018, 08:23:31 AM
You won't be able to use deserialize() and gettransaction() as, like I said, it won't exist on the Bitcoin network as this "hybrid fork" created its own "funding transactions".

However, that explorer you linked to is nice enough to deserialize the raw transaction for you, You can use the link: https://chainz.cryptoid.info/btx/tx.dws?151581.htm#raw and click the "Raw Transaction" tab. You'll see the same info that you would get from the deserialize(gettransaction()).


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: Futuristic_Kid on April 20, 2018, 12:42:41 AM
You won't be able to use deserialize() and gettransaction() as, like I said, it won't exist on the Bitcoin network as this "hybrid fork" created its own "funding transactions".

However, that explorer you linked to is nice enough to deserialize the raw transaction for you, You can use the link: https://chainz.cryptoid.info/btx/tx.dws?151581.htm#raw and click the "Raw Transaction" tab. You'll see the same info that you would get from the deserialize(gettransaction()).


I pulled it off eventually, Thanks for all your help bro !!  :)


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: dmpfjo on April 22, 2018, 10:57:57 PM
i works, thank a lot. i send you 0.2 BTG for some beer  ;)


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: bohnhardt on April 09, 2021, 07:52:27 PM
Sorry for pulling out this old thread, but I'm still having this problem with my old 2FA Electrum wallet. Given the fact that there's a BTG version of Electrum now with ElectrumG did this make things a little easier?


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: HCP on April 10, 2021, 06:29:28 AM
Sorry for pulling out this old thread, but I'm still having this problem with my old 2FA Electrum wallet. Given the fact that there's a BTG version of Electrum now with ElectrumG did this make things a little easier?
You can shortcut some of this process by using ElectrumG (as it should allow you to recreate the multisig)... basically, you'll need to restore your 2FA wallet in Electrum (BTC version) using the 12 word seed and use the "DISABLE" option when prompted if you want to keep or disable 2FA.

Also, DO NOT set a password on the wallet file... otherwise you won't be able to open in a text editor...

What this does is create a copy of your 2FA wallet that contains TWO xprvs and ONE xpub which you can use to recreate the multisig in other versions of Electrum.

After the "disabled" 2fa wallet is created, you should be able to open it with a text editor and copy the the "xprv" from the x1/ and x2/ sections and the "xpub" from x3/ section of the "disabled" BTC wallet file. Once you have the two xprvs and one xpub, you can do the following in ElectrumG:

You can then create a multisig in ElectrumG (BTG version) using these "keys" to recreate the wallet in BTG.
- New/Restore
- Multi-Signature Wallet
- From 3 co-signers, require 2 signatures
- "use a master key"
- paste xprv from x1/ and click "Next"
- Enter co-signer key
- paste xprv from x2/ and click "Next"
- Enter co-signer key
- paste xpub from x3/ and click "Next"
- Add password if you want

This will generate a BTG multisig wallet in ElectrumG that should match the 2FA wallet from Electrum and have your BTG showing (assuming there is some BTG on those addresses)


NOTE: it may take quite a while for the wallet to sync... as there don't seem to be too many BTG electrum servers still running... I could only find 2 :-\


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: nc50lc on April 10, 2021, 07:00:00 AM
Sorry for pulling out this old thread, but I'm still having this problem with my old 2FA Electrum wallet. Given the fact that there's a BTG version of Electrum now with ElectrumG did this make things a little easier?
There's an easier but riskier way aside from the above.
All you have to do is to use TrustedCoin's 2FA Recovery tool (from Electrum's 2fa service provider) and it will generate a ElectrumG-supported 2of3 multisig wallet file.
Then you can simply open that "wallet_recovered" file using ElectrumG.

The catch is, you'll have to paste your seed phrase to that tool.
If you're interested: https://trustedcoin.com/static/recover/standalone.html (https://trustedcoin.com/static/recover/standalone.html) (please read the warnings)


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: bohnhardt on April 10, 2021, 02:29:39 PM
Thank you both for your answers!

There's an easier but riskier way aside from the above.
All you have to do is to use TrustedCoin's 2FA Recovery tool (from Electrum's 2fa service provider) and it will generate a ElectrumG-supported 2of3 multisig wallet file.
Then you can simply open that "wallet_recovered" file using ElectrumG.

The catch is, you'll have to paste your seed phrase to that tool.
If you're interested: https://trustedcoin.com/static/recover/standalone.html (https://trustedcoin.com/static/recover/standalone.html) (please read the warnings)

Man, you are a saint! That worked flawlessly and it was a matter of 1 minute! I saved the page locally and disconnected from the internet before putting in my seed (like they recommend). It generated a wallet that I was able to open in ElectrumG.

Thanks again!


Title: Re: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP]
Post by: nc50lc on April 11, 2021, 03:07:32 AM
Man, you are a saint! That worked flawlessly and it was a matter of 1 minute! I saved the page locally and disconnected from the internet before putting in my seed (like they recommend). It generated a wallet that I was able to open in ElectrumG.
You're welcome.. but,
that's not what they meant by saying "offline", you should've saved the page in your disk and launch that on an offline machine... anyways,
the coins has way smaller value than BTC, I just hope that you've already sent your Bitcoins from the addresses of that seed phrase before extracting your BTG.