BitcoinQnA / seedtool

GNU General Public License v3.0
74 stars 16 forks source link

Feature Request: SeedQR display #45

Closed KyleOfTheCorn closed 1 year ago

KyleOfTheCorn commented 1 year ago

This feature request is to display a SeedQR where ever a mnemonic is presented in Seed Tool.

Once a user has generated or manually loaded a seed into Seed Tool, they should have the ability to view the SeedQR representation of the BIP39 mnemonic. This would also be extremely useful to display the SeedQR for mnemonics within the "Seed XOR" and "BIP85: Deterministic Entropy" sections.

This is very useful for workflows when an airgapped computer is used where a master seed is stored (or accessible) and a signing device (like a SeedSigner) needs to scan a SeedQR to sign a transaction created on an internet-connected computer. SeedQRs are much easier to work with on a signing device than manually typing in each mnemonic.

BitcoinQnA commented 1 year ago

As discussed via DMs. We (SPA) did make a start on this a while ago, but we've both been super busy with other projects.

Paging @SuperPhatArrow to see if there's a chance of us getting this over the line?

SuperPhatArrow commented 1 year ago

Hi!

This is actually merged ( #43 ) into the main branch but failed in testing on some (non-chromium based) browsers. As QnA said, we were both distracted by other things. I will try to carve out time to make it ready for release but I am super busy right now.

SuperPhatArrow commented 1 year ago

OK I have just had a quick look through to remind myself. The merge at #43 is just about displaying a seed's QR. I think it's OK.

What I was working on after that on a different branch was the ability to use a web cam to scan a seedQR into seed tool. I also was working on displaying the seed fingerprint with the QR, merged into one image so it could easily be printed. This is where the glitches on different browsers happened, during the merging process adding SVG to Canvas. If only web standards were standard, eh?

The other issue is that for users wishing to use seed tool as offline html file on mobile, the camera permission can't be granted to a local html file, only to html served over https.

That's an update of where we got to with that.

@BitcoinQnA if you want to do tests on the main branch and release that as is (if passing tests) then that's fine with me. It already shows QR codes for Compact SeedQR on main seed, all addresses, Extended PubKeys (single and multisig), BIP47 Payment Codes and BIP85 Compact seedQR.

Unfortunately I didn't think to add it to XOR, but I will make a note to add it to that in the following release.

SuperPhatArrow commented 1 year ago

image

It seems the QR codes are too big on mobile, maybe there is more work to do.

@KyleOfTheCorn if you don't care about mobile and want to use it anyway, you can find the file here

KyleOfTheCorn commented 1 year ago

@SuperPhatArrow: Downloading that index file and opening it in a browser (just as I would with a release) results in some of the js being read as text instead of ran as code. image

SuperPhatArrow commented 1 year ago

OK, sorry, Maybe better to wait for a proper release unless I get back to you sooner.

SuperPhatArrow commented 1 year ago

@BitcoinQnA @KyleOfTheCorn if you could please test the changes here before release.

Thanks, SPA

KyleOfTheCorn commented 1 year ago

@SuperPhatArrow: When playing with the BIP85 compact SeedQRs, the QR doesn't update when changing the mnemonic length or index (just sticks to default).

Extended public keys and addresses look good. 12-word compact SeedQRs look good. However, this is what a 24-word compact SeedQR looks like: image

SuperPhatArrow commented 1 year ago

Nice find. Let me look into it...

SuperPhatArrow commented 1 year ago

I think everything is fixed and can be tested here

Unfortunately scanning QRs with seed tool will not work on any browser without a secure context (https) so this has been removed entirely. Seed tool will need to be a web/mobile/desktop application to have this function.

KyleOfTheCorn commented 1 year ago

@SuperPhatArrow: I don't personally have any need to use Seed Tool to scan an external QR, so that's not really a problem for myself.

The 24-word compact SeedQR display is fixed, as is the updated SeedQR within the BIP85 Deterministic Entropy section. :+1:

SuperPhatArrow commented 1 year ago

Thanks for the FR and help testing. It will have to pass QnA's QA tests and then new release. I will close this issue now since it seems to be solved.