MetaMask / snaps

Extend the functionality of MetaMask using Snaps
https://metamask.io/snaps/
Other
720 stars 553 forks source link

Implement support for globals needed to support hardware wallets #650

Open FrederikBolding opened 2 years ago

FrederikBolding commented 2 years ago

Follow up to #498

TBD.

rekmarks commented 2 years ago

Quoting @FrederikBolding:

To support hardware wallets as snaps we can expose WebHID and WebUSB via globals. However, we would need to initialize the hardware connection in the MetaMask extension by allowing the user to click a button, triggering a user gesture outside of a snap. After that is done the connection should be available to snaps.

This is the same way the extension is currently doing it. While we are still running snaps in iframes, this seems like the only option.

Can we emulate WebHID and WebUSB in Node.js?