⛓️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