Guardian v2.0: The next generation of ESG marketplaces built on Hedera
Apr 22, 2022
by Daniel Norkin
Co-Founder & CEO at Envision Blockchain Solutions
by Daniel Norkin
Co-Founder & CEO at Envision Blockchain Solutions

For Earth Day 2022, Envision Blockchain is proud to announce the release of the 2.0 version of the Guardian. 

The Guardian is a modular open-source solution that includes best-in-class identity management and DLT libraries for developers to get started creating ESG assets, such as carbon offsets and credits. It allows for full discoverability and traceability of ESG assets to be put into practice. 

Since its introduction, DOVU, CivicLedger, Tymlez (who’s customers include Queensland Government, UON, and TROEF), and numerous Hedera Governing Council members have adopted the Guardian.

Guardian v2.0 delivers new features to expand on what was built and grow the Hedera Guardian ecosystem. Major features introduced include greater decentralization, immutability, ESG asset recovery, enriched documentation, and bug fixes. The Guardian version 2.0 is a game changer for the voluntary ecological market as a whole and the Hedera applications which are participating.

Learn more about Guardian v2 and clone the Github repository here.

Token Provenance

We have been getting a lot of questions around “how do you trace events that lead to a token event on-chain”? We have improved the UX to show the provenance with mapping between the documents stored in IPFS and messages inside Hedera Topics that shows relationships between various ESG artifacts such as Verifiable Presentations, Verifiable Credentials, and more. Below is an architectural diagram of how Token provenance looks with an example:

Guardian Provenance Diagram

Here is how you get a Verifiable Presentation from a token mint transaction:

Look for a token mint transaction on DragonGlass.

For the transaction 00341948921649942497135549961 the link will be https://testnet.dragonglass.me/transactions/00341948921649942497135549961

Transaction data will contain data similar to this:

Code Snippet Background
TRANSACTION DETAILS 0.0.34194892@1649942497-135549961 (SUCCESS)
TRANSACTION TYPE Mint Token
TRANSACTION HASH 8ec781457fbd0ab6124eb04396cdcff153868f4f52b1836e42158fd3f23fc0139f1fd7b7ee18915124eab74d49c9d0ad
PAYER 0.0.34194892
MEMO 1649942508.776446488

Take the MEMO value (which is the Hedera message timestamp) and add it to the URL after the /messages/ to get a message from a Hedera Mirror Node.

In our case it will be https://testnet.mirrornode.hedera.com/api/v1/topics/messages/1649942508.776446488

You will get a message content:

Code Snippet Background
{
  "chunk_info": {
    "initial_transaction_id": {
      "account_id": "0.0.34194892",
      "nonce": 0,
      "scheduled": false,
      "transaction_valid_start": "1649942496.012855213"
    },
    "number": 1,
    "total": 1
  },
  "consensus_timestamp": "1649942508.776446488",
  "message": "eyJpZCI6IjEzNTZlMDNhLTk5NGEtNGU5ZC1iNTFmLWNlMGY4NzBmZDk1MiIsInN0YXR1cyI6IklTU1VFIiwidHlwZSI6IlZQLURvY3VtZW50IiwiYWN0aW9uIjoiY3JlYXRlLWNwLWRvY3VtZW50IiwiaXNzdWVyIjpudWxsLCJyZWxhdGlvbnNoaXBzIjpbIjE2NDk5NDI0OTYuMDEwMjExMDAwIl0sImNpZCI6ImJhZmtyZWlhNWkzYnJ1bWNpMzVzNzMzcTRndWEzNjNpaHhyaXNyNm56aWFmN2g3aGd4aHlhbmg2dnlhIiwidXJsIjoiaHR0cHM6Ly9pcGZzLmlvL2lwZnMvYmFma3JlaWE1aTNicnVtY2kzNXM3MzNxNGd1YTM2M2loeHJpc3I2bnppYWY3aDdoZ3hoeWFuaDZ2eWEifQ==",
  "payer_account_id": "0.0.34194892",
  "running_hash": "P0i9GNaL1qUoPQmNHOumV/3x8K4voPmOUNJOfXDJl9K89u/7Qa7GgqKR3kmaTcAF",
  "running_hash_version": 3,
  "sequence_number": 9,
  "topic_id": "0.0.34204397"
}

Take the url attribute value and paste it to a browser:

https://ipfs.io/ipfs/bafkreia5i3brumci35s733q4gua363ihxrisr6nziaf7h7hgxhyanh6vya

You’ll have a VP of this token.

Code Snippet Background
{
  "id": "db698146-38e2-48f6-8819-6f596647f970",
  "type": [
    "VerifiablePresentation"
  ],
  "@context": [
    "https://www.w3.org/2018/credentials/v1"
  ],
  "verifiableCredential": [
    {
      "id": "2f6ca45d-7f0d-405a-a011-b736db93e511",
      "type": [
        "VerifiableCredential"
      ],
      "issuer": "did:hedera:testnet:9ZJXR58X9XQUgwiuxQQiTUt5yY2vX2Tw5Uph4xXsnkfM;hedera:testnet:tid=0.0.34194893",
      "issuanceDate": "2022-04-14T13:21:28.918Z",
      "@context": [
        "https://www.w3.org/2018/credentials/v1"
      ],
      "credentialSubject": [
        {
          "field0": "did:hedera:testnet:F55HnMGMzS3TkuqBjLaUxcYvm86oGfTFViXELD4GNFAo;hedera:testnet:tid=0.0.34194893",
          "field1": "did:hedera:testnet:8jjgRqbr2YRYccxMrvhupyu543izSe8N1J6UHbgWkhiA;hedera:testnet:tid=0.0.34204397",
          "field2": {
            "type": "706bb8da-7f39-4518-85c3-b4b23a6ef28a",
            "@context": [
              "https://ipfs.io/ipfs/bafkreidcyabsha6frnfqie7bpa5o3yrb6cllglsxd4krjksvreg35ygluy"
            ]
          },
          "field3": {
            "type": "64c171a2-ac60-4972-b796-8596381c65a8",
            "@context": [
              "https://ipfs.io/ipfs/bafkreidcyabsha6frnfqie7bpa5o3yrb6cllglsxd4krjksvreg35ygluy"
            ]
          },
          "field6": "2022-04-07",
          "field7": 1,
          "field8": "2022-04-28",
          "field17": "nu81uxel",
          "field18": "0.0.34194895",
          "ref": "did:hedera:testnet:8jjgRqbr2YRYccxMrvhupyu543izSe8N1J6UHbgWkhiA;hedera:testnet:tid=0.0.34204397",
          "policyId": "62581e42a7303b7ff96a8012",
          "@context": [
            "https://ipfs.io/ipfs/bafkreidcyabsha6frnfqie7bpa5o3yrb6cllglsxd4krjksvreg35ygluy"
          ],
          "id": "6a730bc5-19e2-427d-b132-b9b49359ea20",
          "type": "143e109a-a089-48a1-8a7b-534bfaf79c4d&1.0.0"
        }
      ],
      "proof": {
        "type": "Ed25519Signature2018",
        "created": "2022-04-14T13:21:28Z",
        "verificationMethod": "did:hedera:testnet:9ZJXR58X9XQUgwiuxQQiTUt5yY2vX2Tw5Uph4xXsnkfM;hedera:testnet:tid=0.0.34194893#did-root-key",
        "proofPurpose": "assertionMethod",
        "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..hw6O674MalfXIlD3RyOd1BLhvH_xBYIudK1UQ-cAvZxYYejdMjU2TYfjC-sUa7ZYcioZ_CfSBsMwI7WCO3hGAw"
      }
    },
    {
      "id": "c0c0d496-4f86-4ca9-94cc-80552d838168",
      "type": [
        "VerifiableCredential"
      ],
      "issuer": "did:hedera:testnet:9ZJXR58X9XQUgwiuxQQiTUt5yY2vX2Tw5Uph4xXsnkfM;hedera:testnet:tid=0.0.34194893",
      "issuanceDate": "2022-04-14T13:21:36.139Z",
      "@context": [
        "https://www.w3.org/2018/credentials/v1"
      ],
      "credentialSubject": [
        {
          "date": "2022-04-14T13:21:36.134Z",
          "tokenId": "0.0.34194898",
          "amount": "1",
          "@context": [
            "https://ipfs.io/ipfs/bafkreiaamzhmh3l5pn5nneib5yifb3gjwlotf6fr6vb65j7tfi4tefxcza"
          ],
          "type": "MintToken&1.0.0"
        }
      ],
      "proof": {
        "type": "Ed25519Signature2018",
        "created": "2022-04-14T13:21:36Z",
        "verificationMethod": "did:hedera:testnet:9ZJXR58X9XQUgwiuxQQiTUt5yY2vX2Tw5Uph4xXsnkfM;hedera:testnet:tid=0.0.34194893#did-root-key",
        "proofPurpose": "assertionMethod",
        "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..3uhxt-NAuLaIGTDXlqkD92QOTUZOjJgHNjFwP6jrrGchFLwxuDDnhz5VzMMLv1k3_VkVLvIKx1V-E1aewSI5Bw"
      }
    }
  ],
  "proof": {
    "type": "Ed25519Signature2018",
    "created": "2022-04-14T13:21:36Z",
    "verificationMethod": "did:hedera:testnet:9ZJXR58X9XQUgwiuxQQiTUt5yY2vX2Tw5Uph4xXsnkfM;hedera:testnet:tid=0.0.34194893#did-root-key",
    "proofPurpose": "authentication",
    "challenge": "123",
    "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..-yNpvBHaDnFk-T5OWY516WBsBnsE40E-4-z-d54BhwanRBN15D6VbKGUjRG4kkKhEp-7jh8WIO2VRsYY4-SOBQ"
  }
}

Recovery of ESG Assets

We have added support for the Root Authority account’s assets to be recovered (policies, schemas, etc.) when switching to a new Guardian instance using just Hedera Topics. Now, Guardian users are able to 'recover' previously created Root Authority account assets that have been stored in IPFS using only Hedera topic messages.

Below is a screenshot of different versions of a policy stored in one topic.

Screen Shot 2022 04 22 at 12 15 32 PM

This is the general structure of topics:

Projects 2

You can see how to recover the IPFS url from a Hedera topic in this screenshot:

ESG Asset

Introducing Projects

We have implemented the concept of a “Project” to the Guardian which groups together the following entities: Root Authority, Policy, Users & Custom Roles, and Sensors with their associated MRV data. This allows policy creators to now specify separate hedera topics for different projects which correlates to different groups of entities (the best analogy is this resembles multi-tenancy).

Below is a screenshot that shows how Projects are created from within the Guardian’s policy configuration screen:

Projects

Step by Step Policy Guides

There are a few new demo policies to see how the Guardian creates ESG assets. One of them is the Verra Redd Demo for the avoidance of deforestation. We have included a step by step guide in out gitbook documentation for that policy. We have also enhanced the International Renewable Energy Credit policy and have also included a step by step guide for that as well.

We have added more support for policy creators who may deal with multiple policies via the policy selector in the schema page. This allows for a better user experience when dealing with a large number of policies and schemas.

Policy creator selector

Enriched Hedera Topic Messages

One big change with regards to the plumbing is the removal of the vc-modules and the DID-SDK-JS libraries. Originally this library was used to publish messages to hedera topics. We realized that it only allowed us to send messages in a predefined format. This limitation forced us to create our own implementation of publishing messages to Hedera topics. Now we can allow Guardian users to publish messages in a more enriched format. This implementation is baked into the existing Guardian Service.

API Deprecation

Last, but not least, is a note to developers that a few APIs will be deprecated in this release and discontinued on August 9, 2022.

The reason being is that previously schemas weren’t related to policies. Since schemas are generally related to policies, and because of the improved provenance with mapping between the documents stored in IPFS and messages inside Hedera Topics that we discussed earlier, these three endpoints need to be replaced with the endpoints that contain the appropriate hedera topic parameter. Be on the lookout for those new endpoints soon.

The Best Solution for Creating ESG Assets

The Guardian has made significant improvements since the initial release, and we think it’s the best solution available for creating ESG assets. We can’t wait to see all of the great things you will build on top of it.

About Envision Blockchain

Envision Blockchain Solutions builds applications for the Web3 space. Our mission is to reshape and align today's systems allowing organizations to recognize the new value in tomorrow's Industry Vertical Solutions. The management team has years of Fortune 500 experience and has built a team of subject matter experts in Web3 and Business Transformation Processes. We focus on guiding organizations through 3 major milestones on their Web3 journey: Use Case Analysis, Proof of Concept Development, and Scaled Deployments.

https://envisionblockchain.com/