├── .commitlintrc.js ├── .editorconfig ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── ---bug.md │ ├── ---feature.md │ ├── ---package.md │ └── ---refactoring.md ├── pull_request_template.md ├── sripts │ └── slither-comment.js └── workflows │ ├── main.yml │ └── release.yml ├── .gitignore ├── .husky ├── commit-msg ├── pre-commit └── prepare-commit-msg ├── .lintstagedrc.json ├── .prettierignore ├── .prettierrc.json ├── .yarn ├── patches │ └── changelogithub-npm-0.13.3-1783949906.patch └── releases │ └── yarn-4.2.1.cjs ├── .yarnrc.yml ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── changelogithub.config.json ├── package.json ├── packages ├── excubiae │ ├── .env.example │ ├── .prettierrc.json │ ├── .solcover.js │ ├── .solhint.json │ ├── LICENSE │ ├── README.md │ ├── contracts │ │ ├── Excubia.sol │ │ ├── IExcubia.sol │ │ ├── LICENSE │ │ ├── README.md │ │ ├── extensions │ │ │ ├── EASExcubia.sol │ │ │ ├── ERC721Excubia.sol │ │ │ ├── FreeForAllExcubia.sol │ │ │ ├── GitcoinPassportExcubia.sol │ │ │ ├── HatsExcubia.sol │ │ │ ├── SemaphoreExcubia.sol │ │ │ ├── ZKEdDSAEventTicketPCDExcubia.sol │ │ │ ├── interfaces │ │ │ │ ├── IGitcoinPassportDecoder.sol │ │ │ │ └── IHatsMinimal.sol │ │ │ └── verifiers │ │ │ │ └── ZKEdDSAEventTicketPCDVerifier.sol │ │ ├── package.json │ │ └── test │ │ │ ├── MockEAS.sol │ │ │ ├── MockERC721.sol │ │ │ ├── MockGitcoinPassportDecoder.sol │ │ │ ├── MockHats.sol │ │ │ └── MockSemaphore.sol │ ├── hardhat.config.ts │ ├── package.json │ ├── tasks │ │ └── .gitkeep │ ├── test │ │ ├── EASExcubia.test.ts │ │ ├── ERC721Excubia.test.ts │ │ ├── FreeForAllExcubia.test.ts │ │ ├── GitcoinPassportExcubia.test.ts │ │ ├── HatsExcubia.test.ts │ │ ├── SemaphoreExcubia.test.ts │ │ └── ZKEdDSAEventTicketPCD.test.ts │ └── tsconfig.json ├── imt │ ├── .env.example │ ├── .prettierrc.json │ ├── .solcover.js │ ├── .solhint.json │ ├── LICENSE │ ├── README.md │ ├── contracts │ │ ├── BinaryIMT.sol │ │ ├── Constants.sol │ │ ├── InternalBinaryIMT.sol │ │ ├── InternalQuinaryIMT.sol │ │ ├── LICENSE │ │ ├── QuinaryIMT.sol │ │ ├── README.md │ │ ├── package.json │ │ └── test │ │ │ ├── BinaryIMTTest.sol │ │ │ └── QuinaryIMTTest.sol │ ├── hardhat.config.ts │ ├── package.json │ ├── tasks │ │ └── deploy-imt-test.ts │ ├── test │ │ ├── BinaryIMT.ts │ │ └── QuinaryIMT.ts │ └── tsconfig.json ├── lazy-imt │ ├── .env.example │ ├── .prettierrc.json │ ├── .solcover.js │ ├── .solhint.json │ ├── LICENSE │ ├── README.md │ ├── contracts │ │ ├── Constants.sol │ │ ├── InternalLazyIMT.sol │ │ ├── LICENSE │ │ ├── LazyIMT.sol │ │ ├── README.md │ │ ├── package.json │ │ └── test │ │ │ └── LazyIMTTest.sol │ ├── hardhat.config.ts │ ├── package.json │ ├── scripts │ │ └── defaultZeroes.mjs │ ├── tasks │ │ └── deploy-imt-test.ts │ ├── test │ │ └── LazyIMT.ts │ └── tsconfig.json ├── lazytower │ ├── .env.example │ ├── .prettierrc.json │ ├── .solcover.js │ ├── .solhint.json │ ├── .solhintignore │ ├── LICENSE │ ├── README.md │ ├── contracts │ │ ├── LICENSE │ │ ├── LazyTowerHashChain.sol │ │ ├── README.md │ │ ├── package.json │ │ └── test │ │ │ └── LazyTowerHashChainTest.sol │ ├── hardhat.config.ts │ ├── package.json │ ├── tasks │ │ └── deploy-lazytower-test.ts │ ├── test │ │ ├── LazyTowerHashChainTest.ts │ │ └── utils.ts │ └── tsconfig.json └── lean-imt │ ├── .env.example │ ├── .prettierrc.json │ ├── .solcover.js │ ├── .solhint.json │ ├── LICENSE │ ├── README.md │ ├── contracts │ ├── Constants.sol │ ├── InternalLeanIMT.sol │ ├── LICENSE │ ├── LeanIMT.sol │ ├── README.md │ ├── package.json │ └── test │ │ └── LeanIMTTest.sol │ ├── hardhat.config.ts │ ├── package.json │ ├── tasks │ └── deploy-imt-test.ts │ ├── test │ └── LeanIMT.ts │ └── tsconfig.json ├── scripts ├── check-slither.sh └── remove-stable-version-field.ts └── yarn.lock /.commitlintrc.js: -------------------------------------------------------------------------------- 1 | const fs = require("node:fs") 2 | const path = require("node:path") 3 | 4 | const packages = fs.readdirSync(path.resolve(__dirname, "packages")) 5 | 6 | module.exports = { 7 | extends: ["@commitlint/config-conventional"], 8 | prompt: { 9 | scopes: [...packages], 10 | markBreakingChangeMode: true, 11 | allowCustomIssuePrefix: false, 12 | allowEmptyIssuePrefix: false, 13 | issuePrefixes: [ 14 | { 15 | value: "re", 16 | name: "re: ISSUES related" 17 | } 18 | ] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | #root = true 2 | 3 | [*] 4 | indent_style = space 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | max_line_length = 120 10 | indent_size = 4 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # These owners will be the default owners for everything in the repo. 2 | # They will be added as reviewers for PR related to configuration files. 3 | * @vplasencia 4 | 5 | # When someone opens a pull request that only modifies specific packages, 6 | # only the following users and not the default owners defined above will be 7 | # requested for a review. 8 | /packages/imt/ @vplasencia 9 | /packages/lazy-imt/ @chancehudson 10 | /packages/lazytower/ @LCamel 11 | /packages/lean-imt/ @vplasencia 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/---bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F41E Bug" 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: "bug \U0001F41B" 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 16 | 1. Go to '...' 17 | 2. Click on '....' 18 | 3. Scroll down to '....' 19 | 4. See error 20 | 21 | **Expected behavior** 22 | A clear and concise description of what you expected to happen. 23 | 24 | **Screenshots** 25 | If applicable, add screenshots to help explain your problem. 26 | 27 | **Technologies (please complete the following information):** 28 | 29 | - Node.js version 30 | - NPM version 31 | - Solidity version 32 | 33 | **Additional context** 34 | Add any other context about the problem here. 35 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/---feature.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F680 Feature" 3 | about: Suggest an idea for ZK-Kit 4 | title: '' 5 | labels: 'feature :rocket:' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/---package.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F4E6 Package" 3 | about: Propose a new ZK-Kit Solidity package 4 | title: '' 5 | labels: 'feature :rocket:' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the package you'd like** 11 | A clear and concise description of the type of package you have in mind. 12 | 13 | **Additional context** 14 | Add any other context about the package here. 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/---refactoring.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\u267B Refactoring" 3 | about: Suggest any improvements for this project 4 | title: '' 5 | labels: 'refactoring :recycle:' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the improvement you're thinking about** 11 | A clear and concise description of what you think could improve the code. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the improvement request here. 18 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ## Description 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | ## Related Issue(s) 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | ## Other information 24 | 25 | 26 | 27 | 28 | ## Checklist 29 | 30 | 31 | 32 | - [ ] I have read and understand the [contributor guidelines](https://github.com/privacy-scaling-explorations/zk-kit.solidity/blob/main/CONTRIBUTING.md) and [code of conduct](https://github.com/privacy-scaling-explorations/zk-kit.solidity/blob/main/CODE_OF_CONDUCT.md). 33 | - [ ] I have performed a self-review of my code 34 | - [ ] I have commented my code, particularly in hard-to-understand areas 35 | - [ ] My changes generate no new warnings 36 | - [ ] I have run `yarn style` without getting any errors 37 | - [ ] I have added tests that prove my fix is effective or that my feature works 38 | - [ ] New and existing unit tests pass locally with my changes 39 | 40 | > [!IMPORTANT] 41 | > We do not accept minor grammatical fixes (e.g., correcting typos, rewording sentences) unless they significantly improve clarity in technical documentation. These contributions, while appreciated, are not a priority for merging. If there is a grammatical mistake, please feel free to message the team. 42 | -------------------------------------------------------------------------------- /.github/sripts/slither-comment.js: -------------------------------------------------------------------------------- 1 | module.exports = async ({ github, context, header, body }) => { 2 | const comment = [header, body].join("\n") 3 | 4 | const { data: comments } = await github.rest.issues.listComments({ 5 | owner: context.repo.owner, 6 | repo: context.repo.repo, 7 | issue_number: context.payload.number 8 | }) 9 | 10 | const botComment = comments.find( 11 | (comment) => 12 | // github-actions bot user 13 | comment.user.id === 41898282 && comment.body.startsWith(header) 14 | ) 15 | 16 | const commentFn = botComment ? "updateComment" : "createComment" 17 | 18 | await github.rest.issues[commentFn]({ 19 | owner: context.repo.owner, 20 | repo: context.repo.repo, 21 | body: comment, 22 | ...(botComment ? { comment_id: botComment.id } : { issue_number: context.payload.number }) 23 | }) 24 | } 25 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: main 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | 8 | concurrency: 9 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} 10 | cancel-in-progress: true 11 | 12 | jobs: 13 | deps: 14 | runs-on: ubuntu-latest 15 | outputs: 16 | cache-key: ${{ steps.cache-env.outputs.cache-key }} 17 | steps: 18 | - uses: actions/checkout@v4 19 | - uses: actions/setup-node@v4 20 | with: 21 | node-version: 20 22 | 23 | - name: Output cache key 24 | id: cache-env 25 | run: echo "cache-key=${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}" >> $GITHUB_OUTPUT 26 | 27 | - uses: actions/cache@v4 28 | id: cache 29 | with: 30 | path: node_modules 31 | key: ${{ steps.cache-env.outputs.cache-key }} 32 | restore-keys: ${{ runner.os }}-node_modules- 33 | 34 | - if: steps.cache.outputs.cache-hit != 'true' 35 | run: yarn 36 | 37 | changed-files: 38 | runs-on: ubuntu-latest 39 | outputs: 40 | any_changed: ${{ steps.changed-files.outputs.any_changed }} 41 | modified_files: ${{ steps.changed-files.outputs.modified_files }} 42 | steps: 43 | - uses: actions/checkout@v4 44 | - name: Get changed files 45 | id: changed-files 46 | uses: tj-actions/changed-files@v44 47 | with: 48 | files: packages/**/*.{json,sol,ts} 49 | 50 | compile: 51 | if: needs.changed-files.outputs.any_changed == 'true' 52 | needs: [changed-files, deps] 53 | runs-on: ubuntu-latest 54 | steps: 55 | - uses: actions/checkout@v4 56 | - uses: actions/setup-node@v4 57 | with: 58 | node-version: 20 59 | - uses: actions/cache/restore@v4 60 | with: 61 | path: node_modules 62 | key: ${{ needs.deps.outputs.cache-key }} 63 | 64 | - run: yarn compile 65 | 66 | - name: Upload compilation results 67 | uses: actions/upload-artifact@v4 68 | with: 69 | name: all-artifacts 70 | path: packages/**/artifacts/** 71 | 72 | style: 73 | needs: deps 74 | runs-on: ubuntu-latest 75 | steps: 76 | - uses: actions/checkout@v4 77 | - uses: actions/setup-node@v4 78 | with: 79 | node-version: 20 80 | - uses: actions/cache/restore@v4 81 | with: 82 | path: node_modules 83 | key: ${{ needs.deps.outputs.cache-key }} 84 | 85 | - run: yarn format 86 | 87 | _tests: 88 | if: needs.changed-files.outputs.any_changed == 'true' 89 | needs: compile 90 | runs-on: ubuntu-latest 91 | strategy: 92 | matrix: 93 | dir: ${{ fromJson(needs.set-matrix.outputs.matrix) }} 94 | 95 | steps: 96 | - uses: actions/checkout@v4 97 | - uses: actions/setup-node@v4 98 | with: 99 | node-version: 20 100 | - uses: actions/cache/restore@v4 101 | with: 102 | path: node_modules 103 | key: ${{ needs.deps.outputs.cache-key }} 104 | - uses: actions/download-artifact@v4 105 | with: 106 | name: all-artifacts 107 | path: packages/ 108 | 109 | - if: contains(needs.changed-files.outputs.modified_files, matrix.dir) 110 | name: Test 111 | run: | 112 | workspace=$(jq -r '.name' packages/${{ matrix.dir }}/package.json) 113 | yarn workspace "$workspace" run test:coverage 114 | 115 | - if: contains(needs.changed-files.outputs.modified_files, matrix.dir) && github.event_name == 'push' && github.ref == 'refs/heads/main' 116 | name: Coveralls 117 | uses: coverallsapp/github-action@v2 118 | with: 119 | github-token: ${{ secrets.GITHUB_TOKEN }} 120 | parallel: true 121 | flag-name: run ${{ join(matrix.*, '-') }} 122 | 123 | tests: 124 | needs: _tests 125 | # workaround for https://github.com/orgs/community/discussions/13690 126 | # https://stackoverflow.com/a/77066140/9771158 127 | if: ${{ !(failure() || cancelled()) }} 128 | runs-on: ubuntu-latest 129 | steps: 130 | - name: Tests OK (passed or skipped) 131 | run: true 132 | 133 | set-matrix: 134 | if: needs.changed-files.outputs.any_changed == 'true' 135 | needs: changed-files 136 | runs-on: ubuntu-latest 137 | outputs: 138 | matrix: ${{ steps.set-matrix.outputs.matrix }} 139 | steps: 140 | - uses: actions/checkout@v4 141 | - name: Set matrix 142 | id: set-matrix 143 | run: | 144 | matrix=$(ls -1 packages | jq -Rsc 'split("\n") | map(select(length > 0))') 145 | echo "matrix=$matrix" >> $GITHUB_OUTPUT 146 | 147 | _slither: 148 | if: needs.changed-files.outputs.any_changed == 'true' 149 | needs: [changed-files, set-matrix, deps] 150 | runs-on: ubuntu-latest 151 | permissions: 152 | contents: read 153 | security-events: write 154 | strategy: 155 | matrix: 156 | dir: ${{ fromJson(needs.set-matrix.outputs.matrix) }} 157 | steps: 158 | - uses: actions/checkout@v4 159 | 160 | # FIXME this does not work as a way to restore compilation results for slither job but it does for the compile job ?? 161 | #- uses: actions/download-artifact@v4 162 | # with: 163 | # name: all-artifacts 164 | # path: packages/ 165 | 166 | - uses: actions/setup-node@v4 167 | with: 168 | node-version: 20 169 | - uses: actions/cache/restore@v4 170 | with: 171 | path: node_modules 172 | key: ${{ needs.deps.outputs.cache-key }} 173 | - if: contains(needs.changed-files.outputs.modified_files, matrix.dir) 174 | name: Compile contracts 175 | run: | 176 | workspace=$(jq -r '.name' packages/${{ matrix.dir }}/package.json) 177 | yarn workspace "$workspace" run compile 178 | 179 | - if: contains(needs.changed-files.outputs.modified_files, matrix.dir) 180 | name: Run slither 181 | uses: crytic/slither-action@v0.4.0 182 | id: slither 183 | with: 184 | ignore-compile: true 185 | node-version: 20 186 | fail-on: none 187 | sarif: results.sarif 188 | slither-args: --filter-paths "test" --exclude-dependencies --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/ 189 | target: packages/${{ matrix.dir }} 190 | 191 | - if: contains(needs.changed-files.outputs.modified_files, matrix.dir) 192 | name: Upload SARIF files 193 | uses: github/codeql-action/upload-sarif@v3 194 | with: 195 | sarif_file: ${{ steps.slither.outputs.sarif }} 196 | 197 | - name: Create/update checklist as PR comment 198 | uses: actions/github-script@v7 199 | if: github.even_name == 'pull_request' 200 | env: 201 | REPORT: ${{ steps.slither.stdout }} 202 | with: 203 | script: | 204 | const script = require('.github/scripts/slither-comment') 205 | const header = '# Slither report' 206 | const body = process.env.REPORT 207 | await script({ github, context, header, body }) 208 | 209 | slither: 210 | needs: _slither 211 | if: ${{ !(failure() || cancelled()) }} 212 | runs-on: ubuntu-latest 213 | steps: 214 | - name: Slither analysis OK (passed or skipped) 215 | run: true 216 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: release 2 | 3 | permissions: 4 | contents: write 5 | 6 | on: 7 | push: 8 | tags: 9 | - "*" 10 | 11 | jobs: 12 | release: 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v4 17 | with: 18 | fetch-depth: 0 19 | 20 | - name: Install Node.js 21 | uses: actions/setup-node@v4 22 | with: 23 | node-version: 20 24 | cache: yarn 25 | registry-url: "https://registry.npmjs.org" 26 | 27 | - name: Authentication 28 | run: | 29 | echo npmAuthToken: "$NODE_AUTH_TOKEN" >> ./.yarnrc.yml 30 | env: 31 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 32 | 33 | - name: Install dependencies 34 | run: yarn 35 | 36 | - name: Publish packages 37 | run: yarn version:publish 38 | env: 39 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 40 | 41 | - run: yarn version:release 42 | env: 43 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # IDE 20 | .vscode 21 | .idea 22 | 23 | # Cargo 24 | target 25 | 26 | # Testing 27 | coverage 28 | coverage.json 29 | *.lcov 30 | 31 | # Dependency directories 32 | node_modules/ 33 | 34 | # Parcel cache 35 | .parcel-cache 36 | 37 | # TypeScript cache 38 | *.tsbuildinfo 39 | 40 | # Output of 'npm pack' 41 | *.tgz 42 | 43 | # Microbundle cache 44 | .rpt2_cache/ 45 | .rts2_cache_cjs/ 46 | .rts2_cache_es/ 47 | .rts2_cache_umd/ 48 | 49 | # Yarn Integrity file 50 | .yarn-integrity 51 | 52 | # Generate output 53 | dist 54 | build 55 | 56 | # Hardhat 57 | artifacts 58 | cache 59 | typechain-types 60 | 61 | # dotenv environment variable files 62 | .env 63 | .env.development.local 64 | .env.test.local 65 | .env.production.local 66 | .env.local 67 | 68 | # Optional npm cache directory 69 | .npm 70 | .DS_Store 71 | 72 | # yarn v3 73 | .pnp.* 74 | .yarn/* 75 | !.yarn/patches 76 | !.yarn/plugins 77 | !.yarn/releases 78 | !.yarn/sdks 79 | !.yarn/versions 80 | 81 | .envrc 82 | .tool-versions 83 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx --no-install commitlint --edit $1 5 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx lint-staged 5 | -------------------------------------------------------------------------------- /.husky/prepare-commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | if [ "$NO_HOOK" != "1" ]; then 5 | exec < /dev/tty && npx czg --hook || true 6 | fi 7 | -------------------------------------------------------------------------------- /.lintstagedrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "**/*.{js,ts,md,json,sol,yml,yaml}": "yarn prettier --write" 3 | } 4 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | package-lock.json 4 | yarn.lock 5 | .yarn 6 | 7 | # testing 8 | coverage 9 | coverage.json 10 | 11 | # hardhat 12 | cache 13 | typechain-types 14 | 15 | # production 16 | dist 17 | build 18 | 19 | # github 20 | .github/ISSUE_TEMPLATE 21 | 22 | # misc 23 | .DS_Store 24 | *.pem 25 | 26 | # debug 27 | npm-debug.log* 28 | yarn-debug.log* 29 | yarn-error.log* 30 | 31 | # others 32 | target 33 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "arrowParens": "always", 4 | "trailingComma": "none" 5 | } 6 | -------------------------------------------------------------------------------- /.yarn/patches/changelogithub-npm-0.13.3-1783949906.patch: -------------------------------------------------------------------------------- 1 | diff --git a/dist/index.mjs b/dist/index.mjs 2 | index 8d005a0e1896ec10e6d09755b5859587882e3f93..580cb17bb6be135b45e8060155d0eb5c2614b02c 100644 3 | --- a/dist/index.mjs 4 | +++ b/dist/index.mjs 5 | @@ -192,7 +192,7 @@ function formatLine(commit, options) { 6 | function formatTitle(name, options) { 7 | if (!options.emoji) 8 | name = name.replace(emojisRE, ""); 9 | - return `###    ${name.trim()}`; 10 | + return `##    ${name.trim()}`; 11 | } 12 | function formatSection(commits, sectionName, options) { 13 | if (!commits.length) 14 | @@ -209,7 +209,8 @@ function formatSection(commits, sectionName, options) { 15 | Object.keys(scopes).sort().forEach((scope) => { 16 | let padding = ""; 17 | let prefix = ""; 18 | - const scopeText = `**${options.scopeMap[scope] || scope}**`; 19 | + const url = `https://github.com/${options.repo}/tree/main/packages/${scope}`; 20 | + const scopeText = `[**@${options.repo.split("/")[1]}/${options.scopeMap[scope] || scope}**](${url})`; 21 | if (scope && (useScopeGroup === true || useScopeGroup === "multiple" && scopes[scope].length > 1)) { 22 | lines.push(`- ${scopeText}:`); 23 | padding = " "; 24 | -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | checksumBehavior: update 2 | 3 | compressionLevel: mixed 4 | 5 | enableGlobalCache: false 6 | 7 | nodeLinker: node-modules 8 | 9 | yarnPath: .yarn/releases/yarn-4.2.1.cjs 10 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | - Demonstrating empathy and kindness toward other people 21 | - Being respectful of differing opinions, viewpoints, and experiences 22 | - Giving and gracefully accepting constructive feedback 23 | - Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | - Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | - The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | - Trolling, insulting or derogatory comments, and personal or political attacks 33 | - Public or private harassment 34 | - Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | - Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement. 63 | All complaints will be reviewed and investigated promptly and fairly. 64 | 65 | All community leaders are obligated to respect the privacy and security of the 66 | reporter of any incident. 67 | 68 | ## Enforcement Guidelines 69 | 70 | Community leaders will follow these Community Impact Guidelines in determining 71 | the consequences for any action they deem in violation of this Code of Conduct: 72 | 73 | ### 1. Correction 74 | 75 | **Community Impact**: Use of inappropriate language or other behavior deemed 76 | unprofessional or unwelcome in the community. 77 | 78 | **Consequence**: A private, written warning from community leaders, providing 79 | clarity around the nature of the violation and an explanation of why the 80 | behavior was inappropriate. A public apology may be requested. 81 | 82 | ### 2. Warning 83 | 84 | **Community Impact**: A violation through a single incident or series 85 | of actions. 86 | 87 | **Consequence**: A warning with consequences for continued behavior. No 88 | interaction with the people involved, including unsolicited interaction with 89 | those enforcing the Code of Conduct, for a specified period of time. This 90 | includes avoiding interactions in community spaces as well as external channels 91 | like social media. Violating these terms may lead to a temporary or 92 | permanent ban. 93 | 94 | ### 3. Temporary Ban 95 | 96 | **Community Impact**: A serious violation of community standards, including 97 | sustained inappropriate behavior. 98 | 99 | **Consequence**: A temporary ban from any sort of interaction or public 100 | communication with the community for a specified period of time. No public or 101 | private interaction with the people involved, including unsolicited interaction 102 | with those enforcing the Code of Conduct, is allowed during this period. 103 | Violating these terms may lead to a permanent ban. 104 | 105 | ### 4. Permanent Ban 106 | 107 | **Community Impact**: Demonstrating a pattern of violation of community 108 | standards, including sustained inappropriate behavior, harassment of an 109 | individual, or aggression toward or disparagement of classes of individuals. 110 | 111 | **Consequence**: A permanent ban from any sort of public interaction within 112 | the community. 113 | 114 | ## Attribution 115 | 116 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 117 | version 2.0, available at 118 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 119 | 120 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 121 | enforcement ladder](https://github.com/mozilla/diversity). 122 | 123 | [homepage]: https://www.contributor-covenant.org 124 | 125 | For answers to common questions about this code of conduct, see the FAQ at 126 | https://www.contributor-covenant.org/faq. Translations are available at 127 | https://www.contributor-covenant.org/translations. 128 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | :tada: Thank you for being interested in contributing to the ZK-kit project! :tada: 4 | 5 | Feel welcome and read the following sections in order to know how to ask questions and how to work on something. 6 | 7 | All members of our community are expected to follow our [Code of Conduct](/CODE_OF_CONDUCT.md). Please make sure you are welcoming and friendly in all of our spaces. 8 | 9 | We're really glad you're reading this, because we need volunteer developers to help this project come to fruition. 👏 10 | 11 | ## Issues 12 | 13 | The best way to contribute to our projects is by opening a [new issue](https://github.com/privacy-scaling-explorations/zk-kit.solidity/issues/new/choose) or tackling one of the issues listed [here](https://github.com/privacy-scaling-explorations/zk-kit.solidity/contribute). 14 | 15 | ## Pull Requests 16 | 17 | Pull requests are great if you want to add a feature or fix a bug. Here's a quick guide: 18 | 19 | 1. Fork the repo. 20 | 21 | 2. Run the tests. We only take pull requests with passing tests. 22 | 23 | 3. Add a test for your change. Only refactoring and documentation changes require no new tests. 24 | 25 | 4. Make sure to check out the [Style Guide](/CONTRIBUTING.md#style-guide) and ensure that your code complies with the rules. 26 | 27 | 5. Make the test pass. 28 | 29 | 6. Commit your changes. 30 | 31 | 7. Push to your fork and submit a pull request on our `main` branch. Please provide us with some explanation of why you made the changes you made. For new features make sure to explain a standard use case to us. 32 | 33 | > [!NOTE] 34 | > When a new package is created or a new feature is added to the repository, the contributor will be added to the `.github/CODEOWNERS` file to review and approve any future changes to their code. 35 | 36 | > [!IMPORTANT] 37 | > We do not accept minor grammatical fixes (e.g. correcting typos, rewording sentences) unless they significantly improve clarity in technical documentation. These contributions, while appreciated, are not a priority for merging. If there is a grammatical mistake, please feel free to message the team. 38 | 39 | ## CI (Github Actions) Tests 40 | 41 | We use GitHub Actions to test each PR before it is merged. 42 | 43 | When you submit your PR (or later change that code), a CI build will automatically be kicked off. A note will be added to the PR, and will indicate the current status of the build. 44 | 45 | ## Style Guide 46 | 47 | ### Code rules 48 | 49 | We always use ESLint and Prettier. To check that your code follows the rules, simply run the npm script `yarn lint`. 50 | 51 | ### Commits rules 52 | 53 | For commits it is recommended to use [Conventional Commits](https://www.conventionalcommits.org). 54 | 55 | Don't worry if it looks complicated. In our repositories, `git commit` opens an interactive app to create your conventional commit. 56 | 57 | Each commit message consists of a **header**, a **body** and a **footer**. The **header** has a special format that includes a **type**, a **scope** and a **subject**: 58 | 59 | (): 60 | 61 | 62 | 63 |