Skip to content

The Guardian is a modular open-source solution that includes best-in-class identity management and decentralized ledger technology (DLT) libraries. At the heart of the Guardian solution is a sophisticated Policy Workflow Engine (PWE) that enables the ability for applications to offer a requirements-based tokenization implementation.

License

Notifications You must be signed in to change notification settings

samuraitruong/guardian

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Apache 2.0 License Build results GitHub package.json version (branch)

Guardian

The Guardian is a modular open-source solution that includes best-in-class identity management and decentralized ledger technology (DLT) libraries. At the heart of the Guardian solution is a sophisticated Policy Workflow Engine (PWE) that enables applications to offer a requirements-based tokenization implementation.

HIP-19 · HIP-28 · HIP-29 · Report a Bug · Request a Policy or a Feature

Discovering ESG assets on Hedera

As identified in Hedera Improvement Proposal 19 (HIP-19), each transaction on the Hedera network must contain a specific identifier in the memo field for discoverability. The Guardian demonstrates this when every Hedera Consensus Service transaction is logged to a Hedera Consensus Service Topic. Observing the Hedera Consensus Service Topic, you can discover newly minted tokens. In the memo field of newly minted tokens, you will find a Verifiable Link which will allow users to discover the published standard the token is following and the entire history of the ESG asset and corresponding data to be publicly discoverable. This is further defined in Hedera Improvement Proposal 28 (HIP-28)

(back to top)

Getting Started

To get a local copy up and running, follow these simple example steps. When building the reference implementation, you can manually build every component or run one command with Docker.

Prerequisites

Installation

  1. Clone the repo

    git clone https://github.com/hashgraph/guardian.git
    
  2. Update the following files with your Hedera Testnet account info (see prerequisites) as indicated. Please keep in mind that this Hedera Operator ID and Operator Key is used for this reference implementation as a placeholder until there is a wallet integration. There will be other steps in the Demo Usage Guide that will require the generation of Operator IDs and Operator Keys. It is important to mention that the Operator IDs and Operator Keys in the .env will be used to generate demo accounts.

    For example:

    in guardian-service/.env:

    OPERATOR_ID="0.0.29676495"
    OPERATOR_KEY="302e020100300506032b6570042204202119d6291aab20289f12cdb27a0ae446d6b319054e3de81b03564532b8e03cad"
    

    in guardian-service/.env.docker:

    OPERATOR_ID="0.0.29676495"
    OPERATOR_KEY="302e020100300506032b6570042204202119d6291aab20289f12cdb27a0ae446d6b319054e3de81b03564532b8e03cad"
    

    Note: You can use the Schema Topic ID listed above or you can enter your own if you have one.

  3. Update the following files with your NFT.Storage API KEY. Please follow the steps from https://nft.storage/#getting-started to obtain it.

    For example:

    in ipfs-client/.env:

    NFT_API_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweGVhNzVBQzEwMmM2QTlCQjc4NDI5NDNlMmMzMUNEMzBmRUNmNUVmMTIiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTY0MjQyODUxMDUzMywibmFtZSI6IklQRlMifQ.BjD1EJM1OBWmYClDbRoR1O9vrU3_5-Isb292w3PSSAI"
    

    in ipfs-client/.env.docker:

    NFT_API_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweGVhNzVBQzEwMmM2QTlCQjc4NDI5NDNlMmMzMUNEMzBmRUNmNUVmMTIiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTY0MjQyODUxMDUzMywibmFtZSI6IklQRlMifQ.BjD1EJM1OBWmYClDbRoR1O9vrU3_5-Isb292w3PSSAI"
    
  4. If you want to build with Docker. Please note that the Docker build is meant to be used in production and will not contain any debug information. (Once this step you are finished)

    docker-compose up -d --build
    
  5. If you want to manually build every component with debug information, then build and run the services and packages in the following sequence: Interfaces, Logger Helper, Message Broker, Logger Service, Auth Service, IPFS, Guardian Service, UI Service, and lastly, the MRV Sender Service. See below for commands.

    From the interfaces folder

    Build package

    npm install
    npm run build
    

    From the logger-helper folder

    Build package

    npm install
    npm run build
    

    From the interfaces folder

    Build package

    npm install
    npm run build
    

From the vc-modules folder

Build package

npm install
npm run build

From the logger-helper folder

Build package

npm install
npm run build

From the Message broker folder (Need to run first)

To build the service:

npm install
npm run build

To start the service:

npm start

From the Logger service folder

To build the service:

npm install
npm run build

To start the service:

npm start

From the Auth service folder

To build the service:

npm install
npm run build

To start the service:

npm start

From the IPFS Client folder

To build the service:

npm install
npm run build

To start the service:

npm start

From the Guardian Service folder

To build the service:

npm install
npm run build

To start the service (found on http://localhost:3004):

npm start

From the API Gateway Service folder

To build the service:

npm install
npm run build

To start the service (found on http://localhost:3002):

npm start

From the MRV Sender Service folder

To build the service:

npm install
npm run build

To start the service (found on http://localhost:3005):

npm start

From the Frontend folder

To build the service:

npm install
npm run build

To start the service (found on http://localhost:4200):

npm start

Note: Once you start the service, please wait for the Initialization Process to be completed.

Troubleshoot

To delete all the Containers

docker builder prune --all

To run by cleaning Docker Cache

docker-compose build --no-cache

(back to top)

Unit Tests

To run guardian-service unit tests, following commands needs to be executed:

cd guardian-service 
npm run test

It is also an ability to run Hedera network test only. To do that, the following command needs to be executed:

npm run test:network

To run stability tests (certain transactions will be executed 10 times each), the following command needs to be executed:

npm run test:stability

To run message-broker unit tests, following commands needs to be executed:

cd message-broker
npm run test

(back to top)

For complete documentation on following points. Please refer https://docs.hedera.com/guardian

  • Swagger API
  • Postman Collection
  • Demo Usage guide
  • Contribute a New Policy
  • Reference Implementation
  • Technologies Built on
  • Roadmap
  • Change Log
  • Contributing
  • License
  • Security

Contact

For any questions, please reach out to the Envision Blockchain Solutions team at:

(back to top)

About

The Guardian is a modular open-source solution that includes best-in-class identity management and decentralized ledger technology (DLT) libraries. At the heart of the Guardian solution is a sophisticated Policy Workflow Engine (PWE) that enables the ability for applications to offer a requirements-based tokenization implementation.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 62.2%
  • HTML 15.8%
  • JavaScript 14.8%
  • CSS 6.3%
  • SCSS 0.5%
  • Dockerfile 0.3%
  • Shell 0.1%