• Stars
    star
    136
  • Rank 267,670 (Top 6 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 3 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Verite

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.

Getting Started

Requirements

  • Node.js v14
  • npm v7 or greater (npm i -g npm@7)

Project Structure

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:

  • docs - Documentation for the Verite
  • verite - The core Javascript SDK for issuing, verifying, and revoking Verifiable Credentials.
  • contract - Two sample ERC20 contracts showcasing how to implement Verite into a smart contract.
  • solana - A sample Solana program demonstrating how to implement Verite into a program.
  • e2e-demo - A demo walkthrough of the entire Verite project, showcasing issuance, verification, and revocation, with additional demos for DeFi and custodial use cases.
  • wallet - A demo wallet for storing and submitting credentials. Written in React Native using Expo.

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.

Each package contains a README file with specific details about how to use the package.

Development Environment Setup

Setting up a new development environment is accomplished by running the following script:

npm run setup

This script will do the following:

  • Install all dependencies
  • Build the verite project
  • Set up the local IP hostname for e2e-demo to be used with the wallet.
  • Generate an auth JWT secret for e2e-demo
  • Generate issuer and verifier DIDs and secrets for e2e-demo
  • Build and migrate the database for e2e-demo

Running the end-to-end 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 a local Ethereum node

Running an Ethereum node is easily accomplished by using our built-in scripts for running a HardHat node.

  1. To start a local Ethereum node, simply run:
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.

  1. Next, you will need to deploy the smart contracts to the local Ethereum network.
npm run hardhat:deploy

And finally, you can run the local demos:

npm run dev

This will start your server at http://localhost:3000

Running the wallet

To run the wallet, you will need the Expo Go app on your phone.

  1. Start the wallet:

    npm run wallet
  2. 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.

Manually running services

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.

Developing

To run type-checking, linting, and tests, simply run:

npm run check

Testing

Run tests by running

npm run test

NOTE Be sure to have built the verite package by running npm run build:verite.

Linting the codebase

npm run lint

or, with autofix:

npm run lint -- --fix

Run a type check

npm run type-check --workspaces --if-present

Fixing with Prettier

This app uses Prettier to format the code, and you can auto-format all files with

npm run format

Troubleshooting

Nonce too high

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:

  1. Open MetaMask settings
  2. Click "Advanced"
  3. Click "Reset Account"

Contributors

More Repositories

1

stablecoin-evm

Source repository for smart contracts used by Circle's stablecoins on EVM-compatible blockchains
JavaScript
491
star
2

evm-cctp-contracts

Official repository for all EVM-compatible smart contracts used by the Cross-Chain Transfer Protocol
Solidity
90
star
3

payments-sample-app

Vue
65
star
4

perimeter-protocol

Official repository for the Perimeter Protocol
TypeScript
58
star
5

centre-ecosystem

36
star
6

cctp-sample-app

Sample app to demonstrate capabilities of Cross-Chain Transfer Protocol (CCTP)
TypeScript
35
star
7

circle-nodejs-sdk

Node.js SDK for Circle API
TypeScript
22
star
8

w3s-android-sample-app-wallets

Kotlin
12
star
9

w3s-ios-sample-app-wallets

Swift
11
star
10

contract-cli

CLI for Managing Smart Contracts
TypeScript
11
star
11

noble-cctp

Go
8
star
12

w3s-programmable-wallets-iOS-sample-app

Swift
7
star
13

w3s-programmable-wallets-test-server

JavaScript
7
star
14

circle-ecosystem

Python
7
star
15

w3s-digital-wallet-iOS-sample-app

A demonstration of integrating social sign-in functionality with web3 wallet generation.
JavaScript
6
star
16

verite-minter-allowlist

JavaScript
6
star
17

openapi

An OpenAPI specification for the Circle APIs.
6
star
18

robust-tss-lib

Official repository for Robust Threshold Signatures library robust-tss-lib
Go
4
star
19

recoverable-wrapper

The Official Repository for R&D on recoverable wrapper tokens
Solidity
4
star
20

w3s-ios-sdk

Objective-C
4
star
21

w3s-entity-secret-sample-code

Go
4
star
22

chainmail

Chainmail: authenticated email using the blockchain.
Python
4
star
23

verite-credential-utils

TypeScript
3
star
24

w3s-android-sdk

3
star
25

noble-fiattokenfactory

Repository for Noble fiat token factory code
Go
3
star
26

w3s-pw-web-sdk

TypeScript
1
star
27

solana-cctp-contracts

Official repository for Solana smart contracts used by the Cross-Chain Transfer Protocol
Rust
1
star
28

stablecoin-near

Repository for Circle stablecoins on NEAR
Rust
1
star
29

circle-postman

1
star