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 advanced/trustme.py which ships on each Opendime, but they have been re-implemented in Javascript instead of Python.

All the source code for the app/extension is available on Github here.

Opendime Chrome App

Challenges

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.

Installation

We have to ask you to load it as a developer does, by following these steps:

1) Get a copy of the source code for the extension. You can do that by checking out the repository from Github, or by downloading and unpacking this ZIP file from github or our website.

2) Once you’ve unpacked the ZIP file, go to this special URL: chrome://extensions

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.