Giter Site home page Giter Site logo

astrabacus / verite Goto Github PK

View Code? Open in Web Editor NEW

This project forked from circlefin/verite

0.0 0.0 0.0 16.86 MB

Digitale Kennung

Home Page: https://verite.id

License: MIT License

Shell 0.30% JavaScript 3.52% Rust 0.63% TypeScript 90.81% CSS 0.52% Solidity 4.22%

verite's Introduction

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

verite's People

Contributors

bmcd avatar bmuller avatar bricestacey avatar bumblefudge avatar dan-l avatar dependabot[bot] avatar dlim-circle avatar dnharold avatar euj1n0ng avatar jgardner00 avatar kimdhamilton avatar nshahidi avatar polluterofminds avatar psnevio avatar taisiiak avatar taotao-circle avatar tjbaker avatar venables avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.