We have published the source code for the Fragile Goods Demo. The demo uses the HTML5 accelerometer API to measure the g-force and time taken to deliver a package. When the package is delivered the data is submitted to a Smart Legal Contract to calculate any penalties for late or clumsy package delivery.

The demo illustrates how to:

  • Collect data from a device
  • Call the Trigger URL for a Smart Legal Contract running on Clause
  • Display the results of execution in a web user interface