Pages:
Author

Topic: [TUTORIAL] How to extract Bitcoin Gold from a 2fa Electrum Wallet [STEP BY STEP] - page 4. (Read 1818 times)

member
Activity: 72
Merit: 10
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
HCP
legendary
Activity: 2086
Merit: 4314
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
jr. member
Activity: 38
Merit: 3
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
jr. member
Activity: 38
Merit: 3
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
jr. member
Activity: 38
Merit: 3
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.
newbie
Activity: 19
Merit: 0
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
newbie
Activity: 6
Merit: 0
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!! Wink Tongue

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
HCP
legendary
Activity: 2086
Merit: 4314
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!! Wink Tongue

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

newbie
Activity: 6
Merit: 0
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 Sad
HCP
legendary
Activity: 2086
Merit: 4314
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
newbie
Activity: 6
Merit: 0
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..
HCP
legendary
Activity: 2086
Merit: 4314
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.
newbie
Activity: 15
Merit: 0
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!
HCP
legendary
Activity: 2086
Merit: 4314
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! Tongue)

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. Smiley
newbie
Activity: 2
Merit: 0
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!
member
Activity: 182
Merit: 33
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
HCP
legendary
Activity: 2086
Merit: 4314
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. Undecided 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...
newbie
Activity: 54
Merit: 0
Hey I dont see any tips on your BTG/BTC addresses.... has this not helped anyone or are they all skinflints?
member
Activity: 182
Merit: 33
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? Wink


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  Smiley

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
newbie
Activity: 2
Merit: 0
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
Pages:
Jump to: