Schema Flow
Policy Flow
Available Schema Types
FAQs
Multi - User Roles
Schema Demo
There are two types of Schemas:
  1. 1.
    System Schemas
  2. 2.
    Policy Schemas
To display System / Policy Schemas in the GUI, we have added a toggle in the Schemas tab.

System Schemas

Whenever an account is created, System Schemas are generated automatically.
Note: By default System Schemas cannot be edited / deleted.
To create a new System Schemas, click on the New button at the top right corner.
After clicking on the New button, you will be asked to enter Schema details such as Schema Name, Policy Dropdown, Entity : VC/MRV/NONE, Schema Description and any other required fields.
In addition to the basic Schema details we also have an option to add Field and Condition to each field.
We can also customize the Field keys and Field Title by clicking on Advanced Tab.
There are different types of Field Types:
  • Number
  • Integer
  • String
  • Boolean
  • Date
  • Time
  • DateTime
  • Duration
  • URL
  • Email
  • Image
  • Account
  • Units of Measure
    • Prefix
    • Postfix
  • Enum
Each of the above field types can be marked as either Marked or optional by checking the Required Field checkbox.
Note:
  1. 1.
    Account field type need to be referred in ‘tokenConfirmationBlock’ and ‘tokenActionBlock’. They can be present both in the parent and child documents.
  2. 2.
    If there are multiple fields of the ‘Account’ with the same name, then the value from the most immediate scope, i.e. from the current (‘child’) document is used.
Note: Important points to be noted when "Enum" type is selected:
  1. 1.
    Enum values can be added by editing or by importing it from link or from file.
  2. 2.
    If we are importing files by URL. The response should be ({"enum": ["Option1", "Option2", "Option3"]}) or has same format such as importing file (Options separated by new line symbol).
3. If we put more than five options, it will be automatically loaded to IPFS.
Once the above details are added, click on the Create button.
Once the System Schema is created, we have options for activating, deleting, editing and viewing JSON documents.

2. Policy Schemas

This is the second option in the Schemas tab. This option displays all the Policy Schemas related to all the created / imported Policies in the Policies tab.
The below screenshot shows the Policy Schemas of an imported Policy (iRec).
We also have a filter, where by default, all the Schemas of Policies are shown. We can also select a particular Policy to show the Schemas of the selected Policy.
Policy Schema can also be created by clicking on the New button.
Once the New button is clicked, we get a dialog box that asks for the following information: 1. Schema Name
2. Policy Dropdown: To select any of the imported Policy
3. Entity Dropdown: To select any of the Entity: VC / MRV
4. Description of Schema.
5. Add Field: To add any fields required for the Schema.
Instead of creating a new Schema from scratch, there is also an option to import it via File or via IPFS.
To import the Schema, click on the Import button.
Once the Import button is clicked, we get two options: Import from file and Import from IPFS
Import from file: You can select the required Schema .schema file from your local machine. Sample iREC Schema (iREC Schema.zip) is provided in the link: https://github.com/hashgraph/guardian/tree/main/Demo%20Artifacts
Files with .schema extension are only accepted. These files are in zip format, i.e. they are zip archives of the text file.
Import from IPFS: You can also import Schema from IPFS by entering the correct Schema timestamp. Sample iREC Schema timestamp is below:\
1644847084.945541771 (iREC 3 Policy)
Once the Schema is imported, we need to select the Policy from the Policy dropdown to connect the Schema and the Policy.
After selecting the required Policy, click on the Import button.
When the Schema is imported, it will be in draft status.
Note: Initially when the Schema is created/imported, it will be in draft status.
Once the Schema is imported, we will have the following options: 1. Export the Schema and save it as .zip file in the local machine
2. Editing the Schema
3. Deleting the Schema
4. Displaying JSON document
To Publish the Schema, click on Publish button.
After clicking on Publish, you will be prompted to enter the version. After entering the Version and pressing the submit button, the status will change to Published.
Note: All Schemas connected to a Policy gets published automatically when Policy gets published.
Copy link
Edit on GitHub
On this page
System Schemas
2. Policy Schemas