Bitcoin Forum
May 24, 2025, 01:02:47 PM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Coldcard - Electrum Multi Sig - How to import zpub file when airgapped?  (Read 255 times)
techsloth (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 4


View Profile
January 20, 2025, 12:03:33 AM
Merited by Pmalek (2)
 #1

First Post!

I'm currently upgrading my overall crypto security and generally testing some applications. Trying to set up a multi sig wallet with a coldcard and electrum. The multi sig wallet is set up on electrum's side, and functions.


Problem - However, I am having issues with importing the MPK/ZPub to the coldcard from electrum to form the multi sig wallet.

I have pursued the following solutions to no avail. If anyone has had experience with this let me know!


Possible Solution #1 - Coldcard - Electrum Installation Error?

As seen in the following tutorial
https://medium.com/@1700constantino/part-2-protect-your-bitcoin-with-an-electrum-multisig-wallet-with-coldcard-ledger-and-trezor-8e0027afc56
My electrum wallet is missing the "export for coldcard" button under wallet > information. This indicates something is not working.

Both my coldcard firmware & electrum software are running on the latest version.

Additional Electrum hardware modifications installed from - https://electrum.readthedocs.io/en/latest/hardware-linux.html
ckcc-protocol installed with coinkite rules as well
Note - Installed in electrum's virtual environment and global environment via break package command (I know not recommended, but just testing)

I have no problems using coldcard alone (not multi sig).


Possible Solution #2 - Manual import file configuration

As seen here, I can manually configure the file via:
https://coldcard.com/docs/airgap-multisig/
https://coldcard.com/docs/multisig/

I have to convert the Zpubs to Xpubs, and the converters I downloaded did not seem to function properly. Before I try to troubleshoot more, figured I'd just ask.


Any help or suggestions are appreciated.

Additional Notes:
- I want to set up the coldcard multi sig in an airgapped fashion. I will not connect it directly to the cpu.
- I cannot use single signing, as multi sig is necessary for certain applications I am testing out.
mcdouglasx
Sr. Member
****
Offline Offline

Activity: 644
Merit: 256


Success depends on how much you try


View Profile WWW
January 20, 2025, 02:14:04 PM
Last edit: January 20, 2025, 03:24:44 PM by mcdouglasx
Merited by Pmalek (2), ABCbits (1), DireWolfM14 (1)
 #2

Problem - However, I am having issues with importing the MPK/ZPub to the coldcard from electrum to form the multi sig wallet.

I understand that when you create a new 'standard' wallet in Electrum, you have the option to 'Use a hardware device', and once paired, Electrum will display the master public key (xpub) from your Coldcard. Then, select 'Multi-signature wallet' and choose the number of cosigners, and add the xpub from your Coldcard(provided previously by Electrum) as one of the cosigners.

It seems like you are doing it in reverse.

edit:

I understand why you want to convert the zpub to xpub, so you don't have to connect your Coldcard to Electrum(airgapped). I'm sorry I missed that. In that case, you should export your xpub by going to Export Wallet > Electrum to the MicroSD card and extract it from the file. Or try using this if your Coldcard exports a zpub: https://jlopp.github.io/xpub-converter/
DireWolfM14
Copper Member
Legendary
*
Offline Offline

Activity: 2520
Merit: 4952



View Profile WWW
January 22, 2025, 04:18:26 AM
 #3

you should export your xpub by going to Export Wallet > Electrum to the MicroSD card and extract it from the file.

^This. 

The xpub will be in the json file created by the coldcard.  Make sure you've gone through the steps on your coldcard to create a mulit-sig wallet before exporting the json file.  You'll then be able to import the other xpub keys from the sd card, once you have them.

░░░░▄▄████████████▄
▄████████████████▀
▄████████████████▀▄█▄
▄██████▀▀░░▄███▀▄████▄
▄██████▀░░░▄███▀▀██████▄
██████▀░░▄████▄░░░▀██████
██████░░▀▀▀▀▄▄▄▄░░██████
██████▄░░░▀████▀░░▄██████
▀██████▄▄███▀░░░▄██████▀
▀████▀▄████░░▄▄███████▀
▀█▀▄████████████████▀
▄████████████████▀
▀████████████▀▀░░░░
 
 CCECASH 
 
    ANN THREAD    
 
      TUTORIAL      
nc50lc
Legendary
*
Offline Offline

Activity: 2786
Merit: 7205


Self-proclaimed Genius


View Profile
January 22, 2025, 05:19:05 AM
 #4

I have to convert the Zpubs to Xpubs, and the converters I downloaded did not seem to function properly. Before I try to troubleshoot more, figured I'd just ask.
To convert, enable Electrum's console (View->Show Console), then use convert_xkey command with the correct xtype.
example 1 (from Zpub to xpub):
Code:
convert_xkey(xkey="Zpub-snip-HG9m5Ug",xtype="standard")
example 2 (from xpub to Zpub):
Code:
convert_xkey(xkey="xpub-snip-avAamcV6",xtype="p2wsh")

I don't know where you'll be using that but if you just pasted an extended public key from Coldcard, that "Export for Coldcard" button will not show.
It'll only be available if you setup Coldcard as a cosigner with "Cosign with a hardware device".

Note: Do not use and convert the extended public key from Electrum Standard wallet paired with Coldcard.

techsloth (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 4


View Profile
January 22, 2025, 09:31:56 PM
 #5

Still haven't found the solution after trying everything, for now I'll do a mild compromise of security. I'll just set up the coldcard on an airgapped OS with electrum, then wipe the OS, or Tails it for the amnesia. Still, I have to do this setup in the future for others so it will be good to find the proper solution as opposed to the workaround that reduces security. If anyone finds anything let me know, and will update this if I find solution in mean time.

Thanks for the suggestions.


Replies:

I don't know where you'll be using that but if you just pasted an extended public key from Coldcard, that "Export for Coldcard" button will not show.
It'll only be available if you setup Coldcard as a cosigner with "Cosign with a hardware device".

Note: Do not use and convert the extended public key from Electrum Standard wallet paired with Coldcard.

When I try to make a new wallet, and select cosign with hardware device, electrum asks me to connect the hardware device. There is no option to execute the cosign via SD card or a file, to keep the coldcard cold. If I do not do this, I cannot proceed to form the wallet, electrum requires the signature of all devices to form the wallet.

That is why I did manually copy/paste the coldcard zpub originally. I guess that is why electrum does not recognize it as a coldcard signer. Still the problem remains.

Solution 2 - This failed. I did the xpub conversions, put them in the coldcard import format, and it didn't work. Not sure why, but as nc50lc had said, that is not to be done. Figured I'd just try it though.



The xpub will be in the json file created by the coldcard.  Make sure you've gone through the steps on your coldcard to create a mulit-sig wallet before exporting the json file.  You'll then be able to import the other xpub keys from the sd card, once you have them.

The problem here, is you cannot go through the steps on the coldcard to create the multi sig wallet without first importing the xpubs. You can only export the xpub which contains the xpub,zpub, etc. for the coldcard.

I did try the import from PBST option, that didn't seem to work.


Side Note:
The jlopp converter seems to have a missing/broken package. I used the following fork which worked better for offline use.
https://github.com/ExodusMovement/xpub-converter


Or try using this if your Coldcard exports a zpub: https://jlopp.github.io/xpub-converter/
mcdouglasx
Sr. Member
****
Offline Offline

Activity: 644
Merit: 256


Success depends on how much you try


View Profile WWW
January 23, 2025, 12:23:40 AM
Merited by nc50lc (1), hosemary (1)
 #6

Here are the steps you need to follow:

Coldcard Airgapped Multisig Guide

This might help you:

1- Create a multisig wallet in Electrum, and when you go to add a cosigner, load your JSON file.

2- I read a comment on Bitcoin Stack Exchange that says instead of choosing a wallet file, select the JSON file created with Coldcard. According to the comment, "This will import your multisig wallet i.e. all cosigner xpubs, allowing you to view transactions, derive addresses, and create transactions for signing."
nc50lc
Legendary
*
Offline Offline

Activity: 2786
Merit: 7205


Self-proclaimed Genius


View Profile
January 23, 2025, 05:19:26 AM
Merited by hosemary (1), Gabrics (1)
 #7

1- Create a multisig wallet in Electrum, and when you go to add a cosigner, load your JSON file.
Unfortunately, there's no option to load that exported json file as a cosigner.
It's a "skeleton electrum wallet" that's mainly used to create an Electrum wallet from an existing ColdCard (MultiSig) wallet.
(that info opens a good workaround though)

Example use-case: If the user wants to use Electrum to watch and create transactions instead of his previously used wallet.
That said, OP can temporarily use other wallets that support Air-Gap setup method, then import the skeleton wallet to Electrum and use that instead.

Solution 2 - This failed. I did the xpub conversions, put them in the coldcard import format, and it didn't work. Not sure why, but as nc50lc had said, that is not to be done. Figured I'd just try it though.
You could try to persuade Cold-Card developers to include another way to setup ColdCard as a cosigner
or wait for Electrum to support descriptors which could be used in Coldcard import/export method: https://github.com/spesmilo/electrum/issues/5694 (implement output script descriptors)

For now, this is the official step on how to setup an Electrum MultiSig wallet with ColdCard as cosigner: https://coldcard.com/docs/multisig/#creating-a-multisig-wallet-using-electrum

Pmalek
Legendary
*
Offline Offline

Activity: 3136
Merit: 8063


Top-tier crypto casino and sportsbook


View Profile
January 23, 2025, 09:51:49 AM
Merited by hosemary (1)
 #8

Do you have to use Electrum for the multisig wallet? You can try to create a multisig wallet with Sparrow, for example. Sparrow allows you to import your keys from Coldcard and other airgapped hardware wallets. Export your Xpub from your Coldcard on an SD card, insert the card into your computer and import it when asked by Sparrow. It should work.

██████▄██▄███████████▄█▄
█████▄█████▄████▄▄▄█
███████████████████
████▐███████████████████
███████████▀▀▄▄▄▄███████
██▄███████▄▀███▀█▀▀█▄▄▄█
▀██████████▄█████▄▄█████▀██
██████████▄████▀██▄▀▀▀█████▄
█████████████▐█▄▀▄███▀██▄
███████▄▄▄███▌▌█▄▀▀███████▄
▀▀▀███████████▌██▀▀▀▀▀█▄▄▄████▀
███████▀▀██████▄▄██▄▄▄▄███▀▀
████████████▀▀▀██████████
.BETFURY.....█████████████
███████████████
███████████████
██▀▀▀▀█▀▀▄░▄███
█▄░░░░░██▌▐████
█████▌▐██▌▐████
███▀▀░▀█▀░░▀███
██░▄▀░█░▄▀░░░██
██░░░░█░░░░░░██
███▄░░▄█▄░░▄███
███████████████
███████████████
░░█████████████
█████████████
███████████████
███████████████
███▀▀░░█░░▀▀███
██░░▄█▀▀▀█▄░░██
█░░█▀░▐█▌░▀█░░█
█▀▀█░██░██░█▄▄█
█░░█▄░▐█▌░▄█░░█
██░░▀█▄▄▄█▀░░██
███▄▄░░█░░▄▄███
███████████████
███████████████
░░█████████████
█████████████
███████████████
███████████████
██▀▄▄▄▄▄▄▄▄████
██░█▀░░░░░░░▀██
██░█░▀░▄░▄░░░██
██░█░░█████░░██
██░█░░▀███▀░░██
██░█░░░░▀░░▄░██
████▄░░░░░░░▄██
███████████████
███████████████
░░█████████████
techsloth (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 4


View Profile
January 25, 2025, 11:50:16 PM
 #9


Example use-case: If the user wants to use Electrum to watch and create transactions instead of his previously used wallet.
That said, OP can temporarily use other wallets that support Air-Gap setup method, then import the skeleton wallet to Electrum and use that instead.

You could try to persuade Cold-Card developers to include another way to setup ColdCard as a cosigner
or wait for Electrum to support descriptors which could be used in Coldcard import/export method: https://github.com/spesmilo/electrum/issues/5694 (implement output script descriptors)


Thanks for that, I will add a note to that Electrum request, and send a note to ColdCard. My impression for the Electrum team is that they have a rather overwhelming backlog at the moment, but Coldcard as a company should theoretically be able to act more quickly.


Do you have to use Electrum for the multisig wallet? You can try to create a multisig wallet with Sparrow, for example. Sparrow allows you to import your keys from Coldcard and other airgapped hardware wallets. Export your Xpub from your Coldcard on an SD card, insert the card into your computer and import it when asked by Sparrow. It should work.

This and nc50lc's comment are probably the best current workaround for now, instead of my security compromise approach. I know it works for Sparrow as there are many tutorials for that, and used it in my early tests for single sig wallets. For now I'll just create it in Sparrow, and port over the seeds to Electrum.

Excellent! Thank you for your help, this will work well.

And yes, I have to use Electrum as I need to use some of its features that Sparrow lacks. Sparrow does seem like an excellent wallet though, I have been an Electrum fan for years but Sparrow may overtake them.
nc50lc
Legendary
*
Offline Offline

Activity: 2786
Merit: 7205


Self-proclaimed Genius


View Profile
January 26, 2025, 02:49:29 AM
 #10

This and nc50lc's comment are probably the best current workaround for now, instead of my security compromise approach. I know it works for Sparrow as there are many tutorials for that, and used it in my early tests for single sig wallets. For now I'll just create it in Sparrow, and port over the seeds to Electrum.  
That's probably a typo since you know cryptocurrency pretty well, just in case: you shouldn't be porting (importing) the seeds to Electrum.
Just the skeleton wallet ".json" file containing the extended public keys of the cosigners that can be loaded and turned into a full Electrum wallet file.

Pmalek
Legendary
*
Offline Offline

Activity: 3136
Merit: 8063


Top-tier crypto casino and sportsbook


View Profile
January 26, 2025, 07:59:02 AM
 #11

And yes, I have to use Electrum as I need to use some of its features that Sparrow lacks.
Can you go into some more details about these Electrum features that are crucial to you but which Sparrow lacks? Perhaps the same thing can also be achieved with Sparrow and you are just not aware of it or you are not doing it right. It would save you some time and not require doing imports/exports of keys and json files. I am a fan of Electrum myself and I use it. Still, I wouldn't insist on sticking with it if it complicates my setup.

██████▄██▄███████████▄█▄
█████▄█████▄████▄▄▄█
███████████████████
████▐███████████████████
███████████▀▀▄▄▄▄███████
██▄███████▄▀███▀█▀▀█▄▄▄█
▀██████████▄█████▄▄█████▀██
██████████▄████▀██▄▀▀▀█████▄
█████████████▐█▄▀▄███▀██▄
███████▄▄▄███▌▌█▄▀▀███████▄
▀▀▀███████████▌██▀▀▀▀▀█▄▄▄████▀
███████▀▀██████▄▄██▄▄▄▄███▀▀
████████████▀▀▀██████████
.BETFURY.....█████████████
███████████████
███████████████
██▀▀▀▀█▀▀▄░▄███
█▄░░░░░██▌▐████
█████▌▐██▌▐████
███▀▀░▀█▀░░▀███
██░▄▀░█░▄▀░░░██
██░░░░█░░░░░░██
███▄░░▄█▄░░▄███
███████████████
███████████████
░░█████████████
█████████████
███████████████
███████████████
███▀▀░░█░░▀▀███
██░░▄█▀▀▀█▄░░██
█░░█▀░▐█▌░▀█░░█
█▀▀█░██░██░█▄▄█
█░░█▄░▐█▌░▄█░░█
██░░▀█▄▄▄█▀░░██
███▄▄░░█░░▄▄███
███████████████
███████████████
░░█████████████
█████████████
███████████████
███████████████
██▀▄▄▄▄▄▄▄▄████
██░█▀░░░░░░░▀██
██░█░▀░▄░▄░░░██
██░█░░█████░░██
██░█░░▀███▀░░██
██░█░░░░▀░░▄░██
████▄░░░░░░░▄██
███████████████
███████████████
░░█████████████
techsloth (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 4


View Profile
January 29, 2025, 05:58:29 PM
Merited by Pmalek (2)
 #12

And yes, I have to use Electrum as I need to use some of its features that Sparrow lacks.
Can you go into some more details about these Electrum features that are crucial to you but which Sparrow lacks? Perhaps the same thing can also be achieved with Sparrow and you are just not aware of it or you are not doing it right. It would save you some time and not require doing imports/exports of keys and json files. I am a fan of Electrum myself and I use it. Still, I wouldn't insist on sticking with it if it complicates my setup.

My circumstance is a bit more niche/specific to me. But here are the reasons:

1- I have my electrum server - btc core already setup, and that was a major pain to get working. I do not want to repeat that for Sparrow if I can avoid it. I don't know how the process is for Sparrow-core.

2- It is easier to execute various op codes directly in electrum transactions, which is helpful for certain manual testing of some concepts I am developing. Sparrow supports opcodes, but my understanding is I need to separately upload the script file. That is fine, and in long term will not matter much from a coding perspective, but it is one reason why I chose Electrum initially.

3- Electrum is more mature/widely accepted. This means it has had more eyes on its source code, and is more secure. Open source is only as secure as its thoroughness of code review.

Obsolete factors upon reconsideration:
- Both have lightning now, so this is no longer an issue. I believe Electrum was first though.
- Electrum is coded in python, Sparrow is in Java. This is just a factor as I will end up building an app/plugin that integrates with the base wallet. I originally thought it would be in python, but things are changing on that front, so this is less of a consideration.

Looks like I have to reanalyze this decision a bit.

... this can quickly descend into a wallet comparison which is probably handled better by others elsewhere but in brief:

Both are excellent wallets, I am just noticing the "winds shifting" to Sparrow slightly (pun intended) between their overall superior UI, taproot support, etc.. But it is still possibly too minor to jump to Sparrow for me. Electrum isn't even much worse, it just seems to have some unavoidable technical debt because it is very mature software by crypto standards. The question is the classic mature technical indebted software vs. newcomer starting from the ground up.

We will see which pulls forward, or its fine if both exist, a bit of competition doesn't hurt. Before Sparrow, to me at least, Electrum was the only solid robust yet lightweight, open source, etc. option for a decade. It is helpful to have them keep each other on their toes, as both must guess what issues are most important to users since both have limited dev resources. Ex. Electrum had lightning before Sparrow, Sparrow has taproot before electrum.

For my particular use case, if I had developed my app sooner, Electrum would have made the right call since my app needs lightning. This may be reverse for some other developer on another project. It is awesome the ecosystem has reached a point where it can support multiple robust open source wallet solutions working towards the same overall goal.

From a developer perspective, my plan is to revisit the decision pre development. That is a semi-major decision for the particular app as then the project will be locked in to a degree, unless I figure out how to make it wallet agnostic. But I have some time until then, will see if the dust in next few months, if not, it will be a tough call. That is an entirely other topic though lol.

Ok got sucked into a tangent, well if you read all that, you know my reasons. Smiley
Pmalek
Legendary
*
Offline Offline

Activity: 3136
Merit: 8063


Top-tier crypto casino and sportsbook


View Profile
February 02, 2025, 02:10:30 PM
 #13

1- I have my electrum server - btc core already setup, and that was a major pain to get working. I do not want to repeat that for Sparrow if I can avoid it. I don't know how the process is for Sparrow-core.
Sparow allows you to use a public or private Electrum server. You already have the latter. It also allows your Sparrow wallet to connect to your Bitcoin Core node. I don't know much about Bitcoin Core configurations, but I doubt you are going to struggle setting that up. Enter the correct URL & port and point the software to the folder with your blockchain data. That's the basics. I am sure you know more about this than I do since you are already running BTC nodes.

██████▄██▄███████████▄█▄
█████▄█████▄████▄▄▄█
███████████████████
████▐███████████████████
███████████▀▀▄▄▄▄███████
██▄███████▄▀███▀█▀▀█▄▄▄█
▀██████████▄█████▄▄█████▀██
██████████▄████▀██▄▀▀▀█████▄
█████████████▐█▄▀▄███▀██▄
███████▄▄▄███▌▌█▄▀▀███████▄
▀▀▀███████████▌██▀▀▀▀▀█▄▄▄████▀
███████▀▀██████▄▄██▄▄▄▄███▀▀
████████████▀▀▀██████████
.BETFURY.....█████████████
███████████████
███████████████
██▀▀▀▀█▀▀▄░▄███
█▄░░░░░██▌▐████
█████▌▐██▌▐████
███▀▀░▀█▀░░▀███
██░▄▀░█░▄▀░░░██
██░░░░█░░░░░░██
███▄░░▄█▄░░▄███
███████████████
███████████████
░░█████████████
█████████████
███████████████
███████████████
███▀▀░░█░░▀▀███
██░░▄█▀▀▀█▄░░██
█░░█▀░▐█▌░▀█░░█
█▀▀█░██░██░█▄▄█
█░░█▄░▐█▌░▄█░░█
██░░▀█▄▄▄█▀░░██
███▄▄░░█░░▄▄███
███████████████
███████████████
░░█████████████
█████████████
███████████████
███████████████
██▀▄▄▄▄▄▄▄▄████
██░█▀░░░░░░░▀██
██░█░▀░▄░▄░░░██
██░█░░█████░░██
██░█░░▀███▀░░██
██░█░░░░▀░░▄░██
████▄░░░░░░░▄██
███████████████
███████████████
░░█████████████
DireWolfM14
Copper Member
Legendary
*
Offline Offline

Activity: 2520
Merit: 4952



View Profile WWW
February 07, 2025, 03:09:05 AM
 #14

1- I have my electrum server - btc core already setup, and that was a major pain to get working. I do not want to repeat that for Sparrow if I can avoid it. I don't know how the process is for Sparrow-core.

I don't know of any "Sparrow-core."  Sparrow can run in headless mode as a daemon, but I've never used it that way.  Regardless, it'll still need to connect to a node or a SPV server, even if running in headless mode.

Sparrow is handy in that you can connect it directly to a local, unpruned Bitcoin Core instance, you don't need an SPV server such as Electrs or ElectrumX.  You don't need a separate server for Sparrow, you can connect it to your Electrum server.  Setting it point to you local SPV server or your local Bitcoin Core instance is super easy; open Sparrow, click Fle>Preferences, then select the server tab.  From their you'll see the choices of public server, bitcoin core, or private server, and the settings are very straight forward.

I prefer Electrum for many reasons as well, but Sparrow is a good wallet.  It's been around long enough that peer review shouldn't be a concern, and for a Java app it's not the worst I've seen.  At least the security issues of Java have been addressed, which obviously is critical for a wallet app.

░░░░▄▄████████████▄
▄████████████████▀
▄████████████████▀▄█▄
▄██████▀▀░░▄███▀▄████▄
▄██████▀░░░▄███▀▀██████▄
██████▀░░▄████▄░░░▀██████
██████░░▀▀▀▀▄▄▄▄░░██████
██████▄░░░▀████▀░░▄██████
▀██████▄▄███▀░░░▄██████▀
▀████▀▄████░░▄▄███████▀
▀█▀▄████████████████▀
▄████████████████▀
▀████████████▀▀░░░░
 
 CCECASH 
 
    ANN THREAD    
 
      TUTORIAL      
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!
OSZAR »