Skip to content
This repository has been archived by the owner on Sep 27, 2018. It is now read-only.

Creating uPort Connect in any stack

Shayan Shokrgozar edited this page Aug 13, 2018 · 5 revisions

To create uport connect functionality in any stack, you need the following building blocks:

  1. JWT library, wrapped for DID functionality with support for EC DSA signatures on the secp256k1 curve [Example JS implementation].(https://github.com/uport-project/did-jwt)
  2. A way to resolve DID JWTs
    1. android SDK resolver
    2. W3 DID Resolver spec
  3. A way to Sign JWT's using the secp256k1 curve.
  4. Poll chasqui for updates
    1. dApp generates a random topic id randomIdDapp (ie: 1234-5678-9082)
    2. dApp presents the user a QR with callback: /message/{randomId}
    3. dApp subscribes to topic randomId, waits for address field.
    4. uPort Mobile app generates a random topic id (ie: 9923-1234-3234)
    5. uPort Mobile app subscribes to topic randomIdMobile
    6. uPort Mobile app scans URL from QR code
    7. uPort do a POST to the URL /message/{randomIdDapp} (callback scanned URL) with "address": "
      " and "callback": "<randomIdMobile"> as body parameter
    8. dApp app gets the address and the callback for the mobile app, and deletes the topic from the messaging server with DELETE /topic/{randomId}
  5. Use pututu if you want to send push notifications to the uPort mobile user.

References

Clone this wiki locally