Just as we were finalizing the firmware for V2 of Opendime (now shipping, by the way) we discovered that Chrome, the dominant web browser, can actually talk to USB devices if the code is running in a Chrome App! Chrome Apps (sometimes called Chrome extensions) are easy to install and do all the usual HTML-based pretty stuff we expect from modern applications.
After some very minor changes to the USB protocol implemented by Opendime, we have made a very handy Chrome App that makes using Opendime beyond easy:
- Just plug in the Opendime and it pop ups.
- Shows the payment address as a QR code, with a button for “copy to clipboard”.
- If it’s a factory-fresh Opendime, press one button to load it with 256k bytes of crypto-quality random numbers. This feature alone is worth having!
All the security checks and verifications are implemented:
- bitcoin message signature check (using a unique nonce each time)
- per-unit x.509 certificate is verified against factory certificate
- verification by signed message (with nonce) by the anti-counterfieting chip
- the would-be counterfieter would also need to implement our proprietary USB protocol
These are the same tests performed by
instead of Python.
All the source code for the app/extension is available on Github here.
Unfortunately, Google is phasing-out Chrome Apps, and today at least, that’s the only way we can get to the USB bus from the browser. They are still accepting uploads to the web store, and we’ve done that, but it will only allow installation into ChromeOS.
You can see our extension here on Chrome’s Web Store. If that’s useful for you, please do use that official channel.
We’ve only tested this Chrome App successfully on Mac OS. It does not seem to work on Windows (USB devices aren’t detected). There are known permission issues for Linux (devfs rules) and we don’t have a ChromeOS device to test against.
We have to ask you to load it as a developer does, by following these steps:
2) Once you’ve unpacked the ZIP file, go to this special URL:
3) You can either drag the
manifest.json file into that window, or enable ‘Developer Mode’
and choose ‘Load unpacked extension’.
4) Click ‘Launch’ to start it for the first time. It will ask you for permission to access the USB, which you must approve. We only look for Opendime devices, and you only need to approve it once.
The app supports a single Opendime at a time; please don’t try to use two at the same time as it will be confusing. We link to a number of public block explorers, but this app works entirely off-line and does not contact the Internet without your permission.