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
Support Ledger devices #951
Comments
@friedger mentioned that this is an important issue for Friedger Pool's ability to support users via a web wallet |
and this will also be as equally important for using swapr, or apps that play with more than just a few tokens |
My pool members use Ledger devices because they handle larger amount of tokens. That means they can only use Friedger Pool web app once Web Wallet supports hardware wallets. |
With the new send-many interface created by @friedger and @OmurCataltepe this would definitely be a nice to have. In the scenario of making payouts to multiple addresses from an account secured by a Ledger, right now, an extra TX is required to fund the web wallet address before making payouts. This would really streamline things! https://github.com/friedger/stacks-send-many |
Just wanted to add here that we are starting to look at a provider abstraction layer at Ryder for this exact thing. Obviously we would not have an issue exporting the |
Worth noting, I hooked up the foundation with Shift Crypto, who make the open source BitBox (bitcoin only) hardware wallet series. Nothing confirmed yet, but worth throwing it in here. If they do end up working on it, I'll try connect them here so we can get support for BitBoxes in the Hiro Wallet too. |
I'm also interested since it keeps my funds a lot more protected. I have my Bitcoin keys air gapped through my BitBox(es) and want the same on here. Also we'd like to keep some funds under multisig so more support for that would be great, even though it's not specific to this issue lol |
Also interested in this feature, as I sent all my NFTs, including bns name to my hardware wallet. I thought this would be a safe place where to keep them, and assumed if the Desktop wallet supports Ledger, so does the web wallet. It's difficult for new user to make the difference between the two and for my part, I completely missed this crucial detail. Now I'm realizing I sent all my NFTs on a one-way trip because I'm not ready to compromise on the security of the seed (I also used a passphrase, which makes it more difficult).I wish I'd have known about this little gap in the user experience before sending everything! |
@jasperjansz Let's prepare a full set of mockups for Ledger integration in onboarding and sign in ahead of our next meeting with @jleni and the Zondax team about this next week, so we can review in person then. |
Recommended reading: https://github.com/LedgerHQ/ledgerjs/blob/master/docs/migrate_webusb.md tl;dr we can support Chrome without "Ledger Live bridge", but Firefox doesn't have WebUSB support yet |
@jasperjansz Could you post your designs here now that they're fleshed out? |
It is unlikely that Firefox will support WebUSB, they say: "..we believe that the security risks of exposing USB devices to the Web are too broad to risk exposing users to them or to explain properly to end users to obtain meaningful informed consent. It also poses risks that sites could use USB device identity or data stored on USB devices as tracking identifiers." |
Figma designs can be found here: @eugeniadigon to add illustrations to both flows |
One note here re the current UI designs: There aren't any error flows described. There are a million things that can go wrong with a Ledger. Off the top of my head:
One lesson learnt from the desktop wallet would be that we need to hand hold when things go wrong. Giving what feedback we can, linking to support pages etc. |
@eugeniadigon let's work standard error message components into these when you have a chance, per @kyranjamie's note above 🙏 |
@eugeniadigon to add illustrations for connecting device and confirming transactions on device |
@eugeniadigon we may want to add a notice here to both Ledger connection flows that warns the user that they should close Ledger Live before proceeding. Keeping it open has been known to cause users issues with the desktop wallet in that Ledger Live prevents the Ledger device from communicating with Hiro Wallet. |
Is this issue known only when connecting or also when signing a transaction? |
Both times since it interferes whenever the wallet needs to talk with the Ledger device |
I added some instructive illustrations to the user flow + an option with the Ledger Live warning, both on the Onboarding and Transaction signing. @markmhx please advise if I should use a better phrasing for the warning Onboarding: https://www.figma.com/file/VupGh90FJtT0dcBj2Sh7bb/%F0%9F%93%8FSpec?node-id=1021%3A11552 Transaction signing: https://www.figma.com/file/VupGh90FJtT0dcBj2Sh7bb/%F0%9F%93%8FSpec?node-id=1021%3A11553 |
@eugeniadigon this looks great! We'll discuss as a UserX team today to see if any modifications are needed given @kyranjamie's work so far. |
This issue needs decomposition into sub-issues. |
See ledger milestone https://github.com/hirosystems/stacks-wallet-web/milestone/53 |
@eugeniadigon quick question is there a screen that prompts us to pick ledger or a software wallet when creating a new wallet similar to this screen for desktop wallet? |
How does MetaMask support hardware wallets in Firefox? I just tested connecting a Ledger Nano S to MetaMask in Firefox 95.0.1 and it worked fine. Perhaps Hiro Wallet could use the same hardware wallet connection technique MetaMask is using? |
Metamask Ledger integration has since been fixed, and uses WebHID. We'll do the same. |
@kyranjamie this compatibility table shows that Firefox does not support WebHID. I'm not sure what MetaMask is using to get hardware wallet support on Firefox, but perhaps you can look into it and copy their technique for Firefox so that Hiro Wallet hardware wallet support works on both Chromium-based browsers and Firefox? I think they're using U2F for this but not 100% sure (I am not a programmer and can't read their code). |
@kyranjamie to provide code review instructions (with focus on authentication) while QA gets underway on full regression testing of Ledger support |
I recently tested this with the latest ledger version (0.22.4) & the last POC build from Friday. I could get as far as signing the JWT hash (e.g. on byzantion, gamma) but the wallet wasn't actually connected to the site, and no further actions could be executed. Is there more work to be done here, or will I find today's build offers more functionality (sign in fully, execute actions)? Do the dapps need to update anything on their end? Just trying to understand the process & where we're at. Cheers. |
Thanks for testing @the-artilleryman. It not going to work out the box in some cases, I'm afraid. I tried Gamma too and their code will need to be updated to not solely rely on the |
@kyranjamie No problem. And thank you for the reply. That's useful to know. I'll continue to monitor. Appreciate all the hard work you & the team are putting in here. Thanks again. |
I'm creating an issue here so that we can track it in the future.
It would be amazing to support Ledger devices in the Web Wallet. Even after our audit, it is reasonable to assume that many users won't be comfortable using a software wallet. Not supporting Ledger devices will eliminate the opportunity for apps that build on top of real monetary value - like Stacking, DeFi, etc.
My current understanding is that we already have everything we need (at a technical level) to support Ledger devices in the extension. We can re-use the same library from Zondax, and Ledger has solid support for the WebUSB standard. WebUSB is only supported on Chromium browsers (Chrome, Edge, Brave, etc).
Key features that need design:
appPrivateKey
. We certainly can't extract the private key directly from the Ledger's keychain. However, plenty of options to have a good solution here.The text was updated successfully, but these errors were encountered: