Pages:
Author

Topic: [SOLVED] How do you recover BTC from a multi-signature wallet? (Read 269 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
BACKSTORY

I was using Guarda as my wallet for my BTC. I was using their multi-signature BTC wallet with my friend; 2of2, meaning I needed 2 signatures in order to send out my BTC (i.e we both need to sign it for us to be able to withdraw). For the last 3 months, there was a bug with specifically the BTC multi-sig wallets, in that whenever you create a transaction, the other person would not see it, hence unable to sign it, meaning your BTC was stuck with no other way to withdraw it. Guarda staff constantly said "they're working on a fix" with no other explanation, and after 3 months of the same response, I got fed up with waiting and did my own research. Here is the solution to how I successfully withdrew my BTC from Guarda, without actually using Guarda itself, despite it being a multi-signature wallet. I hope this helps someone who may be stuck in a similar position to me in the future!

--snip--

STEP 3: Create your TRANSACTION https://i.imgur.com/cBq282f.png

I got 404 when accessing this image.

Figure out what you want the fee to be (make sure it's large enough to get confirmed on the first block). This is if you are sending the ENTIRE BALANCE ONLY. So if you are sending 0.2 BTC, and that's your entire balance, do like 0.197 BTC and keep 0.003 as the fee (for example).

For advance or very experienced user those who bother calculate total input and output (along with it's type) on transaction will be created, they could use
1. Use https://bitcoinops.org/en/tools/calc-size/ or https://jlopp.github.io/bitcoin-transaction-size-calculator/ to get transaction size.
2. Use https://mempool.space/ to choose fee rate.
3. Multiply chosen fee rate with their transaction size (in vB/vBytes unit) to determine the TX fee.
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
STEP 4: SIGN THE TRANSACTION USING YOUR PRIVATE KEYS! https://i.imgur.com/GNrgljk.png
With this info, I can conclude that the exported WIF private key isn't used as HD seed.
So for reference, using the "descriptor method" in my previous post should work in case Bitcoin Core is preferred instead of Coinb.in.

If the cosigners wishes to create their own cosigner wallets, they can replace the other party's private key with its public key instead.
And the other party doesn't even have to sync Bitcoin Core to co-sign the partially signed bitcoin transaction.
newbie
Activity: 9
Merit: 32
BACKSTORY

I was using Guarda as my wallet for my BTC. I was using their multi-signature BTC wallet with my friend; 2of2, meaning I needed 2 signatures in order to send out my BTC (i.e we both need to sign it for us to be able to withdraw). For the last 3 months, there was a bug with specifically the BTC multi-sig wallets, in that whenever you create a transaction, the other person would not see it, hence unable to sign it, meaning your BTC was stuck with no other way to withdraw it. Guarda staff constantly said "they're working on a fix" with no other explanation, and after 3 months of the same response, I got fed up with waiting and did my own research. Here is the solution to how I successfully withdrew my BTC from Guarda, without actually using Guarda itself, despite it being a multi-signature wallet. I hope this helps someone who may be stuck in a similar position to me in the future!

SOLUTION
The solution was creating a raw transaction from a website such as https://coinb.in - including creating, verifying, signing and broadcasting the transaction all on the site itself. Here's how I did it. As it was a multi-signature wallet it was slightly more complicated than recovering a regular wallet, and there are 0 guides explaining what I did anywhere. As complicated as this sounds, I am no expert myself, I have written the simplest guide I possibly can explaining exactly what I did.

STEP 1: Obtain your REDEEM SCRIPT https://i.imgur.com/1gOO66s.png
On https://coinb.in/#newMultiSig select NEW -> MultiSig Address. Paste your PUBLIC BTC KEYS for each co-signer (in my case it was me and my friends). Make sure the number of signatures in the box below is correct. It should be relatively easy to find your public key depending on what wallet you use. Remember, it's the public key specifically from the BTC address you use to sign your transactions for your multi-sig wallet. Click SUBMIT and you should see your multi-sig BTC address show up, alongside a REDEEM SCRIPT. Make sure the multi-signature BTC address shown is the same as your actual multi-signature BTC address! If it is correct, copy the REDEEM SCRIPT text below. If it's incorrect, it mainly means you posted the public keys in the wrong order, mess around with this till your address comes up!

STEP 2: VERIFY all details are correct! https://i.imgur.com/VRVdOZD.png
Click VERIFY on the top, paste the REDEEM SCRIPT you obtained and click SUBMIT. This step is just to verify everything so far is correct, nothing else. After you click SUBMIT, your multi-signature address, required signatures, both individual BTC addresses that these signatures are required from, and your public keys for those wallets will appear. Verify they are all correct and you are ready for the next step!

STEP 3: Create your TRANSACTION https://i.imgur.com/cBq282f.png
Click NEW -> Transaction. Paste your REDEEM SCRIPT at the top box and click LOAD. This can take a while depending on your wallet (mine took 20 seconds). You should get this message https://imgur.com/wT7TveE saying you've retrieved your unspent funds. You can see 2 tabs below - INPUTS and OUTPUTS. The INPUTS should be showing your BTC balance! If it does not, you need to click load again, or give it a minute, or try again. If you have 0.2 BTC in your wallet, the INPUTS should say "Inputs (0.2000000000)". If you've done it correctly, the INPUTS tab should be filled out for you - you do not need to do anything there. The TRANSACTION FEE will show as your ENTIRE BALANCE - but don't worry, this is because you've not filled out the OUTPUTS properly yet. On the OUTPUTS tab, put the address you wish to send the crypto to, and then the amount. You will see if you add the amount, you can see the fee changes based on what you add. e.g. if you have 0.2 BTC, and you put 0.18 BTC to send, the fee will say 0.02 BTC, the remainder. Figure out what you want the fee to be (make sure it's large enough to get confirmed on the first block). This is if you are sending the ENTIRE BALANCE ONLY. So if you are sending 0.2 BTC, and that's your entire balance, do like 0.197 BTC and keep 0.003 as the fee (for example).

IF YOU ARE SENDING PART OF THE BALANCE and not the full balance, then you need to click + next to your amount, and another box will appear. Put the address of the wallet you are sending the crypto out from, and the amount you want sent back to that address. For example, if I have 0.2 BTC, and I want to send 0.1 BTC, and keep remainder in that wallet, I would put the address I wanna send to on the top, and 0.1 BTC, then the 2nd line would be the original address I'm sending from and would be like 0.097 BTC (and the remaining 0.003 would be used for fee). This means, when we eventually sign and broadcast the transaction, you send the amount you want to the destination wallet and get back the amount you want to the original wallet.

SUBMIT THIS TO CREATE A TRANSACTION and copy the code below for the next step! It may be a long code, make sure you have copied it all!

STEP 4: SIGN THE TRANSACTION USING YOUR PRIVATE KEYS! https://i.imgur.com/GNrgljk.png
Click on SIGN on the top and paste the transaction text you just copied. Above it, you can see its asking you for your private key. This is when you will need the private key of your BTC wallets for both co-signers (or more if you have more than 2 people). The order you put it in does not matter. Paste the first private key on the top, and click submit. Text will appear below and it will say you have signed. Copy this text, re-paste it in the box above (it looks similar but slightly bigger), and then put your 2nd private key and click SUBMIT. Repeat this with however many co-signers you have. Once you have done it for everyone, you will have a final text that you will use for the final step in broadcasting the transaction!

STEP 5: BROADCAST THE TRANSACTION! https://i.imgur.com/hC1bzTf.png
Click BROADCAST on the top With the final text you just generated, paste it in the box and click SUBMIT. Your transaction is now being placed onto the blockchain! This can take a while, for me it took a minute! It actually showed me an error, but it did send out the transaction successfully! Just a note, you can also use other services to broadcast the transaction like Electrum if you wish!

Things I learned during this process:
- PRACTISE! I followed these steps on multiple dummy wallets I created on electrum to confirm I know exactly what I am doing. I transferred $100 or so onto those test wallets and tested creating a transaction with these steps on a multi-sig wallet. It gave me confidence to eventually do it for my main wallet with all my stuck funds!
- The order you post your public key for STEP 1 on the website matters! Doing it the wrong way will show you the wrong multi-sig address. The solution is to mess around with the order of the private keys until your multi-sig address is shown.
- Make sure your fees are correct! Don't send with too low of a fee or you'll wait forever...
- Watch out for TYPOS! 1 mistake can cause you to lose all your crypto.
- Steps 1-3 are completely safe, your private keys are not exposed. However, after step 4 they are - remember this!
- They themselves say "This page uses javascript to generate your addresses and sign your transactions within your browser, this means we never receive your private keys, this can be independently verified by reviewing the source code on github. You can even download this page and host it yourself or run it offline!"
- This means you can download it offline and do it completely offline for safety, up until the broadcast part! Keep the system air gapped if you want the highest level of safety.
- Find them on Github here: https://github.com/OutCast3k/coinbin/
- That being said, I did not download it or do it offline, or airgap it. I just did everything online and it worked fine.
- I did it for a $60K+ transaction...so I can confirm that as long as you follow the steps, you should be all good.
- My worry was as I was doing a large amount, what if it automatically somehow scams it or something. I can confirm I was completely fine. But if you have concerns, you can run it completely offline, verify the code and air gap it!

If you have any questions feel free to ask. Thank you so much for your help guys on this thread. Lets go!
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
So if anyone is interested, Guarda never actually fixed the bug, HOWEVER...I managed to get my Crypto out of Guarda through external means.
If anyone wants to know, reply to this and I'll post how I did it if this has any interest as it may affect other people in the future!
You must post it regardless of the current "little interest" in your solution.
This is in the internet and people who will need that info will still be able to find it in search engines.

Imagine if someone 1 year from now stumbled upon this topic from searching a solution to restore their Guarda wallet and see that OP left without a remark about how it's solved.

Finding a solution in an existing topic IMO is better than fast replies and accurate answers.
jr. member
Activity: 49
Merit: 20
For sake of upgrading everyone's knowledge here, and
I certainly am interested in knowing how you proceeded to recup your cryptos.

By all means, thank you for educating us, pls.
newbie
Activity: 9
Merit: 32
So if anyone is interested, Guarda never actually fixed the bug, HOWEVER...I managed to get my Crypto out of Guarda through external means.
If anyone wants to know, reply to this and I'll post how I did it if this has any interest as it may affect other people in the future!

NOTE: This solution is for those people who have BTC in a multi-signature wallet and are unable to withdraw/lost access etc.
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
This assumes OP is willing to enter both private keys on the same system. That kinda defeats the purpose of each having a separate private key.
That can be done with two separate Bitcoin Core wallets with MultiSig descriptors containing: (private_key1,public_key2) and (public_key1,private_key2).
In that case, OP should sign the transaction with the first wallet, export the Partially Signed Bitcoin Transaction then sign it with the second wallet to finalize it.

My main concern here is if Guardia's private key is used as an HDSeed rather than the multiSig address of OP.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
my guarda ALSO has a mnemonic phrase (12 words), whereas my partner does not. I assume this is because I initially created the wallet and my friend joined? Does that mean that mnemonic is the master key or something?
Usually, the mnemonic is your backup. If your partner doesn't have one, what happens if his hard drive (or phone) breaks down? Multisig is only safe if you're absolutely sure you won't lose any of the keys.
newbie
Activity: 9
Merit: 32
Okay guys I have an update!

So on Guarda, me and my partner checked each of our individual Guarda wallets. We checked the private key for the address.
We both have different private keys, which was expected, BUT my guarda ALSO has a mnemonic phrase (12 words), whereas my partner does not. I assume this is because I initially created the wallet and my friend joined? Does that mean that mnemonic is the master key or something?
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
Now, create a multisig descriptor with your and your friend's private key.
The format should be like this if the 2-of-2 MultiSig address starts with "3":
sh(sortedmulti(2,WIF_PrivateKey1,WIF_PrivateKey2))
This assumes OP is willing to enter both private keys on the same system. That kinda defeats the purpose of each having a separate private key.
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
Try Bitcoin Core, latest version, create a "blank" wallet with private keys enabled.
Import your private keys in a MultiSig descriptor, then let the wallet rescan if your node is fully synced and not the blockchain isn't pruned, then send using that.
Alternatively, keep Bitcoin Core offline so that you wont have to sync it and create the transaction in Electrum; import the address to Electrum as watching-only wallet and create the transaction there, then export the PSBT file/string to offline Bitcoin Core to be signed.

-snip- step-by-step.
Okay, but this will be a tedious task.

[Offline] In Bitcoin Core:
  • Install Bitcoin Core v26.0 (link above the forum)
  • Launch it and create a new wallet with the option "Make blank wallet" ticked; enable "Encrypt wallet" if you want to add a passphrase in the next step.
  • Once created, open the console (Window->Console) and in the console, select the wallet that you've just created.
  • Now, create a multisig descriptor with your and your friend's private key.
    The format should be like this if the 2-of-2 MultiSig address starts with "3":
    sh(sortedmulti(2,WIF_PrivateKey1,WIF_PrivateKey2))
    If it starts with "bc1", use this instead:
    wsh(sortedmulti(2,WIF_PrivateKey1,WIF_PrivateKey2))
  • Get the desccriptor's checksum using the command: getdescriptorinfo "the multisig descriptor above"
    The checksum should be the 8-character string value of checkum, excluding the "".
  • Then import the descriptor to the blank wallet using this command (use walletpassphrase "passphrase" 180 command first if you've encrypted the wallet):
    importdescriptors "[{\"desc\": \"wsh(sortedmulti(2,WIF_PrivateKey1,WIF_PrivateKey2))#checksum\",\"timestamp\": \"now\",\"label\": \"Guarda_2-2Multisig\"}]"
    The "checksum" is the string that you got from getdescriptor command, do not remove the #. You can set your own label.
  • After importing it, you can check the address in Bitcoin Core's Receiving address list in "Window->Receiving addresses".
    Check if it's correct, otherwise, Guarda may be using a unique MutiSig setup. (share one of your previous outbound transaction's TXID for hints)
  • If Correct, proceed to Electrum or if this is online, you can send after it synced or a rescan.

[Online] In Electrum (plus signing):
  • Install the latest version for maximum PSBT compatibility.
  • Create a new wallet using the option: "Import Bitcoin address or private keys" and paste your address there.
  • Finish the wallet and let it sync.
  • Create your transaction and export it using "Share->Save to file".
  • [Bitcoin Core] Transfer and import that file to Bitcoin Core via "File->Load PSBT from file" (the correct wallet name should be selected in the drop-down menu)
  • [Bitcoin Core] After importation, sign it using the "Sign Tx" button (type your passphrase) and once 'Broadcast Tx' is clickable, it's now signed.
  • [Bitcoin Core] Export the signed transaction via "Save->Select directory"
  • Transfer that to Electrum via "Tools->Load Transaction->From file", then broadcast it to send to the network.
hero member
Activity: 714
Merit: 1298


So, if me and my partner (co-signer) both have our private keys, from this point what exactly would we need to do to recover said crypto?


As I got it you want to recover 2-of-2 multisig.

In Guarda press Multisig button and paste your pubkey into Your public key field, then press Create multisig and in the followng sub-window add pubkey of your friend, then press Publish.

Or, if don't have pubkey of your friend, you may send yours to him to proceed.
legendary
Activity: 3472
Merit: 3217
Playbet.io - Crypto Casino and Sportsbook
So, if me and my partner (co-signer) both have our private keys, from this point what exactly would we need to do to recover said crypto?
Of course, its much simpler if it wasn't multi-signature as from this point I'd just use my own private key and get it onto electrum, but the multi-sig makes it more confusing in terms of the steps to take.


I don't have any experience using the Guarda wallet so I don't know if you both co-signers have the same private key or different but let's assume it's not the same then you can't use it to recover this multisig wallet because Electrum multi-sig is asking for a Mnemonic seed phrase only during restoration, not the private key.

Based on their support page the private key is only for a single address/coin, not the whole wallet so I think you can't recover your Multisig wallet using the exported private key from Guarda it would be better if you could also try it, and import it to Electrum to make this thing clear.

Like I said above try to use the Mnemonic backup to create and import multi-sig wallet into Electrum wallet and import the xpub key of your co-signer to recover your Multi-sig wallet that you created from Guarda.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
If you have the redeem script, you may even be able to use coinb.in (offline and air-gapped of course, running from a Linux LIVE DVD from RAM for security).

I'm out of ideas, good luck Smiley
newbie
Activity: 9
Merit: 32
Thanks for the reply!

I already use many crypto wallets; Electrum multi-sig being one of them, Guard is just another one I use and sadly having a problem with it currently.

Once you login to the Guarda App, and go to settings of your BTC Multisig wallet, and click on PRIVATE KEY, you are given a Mnemonic AND a PrivateKey which looks like a lite coin address almost. I'll create a fake one so you can see an example of the key I can see:

L98km2ZaKaoXieoKK9]Hj8850jDjnEZykOwwhx092j8iL9zz

Unfortunately there's no manual exports of a transaction like you can on Electrum, hence I cannot manually export it and give it to my co-signer for him to load and sign off.

That is a valid private key if the backup private key from Guarda starts at L which is a compressed WIF private key.
But I think even if you imported this to Electrum you can't find funds, have you tried it?

Maybe the Mnemonic seed you can use to recover the multisig wallet into Electrum but it requires a co-signer key or seed to recover your wallet from Guarda. I don't know if this will work but you can try if the Guarda gives you the Mnemonic seed phrase after export.


Yes we've established its a valid private key - for me and my partner.
Later on today I will check with my partner if we have the same, or different private keys.
I would assume it would be different.

So, if me and my partner (co-signer) both have our private keys, from this point what exactly would we need to do to recover said crypto?
Of course, its much simpler if it wasn't multi-signature as from this point I'd just use my own private key and get it onto electrum, but the multi-sig makes it more confusing in terms of the steps to take.

We'll try what you said above (won't be for a couple of hours as he's asleep currently) and update you here, thanks!
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
EDIT: Yes it's 52 characters and starts with an L.
Maybe a variation of this post may work in Electrum. Or have you searched a bit on how to do this in Bitcoin Core? That may even be easier.
I found some posts about it on Bitcointalk, but always found multisig annoying to deal with. I've used it, but it doesn't feel intuitive like normal private keys.
legendary
Activity: 3472
Merit: 3217
Playbet.io - Crypto Casino and Sportsbook
Thanks for the reply!

I already use many crypto wallets; Electrum multi-sig being one of them, Guard is just another one I use and sadly having a problem with it currently.

Once you login to the Guarda App, and go to settings of your BTC Multisig wallet, and click on PRIVATE KEY, you are given a Mnemonic AND a PrivateKey which looks like a lite coin address almost. I'll create a fake one so you can see an example of the key I can see:

L98km2ZaKaoXieoKK9]Hj8850jDjnEZykOwwhx092j8iL9zz

Unfortunately there's no manual exports of a transaction like you can on Electrum, hence I cannot manually export it and give it to my co-signer for him to load and sign off.

That is a valid private key if the backup private key from Guarda starts at L which is a compressed WIF private key.
But I think even if you imported this to Electrum you can't find funds, have you tried it?

Maybe the Mnemonic seed you can use to recover the multisig wallet into Electrum but it requires a co-signer key or seed to recover your wallet from Guarda. I don't know if this will work but you can try if the Guarda gives you the Mnemonic seed phrase after export.
newbie
Activity: 9
Merit: 32
I'll create a fake one so you can see an example of the key I can see:
L98km2ZaKaoXieoKK9]Hj8850jDjnEZykOwwhx092j8iL9zz
This is non-standard. Is this a key created by Garda, or did you just hit the keyboard a few times?
A normal private key looks like this:
Bitcoin private keys
  • WIF Compressed (52 characters base58, starting with "K" or "L").
    Example: L41YPdADy46J9Vh77WGR2bktFwEZ6knza2Xim3Urq9CEWynkkLgn

Oh no I literally made that key up on the spot to show you how it looks, it may not be the correct length etc but its roughly how it looks like.

EDIT: Yes it's 52 characters and starts with an L.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
I'll create a fake one so you can see an example of the key I can see:
L98km2ZaKaoXieoKK9]Hj8850jDjnEZykOwwhx092j8iL9zz
This is non-standard. Is this a key created by Garda, or did you just hit the keyboard a few times?
A normal private key looks like this:
Bitcoin private keys
  • WIF Compressed (52 characters base58, starting with "K" or "L").
    Example: L41YPdADy46J9Vh77WGR2bktFwEZ6knza2Xim3Urq9CEWynkkLgn
newbie
Activity: 9
Merit: 32
Thanks for the reply!

I already use many crypto wallets; Electrum multi-sig being one of them, Guard is just another one I use and sadly having a problem with it currently.

Once you login to the Guarda App, and go to settings of your BTC Multisig wallet, and click on PRIVATE KEY, you are given a Mnemonic AND a PrivateKey which looks like a lite coin address almost. I'll create a fake one so you can see an example of the key I can see:

L98km2ZaKaoXieoKK9]Hj8850jDjnEZykOwwhx092j8iL9zz

Unfortunately there's no manual exports of a transaction like you can on Electrum, hence I cannot manually export it and give it to my co-signer for him to load and sign off.
Pages:
Jump to: