Skip to content

Commit

Permalink
feat: jwt-verifier working w/ tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-londhe committed Sep 11, 2024
1 parent 3957b69 commit 26a0e65
Show file tree
Hide file tree
Showing 73 changed files with 9,471 additions and 47,749 deletions.
21 changes: 21 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Mention the issue number that your changes are addressing. Use the format "Fixes #<issue number>" to automatically link your pull request to the relevant issue.

## Type of Change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## Checklist:

- [ ] I have discussed with the team prior to submitting this PR
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] My changes generate no new warnings
- [ ] New and existing unit tests pass locally with my changes
67 changes: 67 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: ZK Email tests
on: [push]
jobs:
run_circuit_tests:
runs-on: ubuntu-latest
environment: development
steps:
- uses: actions/checkout@v3

# Circom installation from https://github.com/erhant/circomkit/blob/main/.github/workflows/tests.yml
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --yes \
build-essential \
libgmp-dev \
libsodium-dev \
nasm \
nlohmann-json3-dev
- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Download Circom Binary v2.1.8
run: |
wget -qO /home/runner/work/circom https://github.com/iden3/circom/releases/download/v2.1.8/circom-linux-amd64
chmod +x /home/runner/work/circom
sudo mv /home/runner/work/circom /bin/circom
- name: Print Circom version
run: circom --version

- name: Install Yarn dependencies
working-directory: ./packages/circuits
run: yarn install --immutable

- name: Run Tests
working-directory: ./packages/circuits
run: yarn test

run_helpers_tests:
runs-on: ubuntu-latest
environment: development
steps:
- uses: actions/checkout@v3

- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Yarn dependencies
working-directory: ./packages/helpers
run: yarn install --immutable

- name: Run build
working-directory: ./packages/helpers
run: yarn build

- name: Run Tests
working-directory: ./packages/helpers
run: yarn test
102 changes: 83 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,91 @@
# node
node_modules/
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
#
#

# hardhat
cache
artifacts
dist

# Ignore the output from circom because we want people to build these
# Users can remove these lines and commit the artifacts
circuits/*.r1cs
circuits/*.vkey.json
# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

circuits/*_js/*
*.r1cs
*.sym
circuits/*.wasm
circuits/*.zkey
circuits/*.ptau
circuits/*.wtns
packages/circuits/*.wasm
*.ptau
*.zkey
circuits/inputs/*.json

build/
keys/
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

secret.json
yarn.lock
out/
circuits/circuit*zkey*
circuits/email/
cache/
test.log
packages/contracts/out/
packages/contracts/lib/
packages/contracts/broadcast
.next
node_modules.nosync
*Wallet*
*wallet*
circuits/regexes/subject_regex*

.env
*input.json
dizkus-scripts/*input.json
circuits/example
circuits/*.json
*.debug
*.env
.vscode

.DS_Store
.DS_Store?
packages/circuits/tests/compiled-test-circuits/*
packages/helpers/tests/test-jwts/*

.vite
**/.vite
**/.yarn/*

*.tsbuildinfo

**/node_modules
**/build
tsconfig.tsbuildinfo

*.rvkey

# Generated by Cargo
# will have compiled files and executables
debug/
target/

# These are backup files generated by rustfmt
**/*.rs.bk

pyjwt-env/
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
75 changes: 0 additions & 75 deletions README.md

This file was deleted.

17 changes: 0 additions & 17 deletions circuits/ascii.circom

This file was deleted.

Loading

0 comments on commit 26a0e65

Please sign in to comment.