-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Message signing via QR code #1567
Conversation
✅ Deploy Preview for specter-desktop-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@@ -425,15 +427,26 @@ def addressinfo(wallet_alias): | |||
wallet = app.specter.wallet_manager.get_by_alias(wallet_alias) | |||
address = request.form.get("address", "") | |||
if address: | |||
descriptor = wallet.get_descriptor(address=address) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the old version this descriptor was a class: <class 'embit.descriptor.descriptor.Descriptor'>
@@ -425,15 +427,26 @@ def addressinfo(wallet_alias): | |||
wallet = app.specter.wallet_manager.get_by_alias(wallet_alias) | |||
address = request.form.get("address", "") | |||
if address: | |||
descriptor = wallet.get_descriptor(address=address) | |||
descriptor = add_checksum( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the changed version we are generating two descriptors as strings at the api endpoint (and not as before in a confusing way with JS objects in the jinja template): one with pubkey and one with an xpub.
… to single sig wallets and (for now) DIY devices, UI flow added to get signature from scanning DIY QR code back into Specter
UpdateCommit: e0dd454:
Current visualsqr_code_signing_part_1.movAfter scanning the QR code on the Specter DIY: qr_code_signing_part_2_1.movTODOs
|
@b30wulffz, first off, the device name is pretty useful here IMO in the UX flow to point the user in the right direction (that he will sign with the device associated with the wallet, so he should also not be surprised to end up on the respective device endpoint). In short: I'd leave it like this. You have a valid point, though, we need to make sure that longer device names don't mess up the UI. I think there are two options here:
What do you think? Update:@b30wulffz I went with 2) in 72785d1 |
… path, fixed usb signing front end stuff, changed css in address-data.html to allow for long device names without breaking the font end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Works nicely.
…red and use of ghost machine keys in this spec file.
* Added tests/bitcoin to gitignore * First draft. * message signing button better integrated in address info, restriction to single sig wallets and (for now) DIY devices, UI flow added to get signature from scanning DIY QR code back into Specter * fixed regex in wallets_api to allow for electrum's shorter derivation path, fixed usb signing front end stuff, changed css in address-data.html to allow for long device names without breaking the font end. * cypress test for qr code signing flow & renaming of spec_node_configured and use of ghost machine keys in this spec file. * adjustments in cypress tests to account for new ghost wallet
Flow
You ideally come from a wallet and a specific address, but you could also input the derivation path by hand directly from the devices setting where the first approach is redirecting to.
Visuals
Screen.Recording.2022-02-08.at.21.15.42.mov
https://github.com/cryptoadvance/specter-diy/blob/c91a36dfd9ebabf5b22b6835b40beab9b8fd6fec/src/apps/signmessage/signmessage.py#L77
Known issues
get_descriptor()
currently breaks stuff withdisplayAddressOnDevice()
device.jinja
TODOs