Creating Data
Categories Of Data
There are seven categories of data:
General Data: This is any general information about the owner of the data like name, age, etc.
Education Data: This is data about the owner's education, school, certificates, degrees, etc.
Healthcare Data: This is data about the owner's health history
Professional Data: This is data about the owner's work history
Properties Data: This is data about the owner's possessions whether real estate or others. This includes the address of those possessions when relevant.
Others: This is any data about the owner that does not fit into any of the previous categories
Searchable Data: This is data stored in non-encrypted format and that can be searched for through the SSI page. This can be data about the supply chain of a product so that users shopping for the product can just search it by its ID on the SSI page and get all its supply chain information straight from the blockchain. This enables companies to provide a supply chain passport for each product they sell
Supply Chain Passport
This is a collection of information about the supply chain of materials that were used to manufacture a product. You should in the case of a battery, for instance, be able to see every information on:
all the materials that went into the manufacturing of the battery
the supply chain of each of those materials
how those materials were mined/produced and in which condition
We envision a future where a Supply Chain Passport is created (whether on SSI or any other platform) for every product sold and users can search for their product's supply chain passport by product ID.
Filling that knowledge gap will help prevent a lot of issues in the manufacturing industry, the mining industry, and many other industries. It will help:
prevent child labor, forced labor, human rights violations
prevent unsafe working conditions and employee exploitation
prevent non-sustainable practices
prevent illegal mining (since companies will not be able to buy any mineral illegally mined)
etc.
How To Create An SSI Datum?
First of all, for the created data to be trusted by people, it needs to be created by a trusted auditor in a category appropriate to the category of data being created. Generally the higher an auditor's color is, the better. You can search for the right auditor and then classify them based on color to find the right one on the auditor's page.
Also, an auditor should not create data about himself/herself no matter how trusted he/she is.
Here is a step-by-step guide to creating data about one of our user's age given the user is 22:
Go to the SSI page and click on the Make An Entry button
On the data creation page, we fill the Question field with the value Age and the Answer field with the user's age. We set Owner Wallet Address to the address of our user, we picked General as our data category, entered the user's profile ID along with ours, and finally defined a time range of validity for the age. To define the time range of validity for our user's age, we had to check the user's birth date which in our case is the 30th of August. We define that as the end date of our datum's validity.
After the validity end time is passed, our datum expires and the user would have to create a new one.
You can add more entries and Validate the form.
Congratulations, you have successfully created a new datum for your user.
How To Create An Automatic Datum?
PaySwap is the auditor in the case of automatic data creation. The number of data that can be automatically created is limited.
Go to the SSI page and click on the Make An Automatic Entry button
On the page that shows, select the type of data you would like to create and follow the helper guides available when you hover the cursor over the help icon of a field.
Viewing Your Data
Once data has been created for you by a trusted auditor, it becomes available on the SSI page in the category that was picked for it. You can view your currently active data, expired data, or pending data (data that will become active in the future).
The text below each datum is the value of the datum as it is stored.
To view your datum decrypted, click on the red lock icon at the right of your datum's panel, and sign a transaction with your wallet. It should turn green and reveal the actual data.
Creating An Identity Token
Identity tokens are mechanisms through which users can prove information about themselves to smart contracts deployed on the blockchain or to human beings. Identity tokens can only be minted by the owner of their underlying datum, not its auditor. They are NFT tokens that display their underlying datum. Let's create one for our age datum:
Click on the right arrow on the age datum's panel then on the page that shows, click on the red lock and sign the transaction to decrypt the data
Click on the Generate Data button on the right and fill in the form like in the image below.
Validate the transaction to generate the identity token. You should be able to view your identity token from the NFTs > SSI tab on your profile page. Click on the Your Profile button from the drop-down menu on the top right of your screen to go to your profile page
Our recently created identity token is the third one from left to right on the image below. As you can see, it displays the question which age as well as the right answer which testify_eq_22 meaning it is testifying that the owner has an age equal to 22.
This token can be shown to human beings to prove age and its ID can be entered when calling certain smart contract functions to prove age to those contracts.
Creating Zero Knowledge-Proof Data
You can create zero knowledge-proof data from any previously created datum. Let's create one.
The process is similar to that of identity tokens. Go to the datum's page, decrypt it, and click on the Generate Data button
The Zero Knowledge Proof being created in the image above is that of the user's age being over 18 without revealing the user's age. Validate the form.
You should be able to view the generated token from the NFTs > SSI tab on your profile page just like with identity tokens
As you can see, it displays the Question which is age as well as an answer which does not reveal the user's actual age: testify_gt_18 which means that it is testifying that the user's age is greater than 18
This token can be shown to human beings to prove adulthood and its ID can be entered when calling certain smart contract functions to prove adulthood to those contracts.
As for the other parameters being displayed:
SID: Sender ID or in this case Auditor ID
RID: Receiver ID or the ID of the Owner of the datum
AID: Auditor ID
Sharing Data
You can only share data that has already been created for you. The SSI system enables you to specify the duration you are willing to share the data for:
The process is similar to that of identity tokens. Go to the datum's page, decrypt it, and click on the Generate Data button
Pick the Share Data tab and fill in the end date of the share, the ID of the user you are sharing the datum with, and specify whether you are willing to generate an NFT proof of you sharing the datum
Validate the operation and go back to the SSI home page to view your shared data. In this example, we have shared the datum with ourselves so it will be available in our Inbox because if we had shared it with somebody else, it wouldn't. All data shared with you is available in your inbox along with the date you will not be able to view it anymore (which in our example image is October, 28th 2023 at 1:15 AM.
To decrypt shared data, you do not need to sign a transaction, you just have to click on the red lock icon at the right of the datum's panel
Since we've specified when sharing our datum that we wanted an NFT proof of our sharing operation to be minted, this proof has been and is available from the NFTs > SSI tab on our profile page
Last updated