Author

Topic: Multisig in Electrum: instructions for recovery. (Read 271 times)

legendary
Activity: 3472
Merit: 3217
Playbet.io - Crypto Casino and Sportsbook
Why not focus on this tool https://coinb.in/#newTransaction to generate hex transactions without the redeem script manually put the transaction ID on the inputs tab and put the address on output(If where you want to send BTC).

To take the recent transaction ID use some Bitcoin explorer like https://blockchair.com/ and paste the BTC address(with balance) and then copy the first or recent transaction ID.

Take note of the amount under inputs, make sure it was the current balance of that address, and also set up the amount in the output tab(It will reflect on the transaction fee, so make sure put the right amount).

After that submit it should generate an unsigned hex just transfer it to the offline wallet and paste it to Electrum(Under tools>load transaction>"From text" then paste)

If it doesn't work or if you experienced some issue from coinb.in try to download it from here https://github.com/OutCast3k/coinbin/releases/tag/1.6 and repeat the procedure.
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
On the other hand, I was able to restore my wallet using the caravan online service for a test wallet I am using. I just added the xpubs and M out of N parameters,  and automatically it showed me the balances and addresses I had in my wallet.
I've tried it and it works as you described, however, it requires the signature itself when you need to sign the transaction.
For the supported hardware wallet cosigners, there will be no troubles.

If Electrum is required to sign the transaction (eg. for non-hardware wallet cosigner with Electrum seed):
You can select the method "Coldcard" so you can export a ".psbt" file that's supported by Electrum ("Download PSBT" button).
In Electrum, use "Tools->Load Transaction->from file", load and sign it.
Export to file and upload back to the tool if it requires more signatures or if you need to broadcast.
newbie
Activity: 5
Merit: 4
Thanks a lot for the answers. I am checking now your instructions and see if I am able to build a transaction offline with them.

On the other hand, I was able to restore my wallet using the caravan online service for a test wallet I am using. I just added the xpubs and M out of N parameters,  and automatically it showed me the balances and addresses I had in my wallet.

https://unchained-capital.github.io/caravan/#/



https://gyazo.com/386558b0b008e4307e6a663180c03d62
newbie
Activity: 5
Merit: 4
Thanks a lot for the answers. I am checking now your instructions and see if I am able to build a transaction offline with them.

On the other hand, I was able to restore my wallet using the caravan online service for a test wallet I am using. I just added the xpubs and M out of N parameters,  and automatically it showed me the balances and addresses I had in my wallet.

https://unchained-capital.github.io/caravan/#/

legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
If Electrum stops working, I can just use Electrum offline to build the wallet and sign the transaction. Then I can broadcast it with another wallet. Am I correct?
if electrum servers stop working then you won't be able to craft a transaction to sign with electrum. in order to craft a transaction electrum needs to be online so that it can learn about unspent outputs relevant to your wallet.
There's a workaround but it's not newbie friendly.

@AndresAA90 Yes, but you have to load the RAW transactions manually to Electrum so that you can use them as inputs to create a transaction while offline.
The tiring part is finding your wallet's unspent outputs (if you have many) and the troublesome part is getting their "RAW transaction" data.

He's an example workflow (some steps can be done in variety of ways):
  • Let's say Electrum is offline, so when you restored your wallets the transaction history is empty.
  • Now, enable "Address" and "Console" tab, you need to generate more addresses to a quantity based from your past transaction history.
    So, in the 'console' tab, type [wallet.create_new_address(False) for i in range(100)] and [wallet.create_new_address(True) for i in range(50)]
    The former is for your "receiving addresses" and the later is for the "change addresses", change 100 and 50 depending on how many addresses you think you've used.
  • Go to Address tab and find a way to check the addresses' balances (eg. a blockexplorer), then take note of the TXIDs that contain your addresses as output that's still unspent.
  • Find a way to get the "RAW Transaction" of the TXIDs that you've noted, (one example is to use a service like https://chainquery.com/bitcoin-cli/getrawtransaction)
  • Back to Electrum, use the menu: "Tools->Load Transaction from text", paste one RAW transaction, click "Load" and then "Save"
    Note: "Save" wont be available if the transaction isn't related to the wallet or the address isn't generated yet; if it's the latter: generate more addresses.
    Do that to all of the RAW Transactions in your note one by one.
  • Lastly you can now create an offline transaction and broadcast it using other wallets/service.
    If it's rejected when broadcast, you must have likely included a "spent output" in the mix (remove it/those from the history and create a transaction again).
legendary
Activity: 3710
Merit: 1586

5. Remember the fact that in Electrum the cosigners are organized in lexicographical order. (In case they want to rebuild it later with something different than Electrum).


Other wallets will not be able to restore from an electrum seed. You absolutely will need electrum to restore the wallet.


If Electrum stops working, I can just use Electrum offline to build the wallet and sign the transaction. Then I can broadcast it with another wallet. Am I correct?

Also, shouldn't I be able to build the same wallet in another software wallet that allows multisig for BTC?

Thanks,


if electrum servers stop working then you won't be able to craft a transaction to sign with electrum. in order to craft a transaction electrum needs to be online so that it can learn about unspent outputs relevant to your wallet.

you can't recreate the wallet using other software. at least not trivially.

legendary
Activity: 2268
Merit: 18771
If Electrum stops working, I can just use Electrum offline to build the wallet and sign the transaction. Then I can broadcast it with another wallet. Am I correct?
Absolutely. Provided you have a working copy of Electrum saved somewhere, or can source a copy from someone else online (which will almost certainly be possible outside of the situation of a global catastrophe), you can restore you multi-sig wallet offline, move the address to an online computer and use it to create an unsigned transaction, move that transaction back to your offline wallet to be signed, and then move the signed transaction back to your online computer to be broadcast. You can use a service such as https://www.coinb.in/#newTransaction to create your transaction for signing, and you can use the broadcast function on the same site or pretty much any block explorer.

Also, shouldn't I be able to build the same wallet in another software wallet that allows multisig for BTC?
That was my question above. Electrum seed phrases are not the same as BIP39 seed phrases. Almost all wallets use BIP39, and so you would not be able to just import your Electrum seed phrases in to another wallet. You could extract the extended private and public keys from your Electrum seed phrases and import those in to another wallet, but I'm not sure which other wallets support generating multi-sig wallets from imported keys.
newbie
Activity: 5
Merit: 4

5. Remember the fact that in Electrum the cosigners are organized in lexicographical order. (In case they want to rebuild it later with something different than Electrum).


Other wallets will not be able to restore from an electrum seed. You absolutely will need electrum to restore the wallet.


If Electrum stops working, I can just use Electrum offline to build the wallet and sign the transaction. Then I can broadcast it with another wallet. Am I correct?

Also, shouldn't I be able to build the same wallet in another software wallet that allows multisig for BTC?

Thanks,
legendary
Activity: 2268
Merit: 18771
Other wallets will not be able to restore from an electrum seed. You absolutely will need electrum to restore the wallet.
Which other wallets out there support setting up a multi-sig wallet by importing raw extended private/public keys, rather than importing seed phrases?

If, in the future, OP could not find any working copy of Electrum (incredibly unlikely, I know), he could still extract the xprvs/Zprvs and xpubs/Zpubs from his Electrum seed phrases, for example by using a modified Ian Coleman's tool. Then he would just need to import the minimum required combination of private and public keys in to any wallet which supports it to recover his multi-sig wallet.
legendary
Activity: 3710
Merit: 1586

5. Remember the fact that in Electrum the cosigners are organized in lexicographical order. (In case they want to rebuild it later with something different than Electrum).


Other wallets will not be able to restore from an electrum seed. You absolutely will need electrum to restore the wallet.
legendary
Activity: 2268
Merit: 18771
Electrum seed phrases use m/0 as the derivation path (for legacy addresses at least). I have also heard reports that m/0/0' is used when you make a segwit wallet so storing the derivation path is also important so that you can restore it with other clients besides Electrum.
Electrum derivation paths are as follows, with /0/0 appended to the end of each one for the first receiving address:

Legacy: m (so the first receiving address is at m/0/0)
Segwit: m/0'
Legacy multi-sig: m
Segwit multi-sig: m/1'
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
Thanks. Keep in mind I want the instructions to be useful in a long period of time (i.e. 5 years) without having to use the wallet.

Electrum seed phrases use m/0 as the derivation path (for legacy addresses at least). I have also heard reports that m/0/0' is used when you make a segwit wallet so storing the derivation path is also important so that you can restore it with other clients besides Electrum.
newbie
Activity: 5
Merit: 4
Thanks. Keep in mind I want the instructions to be useful in a long period of time (i.e. 5 years) without having to use the wallet.
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
That is enough. Electrum version shouldn't matter, there isn't anything specific to each version that would affect the addresses generated.
newbie
Activity: 5
Merit: 4
When you setup one multisig wallet in Electrum, cosigners will need to store some information to build the wallet. Each cosigner will store their seed and passphrase, as well as the instructions for the wallet recovery. The ones they should be storing are:

1. M out of N signers.
2. Cosigners xPubs.
3. As some cosigners use a hardware wallet, their derivation path close to their xPub.
4. Electrum version used to build the wallet.
5. Remember the fact that in Electrum the cosigners are organized in lexicographical order. (In case they want to rebuild it later with something different than Electrum).

Would this be enough for recovery? Am I missing any parameter that might be needed to rebuild the wallet in the future?

Thanks,


Jump to: