selfcustody / krux

Open-source signing device firmware for Bitcoin
https://selfcustody.github.io/krux/
Other
179 stars 36 forks source link

Q: What is being imported _back_ into Krux from the wallet "coordinator"? #60

Closed david-bakin closed 2 years ago

david-bakin commented 2 years ago

[This is not so much an issue as a question - I couldn't find a reference to any Krux discussion forum where I could ask it. BTW, if you don't have one yet I suggest starting a channel on Telegram which is where the SeedSigner / ColdCard / Raspiblitz / Specter / Sparrow and other projects hang out.]

The single-sig instructions (for Specter) proceed as follows: Create mnemonic, export to wallet coordinator via QR, then export from wallet coordinator back to Krux via QR. Question is: What is being moved back to the Krux that it doesn't already know from the mnemonic?

ghost commented 2 years ago

Hi! Good question.

For single-key wallets, loading the wallet information is optional in terms of needing to check that receive addresses are valid or to sign PSBTs; in that case, it's assumed to be the wpkh script type. Where the import is more useful is when the wallet coordinator includes extra information beyond just the output descriptor in the wallet backup, such as how Specter Desktop also includes the device list and wallet name. Krux will keep the data in the format it was received when it generates its own QR code that you can scan or print, which in this case would let you load up a new Specter Desktop instance with the correct wallet metadata.

For multisig, the wallet import is more important obviously since it includes the cosigners which can't be inferred otherwise.