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"