├── .github ├── ISSUE_TEMPLATES │ ├── bug_report.md │ ├── ci.md │ ├── documentation.md │ └── feature-request.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── run-test-build-deploy.yaml ├── .gitignore ├── README.md ├── commitlint.config.cjs ├── example ├── .gitignore ├── README.md ├── next.config.mjs ├── package-lock.json ├── package.json ├── postcss.config.js ├── public │ ├── next.svg │ └── vercel.svg ├── src │ └── app │ │ ├── debug │ │ ├── README.md │ │ └── page.tsx │ │ ├── favicon.ico │ │ ├── globals.css │ │ ├── layout.tsx │ │ └── page.tsx ├── tailwind.config.ts └── tsconfig.json ├── jest.config.js ├── package-lock.json ├── package.json ├── readme ├── depemdency-diagram.svg ├── usage-flow-2.svg ├── usage-flow-3.svg └── usage-flow.svg ├── scripts └── build.sh ├── src ├── Reclaim.ts ├── contract-types │ ├── config.json │ ├── contracts │ │ ├── factories │ │ │ ├── Reclaim__factory.ts │ │ │ └── index.ts │ │ └── index.ts │ └── index.ts ├── index.ts ├── smart-contract.ts ├── utils │ ├── __tests__ │ │ ├── device.test.ts │ │ └── helper.test.ts │ ├── constants.ts │ ├── device.ts │ ├── errors.ts │ ├── helper.ts │ ├── interfaces.ts │ ├── logger.ts │ ├── modalUtils.ts │ ├── proofUtils.ts │ ├── sessionUtils.ts │ ├── types.ts │ └── validationUtils.ts └── witness.ts └── tsconfig.json /.github/ISSUE_TEMPLATES/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🐛 General Bug Report 3 | about: Report an issue to help improve the project. 4 | title: '' 5 | labels: 'kind/bug' 6 | assignees: '' 7 | --- 8 | 9 | ### Current Behavior 10 | 11 | 12 | ### Expected Behavior 13 | 14 | 15 | ### Screenshots/Logs 16 | 17 | 18 | ### To Reproduce 19 | 1. Go to '...' 20 | 2. Click on '....' 21 | 3. Scroll down to '....' 22 | 4. See error 23 | 24 | --- 25 | ## Before You Begin 26 | 27 | Before submitting an issue, please ensure you have completed the following steps: 28 | 29 | - [ ] I have read and agree to follow the [Code of Conduct](https://github.com/reclaimprotocol/.github/blob/main/Code-of-Conduct.md). 30 | - [ ] I have checked that this is not a security-related issue. For security concerns, please refer to our [Security Policy](https://github.com/reclaimprotocol/.github/blob/main/SECURITY.md). 31 | - [ ] I have read and signed the [Contributor License Agreement (CLA)](https://github.com/reclaimprotocol/.github/blob/main/CLA.md). 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATES/ci.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🛠 Continuous Integration / DevOps 3 | about: Improve or update workflows or other automation 4 | title: '[CI] ' 5 | labels: 'area/ci' 6 | assignees: '' 7 | --- 8 | 9 | ## Issue Description 10 | 11 | ### Current Situation 12 | 13 | 14 | ### Desired Outcome 15 | 16 | 17 | ### Proposed Implementation 18 | 19 | 20 | ### Additional Context 21 | 22 | 23 | --- 24 | ## Before You Begin 25 | 26 | Before submitting an issue, please ensure you have completed the following steps: 27 | 28 | - [ ] I have read and agree to follow the [Code of Conduct](https://github.com/reclaimprotocol/.github/blob/main/Code-of-Conduct.md). 29 | - [ ] I have checked that this is not a security-related issue. For security concerns, please refer to our [Security Policy](https://github.com/reclaimprotocol/.github/blob/main/SECURITY.md). 30 | - [ ] I have read and signed the [Contributor License Agreement (CLA)](https://github.com/reclaimprotocol/.github/blob/main/CLA.md). 31 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATES/documentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 📄 Documentation issue 3 | about: Issues related to documentation. 4 | title: '[Docs]' 5 | labels: 'area/docs, language/markdown' 6 | assignees: '' 7 | --- 8 | 9 | ### Current State 10 | 11 | 12 | ### Desired State 13 | 14 | 15 | --- 16 | ## Before You Begin 17 | 18 | Before submitting an issue, please ensure you have completed the following steps: 19 | 20 | - [ ] I have read and agree to follow the [Code of Conduct](https://github.com/reclaimprotocol/.github/blob/main/Code-of-Conduct.md). 21 | - [ ] I have checked that this is not a security-related issue. For security concerns, please refer to our [Security Policy](https://github.com/reclaimprotocol/.github/blob/main/SECURITY.md). 22 | - [ ] I have read and signed the [Contributor License Agreement (CLA)](https://github.com/reclaimprotocol/.github/blob/main/CLA.md). 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATES/feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 💡 Feature Request 3 | about: Suggest an enhancement for this project 4 | title: '[FEATURE] ' 5 | labels: 'enhancement' 6 | assignees: '' 7 | --- 8 | 9 | ## Feature Description 10 | 11 | ### Current Situation 12 | 13 | 14 | ### Proposed Enhancement 15 | 16 | 17 | ### Benefits (Optional) 18 | 19 | 20 | ### Possible Implementation (Optional) 21 | 22 | 23 | 24 | ### Additional Context 25 | 26 | 27 | --- 28 | ## Before You Begin 29 | 30 | Before submitting an issue, please ensure you have completed the following steps: 31 | 32 | - [ ] I have read and agree to follow the [Code of Conduct](https://github.com/reclaimprotocol/.github/blob/main/Code-of-Conduct.md). 33 | - [ ] I have checked that this is not a security-related issue. For security concerns, please refer to our [Security Policy](https://github.com/reclaimprotocol/.github/blob/main/SECURITY.md). 34 | - [ ] I have read and signed the [Contributor License Agreement (CLA)](https://github.com/reclaimprotocol/.github/blob/main/CLA.md). 35 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | 4 | ### Testing (ignore for documentation update) 5 | 6 | 7 | ### Type of change 8 | - [ ] Bug fix 9 | - [ ] New feature 10 | - [ ] Breaking change 11 | - [ ] Documentation update 12 | 13 | ### Checklist: 14 | - [ ] I have read and agree to the [Code of Conduct](https://github.com/reclaimprotocol/.github/blob/main/Code-of-Conduct.md). 15 | - [ ] I have signed the [Contributor License Agreement (CLA)](https://github.com/reclaimprotocol/.github/blob/main/CLA.md). 16 | - [ ] I have considered the [Security Policy](https://github.com/reclaimprotocol/.github/blob/main/SECURITY.md). 17 | - [ ] I have self-reviewed and tested my code. 18 | - [ ] I have updated documentation as needed. 19 | - [ ] I agree to the [project's custom license](https://github.com/reclaimprotocol/.github/blob/main/LICENSE). 20 | 21 | ### Additional Notes: 22 | 23 | -------------------------------------------------------------------------------- /.github/workflows/run-test-build-deploy.yaml: -------------------------------------------------------------------------------- 1 | name: build-deploy 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | workflow_dispatch: 8 | inputs: 9 | release_type: 10 | description: "Type of release" 11 | required: true 12 | default: "patch" 13 | type: choice 14 | options: 15 | - patch 16 | - minor 17 | - major 18 | - bugfix 19 | - hotfix 20 | 21 | permissions: 22 | contents: write 23 | packages: write 24 | 25 | jobs: 26 | test_and_build: 27 | runs-on: ubuntu-latest 28 | steps: 29 | - uses: actions/checkout@v3 30 | 31 | - name: Set up Node.js 32 | uses: actions/setup-node@v3 33 | with: 34 | node-version: "16" 35 | 36 | - name: Clean install dependencies 37 | run: | 38 | rm -rf node_modules 39 | rm -rf package-lock.json 40 | npm i 41 | 42 | - name: Build package 43 | run: npm run build 44 | 45 | - name: Upload build artifacts 46 | uses: actions/upload-artifact@v4 47 | with: 48 | name: dist 49 | path: dist/ 50 | 51 | publish: 52 | needs: test_and_build 53 | runs-on: ubuntu-latest 54 | if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' 55 | steps: 56 | - uses: actions/checkout@v3 57 | with: 58 | persist-credentials: false # Disable automatic token authentication 59 | 60 | - name: Set up Node.js 61 | uses: actions/setup-node@v3 62 | with: 63 | node-version: "16" 64 | registry-url: "https://registry.npmjs.org" 65 | 66 | - name: Download build artifacts 67 | uses: actions/download-artifact@v4 68 | with: 69 | name: dist 70 | path: dist/ 71 | 72 | - name: Version and publish 73 | env: 74 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 75 | run: | 76 | npm publish 77 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .DS_Store 3 | dist 4 | coverage 5 | 6 | .env* 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
{JSON.stringify(proofs, null, 2)}122 |
Reclaim SDK Device Detection Analysis
268 |Device Type
290 |{debugInfo.detection.deviceType}
291 |Mobile Type
295 |{debugInfo.detection.mobileType}
296 |Is Mobile
300 |{debugInfo.detection.isMobile ? 'Yes' : 'No'}
301 |Is Desktop
304 |{debugInfo.detection.isDesktop ? 'Yes' : 'No'}
305 |User Agent
398 |{debugInfo.environment.userAgent}
399 |455 | {JSON.stringify(debugInfo, null, 2)} 456 |457 |
Reclaim SDK Device Detection Debug Tool
462 |Report any detection issues at: GitHub Issues
463 |Extracted Parameters
125 | {Object.entries(extractedParams).length > 0 ? ( 126 |No parameters extracted
138 | )} 139 | > 140 | ) 141 | } catch (e) { 142 | returnFailed to parse parameters
143 | } 144 | } 145 | 146 | return ( 147 |154 | Click the button below to start the claim process. 155 |
156 | 163 |Processing your claim...
170 |Provider
193 |{getProviderUrl(proof)}
194 |Timestamp
197 |{new Date(proof.claimData.timestampS * 1000).toLocaleString()}
198 |Attested by
210 |{witness.id}
214 |Signatures
224 |{signature}
228 |Proof Identifier
237 |238 | {proof.identifier} 239 |
240 |${this.options.description}
162 | 163 | 169 | 170 | ${this.options.showExtensionInstallButton ? ` 171 |💡 For a better experience
184 |Install our browser extension for seamless verification without QR codes
190 | 205 | Install Extension 206 | 207 |