Decentralized Identity for Crypto Finance.
This repository is a monorepo containing the Core Verite Javascript SDK, documentation, as well as several demos to illustrate issuance, verification, revocation, and real-world use-cases of the Verite standard.
npm i -g npm@7
)This repository is set up as an npm workspace (which requires npm v7 or greater). The dependencies for all packages are installed from the root level using npm install
.
Each package in this repository lives in the packages/
directory.
The primary packages in this repository are:
In addition to the packages above, there are 3 single-purpose demo packages, largely extracted
from the e2e-demo
package to help clarify each major function of Verite credentials.
verite
.verite
.verite
.Each package contains a README file with specific details about how to use the package.
Setting up a new development environment is accomplished by running the following script:
npm run setup
This script will do the following:
verite
projecte2e-demo
to be used with the wallet.e2e-demo
e2e-demo
e2e-demo
When first starting, you will likely be most interested in the ./packages/e2e-demo
package. This package contains several demos and integrates deeply with verite
.
This package contains several isolated demos. One of the demos showcases an Ethereum dApp integration, and requires running a local Ethereum node.
Running an Ethereum node is easily accomplished by using our built-in scripts for running a HardHat node.
npm run hardhat:node
Now you have a local Ethereum node running. This process is long-lived and should remain open in it's own terminal tab.
npm run hardhat:deploy
And finally, you can run the local demos:
npm run dev
This will start your server at http://localhost:3000
To run the wallet, you will need the Expo Go app on your phone.
Start the wallet:
npm run wallet
Scan the QR code with your phone.
On iOS, scan the QR code with your phone's camera. On Android, scan the QR code from within the Expo Go app.
Each packages in the ./packages
folder has instructions on how to get started
independently of other packages. To run a service on it's own, follow the instructions
in the package's README.md
file.
NOTE It is recommended that you run npm run clean
before manually running a service.
To run type-checking, linting, and tests, simply run:
npm run check
Run tests by running
npm run test
NOTE Be sure to have built the verite
package by running npm run build:verite
.
npm run lint
or, with autofix:
npm run lint -- --fix
npm run type-check --workspaces --if-present
This app uses Prettier to format the code, and you can auto-format all files with
npm run format
Occasionally, the local hardhat ethereum node and MetaMask become out of sync. If you see an error stating "Nonce too high", you can fix this by: