Author

Topic: Coldcard question (Read 271 times)

jr. member
Activity: 94
Merit: 3
March 08, 2019, 12:30:27 PM
#7
Yea the xpub in the dump file correlates to the card itself and a couple others listed for electurm. My issue was the .json xpub in electrum didn't match any in the dump file.

What I found is the xpub displayed in the coldcard is associated with still with the .json file created for electrum, so everything works perfectly air gaped and the card is actually really easy to use. It will be even better imo when they work it into use with Samouri wallet.

Seemed intimidating at first but really no chore at all to use with electrum, and even easier to monitor and send to with sentinel as well though maybe a bit of a warmer wallet in that regard pending veiw of sharing xpubs.
HCP
legendary
Activity: 2086
Merit: 4361
March 02, 2019, 03:34:13 AM
#6
According to the documentation, Coldcard is indeed a BIP39 wallet. In fact, they tell you to use the "BIP39 seed" option if restoring in Electrum: https://github.com/Coldcard/firmware/blob/master/docs/electrum-usage.md#import-from-seed-words


I'm not exactly sure what they mean by use the xpub next to m/44'/1' here tho: https://github.com/Coldcard/firmware/blob/master/docs/electrum-usage.md#import-from-extended-public-key-xpub

apparently there is an Electrum specific xpub generated when you create the dump summary? Huh

* In public.txt, look for the section labeled "BIP44 / Electrum" and Copy the top xpub value, beside: m/44'/1'
jr. member
Activity: 94
Merit: 3
March 01, 2019, 08:04:24 PM
#5
I was sure BIP39 isn't supported by the coldcard. I'll double check and reconfirm. I think it was in the docs if you have to restore wallet from compromise or loss/damage with seed directly, this wasn't the option to pursue.

I guess best option is to test (like suggested) with dust through an air gap signed send with the electrum xpub from the coldcard. I suppose I'm just overly skeptical it will work not seeing the lack of correlation with the xpubs from dump file.

Update soonish.



HCP
legendary
Activity: 2086
Merit: 4361
March 01, 2019, 05:02:01 PM
#4
If the addresses being generated are the same, it is most likely because of the way Electrum stores your xpub... and where it "begins" it's derivation from.

This is a somewhat simplified description, but it seems that most BIP39 wallets store the very top level (BIP32 "root") xpub and then use the full m/44'/0'/0'/0 derivation path... Electrum seems to drop down to the "account" level xpub... and then just uses m/0 and m/1 to specify if using receive or change addresses.

Full path: m / purpose' / coin_type' / account' / change / address_index
Electrum: m / purpose' / coin_type' / account' / change / address_index

So, when you ask Electrum to display the xpub for a wallet, it shows the "account" xpub that it has derived and stored in your wallet file.

I don't have a coldcard to test, so this might not be 100% accurate, but this is what Electrum seems to do when you import a BIP39 seed... it doesn't store the seed, but stores and xprv/xpub that isn't the one you'd normally expect it to. So, it is possibly doing something similar with the coldcard import.
jr. member
Activity: 94
Merit: 3
March 01, 2019, 02:07:33 PM
#3
Yea, the work flow I have down.

I'm just looking to confirm why the xpub from the device/dump log doesn't match what I receive in electrum. 

Electrums latest update is coldcard enabled out the gate, no plug in needed.
legendary
Activity: 1946
Merit: 1427
March 01, 2019, 01:48:42 PM
#2
Probably because electrum detected the wrong derivation path for your wallet. Eg BIP32 when it should've been BIP44. (Since i read that Coldcard is bip39 based?)
BIP39 based, which means you can backup the secret words onto paper, and have lots of sub-accounts and unlimited independent payment addresses.

Have you tried this guide, and does this resolve your issue? https://coldcardwallet.com/docs/quick

Quote
Using Coldcard Offline
Steps:

secure quality MicroSD cards of small size
on the Coldcard, go to: Advanced > MicroSD Card > Electrum Wallet
read and approve the warning message, like this:
skeleton wallet warning

a new file, new-wallet.json, is written to the MicroSD
remove card, take to a computer running Electrum
your Electrum client must have the Coldcard plugin enabled
open the wallet file, and wait for sync to complete.
you may want to keep the wallet file (which now has many additional details about change addresses and so on) elsewhere on your computer.
your new wallet will use old-style (not segwit) payment addresses for maximum compatibility
When you want to spend from this wallet:

open the wallet in Electrum
setup your new transaction as usual
choose Preview transaction, then the "Save PSBT" button
you can save directly to your MicroSD card.
use a short file name that describes transaction or has the date; must end in .PSBT
move that card to the Coldcard
select "Ready to Sign" from main menu of the Coldcard
pick today's PSBT file from the list (if there is more than one on the card)
approve the details of the transaction
the resulting transaction will be saved back to the card, under the same filename with new ending: -final.txn
use any copy of Electrum, or a public service to push the hex-encoded transaction from that file
for example, in Electrum, use Tools > Load transaction > From file
jr. member
Activity: 94
Merit: 3
March 01, 2019, 01:04:56 PM
#1
Trying to use a coldcard air gapped. I noticed the xpub in "view identity" match those in the dump summary but when I import the legacy .json file to electrum the xpub is different than what the coldcard or the dump file reads.
Jump to: