Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: walleting.services on November 18, 2017, 09:04:10 PM



Title: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: walleting.services on November 18, 2017, 09:04:10 PM
We were successful in extracting the Bitcoin Gold from a multisig address that was made using the Electrum-Trustedcoin method. Our 2Fa / multisig BTG digging service is now open for business.

Walleting.Services BTG Digging:
--> https://bitcointalk.org/index.php?topic=2434261.0 <--


This is a dedicated thread for those using Electrum 2FA or Multisig wallets trying to claim your Bitcoin Gold:
This post was useful: https://bitcointalk.org/index.php?topic=1989369.msg19853098#msg19853098
The Process:

0) empty your real BTC & BCH from the wallet
1) Regenerate your 2FA electrum wallet with the seed, select "disable" 2FA
2) Find your multisig address with BTG in it. It starts with a 3. Right click, details
3) copy-past your Redeem Script here: https://coinb.in/#verify (save page offline for maximum security)
4) (for 2-of-3 methods, as most will be) find the 3 addresses that need at least 2 of them to sign
5) Dig your X1 & X2 xpriv keys from the text file in your regenerated, password-less, disabled 2FA wallet file.  It's in plain text. Windows it's in %appdata%/electrum, mac it's in ~/.electrum. Linux is in Go -> Location and type ~/.electrum
6) Make a 2 new standard electrum wallets using the 2 xprv keys and find one of the addresses needed to sign your 2FA address in each of them.
OR
6a) Use this: https://iancoleman.io/bip39/ or this http://bip32.org/ to find the private keys using the 2 xprv keys you dug out earlier. (we ended up generating 10,000 keys to find ours)
7) Create your new transaction in the Bitcoin Gold Debug Console (get Hex)
8) Sign the transaction with the first key (get Hex)
9) Sign the transaction with the second key (get Hex)
10) sendrawtransaction "hex"

[scroll down a few posts for the exact commands to enter into the console]


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: walleting.services on November 18, 2017, 10:25:11 PM
Update:

Have found 2 private keys for a 2-of-3 multisig address with BTG in it.

Working on creating the raw transaction to broadcast in the Bitcoin Gold Core wallet.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: walleting.services on November 19, 2017, 12:44:20 PM
Update:

We were successful in broadcasting the transaction and the Bitcoin Gold was freed from it's multisig chamber.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: Bit123ABC on November 25, 2017, 04:35:33 PM
Hi,
I am trying to do the same thing, but are having trouble with step 8, signing the transaction. Are you able to write a bit more detail on how you set the transaction up/ got the txid and vout? I must be using a wrong one somehow. When signing the transaction the hex i get is identical to the one i put in.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: walleting.services on November 26, 2017, 04:20:51 PM
**Warning: It is about to get nerdy**
If this is too intimidating or you get stuck, please consider our BTG Digging Service.
We will do this for you and charge a small fee. References available.

Walleting.Services BTG Digging:
--> https://bitcointalk.org/index.php?topic=2434261.0 <--



Hi,
I am trying to do the same thing, but are having trouble with step 8, signing the transaction. Are you able to write a bit more detail on how you set the transaction up/ got the txid and vout? I must be using a wrong one somehow. When signing the transaction the hex i get is identical to the one i put in.


First you need to gather all the inputs that funded the address (essentially you need to find all transactions that funded the address and were unspent when the fork happened).

Then you can open the console in Electrum (View > Show Console) and type the following command (replace TXID_HERE with the transaction ID of one of the input transactions from the previous step):

deserialize(gettransaction("TXID_HERE"))

You'll get a formatted JSON output. Under "outputs" you need to find your 2FA / Multisig address. Once you find it you'll see three fields under the address that you need to take note of:
prevout_n -> this is the vout value
scriptPubKey -> needed for signing the transaction
value -> also needed for signing the transaction to avoid triggering replay protection

You need to repeat this for every input!!!

Once you have all the values written down you need to create a raw transaction. You can do this by running the following command in Bitcoin Gold Core:

createrawtransaction '[{"txid": "INPUT_TRX_ID", "vout": VOUT_VALUE}]' '{"YOUR_BTG_ADDRESS":  AMOUNT_TO_SEND}'

Please note that you need to repeat the following for EVERY input!!

{"txid": "INPUT_TRX_ID", "vout": VOUT_VALUE}

So for example if you have 3 inputs the command would look something like this:

createrawtransaction '[{"txid": "INPUT_TRX_ID_1", "vout": VOUT_VALUE_1}, {"txid": "INPUT_TRX_ID_2", "vout": VOUT_VALUE_2}, {"txid": "INPUT_TRX_ID_3", "vout": VOUT_VALUE_3}]' '{"YOUR_BTG_ADDRESS":  AMOUNT_TO_SEND}'

Also note that AMOUNT_TO_SEND should be the sum of all "value" fields MINUS the transaction fee you wish to pay! (Make sure the amount is in BTC / BTG and NOT in mBTC / mBTG or anything similar).

After you run this command you should get a raw transaction hash. Next you need to sign it. You will do this by running the following command:

signrawtransaction "RAW_TRANSACTION_HASH" '[{"txid": "INPUT_TRX_ID", "vout": VOUT_VALUE, "scriptPubKey": "INPUT_SCRIPT_PUB_KEY", "redeemScript": "MULTISIG_ADDRESS_REDEEM_SCRIPT", "amount": "INPUT_VALUE_FIELD"}]' '["FIRST_PRIVATE_KEY_FOR_SIGNING"]'

Please note that you should again repeat the input part for every input like you did with "createrawtransaction" except that this time you need to also provide "redeemScript", "scriptPubKey" and "amount" fields for each input!!

Once you run this command you should see the HEX hash of the signed transaction and an error saying something like "The current operation isn't possible with the current stack size!". This error is normal and it's just saying we need to sign the transaction with another private key before we can spend the inputs.

To sign it for the second time run the same command again, but replace the RAW_TRANSACTION_HASH with the new, signed transaction hash (you can find it above the error) and replace FIRST_PRIVATE_KEY_FOR_SIGNING with the second private key. Once you run the command you should get the signed transaction hash. You can then run the following command to broadcast it to the network:

sendrawtransaction "SIGNED_TRX_HASH"


That was easy, right? No?
Then have us do it for you!
Walleting.Services BTG Digging:
--> https://bitcointalk.org/index.php?topic=2434261.0 <--


Tips: GZrbRvCaEppbEB4493HCeU3w6GXPnDs5XB


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: Bit123ABC on November 28, 2017, 11:18:14 AM
Thanks guys!! :)
Got it working. I was using a wrong scriptPubKey and did not have the amount in my signrawtransaction statements.
Believe some of the wallets are working on making the process more user friendly, so that will probably come soon, but if you let me have an address i am happy to send a btg your way for your help.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: Bit123ABC on November 28, 2017, 03:03:16 PM
I made a spreadsheet to repeat the process a bit easier. As it is; it will only help with "one input" transactions, ie. not work for addresses that have received multiple transfers. Most of mine however had not. Link below in case it can help anyone (All the hashes, addresses etc. in the sheet are invalid).

http://wikisend.com/download/745806/redeem.ods (http://wikisend.com/download/745806/redeem.ods)

SHA-256: 0ae5e292b8ac0f756726e378b7dfb34535bc1f1c1f85b44a0e3c5c8e004720b5


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: walleting.services on November 28, 2017, 06:27:03 PM
if you let me have an address i am happy to send a btg your way for your help.

Thank you very much for the recognition and the tip:

GZrbRvCaEppbEB4493HCeU3w6GXPnDs5XB

We felt the most ethical thing to do was give away the info on how to solve the problem while offering our service to do it for customers who don't want to go through all of that.





Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: YuriyOdUa on December 01, 2017, 02:14:30 AM
Hi.
Cannot find needed multisig adresses (with funds) after regenerating my 2FA electrum (with disabled 2FA).
Can't find them after regenerating with enabled 2FA either. Am I doing something wrong?


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: turboblade on December 01, 2017, 03:10:45 AM
Excellent instructions, many thanks. Got the Tx created and signed correctly, however when I try to send transaction to network I am faced with the following error.

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

Any ideas?


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: turboblade on December 01, 2017, 11:49:57 AM
Excellent instructions, many thanks. Got the Tx created and signed correctly, however when I try to send transaction to network I am faced with the following error.

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

Any ideas?

Figured it out for anyone who's interested. Make sure you use the amounts of the original inputs when signing. I was using adjusted amounts to allow for fees, which was incorrect. Although it will sign correctly, the transaction cant be sent. The fees adjustment need only be taken into account when creating the transaction, not while signing it.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: ThomasAnderson7 on December 01, 2017, 06:07:32 PM
I don't understand the order from the instructions from the first post and the detailed 5th post, can someone clear that to me please?
And if someone can write the instructions in a simpler way would be great


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: walleting.services on December 02, 2017, 03:49:13 AM

I don't understand the order from the instructions from the first post and the detailed 5th post, can someone clear that to me please?
And if someone can write the instructions in a simpler way would be great

We can do it for you at a special rate of 10% drop us a PM or an email and mention this post.



Walleting.Services BTG Digging:
--> https://bitcointalk.org/index.php?topic=2434261.0 <--

 


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: turboblade on December 02, 2017, 09:02:26 AM
If you follow the instructions above it will work for you. If you have multiple previous (deposits)  inputs to the address you are trying to unlock, the command becomes rather long, though achievable. Let me know if you need any help


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: walleting.services on December 02, 2017, 01:53:02 PM
Has anyone been able to extract BTG from a SegWit address?

We are currently banging our heads against this one for a client. Not sure if it is even possible right now. We keep getting an error:

Segregated witness not enabled on network (code -4)

Bitcoin Gold website claims they support Segwit, but Bitcoin Gold Core claims the network doesn't... We wonder if it's possible to mine such a transaction but not possible for the Core client to broadcast it yet...

 ???


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: ThomasAnderson7 on December 02, 2017, 03:03:30 PM

I don't understand the order from the instructions from the first post and the detailed 5th post, can someone clear that to me please?
And if someone can write the instructions in a simpler way would be great

We can do it for you at a special rate of 10% drop us a PM or an email and mention this post.

Sorry but that's what I think, if you can do it you could write a simpler tutorial and earn with tips, because if I can, thanks to you, recover my BTG automatically I feel I owe you something, I think everyone in Bitcoin community if they find themselves in a situation like this would think the same, the soultion so would be to write a simpler guide with screenshots.
That's because no one, even at the cost of losing money, would give their private keys. There will be more forks, it can happen something, but the private keys are personal, so it's obvious no one would agree to that, even at a price like 5% or 2%.
So if you wanna help give help following on Skype step by step and getting paid 10% or write a simpler tutorial and earn by donations. That's my piece of advice.


If you follow the instructions above it will work for you. If you have multiple previous (deposits)  inputs to the address you are trying to unlock, the command becomes rather long, though achievable. Let me know if you need any help

Can you help me step by step on Skype via Chat? I can pay you 7% of my Bitcoin Gold


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: walleting.services on December 03, 2017, 01:20:32 AM
We just extracted BTG from a Segwit address for a client. It was hard to figure out at first, but relatively straight forward once we figured out our issues. The WS team member that did that job it will write it up soon so the community can benefit.


So if you wanna help give help following on Skype step by step and getting paid 10% or write a simpler tutorial and earn by donations. That's my piece of advice.

Thank you for your feedback.

Please check our growing list of satisfied clients in our thread service thread:  https://bitcointalk.org/index.php?topic=2434261.msg24929414#msg24929414

We are one of the good guys, acting ethically, doing hard work, and giving away game for free. Our intent is to make a good name for ourselves and offer our services for many years in many different forms. That being said, we understand your desire to preserve the integrity of your private keys for future forks. We understand that our guarantee to delete your seed immediately after BTG retrieval and never extract any other coin without your approval is not good enough for you, and we can respect that.

We don't use Skype for security reasons, but for $100/hr (minimum 1 hour charge, ) we can have a team member jump on a Telegram, Cryptocat, Signal or something similar and work with you through to extract your BTG, telling you exactly what to type into the debug console. You will never have to reveal your seed or private keys to us. Note that you must have the latest version of Bitcoin Gold Core with the ~140GB blockchain fully sync'd.  (Also make sure you didn't download the "scam version" that was available from their Github for 1.5 days earlier this week)

DM or email us walleting.services at protonmail dot com and we can set up a time.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: ThomasAnderson7 on December 03, 2017, 02:00:10 AM
We just extracted BTG from a Segwit address for a client. It was hard to figure out at first, but relatively straight forward once we figured out our issues. The WS team member that did that job it will write it up soon so the community can benefit.


So if you wanna help give help following on Skype step by step and getting paid 10% or write a simpler tutorial and earn by donations. That's my piece of advice.

Thank you for your feedback.

Please check our growing list of satisfied clients in our thread service thread:  https://bitcointalk.org/index.php?topic=2434261.msg24929414#msg24929414

We are one of the good guys, acting ethically, doing hard work, and giving away game for free. Our intent is to make a good name for ourselves and offer our services for many years in many different forms. That being said, we understand your desire to preserve the integrity of your private keys for future forks. We understand that our guarantee to delete your seed immediately after BTG retrieval and never extract any other coin without your approval is not good enough for you, and we can respect that.

We don't use Skype for security reasons, but for $100/hr (minimum 1 hour charge, ) we can have a team member jump on a Telegram, Cryptocat, Signal or something similar and work with you through to extract your BTG, telling you exactly what to type into the debug console. You will never have to reveal your seed or private keys to us. Note that you must have the latest version of Bitcoin Gold Core with the ~140GB blockchain fully sync'd.  (Also make sure you didn't download the "scam version" that was available from their Github for 1.5 days earlier this week)

DM or email us walleting.services at protonmail dot com and we can set up a time.

lol.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: adys11 on December 04, 2017, 07:21:13 AM
I have the same issue, f2a electrum wallet.

trezor have a new solution for this, didn't check it, I wonder if it will work for the f2a multisig

https://blog.trezor.io/claim-bitcoin-gold-bgold-btg-f66969e7f2c0


I will check it tonight and update.

* wallet new version to support this is still in beta, so I will wait few more days.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: HCP on December 04, 2017, 08:46:57 PM
trezor have a new solution for this, didn't check it, I wonder if it will work for the f2a multisig
No, it won't... because the Trezor tool is designed for claiming the BTG from your Trezor BTC wallet... NOT from other wallets.

If you need to get the BTG from your Electrum 2FA wallet, you'll need to follow the guide that they have provided here... and you'll need BTG Core installed and fully synced... or you'll need to get someone you trust that has BTG Core, give them your Electrum 2FA seed and let them do it on your behalf.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: adys11 on December 04, 2017, 10:49:04 PM
trezor have a new solution for this, didn't check it, I wonder if it will work for the f2a multisig
No, it won't... because the Trezor tool is designed for claiming the BTG from your Trezor BTC wallet... NOT from other wallets.

If you need to get the BTG from your Electrum 2FA wallet, you'll need to follow the guide that they have provided here... and you'll need BTG Core installed and fully synced... or you'll need to get someone you trust that has BTG Core, give them your Electrum 2FA seed and let them do it on your behalf.

You are right.
I have the core installed and sync finished today.
Need to find the time to do it, I will update here.

Thanks!

Ady.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: Lazybits on December 05, 2017, 10:37:22 PM
Hmm..

so I'm trying this here:

createrawtransaction '[{"txid": "my input txid is here", "vout": 77531100}]' '{"my bitcoin gold address is here": 77450000}'

and I'm getting this:

Amount out of range (code -3)

What does that mean?



UPDATE: nevermind.. now I'm hung up at signing the with the 2nd private key.  I'm getting this message:

"error": "Script evaluated without error but finished with a false/empty top stack element"



YET ANOTHER UPDATE:

I got the signed HEX value, now when I attempt the sendrawtransaction I get the following:

Missing inputs (code -25)


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: HCP on December 06, 2017, 08:34:49 AM
It means some of the inputs you are attempting to use, don't exist (anymore)... so they've either already been used in a transaction... or you are using the wrong inputs.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: Lazybits on December 06, 2017, 09:03:24 AM
It shows the BTG as sitting there unspent when I put them in https://btgexplorer.com/


I followed the steps in this thread as such:

createrawtransaction '[{"txid": "the txid from the address holding btg on electrum", "vout": 1}]' '{"my btg address in core":  amount_of_btg_to_move_here}'

that gave me my raw hash

signrawtransaction "the_raw_hash" '[{"txid": "txid from above", "vout": 1, "scriptPubKey": "pub_key_here", "redeemScript": "redeem script from electrum", "amount": "amount_of_btg_to_move_here"}]' '["first private key to sign with"]'

Got the error it says to expect, along with a longer hash

signrawtransaction "the_longer_hash", "vout": 1, "scriptPubKey": "pub_key_here", "redeemScript": "redeem script from electrum", "amount": "amount_of_btg_to_move_here"}]' '["2nd private key to sign with"]'

it says complete and tosses out another hash.

Now I do this and have the error...

sendrawtransaction "the_final_hash"

**I'm scratching my head here**


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: HCP on December 06, 2017, 10:18:13 AM
Are you sure that your "vout" value is correct?

Also, are you passing the TXID into the 2nd "signrawtransaction" command?

And as someone else had problems with... is your "amount_of_btg_to_move_here" set to the original amount of BTC or the amount of BTG - fee? (hint: it should be the original amount of BTC)


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: Lazybits on December 06, 2017, 05:36:10 PM
You are the man! 

Somehow I did get some numbers mixed up in the copy/paste tornado that I was in the middle of the night.  Wow, it worked!

Thanks!


 ;D ;D ;D


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: angelitomdq on December 06, 2017, 08:14:03 PM
Are you sure that your "vout" value is correct?

Also, are you passing the TXID into the 2nd "signrawtransaction" command?

And as someone else had problems with... is your "amount_of_btg_to_move_here" set to the original amount of BTC or the amount of BTG - fee? (hint: it should be the original amount of BTC)
hi  I have 1.65 in an electrum wallet and I can not recover them .. the truth is that I can not understand the steps to follow, could you help me? for a reward ..


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: HCP on December 08, 2017, 04:35:54 AM
hi  I have 1.65 in an electrum wallet and I can not recover them .. the truth is that I can not understand the steps to follow, could you help me? for a reward ..
Done... and Done! ;) Glad to have been able to help... Have a great weekend  8)


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: angelitomdq on December 08, 2017, 08:40:02 PM
thanks to you, I totally recommend this person, in 10 minutes I had my btg available, super reliable and friendly in the deal!


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: LeonardoDiCrypto on December 08, 2017, 08:53:51 PM
Does the procedure described in this thread work also to redeem Bitcoin Cash from an Electrum Multisig wallet?


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: adys11 on December 08, 2017, 11:57:02 PM
**Warning: It is about to get nerdy**
If this is too intimidating or you get stuck, please consider our BTG Digging Service.
We will do this for you and charge a small fee. References available.

Walleting.Services BTG Digging:
--> https://bitcointalk.org/index.php?topic=2434261.0 <--



Hi,
I am trying to do the same thing, but are having trouble with step 8, signing the transaction. Are you able to write a bit more detail on how you set the transaction up/ got the txid and vout? I must be using a wrong one somehow. When signing the transaction the hex i get is identical to the one i put in.


First you need to gather all the inputs that funded the address (essentially you need to find all transactions that funded the address and were unspent when the fork happened).




I did all the steps, I have now 2 wallets, with 2 addresses that need to be signed. (both are first addresses from some reason)
Now the inputs:

https://blockchain.info/address/321SXfj5sMQ8VcgcgtNC1SZgMa4YZrvLWv
 (https://blockchain.info/address/321SXfj5sMQ8VcgcgtNC1SZgMa4YZrvLWv)

or here
https://btgexplorer.com/address/AG6JFd6GebjuDRCB8SMvjhTqgehXLDRveR
 (https://btgexplorer.com/address/AG6JFd6GebjuDRCB8SMvjhTqgehXLDRveR)
Can you please help me to build the command?
I guess its the second transaction from the buttom? a4c64944cfc57822c460436d7fd359bb641cf63e86ba95f50bf5789516bd160b

createrawtransaction '[{"txid": "63d10de4ba8bd486a4f4eb1419a6bc7a52d3ce3d73f6e4dc8e7ecb6d8dd504b3", "vout":0.98889564}]' '{"AG6JFd6GebjuDRCB8SMvjhTqgehXLDRveR":  0.98889564}'

I am getting "JSON integer out of range (code -1)"



update - ok - no need in 0. before the value - so

createrawtransaction '[{"txid": "63d10de4ba8bd486a4f4eb1419a6bc7a52d3ce3d73f6e4dc8e7ecb6d8dd504b3", "vout":98889564}]' '{"AG6JFd6GebjuDRCB8SMvjhTqgehXLDRveR":  98889564}'


now I am getting amount out of range (code -3)
Should I use the same address or a new address?




Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: ApproximateSunlight on December 09, 2017, 01:22:02 AM
**Warning: It is about to get nerdy**
If this is too intimidating or you get stuck, please consider our BTG Digging Service.
We will do this for you and charge a small fee. References available.

Walleting.Services BTG Digging:
--> https://bitcointalk.org/index.php?topic=2434261.0 <--



Hi,
I am trying to do the same thing, but are having trouble with step 8, signing the transaction. Are you able to write a bit more detail on how you set the transaction up/ got the txid and vout? I must be using a wrong one somehow. When signing the transaction the hex i get is identical to the one i put in.


First you need to gather all the inputs that funded the address (essentially you need to find all transactions that funded the address and were unspent when the fork happened).




I did all the steps, I have now 2 wallets, with 2 addresses that need to be signed. (both are first addresses from some reason)
Now the inputs:

https://blockchain.info/address/321SXfj5sMQ8VcgcgtNC1SZgMa4YZrvLWv
 (https://blockchain.info/address/321SXfj5sMQ8VcgcgtNC1SZgMa4YZrvLWv)

or here
https://btgexplorer.com/address/AG6JFd6GebjuDRCB8SMvjhTqgehXLDRveR
 (https://btgexplorer.com/address/AG6JFd6GebjuDRCB8SMvjhTqgehXLDRveR)
Can you please help me to build the command?
I guess its the second transaction from the buttom? a4c64944cfc57822c460436d7fd359bb641cf63e86ba95f50bf5789516bd160b

createrawtransaction '[{"txid": "63d10de4ba8bd486a4f4eb1419a6bc7a52d3ce3d73f6e4dc8e7ecb6d8dd504b3", "vout":0.98889564}]' '{"AG6JFd6GebjuDRCB8SMvjhTqgehXLDRveR":  0.98889564}'

I am getting "JSON integer out of range (code -1)"



update - ok - no need in 0. before the value - so

createrawtransaction '[{"txid": "63d10de4ba8bd486a4f4eb1419a6bc7a52d3ce3d73f6e4dc8e7ecb6d8dd504b3", "vout":98889564}]' '{"AG6JFd6GebjuDRCB8SMvjhTqgehXLDRveR":  98889564}'


now I am getting amount out of range (code -3)
Should I use the same address or a new address?




You have to consider both transaction IDs, anyway the "vout" is the prevout_n, not the value of the transaction.
https://bitcointalk.org/index.php?topic=2550529.0
You can follow this tutorial step by step, if you need any help feel free to ask
Then you have to write the value in BTC, not satoshi (convert with http://satoshitobitcoin.co and don't forget the fee)
There is all written in that tutorial


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: adys11 on December 09, 2017, 09:18:06 PM
**Warning: It is about to get nerdy**
If this is too intimidating or you get stuck, please consider our BTG Digging Service.
We will do this for you and charge a small fee. References available.

Walleting.Services BTG Digging:
--> https://bitcointalk.org/index.php?topic=2434261.0 <--



Hi,
I am trying to do the same thing, but are having trouble with step 8, signing the transaction. Are you able to write a bit more detail on how you set the transaction up/ got the txid and vout? I must be using a wrong one somehow. When signing the transaction the hex i get is identical to the one i put in.


First you need to gather all the inputs that funded the address (essentially you need to find all transactions that funded the address and were unspent when the fork happened).




I did all the steps, I have now 2 wallets, with 2 addresses that need to be signed. (both are first addresses from some reason)
Now the inputs:

https://blockchain.info/address/321SXfj5sMQ8VcgcgtNC1SZgMa4YZrvLWv
 (https://blockchain.info/address/321SXfj5sMQ8VcgcgtNC1SZgMa4YZrvLWv)

or here
https://btgexplorer.com/address/AG6JFd6GebjuDRCB8SMvjhTqgehXLDRveR
 (https://btgexplorer.com/address/AG6JFd6GebjuDRCB8SMvjhTqgehXLDRveR)
Can you please help me to build the command?
I guess its the second transaction from the buttom? a4c64944cfc57822c460436d7fd359bb641cf63e86ba95f50bf5789516bd160b

createrawtransaction '[{"txid": "63d10de4ba8bd486a4f4eb1419a6bc7a52d3ce3d73f6e4dc8e7ecb6d8dd504b3", "vout":0.98889564}]' '{"AG6JFd6GebjuDRCB8SMvjhTqgehXLDRveR":  0.98889564}'

I am getting "JSON integer out of range (code -1)"



update - ok - no need in 0. before the value - so

createrawtransaction '[{"txid": "63d10de4ba8bd486a4f4eb1419a6bc7a52d3ce3d73f6e4dc8e7ecb6d8dd504b3", "vout":98889564}]' '{"AG6JFd6GebjuDRCB8SMvjhTqgehXLDRveR":  98889564}'


now I am getting amount out of range (code -3)
Should I use the same address or a new address?




You have to consider both transaction IDs, anyway the "vout" is the prevout_n, not the value of the transaction.
https://bitcointalk.org/index.php?topic=2550529.0
You can follow this tutorial step by step, if you need any help feel free to ask
Then you have to write the value in BTC, not satoshi (convert with http://satoshitobitcoin.co and don't forget the fee)
There is all written in that tutorial
Great tutorial, thanks!


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: HCP on December 10, 2017, 03:54:24 AM
We just extracted BTG from a Segwit address for a client. It was hard to figure out at first, but relatively straight forward once we figured out our issues. The WS team member that did that job it will write it up soon so the community can benefit.
Any update on this? Would be interested to see the technical details behind extracting from SegWit addresses ;)


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: walleting.services on December 11, 2017, 03:57:13 AM
We just extracted BTG from a Segwit address for a client. It was hard to figure out at first, but relatively straight forward once we figured out our issues. The WS team member that did that job it will write it up soon so the community can benefit.
Any update on this? Would be interested to see the technical details behind extracting from SegWit addresses ;)

We've been quite busy extracting BTG & BCH for clients & working on our automated digging website, which should launch in the next week or two.

When things settle down we'll post the step-by-step for SegWit.



Walleting.Services BTG Digging:
--> https://bitcointalk.org/index.php?topic=2434261.0 <--


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: ApproximateSunlight on December 14, 2017, 12:34:58 PM
There is also another fork, Bitcore (BTX) that can be claimed with their Core Wallet. I'm doing this method too but for that fork for some reason doesn't work. Would be great if you can find the method for BTX and release to the public. :)
Have a nice day!


P.S.The fork is 1 BTC : 0.5 BTX


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: walleting.services on December 14, 2017, 08:46:39 PM
There is also another fork, Bitcore (BTX) that can be claimed with their Core Wallet. I'm doing this method too but for that fork for some reason doesn't work. Would be great if you can find the method for BTX and release to the public. :)
Have a nice day!


P.S.The fork is 1 BTC : 0.5 BTX

Great work on the BTG 2FA explainer you wrote, it is really well done. Didn't find it after a quick look, but if you post it here we can add it to our first post of this thread & to our service thread.

We haven't had a client ask us for their BTX, as it's such little value compared to BCH & BTG, but it is certainly worth looking at to maximize total value for clients.  Do you have to register for that one?  Or are there claiming periods?


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: ApproximateSunlight on December 16, 2017, 02:52:56 PM
There is also another fork, Bitcore (BTX) that can be claimed with their Core Wallet. I'm doing this method too but for that fork for some reason doesn't work. Would be great if you can find the method for BTX and release to the public. :)
Have a nice day!


P.S.The fork is 1 BTC : 0.5 BTX

Great work on the BTG 2FA explainer you wrote, it is really well done. Didn't find it after a quick look, but if you post it here we can add it to our first post of this thread & to our service thread.

We haven't had a client ask us for their BTX, as it's such little value compared to BCH & BTG, but it is certainly worth looking at to maximize total value for clients.  Do you have to register for that one?  Or are there claiming periods?

You too, you're doing a great job too!
Btw I'm talking about this fork https://bitcointalk.org/index.php?topic=1883902.0 I guess it's not very valuable but it's still free money and we can dump it to get better alts


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: bambus002 on December 31, 2017, 01:26:25 PM
Step 6

I see x1, x2, x3 priv key in the wallet file but when i copy e.g X1 to create new wallet, electrum doesn't show "next" button like i would write the wrong xpriv key.

What am I doing wrong here? I need to create wallet_1 with xprv key X1 and wallet_2 with xprv key X2 right? The X3 xprv key says "null" - assuming this means i got disabled 2FA right?


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: HCP on December 31, 2017, 11:00:32 PM
Does your X1 xprv and X2 xprv actually look like this: xprv9vBq3lgskdah4l5h2yt894th93hhbcbsdcgbhsjcguyegfUYGJHGFJHGFg34ff1Z68Mt3vsB3k6SVFk M

That is to say... does it start with the 4 letters "xprv" or does it look something like this: RhooCVdENKkQnsw1SelJzYpJetYscSqnHnc7vKw0bvsKpzv5VquuNKSsX6gBm74wWgv493iawJMGBFF 12OkUfZsES6L2fxDMpdYlfJtpJohGLuGj1sM7mGPppejGFZ9pbRrx1KUJnnQPvCFcaDzVVU5FAmCBVm +ykAuOqLxf2ME=


If it looks like the 2nd example (and ends in =)... "Rhoo.... ME=", then I suspect you have set a wallet password... as per the instructions, when you create the disabled 2FA wallet, you must NOT set a wallet password, otherwise the keys are encrypted and you cannot copy/paste them from the wallet file.

Use: "Wallet -> Password", enter your current password and then leave the new/confirm password boxes BLANK. This will remove the password from your wallet file and when you open the wallet file, you should see that your xprv is now unencrypted and starts with "xprv"


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: ApproximateSunlight on January 01, 2018, 12:10:56 PM
Someone tried this on Super Bitcoin or Bitcore or Bitcoin Diamond?


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: bambus002 on January 01, 2018, 05:53:19 PM
Does your X1 xprv and X2 xprv actually look like this: xprv9vBq3lgskdah4l5h2yt894th93hhbcbsdcgbhsjcguyegfUYGJHGFJHGFg34ff1Z68Mt3vsB3k6SVFk M

That is to say... does it start with the 4 letters "xprv" or does it look something like this: RhooCVdENKkQnsw1SelJzYpJetYscSqnHnc7vKw0bvsKpzv5VquuNKSsX6gBm74wWgv493iawJMGBFF 12OkUfZsES6L2fxDMpdYlfJtpJohGLuGj1sM7mGPppejGFZ9pbRrx1KUJnnQPvCFcaDzVVU5FAmCBVm +ykAuOqLxf2ME=


If it looks like the 2nd example (and ends in =)... "Rhoo.... ME=", then I suspect you have set a wallet password... as per the instructions, when you create the disabled 2FA wallet, you must NOT set a wallet password, otherwise the keys are encrypted and you cannot copy/paste them from the wallet file.

Use: "Wallet -> Password", enter your current password and then leave the new/confirm password boxes BLANK. This will remove the password from your wallet file and when you open the wallet file, you should see that your xprv is now unencrypted and starts with "xprv"

Thanks, that was it :) and btw: Do i need to synchronise whole BTG blockchain via BTG core wallet or i can do next steps without it?


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: ApproximateSunlight on January 01, 2018, 10:08:51 PM
Does your X1 xprv and X2 xprv actually look like this: xprv9vBq3lgskdah4l5h2yt894th93hhbcbsdcgbhsjcguyegfUYGJHGFJHGFg34ff1Z68Mt3vsB3k6SVFk M

That is to say... does it start with the 4 letters "xprv" or does it look something like this: RhooCVdENKkQnsw1SelJzYpJetYscSqnHnc7vKw0bvsKpzv5VquuNKSsX6gBm74wWgv493iawJMGBFF 12OkUfZsES6L2fxDMpdYlfJtpJohGLuGj1sM7mGPppejGFZ9pbRrx1KUJnnQPvCFcaDzVVU5FAmCBVm +ykAuOqLxf2ME=


If it looks like the 2nd example (and ends in =)... "Rhoo.... ME=", then I suspect you have set a wallet password... as per the instructions, when you create the disabled 2FA wallet, you must NOT set a wallet password, otherwise the keys are encrypted and you cannot copy/paste them from the wallet file.

Use: "Wallet -> Password", enter your current password and then leave the new/confirm password boxes BLANK. This will remove the password from your wallet file and when you open the wallet file, you should see that your xprv is now unencrypted and starts with "xprv"

Thanks, that was it :) and btw: Do i need to synchronise whole BTG blockchain via BTG core wallet or i can do next steps without it?

Nope, you need to sync


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: walleting.services on January 03, 2018, 12:30:38 AM

Automated Bitcoin Gold Extraction Tool [Alpha Version] has been released:

dig.walleting.services (https://dig.walleting.services/#/)

Currently this only works for (new version) Electrum Seeds, including 2FA, and BIP 39 phrases. We are going to expand to individual private keys and put buttons to fill in the derivation paths for common wallets.

Next we will upgrade the tool to extract BCD & SBTC, with other currencies being added as they become relevant. Eventually we will build the tool so you put in your seed and it will tell you all coins available for extraction.

We encourage anyone who uses the tool to post here after doing so. Trusting your seed to a website is not something that should be taken lightly, so we must have feedback to build confidence.

Any other ideas to make it more useful we are listening.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: BasBas on January 13, 2018, 08:47:28 AM
I'm stuck at step 6.

My BTG are in 3 different multisig addresses in the same 2FA wallet.

I thought I have to make 3 seperate transactions then. Or can I merge it together into one?

After making the 2 new standard wallets I can only find the public keys for one of the 3 multisig addresses in my new wallets.

The other 2 addresses should be there as well as the BTC were held in the same wallet, no?


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: HCP on January 13, 2018, 10:04:31 AM
You can do it all in one transaction... it just becomes slightly more complicated as you need to include all the different transaction information.... (makes the JSON quite long)... and you also need to provide 3 private keys at each signrawtransaction (ie. x1_xprv_Address1, x1_xprv_Address2, x1_xprv_Address3 for first signrawtransaction... and then x2_xprv_Address1, x2_xprv_Address2 and x2_xprv_Address3 for the second signrawtransaction)

I have succesfully done this several times with two addresses... so I see no reason why it won't work with 3 ;)


As for why you can't see the public keys... Are you creating the new standard wallets with the "xprv"s... or just with a specific WIF private key (ie. starts with "K" or "L")?


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: BasBas on January 13, 2018, 10:38:35 AM
I used the "xprv"s.

Quote
(ie. x1_xprv_Address1, x1_xprv_Address2, x1_xprv_Address3 for first signrawtransaction... and then x2_xprv_Address1, x2_xprv_Address2 and x2_xprv_Address3 for the second signrawtransaction)

x1_xprv_Address1 = x1_xprv_Address2 = x1_xprv_Address3 and x2_xprv_Address1 = x2_xprv_Address2 = x2_xprv_Address3 in my case? Or I don't understand where I get the other 2 from as they are all in the same wallet.

I just noticed that I have 12 addresses in my "Addresses" "change" 2FA wallet but only 6 addresses in the new wallets in the same tab. That must be the missing addresses. So how can the change list be incomplete in the new wallet?


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: HCP on January 13, 2018, 11:07:40 AM
No... in the "signrawtransaction" command you are supposed to provide ["PRIVATE_KEY"]... but you would need to provide ["PRIVATE_KEY_ADDRESS1", "PRIVATE_KEY_ADDRESS2", "PRIVATE_KEY_ADDRESS3"] if you want to take all the inputs from the 3 different addresses... these private keys are generated from the x1_xpv

You would then do the same with the 2nd "signrawtransaction"... you would need to provide the 3 private keys for the 3 different addresses (generated from x2_xprv)

As for why your addresses are "missing", by default, a new Electrum wallet only generates 5 change addresses... chances are your "missing" coins are out past the "gap limit"... and just aren't found when Electrum has scanned 5 change addresses, so it stops... try this command in the console:

Code:
for x in range(0, 20): print wallet.create_new_address(True)

That should generate 20 new "change" addresses... and you should see the ones you need ;)  Do that command in both of the new standard wallets you created with the x1 and x2 xrpvs


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: oliversh on January 14, 2018, 12:00:57 AM
hi, I got to the last step for signing the raw transaction, but now get the error message:

Invalid private key (code -5)

The 1st private key starts with 'xprv.....' and I got it from the wallet text file. I tried the 2nd priv key and got the same error code. Its a 2 of 3 multisig wallet. Its a restored wallet with disabled 2fa.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: LeonardoDiCrypto on January 14, 2018, 12:04:43 AM
Does the same procedure work also for extracting Bitcoin Cash from a Multisig Electrum Wallet? I still have them sitting there since all usual procedures didn't work...


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: HCP on January 14, 2018, 12:15:56 AM
hi, I got to the last step for signing the raw transaction, but now get the error message:

Invalid private key (code -5)

The 1st private key starts with 'xprv.....' and I got it from the wallet text file. I tried the 2nd priv key and got the same error code. Its a 2 of 3 multisig wallet. Its a restored wallet with disabled 2fa.

You didn't follow the process correctly. You don't sign with the "xprv"... you need to create two standard wallets using the xrpvs... and get the private keys from those wallets... the private keys should start with either a "K" or an "L"...


Does the same procedure work also for extracting Bitcoin Cash from a Multisig Electrum Wallet? I still have them sitting there since all usual procedures didn't work...
Technically yes, but you can simply use "ElectronCash" (https://electroncash.org/#download)... open your "restored/disabled" 2FA wallet in ElectronCash and you should be able to simply send the BCH out ;)



Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: oliversh on January 14, 2018, 08:34:59 AM
hi, I got to the last step for signing the raw transaction, but now get the error message:

Invalid private key (code -5)

The 1st private key starts with 'xprv.....' and I got it from the wallet text file. I tried the 2nd priv key and got the same error code. Its a 2 of 3 multisig wallet. Its a restored wallet with disabled 2fa.

You didn't follow the process correctly. You don't sign with the "xprv"... you need to create two standard wallets using the xrpvs... and get the private keys from those wallets... the private keys should start with either a "K" or an "L"...

Thanks, I made it up-to point 6 "Make a 2 new standard electrum wallets using the 2 xprv keys and find one of the addresses needed to sign your 2FA address in each of them."

Now, there are two wallets with different addresses starting with 1xxxx and no balance or history. Will signing with the key of any address do, or is there a way to figure out which 3xxx address corresponds to which two 1xxx addresses?


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: HCP on January 14, 2018, 09:06:23 AM
Did you actually do points 2), 3) and 4)? If so, then you should know exactly which "1xxxx" addresses you need to get the private keys for. When you paste the redeemscript in the "Verify" section you'll see something like:
https://talkimg.com/images/2023/11/15/zDf9j.jpeg

You should find that two of the three "1xxx" addresses displayed can be in found in the X1 and X2 wallets.

NOTE: you did to get the redeemscript for EACH of your "3" addresses from your Electrum 2FA that you are trying to spend the coins from... and then find the "1xxxx" addresses... and then get those private keys.




Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: oliversh on January 14, 2018, 09:33:43 AM
Gosh, I didnt. Thanks for pointing that out. I actually followed a set of instructions from elsewhere, and only referenced point 6 here as it had to do with the xprv issue that you kindly clarified. I got the addresses from coinb.in and finally got my complete command configured. I tested it in offline mode as I don't have the chain synced yet and got the error "Method not found (code -32601)"....
I went online repeated all the steps and finally got "Complete" :  true     :)

I avoided having to sync the entire blockchain by broadcasting the transaction hash from https://btgexplorer.com/tx/send and I've got my BTG now!  :)

Thanks OP and HCP.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: HCP on February 19, 2018, 06:41:01 PM
We've been quite busy extracting BTG & BCH for clients & working on our automated digging website, which should launch in the next week or two.

When things settle down we'll post the step-by-step for SegWit.
Any chance we'll get that step-by-step for SegWit? I'm just curious to know if it was basically the same as what I did for a guy over the weekend... in short:

- importprivkey's into Bitcoin Gold Core, without rescan (saves some time ;))
- addmultisigaddress using public keys that match imported priv keys (gives "Legacy" MultiSig address)
- addwitnessaddress using "legacy" multisig address (gives SegWit MultiSig address)
- restart Bitcoin Gold Core using -rescan (wait "patiently" for an hour)
- create transaction as normal in the GUI, using coin control to spend from just the SegWit MultiSig address coins.
- PROFIT! :D


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: the_crazy88 on February 24, 2018, 11:32:57 PM
As it is for me to complicated to create for all forks a wallet and download the blockchain.
I used the above mentioned service for a lot of coins BCH, BCG, BCD ...
for my electrum 2fa wallet and it worked great:
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: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: marganargal27 on March 06, 2018, 05:06:24 PM
I am able to run the "createrawtransaction" command, after which I am given the appropriate "raw transaction hash".

After that, however, when I enter the "raw transaction hash" as the first argument in the following command ("signrawtransaction"), I am given this error:

Quote
"error": "Witness program was passed an empty witness"

My best guess is that this is happening because I'm using the latest version of Electrum. To be more clear: even though the address I'm using to create the raw transaction is NOT segwit, the latest version of Electrum IS segwit-ready. Could that explain this error?

I tried using an older version of Electrum to generate the necessary data (redeem scripts, public keys, private keys, etc), but again, when I tried to run everything in the Bitcoin Gold console, I received the same error.

Does anyone here know why I'm getting this "empty witness error?" What do I need to add to my commands to satisfy this requirement?

Many thanks in advance...

 


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: HCP on March 07, 2018, 01:55:18 AM
I doubt that the version of Electrum you are using has any bearing on this... the redeem scripts and public/private keys *should* be the same regardless of version... UNLESS your wallet is indeed a SegWit wallet.

The "Witness Program" error would indicate that the input you are attempting to spend is, in fact, a SegWit input... or maybe it was included in a "SegWit" transaction (ie. one of the other outputs was a SegWit transction) and now you need to provide all the witness data.

Are you able to provide any more information? Maybe the Transaction ID and vout of the inputs you are trying to spend? If you'd rather not post publicly for privacy reasons, you can PM me...

Alternatively, I think that if you provide the "witness" info... you should be able to make it work. Basically, you "double up" on the the "Input" section and include the witness script in the 2nd one... like this:
Quote
signrawtransaction "OUTPUT_HEX_FROM_CREATERAWTRANSCTION" '[{"txid": "your_tx_id","vout": X,"scriptPubKey": "whatever_your_scriptpubkey_is","redeemScript":"theReedemScriptForYourMultiSig","amount": "0.10000000"},{"txid": "same_tx_id","vout": X,"scriptPubKey": "whatever_your_scriptpubkey_is","redeemScript":"SEGWIT_witnessScript","amount": "0.10000000"}]','["private_key1","privatekey2"]'
Note that txid, vout and scriptPubKey should be the same for both records... it is just the "redeemScript" section that should change.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: marganargal27 on March 07, 2018, 03:55:09 PM
Thank you SO much for getting back to me so quickly.

The wallet I'm coming from is definitely not a segwit wallet. If nothing else, the fact that it is using "3" addresses (and not bech32 addresses) should confirm this -- unless you know something I don't!

The template you sent makes a lot of sense, structurally. Can you give me some idea where I can find the "SEGWIT_witnessScript" you mentioned? From the research I've done, that seems like the only thing I'm missing. If I could find out how to retrieve that, I'm pretty sure it would solve everything.

I'd really like to try to get it going on my own, but if we can't solve it here, publicly, then I will DM you with the more private details. If we must do it that way, I'll post the solution back here for any others who need it, once I have success.

Thank you again for your help and your quick response. I just can't tell you how much I appreciate it!


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: HCP on March 07, 2018, 08:09:28 PM
The wallet I'm coming from is definitely not a segwit wallet. If nothing else, the fact that it is using "3" addresses (and not bech32 addresses) should confirm this -- unless you know something I don't!
Guessing you have not heard of P2SH-P2WPKH addresses (https://bitcoincore.org/en/segwit_wallet_dev/#creation-of-p2sh-p2wpkh-address) then...

Like any other P2SH address, P2SH-P2WPKH address has prefix 3.

Most of the SegWit wallets use addresses that start with a "3"... they're "backwards compatible" and indistinguishable from other "3" addresses... so it's POSSIBLE that you have a SegWit wallet... but just because they start with a "3" doesn't mean they are SegWit addresses. MultiSig and 2FA wallets also use addresses that start with "3".

How did you make this wallet? What does it say in  the [ ]'s after the wallet name in the titlebar? It should be something like "standard", "imported", "2-of-X" or "2fa"...


Quote
The template you sent makes a lot of sense, structurally. Can you give me some idea where I can find the "SEGWIT_witnessScript" you mentioned? From the research I've done, that seems like the only thing I'm missing. If I could find out how to retrieve that, I'm pretty sure it would solve everything.
That's going to depend a lot on whether or not you actually have a SegWit wallet... If you do indeed have a SegWit wallet, the "SEGWIT_witnessScript" is just: ripemd160(sha256(pubkey_of_your_segwit_address))


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: marganargal27 on March 07, 2018, 08:21:10 PM
It's a multisig 2 of 3 wallet, created in Electrum. I say it has a "3" address because it is multisig Electrum. The reason I don't think it's segwit is because I created it before Electrum supported Segwit, and because it doesn't use the bech32 format.

If I am wrong about this, please let me know, and thank you again.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: HCP on March 07, 2018, 11:53:12 PM
Yeah... Should just be a "legacy" MultiSig wallet then... In which case, I've no idea why it is giving you errors about the witness program...

The only other thing I can think of, without seeing specific details like TXIDs and addresses, is that you've selected the wrong "vout" value from the transaction... and so it is attempting to use a UTXO belonging to a SegWit address and therefore giving the error due to there being no witness data supplied.

Double check the "vout" value (labelled in Electrum as "prevout_n") given when you look up the TXID that generated the UTXO that you're trying to use by entering he following in the Electrum console:
Code:
deserialize(gettransaction("Your_TXID"))


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: marganargal27 on March 08, 2018, 05:32:07 PM
Many, many thanks again. I will check back in once I've looked at your suggestion.


Title: Re: Extracting Bitcoin Gold from 2FA & Multisig Electrum Wallet
Post by: dance on April 11, 2021, 09:33:44 PM
Just had a success in extracting BTG from my old 2/2 multisig BitPay wallet.
It's not hard if you know what to do.
All that is needed is BIP39 Mnemonic Code Converter and ElectrumG.