Walletwasabi: Import cold wallet data

Created on 6 May 2019  路  11Comments  路  Source: zkSNACKs/WalletWasabi

Is your feature request related to a problem? Please describe.

Currently, you can generate, export and broadcast PSBT data over SD card for complete cold storage signing of transactions. Once the wallet is setup, everything can be securely communciated over SD to the Cold Card Wallet.
One major thing missing so far, is the opportunity to import public wallet date [master key fingerprint and extended public key] generated on the hardware wallet, and imported via SD card or copy and paste.

Describe the solution you'd like

In the hardware wallet tab, add a copy and paste text field, or a drag and drop file upload field, to import the relevant public information to generate the watch only wallet.
Maybe, the electrum skeleton wallet might work for this without any change to the format.
@peter-conalgo @nvk might help with the details.

featurenhancement

All 11 comments

That's the hard way! (Parsing the Electrum skeleton wallet JSON.) We are planning to put a Wasabi option in the Coldcard menu and create the specialized JSON file you need (ie. a Wasabi wallet, ready to open).

Thanks @peter-conalgo!!
But would it really be advisable to build a new format for every wallet?
When you have one for Wasabi, would you also need another type for BTCPay?
Is there a standard similar to PSBT that handles the wallet import?

I agree with @MaxHillebrand. Plus we'd have to deal with support requests resulting outdated firmware. And it'd also complicate your own UX.

You may want to generalize your Electrum file. Now, as I see from the code, you have "xpub", "label", "ckcc_xfp" and "derivation".

So I think it's pretty general already, so for generalization all you need to do is to not have an "Electrum" string in your firmware, but you don't have to touch the actual json.

In Wasabi what we'll do is, we don't care about the label, nor the derivation and we only take the xpub and the master fingerprint (ckcc_xfp) and we're perfectly good. For this you don't need to add a new export type. In fact, maybe in the future we'd use the label information to name the wallet or we may implement monitoring non-bech32 keypaths, so Electrum's json feed is actually a more extensible solution for us than a Wasabi export.

Nice.

The coldcard wallet file only has the label for the entire wallet "label": "Coldcard Import 0xffffffff", this might be interesting to show in the wallet selection window. How do I know which wallet I actually open, if it's not labeled in the GUI?

The individual UTXOs will be labeled inside Wasabi regardless, but this won't affect the wallet file within cold card, right?

How do I know which wallet I actually open, if it's not labeled in the GUI?

Wallets are identified by fingerprints internally, so one fingerprint one wallet.

The individual UTXOs will be labeled inside Wasabi regardless, but this won't affect the wallet file within cold card, right?

Correct.

Wallets are identified by fingerprints internally, so one fingerprint one wallet.

Yes, on the internal lookup. But what is shown in the GUI, if not the imported / changed label from CC?

"Coldcard0, Coldcard1, Coldcard2..." User can rename those manually with "open wallet folder" but most of the times it's one person one hardware wallet will be the case.

It's not released yet but this is the Wasabi skeleton wallet code:

https://github.com/Coldcard/firmware/commit/353e228639d2f076db687d43bd7dd2068b9966bd

You can try it on the simulator easily: Advanced > MicroSD > Wasabi Wallet
Creates "new-wallet.json" under unix/working/MicroSD... Drag into your Wasabi wallet directory and go from there.

The only buzz kill: we need PSBT export/import from/to Wasabi to be able to operate completely air gapped. Regardless, we can get this into the Coldcard firmware before that happens.

Very nice, thanks for the fast setup Peter!!

I'll try to run the installer and test this out.

The only buzz kill: we need PSBT export/import

The good thing is, Wasabi has this already in master branch :)

Ok, I tried it out, works very well, just needs some minor UI improvements.

Work flow is as follows:

  • In Cold Card, go to Settings > Micro SD Card > Wasabi Wallet, a message is shown This saves a skeleton Wasabi wallet file onto the MicroSD card. You can then open that file in Wasabi without ever connecting this Coldcard to a computer. The file created is sensitive -- in terms of privacy -- but should not compromise your finds directly.
  • Press checkmark, and the new-wallet.json file is saved to the SD card. This includes {"ExtPubKey": "xpub6CaWStGvcXqM8BH3Grg4Ae1SrRhXPN67Sr3HJoEZLmz51QaR9a7wSD5gRBVtTSH7mKsfoAEScB8jRPsWX1VBayBFYKUNwG7JqhWczbq4U99", "MasterFingerprint": "4369050F", "BlockchainState": {"Network": "TestNet"}}
  • Remove SD Card from CC, put it into computer.
  • Copy the new-wallet.json into ~/.wasabiwallet/client/Wallets/ and if desired rename it.
  • Open Wasabi and load the wallet file, it will change the file to the regular structure of Wasabi Wallets

From now on, the watch only wallet is integrated and it can be used to build transactions.

Still missing for good ColdCard + Wasabi UX:

  • After selecting coins, address, amount, fee, label in the Build Transaction tab and pressing the Build Transaction button, it opens the Transaction tab which contains the transaction json, hex and PSBT. Right now, it can only be copied.
    --> Add button with Save/Export PSBT, when pressed, open directory window so user can select where to save the file, for CC this will be the SD card.
  • In the Broadcast Transaction tab, there is only an empty text field to paste the signed tx, and a button to Broadcast Transaction
    --> Add a button with Import Signed Transaction, when pressed, open directory window so user can select from where to import the file, for CC this will be the SD card.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

2pac1 picture 2pac1  路  3Comments

yahiheb picture yahiheb  路  3Comments

MaxHillebrand picture MaxHillebrand  路  3Comments

trading2835 picture trading2835  路  3Comments

davterra picture davterra  路  3Comments