Skip to content

Commit

Permalink
2.9.2 documentation only - library of policy examples (#1758)
Browse files Browse the repository at this point in the history
* fix

Signed-off-by: Stepan Kiryakov <[email protected]>

* GitBook: [#213] Added GroupByFields property in aggregateBlock

* GitBook: [#214] Setting up local IPFS Node

* Setting Local IPFS node updated in ReadMe

* GitBook: [#215] Added Multi Policy APIs

* update Dovu policy (fix schemas)

* update validation errors

Signed-off-by: Stepan Kiryakov <[email protected]>

* update validation errors

Signed-off-by: Stepan Kiryakov <[email protected]>

* fix

Signed-off-by: Stepan Kiryakov <[email protected]>

* GitBook: [#213] Added GroupByFields property in aggregateBlock

* GitBook: [#214] Setting up local IPFS Node

* Setting Local IPFS node updated in ReadMe

* GitBook: [#215] Added Multi Policy APIs

* MBP projects

* bump version

Signed-off-by: simvalery <[email protected]>

* change hedera explorer

Signed-off-by: artembuslaev <[email protected]>

* always display delete action on selected block

Signed-off-by: artembuslaev <[email protected]>

* update hedera-sdk

Signed-off-by: simvalery <[email protected]>

* GitBook: [#220] Multi Policy UI

* GitBook: [#221] corrected local node files

* added message chunk setting

Signed-off-by: artembuslaev <[email protected]>

* #1014 MBP projects

* update schemas

* rename

* Updated Verra Timestamp

* added settings to change body request size

Signed-off-by: artembuslaev <[email protected]>

* add demo policy

* GitBook: [#224] Changed DragonGlass to Ledger Works in FAQs

* GitBook: [#225] how to change Explorer URL

* add additional events

* update lint

* GitBook: [#227] ImpactAddon block added

* GitBook: [#228] UI Automation Tests

* GitBook: [#229] added AddiitonalMintEvent

* GitBook: [#230] Added Impacts section in ReportBlock

* fix display token type

* fix dependency

Signed-off-by: simvalery <[email protected]>

* added IREC 8.1,8.2 in ReadMe

* GitBook: [#231] Added IREC and Verra Intro

* policy comparison

* GitBook: [#232] Remote GHG Policy added

* GitBook: [#233] Remote GHG Policy Demo images

* GitBook: [#234] Artifacts APIs added

* update

* http request block config

Signed-off-by: simvalery <[email protected]>

* update

* update

* http-request-block

Signed-off-by: simvalery <[email protected]>

* fix lint

Signed-off-by: simvalery <[email protected]>

* add validation

Signed-off-by: simvalery <[email protected]>

* fix

Signed-off-by: simvalery <[email protected]>

* update

* custom logic worker

Signed-off-by: simvalery <[email protected]>

* tokens retirement

Signed-off-by: artembuslaev <[email protected]>

* fixed endpoints, changed labels

Signed-off-by: artembuslaev <[email protected]>

* tokens retirement fixes

Signed-off-by: artembuslaev <[email protected]>

* up version

Signed-off-by: simvalery <[email protected]>

* fix

Signed-off-by: artembuslaev <[email protected]>

* fixed issue with double publishing retire schema

Signed-off-by: artembuslaev <[email protected]>

* fix deps

Signed-off-by: simvalery <[email protected]>

* GitBook: [#235] Retirement UI and APIs added

* The worker-service now operates on the network specified by guardian-service.

Signed-off-by: Giuseppe Bertone <[email protected]>

* fix updating token balance in retirement process

Signed-off-by: artembuslaev <[email protected]>

* GitBook: [#236] corrected typo in retirement

* added max transaction fee setting to worker

Signed-off-by: artembuslaev <[email protected]>

* update default max fee

Signed-off-by: artembuslaev <[email protected]>

* GitBook: [#237] Updated env parameters in installation

* up version

Signed-off-by: simvalery <[email protected]>

* GitBook: [#239] UI Properties of Interface step Block deprecated

* updated retirement docs, added some checks

Signed-off-by: artembuslaev <[email protected]>

* GitBook: [#240] Updated Contract APIs

* fix preset and readonly fields in condition section

Signed-off-by: artembuslaev <[email protected]>

* remove setImmidiate

Signed-off-by: simvalery <[email protected]>

* update string formats ui validation

Signed-off-by: artembuslaev <[email protected]>

* GitBook: [#241] HTTP Request Block added

* GitBook: [#242] Added blocks to available blocks

* remove redundant logs

Signed-off-by: simvalery <[email protected]>

* CVE-2022-25878

Signed-off-by: simvalery <[email protected]>

* disable autocomplete on tokens count

Signed-off-by: artembuslaev <[email protected]>

* change placeholder for url type field

Signed-off-by: artembuslaev <[email protected]>

* added retirement contract code

Signed-off-by: artembuslaev <[email protected]>

* update

* Changed the iREC User Guide URL in ReadMe

* Updated Verra User Guide link

* fix lint

Signed-off-by: simvalery <[email protected]>

* fix tests

Signed-off-by: simvalery <[email protected]>

* GitBook: [#243] Corrected Creation of Root API in API Demo Guide of iREC

* compare tokens

* compare conditions

* update

* update

* update

* export in csv

* update tymlez policies

Signed-off-by: artembuslaev <[email protected]>

* update

* update

* fix

* fix

* update

* fix

Signed-off-by: Stepan Kiryakov <[email protected]>

* fix

Signed-off-by: Stepan Kiryakov <[email protected]>

* fix

Signed-off-by: Stepan Kiryakov <[email protected]>

* fix

Signed-off-by: Stepan Kiryakov <[email protected]>

* GitBook: [#244] Corrected time tracking format in GHG

* fix

Signed-off-by: Stepan Kiryakov <[email protected]>

* GitBook: [#245] No subject

* GitBook: [#247] Policy Differentiation UI

* GitBook: [#248] No subject

* GitBook: [#250] No subject

* GitBook: [#251] Policy Differentiation UI

* GitBook: [#252] Policy Differentiation APIs

* GitBook: [#253] Schema Differentiation UI

* GitBook: [#254] Schema Diff APIs

* added possibility to include incomplete pairs

Signed-off-by: artembuslaev <[email protected]>

* added contract code, fix

Signed-off-by: artembuslaev <[email protected]>

* fix incomplete retire request for nft opposite token

Signed-off-by: artembuslaev <[email protected]>

* fix custom logic block error handling

Signed-off-by: artembuslaev <[email protected]>

* fix

Signed-off-by: Stepan Kiryakov <[email protected]>

* fix

Signed-off-by: Stepan Kiryakov <[email protected]>

* fix

Signed-off-by: Stepan Kiryakov <[email protected]>

* policy service

Signed-off-by: simvalery <[email protected]>

* fixes

Signed-off-by: simvalery <[email protected]>

* fix build

Signed-off-by: simvalery <[email protected]>

* fix build

Signed-off-by: simvalery <[email protected]>

* fix tests

Signed-off-by: simvalery <[email protected]>

* add title

* fix

Signed-off-by: artembuslaev <[email protected]>

* fix select user role
fix block updates

Signed-off-by: simvalery <[email protected]>

* refactor runner

Signed-off-by: simvalery <[email protected]>

* fix docker build

Signed-off-by: simvalery <[email protected]>

* GitBook: [#255] Updated Retirement screens

* add package lock

Signed-off-by: simvalery <[email protected]>

* updated contract file id

Signed-off-by: artembuslaev <[email protected]>

* update transmute

Signed-off-by: simvalery <[email protected]>

* update transmute

Signed-off-by: simvalery <[email protected]>

* Temp fix

Signed-off-by: simvalery <[email protected]>

* fix

Signed-off-by: simvalery <[email protected]>

* fixes

Signed-off-by: simvalery <[email protected]>

* fix available block for interfaceDocumentSourceBlock

Signed-off-by: artembuslaev <[email protected]>

* fix trustchain

Signed-off-by: simvalery <[email protected]>

* GitBook: [#257] Updated timestamps

* Updated iREC Timestamps

* Updated Verra Timestamps

* Updated GHG timestamp

* GitBook: [#258] Updated Topic ID and Contract ID

* fix lint

Signed-off-by: simvalery <[email protected]>

* fix deps

Signed-off-by: simvalery <[email protected]>

* refactor

Signed-off-by: simvalery <[email protected]>

* fix lint

Signed-off-by: simvalery <[email protected]>

* fix receive external data

Signed-off-by: simvalery <[email protected]>

* refactor
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* add .env

Signed-off-by: simvalery <[email protected]>

* remove api key

Signed-off-by: simvalery <[email protected]>

* fix versions

Signed-off-by: simvalery <[email protected]>

* fix policy init

Signed-off-by: simvalery <[email protected]>

* fix lint

Signed-off-by: simvalery <[email protected]>

* initialization messages

Signed-off-by: simvalery <[email protected]>

* optiomize docker builds

Signed-off-by: simvalery <[email protected]>

* GitBook: [#259] Added Mongo-admin-panel, target deployment

* fix builds

Signed-off-by: simvalery <[email protected]>

* fix name

Signed-off-by: simvalery <[email protected]>

* fix duplicate retire requests

Signed-off-by: artembuslaev <[email protected]>

* fix contract query transaction fee

Signed-off-by: artembuslaev <[email protected]>

* production builds

Signed-off-by: simvalery <[email protected]>

* up version

Signed-off-by: simvalery <[email protected]>

* GitBook: [#261] library of policy

* fix draft policy requests

Signed-off-by: simvalery <[email protected]>

* up version

Signed-off-by: simvalery <[email protected]>

* fix task callback undefined

Signed-off-by: simvalery <[email protected]>

* update retire requests in swagger

Signed-off-by: artembuslaev <[email protected]>

* GitBook: [#262] Role Library Policy

* GitBook: [#263] Creation of forms library example

* fix update json;
fix check aggregate block props

Signed-off-by: Stepan Kiryakov <[email protected]>

* fix validation

Signed-off-by: simvalery <[email protected]>

* fix validation

Signed-off-by: simvalery <[email protected]>

* fix validation

Signed-off-by: simvalery <[email protected]>

* up version

Signed-off-by: simvalery <[email protected]>

* fix transaction response callback

Signed-off-by: artembuslaev <[email protected]>

* GitBook: [#264] Data input via forms example

* GitBook: [#265] Token Policy Example

* fix worker events

Signed-off-by: simvalery <[email protected]>

* fix destroy model

Signed-off-by: simvalery <[email protected]>

* GitBook: [#266] MRV Document Operations Example

* GitBook: [#267] TrustChain Report Library Example

* fix

Signed-off-by: simvalery <[email protected]>

* up version

Signed-off-by: simvalery <[email protected]>

* kill destroyed policy instance

Signed-off-by: simvalery <[email protected]>

* fix timeout error

Signed-off-by: simvalery <[email protected]>

* GitBook: [#268] Updated Deep Dive Architecture

* GitBook: [#269] Added Timestamps for policy examples library

* GitBook: [#270] Aggregation and split example

* GitBook: [#271] Added cleared images for policy examples

---------

Signed-off-by: Stepan Kiryakov <[email protected]>
Signed-off-by: simvalery <[email protected]>
Signed-off-by: artembuslaev <[email protected]>
Signed-off-by: Giuseppe Bertone <[email protected]>
Co-authored-by: Stepan Kiryakov <[email protected]>
Co-authored-by: prernaa.agarwal <[email protected]>
Co-authored-by: prernaadev01 <[email protected]>
Co-authored-by: artembuslaev <[email protected]>
Co-authored-by: artembuslaev <[email protected]>
Co-authored-by: Stepan Kirjakov <[email protected]>
Co-authored-by: Giuseppe Bertone <[email protected]>
  • Loading branch information
8 people authored Feb 3, 2023
1 parent 20d16e3 commit 9c373d9
Show file tree
Hide file tree
Showing 60 changed files with 161 additions and 81 deletions.
Binary file added docs/.gitbook/assets/0 (3) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/0 (3).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/1 (4).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/10 (4).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/2 (4) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/2 (4).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/3 (5).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/4 (3) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/4 (3).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/5 (2) (2).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/5 (2).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/6 (3) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/6 (3).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/7 (4).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/8 (4) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/8 (4).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/9 (3) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/9 (3).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/Deep Dive Architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/Template_2_demo_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/Template_2_demo_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/Template_2_demo_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/Template_2_demo_04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.gitbook/assets/Template_2_demo_05.png
Binary file added docs/.gitbook/assets/Template_2_screenshot_22.png
Binary file added docs/.gitbook/assets/Template_2_screenshot_23.png
Binary file added docs/.gitbook/assets/Template_2_screenshot_24.png
Binary file added docs/.gitbook/assets/Template_2_screenshot_25.png
Binary file added docs/.gitbook/assets/Template_2_screenshot_26.png
Binary file added docs/.gitbook/assets/Template_2_screenshot_27.png
Binary file added docs/.gitbook/assets/Template_3_demot_01.png
Binary file added docs/.gitbook/assets/Template_3_demot_02.png
Binary file added docs/.gitbook/assets/Template_3_demot_03.png
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
* [🪙 Token Operations](guardian/standard-registry/policies/library-of-policy-examples/token-operations.md)
* [🔎 MRV Document Operations](guardian/standard-registry/policies/library-of-policy-examples/mrv-document-operations.md)
* [⛓ TrustChain reports](guardian/standard-registry/policies/library-of-policy-examples/trustchain-reports.md)
* [➗ MRV aggregation and splitting for minting tokens](guardian/standard-registry/policies/library-of-policy-examples/mrv-aggregation-and-splitting-for-minting-tokens.md)
* [📔 Retirement Contract](guardian/standard-registry/retirement-contract/README.md)
* [💻 Creating / Importing Contract UI](guardian/standard-registry/retirement-contract/creating-importing-contract-ui.md)
* [💻 Creating Token Pair UI](guardian/standard-registry/retirement-contract/creating-token-pair-ui.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/available-policy-workflow-blocks/groupmanagerblock.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This block allows to manage group membership, add and remove users from the grou

#### 2.1 **List of the groups in which the user is included:**

<figure><img src="../.gitbook/assets/image (13) (4).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../.gitbook/assets/image (13) (4) (1).png" alt=""><figcaption></figcaption></figure>

#### **2.2 List of the users included in the group**

Expand Down
2 changes: 1 addition & 1 deletion docs/available-policy-workflow-blocks/multisignblock.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ This block provides a way to specify multiple signators for a single VC document

We have an option of Signing/ Declining the document by clicking on "Sign" or "Decline" button for the document as shown below:

<figure><img src="../.gitbook/assets/image (21) (2).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../.gitbook/assets/image (20) (2).png" alt=""><figcaption></figcaption></figure>

#### 5.2 Threshold Display

Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ Once you generated Operator ID and Operator Key, we can either click on Next or
**Note**: Restore Data can be restored from Hedera if data is available for setting up the Registry.
<figure><img src="../../.gitbook/assets/image (21) (3).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (2) (6).png" alt=""><figcaption></figcaption></figure>
{% hint style="info" %}
**Limitations on restoring the data:**\
Expand All @@ -360,7 +360,7 @@ Once you generated Operator ID and Operator Key, we can either click on Next or
If Next is clicked, we need to manually setup the Registry or if Restore Data is clicked, it is filled automatically.
![](<../../.gitbook/assets/image (14) (3).png>)
![](<../../.gitbook/assets/image (23) (1).png>)
**Note:** The above fields in UI are mandatory only for this default Schema.
Expand Down
2 changes: 1 addition & 1 deletion docs/guardian-architecture/reference-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ description: >-

This repo contains a reference implementation of the Guardian to learn how to use the components for various applications. This reference implementation is designed with modularity so that different components may be swapped out based on various implementation requirements. Please see the Guardian's architecture diagram below:

![](../.gitbook/assets/reference\_architecture.png)
<figure><img src="../.gitbook/assets/Deep Dive Architecture.png" alt=""><figcaption></figcaption></figure>
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ When the Operator ID and Operator Key generates, click the submit button.

When the Employer profile has been created, click on the Policies tab

<figure><img src="../../../../.gitbook/assets/Screen Shot 2022-12-14 at 1.23.09 PM (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/Screen Shot 2022-12-14 at 1.23.09 PM.png" alt=""><figcaption></figcaption></figure>

In the Policies tab, click on the “Go” button to begin the Remote Work GHG Policy operations.

Expand Down Expand Up @@ -84,7 +84,7 @@ On the Profile screen, select “GHG Remote Work” and then “Generate” the

When the Employee profile has been created, click on the Policies tab.

<figure><img src="../../../../.gitbook/assets/Screen Shot 2022-12-14 at 1.26.36 PM (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/Screen Shot 2022-12-14 at 1.26.36 PM.png" alt=""><figcaption></figcaption></figure>

In the Policies tab, click on the “Go” button to begin the Remote Work GHG Policy operations.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This folder contains a sample file that is referenced in the Demo Usage Guide

3\. You'll now be prompted to configure your Verra account. Enter the details and then press the Generate button to generate a Hedera Operator ID and an Operator Key and enter the name of your Standard Registry. Press Connect when finished. This will now create Hedera Consensus Service Topics, fill the account with test hBar, create a DID document, create a Verifiable Credential, etc.

![](../../../.gitbook/assets/iREC\_4.2.png)
![](../../../.gitbook/assets/Verra\_2.2.png)

4\. This could be one of the most interesting parts of the reference implementation. Now we will be creating the Policy. We have two ways to "create policies." The first way is to import an existing policy. This is the easiest way to get started. When you import a policy, all schemas and tokens that are required in the policy are automatically populated. To do this, you can use the sample policy that we have already uploaded to IPFS. Click on the import button and enter the one of the following Hedera message IDs:

Expand Down Expand Up @@ -59,7 +59,7 @@ Once, VVB name is submitted, its waiting for the approval.

9\. Now, we logout as VVB and login as Standard Registry and review the document and approve VVB by clicking on Approve button.

<figure><img src="../../../.gitbook/assets/3_9 (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/3_9.png" alt=""><figcaption></figcaption></figure>

10\. Now we login as Project Proponent and repeat same steps as Step 5, Step 6.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

### 1.2 In the policy config there is a root block which is the top of the structure

![](../../../.gitbook/assets/API\_1.png)
![](<../../../.gitbook/assets/API\_1 (1).png>)

### 1.3 Request the config for the root block

Expand Down Expand Up @@ -70,7 +70,7 @@
{% endswagger-response %}
{% endswagger %}

![](<../../../.gitbook/assets/API\_2 (1).png>)
![](<../../../.gitbook/assets/API\_2 (1) (1).png>)

### 1.5 At present only PolicyRolesBlock is available to the user. Select the "INSTALLER" role.

Expand Down Expand Up @@ -235,7 +235,7 @@ Years of registration
{% endswagger-parameter %}
{% endswagger %}

![](<../../../.gitbook/assets/API\_4 (1).png>)
![](<../../../.gitbook/assets/API\_4 (1) (1).png>)

### 1.8 Request the root block and all contained blocks again.

Expand Down Expand Up @@ -297,7 +297,7 @@ Years of registration
{% endswagger-response %}
{% endswagger %}

![](../../../.gitbook/assets/API\_5.png)
![](<../../../.gitbook/assets/image 1.png>)

## 2. Login as a Standard Registry

Expand Down Expand Up @@ -699,9 +699,9 @@ capacity
{% endswagger-parameter %}
{% endswagger %}

![](../../../.gitbook/assets/API\_9.png)
![](../../../.gitbook/assets/Sensor.png)

<figure><img src="../../../.gitbook/assets/API_10 (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/API_10 (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (1) (2) (1) (1).png" alt=""><figcaption></figcaption></figure>

### 3.4 Refresh the Blocks

Expand All @@ -717,7 +717,7 @@ record in the grid (data[0])
{% endswagger-parameter %}
{% endswagger %}

![](../../../.gitbook/assets/API\_11.png)
![](<../../../.gitbook/assets/image 4.png>)

### 3.6 Sample MRV Sender Data

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Following are the steps to run iREC 7 Policy.

6\. Now, we login as Standard Registry and approve the Registrant role by clicking on Approve button:

<figure><img src="../../../.gitbook/assets/iREC_&#x26;_10.png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/iREC_&#x26;_10 (1).png" alt=""><figcaption></figcaption></figure>

7\. Once approved, we logout as Standard Registry and login as Registrant. As a registrant, we register device by entering all the device details.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This folder contains a sample file that is referenced in the Demo Guide

3\. You will now be prompted to configure your Standard Registry account. Press the Generate button to generate a Hedera Operator ID and an Operator Key and enter the details of your Standard Registry. Press Connect when finished. This will now create Hedera Consensus Service Topics, fill the account with test hBar, create a DID document, create a Verifiable Credential, etc.

![](../../../.gitbook/assets/Verra\_2.2.png)
![](../../../.gitbook/assets/iREC\_4.2.png)

4\. This could be one of the most interesting parts of the reference implementation. Now we will be creating the Policy. We have two ways to "create policies." The first way is to import an existing policy. This is the easiest way to get started. When you import a policy, all schemas and tokens that are required in the policy are automatically populated. To do this, you can use the sample policy that we have already uploaded to IPFS by entering the Hedera Message IDs.

Expand Down Expand Up @@ -116,7 +116,7 @@ Once details are submitted, Registrant waits for the approval.

21\. Now, we login back as Approver1 and approves the device created by Registrant. Device is approved by clicking on Sign button.

<figure><img src="../../../.gitbook/assets/iREC_5.18.png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/iREC_5.18 (1).png" alt=""><figcaption></figcaption></figure>

22\. We logout as an Approver1 and login as Approver2 and approve the device by following step 21.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 💻 Creating and using Roles

For a demo example of following steps, here is the policy timestamp: **1675164531.823309003**

## **User roles usage in Policies**

### **An example of creating and using Roles in Policy**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 🔢 Data input via Forms, using Roles to partition user activities.

For a demo example of following steps, here is the policy timestamp: **1675164605.096601003**

## **Objective**

Construct a policy in which one group of users can individually fill in and submit documents for approval and view their own documents’ status, and another group of users can view and take approve/reject actions on any of these user documents.
Expand Down Expand Up @@ -136,25 +138,25 @@ Configure both ‘**documentSourceAddon**’ blocks similarly to how it was in t

Switch off the ‘Default Active’ option to avoid specifying the button as an independent element and hide it

<figure><img src="../../../../.gitbook/assets/image (31).png" alt=""><figcaption><p>Adding buttonBlock</p></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/Template_2_screenshot_22.png" alt=""><figcaption></figcaption></figure>

2.2 Create 2 buttons for ‘Approve’ and ‘Reject’ correspondingly.

<figure><img src="../../../../.gitbook/assets/image (33).png" alt=""><figcaption><p>Creating two buttons</p></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/Template_2_screenshot_23.png" alt=""><figcaption></figcaption></figure>

2.3 ‘**buttonBlock**’ is responsible only for the actions, in order to save the refreshed status of the documents.&#x20;

Create 2 ‘**sendToGuardianBlock**’ blocks with the corresponding values for the ‘Status’.

<figure><img src="../../../../.gitbook/assets/image (34).png" alt=""><figcaption><p>Creating 2 sendToGuardianBlock</p></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/Template_2_screenshot_24.png" alt=""><figcaption></figcaption></figure>

2.4 By default blocks are always directly connected to the next block (just below it). To decouple the blocks select ‘**Events**’ tab and switch off the default events for both blocks.

<figure><img src="../../../../.gitbook/assets/image (29).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/Template_2_screenshot_25.png" alt=""><figcaption></figcaption></figure>

2.5 Connect events from the ‘**buttonBlock**’ with the corresponding ‘**sendToGuardianBlock**__ by selecting the _Events_ tab and create 2 new events.

<figure><img src="../../../../.gitbook/assets/image (42).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/Template_2_screenshot_26.png" alt=""><figcaption></figcaption></figure>

3. Return to the grid settings and add the created buttons into the previously prepared column

Expand All @@ -164,22 +166,22 @@ Create 2 ‘**sendToGuardianBlock**’ blocks with the corresponding values for

3.3 In order to display the buttons for only new documents set the corresponding value for the ‘_Bind Group'_

<figure><img src="../../../../.gitbook/assets/image (43).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/Template_2_screenshot_27.png" alt=""><figcaption></figcaption></figure>

## Result

### 1. Choose a role

<figure><img src="../../../../.gitbook/assets/image (7) (4).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/Template_2_demo_01.png" alt=""><figcaption></figcaption></figure>

### 2. Create new document

<figure><img src="../../../../.gitbook/assets/image (4).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/Template_2_demo_02.png" alt=""><figcaption></figcaption></figure>

<figure><img src="../../../../.gitbook/assets/image (5).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/Template_2_demo_03.png" alt=""><figcaption></figcaption></figure>

### 3. Approve

<figure><img src="../../../../.gitbook/assets/image (6).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/Template_2_demo_04.png" alt=""><figcaption></figcaption></figure>

<figure><img src="../../../../.gitbook/assets/image (7).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/Template_2_demo_05.png" alt=""><figcaption></figcaption></figure>
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# ➗ MRV aggregation and splitting for minting tokens

For a demo example of following steps, here is the policy timestamp: **1675266693.102366003**

## Adding aggregateDocumentBlock in separate containerAdding aggregateDocumentBlock in separate container**Task**

MRV documents feature a numerical measurement field. The values in this field are periodically aggregated, in this example we will use 1 minute period.

The purpose of the aggregation is to mint tokens, in this example 1 token will be minted for each part which equal to 1000 of the aggregated value.

## **Preparation**

Create a token and 2 schemas (**User** and **Report**). For simplicity the token will not require a KYC.

Build the first part of the document entry:

![image1.png](<../../../../.gitbook/assets/0 (3).png>)

_(Please see_ [_examples 2_](data-input-via-forms-using-roles-to-partition-user-activities..md) _and_ [_3_](token-operations.md) _for more detailed description of this)_

### **Aggregate:**

1. Add ‘**aggregateDocumentBlock**' after saving the document in the database. This is the block which would accumulate documents/values until the condition is met (which in this case is the event from the timer).

1.1 Put '**aggregateDocumentBlock**' in a separate container to avoid it from interfering with the working of '**interfaceStepBlock**'

![Adding aggregateDocumentBlock](<../../../../.gitbook/assets/1 (4).png>)

![Adding aggregateDocumentBlock in separate container](<../../../../.gitbook/assets/2 (4).png>)

1.2 Pass the document to the ‘_**aggregateDocumentBlock**_' after it is saved.

![Passing the saved document to the aggregateDocumentBlock](<../../../../.gitbook/assets/3 (5).png>)

2. Timer is a separate block called '_**timerBlock**_'

2.1 For each user there is a separate timer execution context (i.e., each user has an independent timer). For this it requires a document owned by the user to be passed into this. To ensure this, let’s add the timer immediately after user registration.

![Adding timerBlock after user registration](<../../../../.gitbook/assets/4 (3).png>)

2.2 Set the timer to trigger every minute

![Setting the timer for every minute](<../../../../.gitbook/assets/5 (2).png>)

2.3 Now after the timer is launched, it would create a ‘**TimerEvent**’ periodically every minute. And then connect it with ‘_**aggregateDocumentBlock**_':

![Connecting TimerBlock with aggregateDocumentBlock](<../../../../.gitbook/assets/6 (3).png>)

### **Split:**

1. To split the document into equal parts, add '_**splitBlock**_'

1.1 Add '_**splitBlock**_' immediately after the '_**aggregateDocumentBlock**_'

![Adding splitBlock after aggregateDocumentBlock](<../../../../.gitbook/assets/7 (4).png>)

1.2 Configure the document field which would be used for splitting/aggregation

![Configuring Source Field](<../../../../.gitbook/assets/8 (4).png>)

1.3 Set a ‘**Threshold**’ to configure the value for splitting the document.

<figure><img src="../../../../.gitbook/assets/9 (3).png" alt=""><figcaption><p>Setting the Threshold for split</p></figcaption></figure>

### **Mint:**

Add '_**mintDocumentBlock**_' immediately after ‘_**splitBlock**_' to mint tokes and configure the minting rule

![Adding mintDocumentBlock after splitBlock](<../../../../.gitbook/assets/10 (4).png>)
Loading

0 comments on commit 9c373d9

Please sign in to comment.