Skip to content
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

[TASK] Implement mm-ledger-gateway #4593

Closed
ghost opened this issue Jun 16, 2018 · 3 comments
Closed

[TASK] Implement mm-ledger-gateway #4593

ghost opened this issue Jun 16, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Jun 16, 2018

affects #4060


(draft)

Problem

USB access is not allowed for extensions, thus the Ledger hw-wallet cannot be accessed directly by MetaMask.

Solution Summary

  • Implement a "mini-metamask" within a chrome app, which accesses the ledger device directly
  • Only the minimal functionality needed is implemented
  • Allow the metamask-extension to connect to this "mini-metamask" chrome app

Solution Details

This solution does not depend on the Ledger Native app. MetaMask would be able to communicate directly to the Ledger-Device, by using only the mm-ledger-gateway.

A) ledgerjs

The relevant ledger libraries:

Preferred Path (Latest Ledger code, no native-code or desktop-app needed)

A.1) mm-ledger-u2f-gateway Chrome App

The eth-ledger-keyring depends-on/accesses the mm-ledger-u2f-gateway

User Manual: "If you want to interface Ledger, you have to install additionally the mm-ledger-u2f-gateway Chrome App

A.2) mm-ledger-u2f-gateway IFRAME

Same as above, but uses an IFRAME and (mm-extension-) internal-messaging

(no additional installation steps needed)

Further alternatives

xyz = any applicable alternative transport

  • mm-ledger-xyz-gateway Chrome-App or IFRAME

End Notes

The same Solution-Path should be applicable to other hw-wallets (including Trezor, for a more direct interfacing-approach than #4625)

@ghost
Copy link
Author

ghost commented Aug 17, 2018

The "A.2) mm-ledger-u2f-gateway IFRAME" was implemented within #5050

@ethanfrey
Copy link

Curious about the solution using chrome apps, as they seem to be deprecated... https://9to5google.com/2017/12/06/google-chrome-apps-dead-web-store/

But I guess the iframe solution won in the end

@ghost
Copy link
Author

ghost commented Aug 24, 2018

@ethanfrey , I somewhere saw that the end-of-life for chrome-apps was extended. Additionally, A.1 and A.2 use essentially the same messaging-technique, thus code produced for A.1 could be reusable for a A.2 implementation.

Both A.1 and A.2 implementations are not the final ones. They are just kind of workarounds, until a direct-access-layer (U2F or WebUSB) for browser-extensions is provided by the browsers.

(feel free to contact me via info at lazaridis.com, here @ MetaMask the things are done/closed)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant