Digital Asset Platform Accelerator

Overview

The Digital Asset Platform (DAP) sample demonstrates a use case for purchasing menu items from a vendor. Several of Keychain’s features are demonstrated, including:

  • Persona creation

  • Pairing with a trusted directory

  • Pairing devices using QR codes

  • Data security

  • Purchasing products from a merchant

  • Approval/Rejection of transactions

This accelerator has multiple components, each operating as one of the parties involved in a transaction (customer, merchant, issuer).

See Design for more details.

Source Code

Repository

https://github.com/keychain-io/solution-accelerator-digital-asset

Languages

Java (SE, Android), Javascript, Python

Video


Design

There are 5 discrete components to this accelerator:

  1. DAP Issuer Backend

  2. DAP Issuer Customer Web Page

  3. Dap Issuer Admin Web Page

  4. DAP Merchant Android App

  5. DAP Consumer Android App

The basic workflow at a high level is as follows. . a customer uses the DAP Consumer Android App to purchase items from the Merchant . if an item costs less than ¥1,000 it is approved automatically . if the price of an item is over ¥2,000 the transaction is rejected . if the price is between ¥1,000 ~ ¥2,000, the transaction must be approved using a three-way authenticated consensus. That is, the Issuer, Merchant, and Consumer must all accept and sign the transaction. After all three sign and verify each other’s signatures the transaction is approved.

Please see the README.md file in each of the sample applications for more detailed and specific information about each sample, including how to configure and run each of sample application.

DAP Issuer Backend

The Issuer Backend is written using Python. It is used to issue funds to the Consumer app so that the Consumer app can purchase items from the Merchant app. Participating in the three-way authenticated concensus, the Issuer Backend must also approve the transactions, as previously described above. It also archives the transactions to a PostgreSQL database.

Issuer Backend

DAP Issuer Customer Web App

The Issuer Customer Web app is written in Vue (JavaScript). It is used to create customer accounts so that the Consumer App can pair with the issuer using a QR code.

Issuer Consumer Web
Issuer Consumer Web Pairing Page
Issuer Consumer Web Manage Devices Page

DAP Issuer Web App

The Issuer Web app is written in Vue (JavaScript). It is the frontend application that allows you to set parameters that will control rules and limits that configure the behavior of the issuer.

Issuer Web App

DAP Merchant

The DAP Merchant sample app is an Android app that is written in Java. Its purpose is to act as a point of sale device, from which a consumer app will purchase menu items by scanning QR codes. The Merchant also participates in the three-way authenticated concensus to approve/reject transactions as previously described above. Think of this like a typical tablet menu at a restaurant.

Merchant App
Merchant Wallet Screen

DAP Consumer

The DAP Consumer sample app is an Android app that is written in Java. It is used to purchase items from the Merchant app. The Consumer also participates in the three-way authenticated concensus to approve/reject transactions as previously described above.

Consumer App
Consumer Wallet Screen