Search
  • Litentry

Use the Playground Apps to interact with Litentry

Updated: Apr 14


Get the apps




Quick Start


1. Connect to Polkadot.js Apps, switch to the Settings page, connect to Litentry's node with "wss://ws.litentry.com/" .


2. You will need to add Litentry's types to the app so it can encode and decode the extrinsic correctly, copy the following code to the text field on "developer" tabs: https://polkadot.js.org/apps//#/settings/developer .

{
  "Address": "AccountId",
  "LookupSource": "AccountId",
  "IdentityOf": {
    "id": "Hash"
  },
  "AuthorizedTokenOf": {
    "id": "Hash",
    "cost": "Balance",
    "data": "u64",
    "datatype": "u64",
    "expired": "u64"
  }
}

it would look like on the following page, click "save" and you are ready to interact with runtime.



3.  Litentry related method is in the "LintentryTemplateModules" module. what you can do with pre-defined accounts like "Alice" is : 


  • register Identity:  registered identity belongs to Alice, it shows different identities, like identity in Sports, identity in Music Field, identity in German Citizenship, which could split her personal data and protects the data.

  • issue Token: the issued token is the pass for certain identity, for example, a token to use specifically for a certain gym.

  • transfer Token: transfer the ownership to another person, like the ownership/ membership

  • register identity with certain id:  that is useful when you already get the identity id from the merchant, for example, you buy a solar panel, there is identity code in the box, then you can register this identity to you, thus the whole net will acknowledge the ownership of the solar panel.


And also check the state in the "Chain State" page:

3. Open Playground web application is: https://demo.litentry.com/




4. We have the authenticator app to interact with the playground (Github repo: https://github.com/litentry/litentry-authenticator. Now it is a custom react-native app foked from Parity Signer. In the future, we will try to use light client

To install the app please download the apk here: https://blockweise.s3-ap-southeast-1.amazonaws.com/litentry-authenticator.apk .

The app is bound with "Alice"'s account, with it open you will see all the identities of "Alice"


5. Here we mock the "sign up" and "log in" process IoT authenticating scenarios, such as in Fitness studio or Pass Check. So let us first click the "Sign Up" button on the web app. Here you can scan one of the Identities from your mobile app, which replaces the tedious register process on other websites.




6. Then you see your identity ID is listed on the website, just click it for logging in.

7. On the "Log in" page, it comes a scanner again. Now click one of the tokens on the mobile app now and click "generate signed hash" button, show this QR code to the web scanner.



8. Once the scanner finds it is authorized by the identity you are successfully logged in.


Tokens received from Other accounts could be seen from "Received Token List" page, there you can see the tokens and token's Identity there. Try to use Bob's account and issue a access token to Alice!




Future Improvements


In the next phase, we will implement "Web Scenario" which is like "login" to twitter or your Facebook account. In such case, "Sign up" would be pretty much the same, but start from step 7, the login process will be changed like the following: 

8. Now on your mobile app, you receive notifications to ask whether to authorize one of your identity to log in.

9. Click "Yes" and then you send the signed login message to a remote server, and then you are logged in.

10. Since the web app has no idea who you are, (you have split your identities and from the hash code he know nothing) your privacy is protected.

11. After using the app, the generated data when browsing/using the web app will send to the user's decentralized data storage. User harvest his own data!





35 views

© 2019 Blockweise Ltd.