The agent can be configured using several environment variables. Amongst these are variables to enable certain functionalities of the agent. The idea is that there are functions in this agent each listening to different ports
- The OIDC component: This component running on port 3001 by default, provides the OpenID Connect support. It is responsible for ensuring that users are authenticated using an OpenID Connect capable Identity provider.
- The Headless web3 component: This component is running on port 2999 by default. It provides headless web3 wallet functionality. Meaning it signs transaction on behalf of (un)authenticated users
Docker images are provided in the docker
folder for both the issuer and customer agents
You can run docker compose up
to run an agent with both components in Docker.
These module make use of Lerna for managing multiple packages. Lerna is a tool that optimizes the workflow around managing multi-package repositories with git and pnpm.
The below command builds all packages for you using lerna
To build the project pnpm is used. Do not confuse this package manager with the
more regular npm
.
Install pnpm globally:
npm -g install pnpm
Install the dependencies of all the projects
pnpm install
Build the projects
pnpm build
If you want to run this project in production, directly from the project, instead of using an NPM repo for this project, follow the below steps.
- Build the project according to the above steps first. This is needed because you will need to create the
dist
folders, and it needs the NodeJS and Typescript libraries during build. - Remove the
node_modules
top-level folder, keep anydist
folder, as that is where the built project is to be found. You can also run the command below (ignore the error about node_modules missing at the end)
pnpm run clean:modules
- Install modules without dev dependencies and also do it offline, since everything should already be available
pnpm run install:prod
# The above is the same as pnpm install --prod --offline
- Running the production installation
pnpm run start:prod
There are other utility scripts that help with development.
pnpm fix:prettier
- runsprettier
to fix code style.
Please note that currently the packages are marked as internal. Meaning they will not be published to an NPM repository!
There are scripts that can publish the following versions:
latest
next
unstable
pnpm publish:[version]