Skip to content

Latest commit

 

History

History
228 lines (158 loc) · 7.14 KB

README.md

File metadata and controls

228 lines (158 loc) · 7.14 KB

Polygon ID Issuer Node

Checks golangci-lint

Streamline the Verifiable Credentials issuance process with the user-friendly API and UI of the Issuer Node within the Polygon ID ecosystem. The on-premise (self-hosted) Issuer Node, seamlessly integrated with a robust suite of tools including the mobile Wallet, Schema Builder, and Credential Marketplace, guarantees a frictionless experience for effortlessly issuing and verifying credentials.

Triagle-of-trust

Features:

  • Create Issuer Identities.
  • Issue VCs.
  • Revoke VCs.
  • Fetch VCs.
  • Transit Issuer's state.
  • Create Issuer-User connections.
  • Issuer's UI.

Table of Contents

Quick Start Installation

Note

The provided installation guide is non-production ready. For production deployments please refer to Standalone Mode Guide.

There is no compatibility with Windows environments at this time. While using WSL should be ok, it's not officially supported.

Prerequisites

  • Unix-based operating system (e.g. Debian, Arch, Mac OS)
  • Docker Engine 1.27+
  • Makefile toolchain GNU Make 3.81
  • Publicly accessible URL - The issuer node API must be publicly reachable. Please make sure you properly configure your proxy or use a tool like Localtunnel for testing purposes.
  • Polygon Mumbai or Main RPC - You can get one in any of the providers of this list

Issuer Node API

In this section we will cover the installation of the Issuer Node API.

Note

This Quick Installation Guide is prepared for Polygon Mumbai (Testnet) both for the state contract and issuer dids. If you want to deploy the node with Polygon Main configuration, please visit our advanced Issuer Node configuration guide).

Deploy Issuer Node Infrastructure

  1. Copy the config sample files:

    cp .env-issuer.sample .env-issuer
    cp .env-api.sample .env-api
  2. Fill the .env-issuer config file with the proper variables:

    .env-issuer

    ISSUER_ETHEREUM_URL=<YOUR_RPC_PROVIDER_URI_ENDPOINT>
  3. Start the infrastructure:

    make up
  4. Enable vault authentication:

    make add-vault-token
  5. Write the private key in the vault. This step is needed in order to be able to transit the issuer's state. To perform that action the given account has to be funded. For Mumbai network you can request some testing Matic here.

    make private_key=<YOUR_WALLET_PRIVATE_KEY> add-private-key

Troubleshooting:

In order to stop and delete all the containers.

Warning

This will permanently delete all data, making it necessary to create an Issuer DID again.

make down

If you experience problems with the vault, follow these commands:

docker stop issuer-vault-1    // Stops the container issuer-vault-1 
docker rm issuer-vault-1      // Removes container issuer-vault-1
make clean-vault              // Removes all the data in the vault, including the token
make up                       // Starts the database, cache and vault storage (i.e, postgres, redis and vault)

Wait 20 secs so the vault can boot and generate a token.

make add-vault-token                                          // Adds the generated token to the ISSUER_KEY_STORE_TOKEN var in .env-issuer
make private_key=<YOUR_WALLET_PRIVATE_KEY> add-private-key    // Stores the private key in the vault

Run Issuer Node API

The issuer node is extensively configurable, for a detailed list of the configuration, please visit our detailed configuration guide.

  1. Fill the .env-issuer config file with the proper variables:

    .env-issuer

    ISSUER_API_AUTH_USER=user-issuer
    ISSUER_API_AUTH_PASSWORD=password-issuer
    ISSUER_SERVER_URL=<PUBLICLY_ACCESSIBLE_URL_POINTING_TO_ISSUER_SERVER_PORT>
  2. Run api:

    make run

Core API specification - http://localhost:3001/


Troubleshooting:

Restart the api.

make restart-api

Issuer Node UI

In this section we will cover the installation of the Issuer Node UI, before continuing with these steps, make sure that you have followed the Deploy Issuer Node Infrastructure section before continuing.

In order to make the UI work, we will need configure some env variables in the .env-api file

  1. Copy .env-ui sample file and fill the needed env variables:

    cp .env-ui.sample .env-ui

    .env-ui

    ISSUER_UI_AUTH_USERNAME=user-ui
    ISSUER_UI_AUTH_PASSWORD=password-ui

    .env-api

    ISSUER_API_UI_SERVER_URL={PUBLICLY_ACCESSIBLE_URL_POINTING_TO_ISSUER_API_UI_SERVER_PORT}
  2. Generate Issuer DID:

    make generate-issuer-did
  3. Run UI:

    make run-ui

API UI specification - http://localhost:3002/

UI - http://localhost:8088/


Troubleshooting:

Restart the ui:

make restart-ui

Quick Start Demo

This Quick Start Demo will walk you through the process of issuing and verifying your first credential.

Documentation

Tools

Warning

Demo Issuer and Verifier Demo are for testing purposes only.

License

See LICENSE.