Skip to main content

Installation

info

Please note that this content is under development and is not ready for implementation. This status message will be updated as content development progresses.

Prerequisites

warning

Notice: You should install the pnpm package manager globally on your machine by using the npm package manager. You can install pnpm by running the following command: npm install -g pnpm@8.14.1. Using Corepack to install pnpm that will have some conflicts with the project dependencies that are using yarn package manager to install and build.

This project has been tested and optimized for Node.js version v20.12.2 and pnpm version 8.14.1. Please note that using a Node.js version later than v20.12.2 may result incorrect functionality and potential bugs. It is strongly recommended to use these specific versions for running and testing the project. Deviating from these versions may result in unforeseen compatibility issues or unexpected behavior.

Clone VCkit from github

Let's start by cloning the VCkit repository at the URL below.

https://github.com/uncefact/project-vckit.git

Install dependencies

Let's install the dependencies of this project by running this command.

cd project-vckit & pnpm install

...then run this command to build the project

pnpm build

Initialize the agent configuration

tip

To understand more about the agent file structure and how to config it, read here.

The pnpm vckit config command will create a agent.yml file in the root of the project. This file contains the configuration for the Veramo agent. You can edit this file to configure the agent to your needs. The default configuration is sufficient to get started.

pnpm vckit config

After run this command, you will have an agent.yml file in your root directory.

Optional: Configure the agent

You can configure the agent by editing the agent.yml file in the root of the project. You can change the infuraProjectId and dbEncryptionKey to your own values.

Currently, the infuraProjectId and dbEncryptionKey are set to the default values. That mean you can use the default values to run the project. However, it is recommended to change the default values to your own values.

1. Infura Project ID

To create your own Infura Project ID, visit https://www.infura.io and follow the instruction.

2. Generate secret key

You need to generate an X25519 key, run this command in a terminal:

veramo config gen-key

Start the local server

pnpm vckit server

Now you can check the api documentation at http://localhost:3332/api-docs