βοΈTrustChain reports
For a demo example of following steps, here is the policy timestamp: 1675176247.137536341
Task
Create a report to check a chain of documents.
Preparation
We will use example 4 to assemble multiple documents to build a realistic-looking Trustchain.
Letβs add several additional attributes into the documents to simplify the document search.
Building the trustchain report:
Using the βreportBlockβ
1.1 Add new container
1.2 Add βreportBlockβ
In Guardian policy βreportBlockβ finds VP documents based on their id or hash and displays document information, related policy and token information. To retrieve the linked information βreportItemBlockβ must be used.
1.3 We will build the following chain in this example: mint _VP β MRV Report β Project (approved and signed the the Approver) β Approver document β Project (created and signed by the user) β User document._
We will need 6 βreportItemBlockβ items correspondingly, 1 per each document.
The βreportItemBlockβ items are executed sequentially, thus in the filter for each consecutive βreportItemBlockβ we can use values from the previous blocks/documents.
1.3.1 βmint_documentβ. To find this document which described the token mint operation we will use one of the Common Variables - actionId
1.3.2 βreport_documentβ. To find the MRV report (i.e. data document which was the basis of the decision to mint tokens) we will also use one of the Common Variables β documentId
To find further documents we will need to use values from the Ref variable which point to the previous document. Letβs save in a new variable:
1.3.3 βproject_document(approver)β - Lets use the previously defined variable alongside the static filtration parameters.
Save the author of the document signature so we can display the information about the user later
Use the same approach to continue the chain until the end.
1.3.4 βapprover_documentβ
1.3.5 βproject_document(user)β
1.3.6 βuser_documentβ
To activate the βreportBlockβ an id or a hash of the VP document is needed, we will add the grid containing the list of the VP documents and links to the trustchain.
2.1 Add βinterfaceContainerBlockβ, βinterfaceDocumentsSourceBlockβ and βdocumentsSourceAddonβ
2.2 Add new column with the type BUTTON
Setting the Action to LINK will cause the Policy Engine to attempt to switch the display to the target policy block upon the user clicking the link (if possible).
Demo
VPs:
Trustchain:
Last updated