Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: iden3/js-iden3-auth
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0-beta.7
Choose a base ref
...
head repository: iden3/js-iden3-auth
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: develop
Choose a head ref
Loading
Showing with 6,786 additions and 14,751 deletions.
  1. +14 −31 .eslintrc.js
  2. +33 −0 .github/ISSUE_TEMPLATE/issue-report.md
  3. +41 −8 .github/workflows/ci.yaml
  4. +1 −1 .github/workflows/npm-publish.yml
  5. +2 −1 .gitignore
  6. +1 −4 .prettierrc
  7. +0 −661 LICENSE
  8. +201 −0 LICENSE-APACHE
  9. +21 −0 LICENSE-MIT
  10. +36 −13 Readme.md
  11. +13 −15 jest.config.js
  12. +3,018 −9,781 package-lock.json
  13. +30 −31 package.json
  14. +13 −0 patches/@digitalbazaar+http-client+3.4.1.patch
  15. +348 −71 src/auth/auth.ts
  16. +50 −114 src/circuits/atomicMtpV2.ts
  17. +44 −113 src/circuits/atomicSigV2.ts
  18. +224 −0 src/circuits/atomicV3.ts
  19. +13 −26 src/circuits/authV2.ts
  20. +9 −26 src/circuits/common.ts
  21. +127 −0 src/circuits/linkedMultiQuery.ts
  22. +6 −7 src/circuits/ownershipVerifier.ts
  23. +65 −370 src/circuits/query.ts
  24. +28 −13 src/circuits/registry.ts
  25. +2 −3 src/index.ts
  26. +0 −2 src/loaders/index.ts
  27. +0 −14 src/loaders/key.ts
  28. +0 −67 src/loaders/schema.ts
  29. +0 −19 src/proofs/zk.ts
  30. +0 −9 src/protocol/constants.ts
  31. +0 −2 src/protocol/index.ts
  32. +0 −111 src/protocol/models.ts
  33. +17 −14 src/state/resolver.ts
  34. +135 −266 src/state/types/ethers-contracts/Abi.ts
  35. +6 −15 src/state/types/ethers-contracts/common.ts
  36. +557 −557 src/state/types/ethers-contracts/factories/Abi__factory.ts
  37. +1 −1 src/state/types/ethers-contracts/factories/index.ts
  38. +3 −3 src/state/types/ethers-contracts/index.ts
  39. +8 −0 src/types-sdk.ts
  40. +740 −0 test/atomicV3.test.ts
  41. +723 −499 test/auth.test.ts
  42. +20 −0 test/common.test.ts
  43. +0 −104 test/data/authV2.json
  44. +0 −474 test/data/credentialAtomicQueryMTPV2.json
  45. +0 −474 test/data/credentialAtomicQuerySigV2.json
  46. +14 −12 test/genesis.test.ts
  47. +95 −0 test/linked-proofs.test.ts
  48. +99 −0 test/mocks.ts
  49. +0 −797 test/query.test.ts
  50. +23 −20 test/schema.test.ts
  51. +3 −2 tsconfig.build.json
  52. +2 −0 tsconfig.json
45 changes: 14 additions & 31 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,18 @@
const iden3Config = require('@iden3/eslint-config');
const { spellcheckerRule, cspellConfig } = require('@iden3/eslint-config/cspell');

module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['tsconfig.json', 'tsconfig.test.json'],
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js', 'jest.config.js'],
...iden3Config,
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
'@cspell/spellchecker': [
1,
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-base-to-string': 'error',
},
...spellcheckerRule,
cspell: {
...cspellConfig,
ignoreWords: ['unmarshal', 'UWLEWdAWcosiLkYoL0KWwZpgEOrPPepl6T5gC']
}
}
]
}
};
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/issue-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Issue report
about: Create a report to help us improve
title: ''
labels: ''
assignees: Kolezhniuk, vmidyllic

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Install js-iden3-auth@<version>
2. call function <Y> with param <X>

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

** Environment info (please complete the following information):**
- OS version [e.g. Mac OS]
- Node version: [e.g. 18.16]
- Browser [e.g. chrome, safari]
- Package version [e.g. 1.0.0]
- Build [e.g. umd, cjs]


**Additional context**
Add any other context about the problem here.
49 changes: 41 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -2,21 +2,54 @@ name: RUN ES LINT ANS TESTS
on: push
jobs:
build:
strategy:
matrix:
version: [16.15, 18]
timeout-minutes: 7
runs-on: ubuntu-latest
env:
IPFS_URL: ${{ secrets.IPFS_URL }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
node-version: 'lts/*'

- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
# if tests fail, this step may show what dependencies are changed.
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list

- name: Install modules
run: npm ci

- name: Run Prettier
run: npm run format

- name: Run ESLint
run: npm run lint

- name: Run Build
run: npm run build

- name: Download regular circuits for CI 'latest.zip' from S3
run: mkdir ./test/testdata && wget https://iden3-circuits-bucket.s3.eu-west-1.amazonaws.com/latest.zip -P ./test/testdata

- name: Unzip circuits to folder
run: cd ./test/testdata && unzip latest.zip && cd - && pwd

- name: Run Tests
run: npm run test
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -3,4 +3,5 @@ coverage
dist
.DS_Store
.idea
.vscode
.vscode
/test/testdata
5 changes: 1 addition & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
{
"singleQuote": true,
"trailingComma": "all"
}
"@iden3/eslint-config/prettier"
Loading