Skip to content

Conversation

@transphorm
Copy link
Member

@transphorm transphorm commented Aug 25, 2025

Summary

  • move license header check scripts to the repo root
  • hook mobile-sdk-alpha into shared license header lint
  • add license headers to mobile-sdk-alpha sources

Testing

  • yarn workspace @selfxyz/mobile-sdk-alpha lint
  • yarn workspace @selfxyz/mobile-sdk-alpha build
  • yarn workspace @selfxyz/mobile-sdk-alpha test
  • yarn workspace @selfxyz/mobile-app lint:headers
  • yarn workspace @selfxyz/mobile-app test (fails: Cannot find module '@selfxyz/common/utils/proving')
  • yarn workspace @selfxyz/contracts build (fails: Hardhat config accounts missing)

https://chatgpt.com/codex/tasks/task_b_68ac6c830ab0832d98775ac85996a45d

Summary by CodeRabbit

  • New Features
    • None
  • Style
    • Added SPDX license headers across source, scripts, and tests with no functional changes.
  • Chores
    • Standardized lint workflow: root lint now runs header checks before package linting.
    • Simplified app-level lint scripts by removing separate header-check steps.
    • Improved header-check scripts to allow directory-scoped runs and clearer CLI usage.
  • Tests
    • No test behavior changes; only header comments added.
  • Documentation
    • Licensing metadata clarified via consistent file headers.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 25, 2025

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

193 files out of 300 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This PR centralizes license-header linting at the repo root, updates header-check scripts to accept target directories, removes app-level header checks, and adds SPDX headers across packages/mobile-sdk-alpha (source, configs, scripts, and tests). No functional runtime changes to the SDK; only script orchestration and comment headers were added.

Changes

Cohort / File(s) Summary
Root lint orchestration
package.json, app/package.json
Root adds lint:headers and lint:headers:fix, and prefixes lint with header checks. App removes lint:headers* and simplifies lint/lint:fix to run ESLint only.
Header-check scripts
scripts/check-duplicate-headers.cjs, scripts/check-license-headers.mjs
Both CLIs now accept a target directory (first non-flag arg). Path resolution updated to use provided dir or CWD; scanning is scoped accordingly. No changes to matching rules or header logic.
mobile-sdk-alpha: source files
packages/mobile-sdk-alpha/src/**/* (adapters/, bridge/, browser.ts, client.ts, components//, config/, context.tsx, entry/index.tsx, errors//, hooks/, mrz/, nfc/, processing/, qr/, types/, validation/, index.ts)
Insert SPDX license headers at file tops. No code, types, or exports changed.
mobile-sdk-alpha: scripts/configs
packages/mobile-sdk-alpha/scripts/*, packages/mobile-sdk-alpha/.eslintrc.cjs, packages/mobile-sdk-alpha/tsup.config.ts, packages/mobile-sdk-alpha/vitest.config.ts
Add SPDX license headers. No behavioral changes to configs or scripts.
mobile-sdk-alpha: tests
packages/mobile-sdk-alpha/tests/**/*
Add SPDX license headers to all test files. No test logic changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant Yarn as yarn (root)
  participant Hdr as lint:headers
  participant Dups as check-duplicate-headers.cjs
  participant Lic as check-license-headers.mjs
  participant WS as workspaces foreach lint
  participant App as app workspace

  Dev->>Yarn: yarn lint
  Yarn->>Hdr: run lint:headers
  par app headers
    Hdr->>Dups: node .../check-duplicate-headers.cjs app
    Hdr->>Lic: node .../check-license-headers.mjs app --check
  and mobile-sdk-alpha headers
    Hdr->>Dups: node .../check-duplicate-headers.cjs packages/mobile-sdk-alpha
    Hdr->>Lic: node .../check-license-headers.mjs packages/mobile-sdk-alpha --check
  end
  Note right of Lic: Both scripts now accept<br/>target dir as first arg
  Hdr-->>Yarn: exit(0|1)
  Yarn->>WS: workspaces foreach run lint
  WS->>App: yarn lint
  Note right of App: Now runs "eslint ." only<br/>(no app-level header checks)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • aaronmgdr
  • shazarre
  • remicolin

Poem

Headers unfurl at dawn’s first light,
BUSL whispers, tidy and bright.
Lint now leads with a careful scan,
Root commands orchestrate the plan.
No code paths bend, no logic stirred—
Just polished scripts and licensed word.
CI smiles: ✅ assured.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/add-license-header-check-to-mobile-sdk-alpha

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@transphorm transphorm marked this pull request as ready for review August 25, 2025 14:33
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 12

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (15)
packages/mobile-sdk-alpha/scripts/validate-exports.mjs (1)

8-19: Fix path handling for file URLs to avoid Windows/URL path breakage

Using dist.pathname with path.join mixes URL semantics and file paths. On Windows this can produce invalid paths (e.g., /C:\...), causing false negatives or crashes. Convert the URL to a filesystem path with fileURLToPath and use that consistently.

Apply this diff:

-import { readFile } from 'node:fs/promises';
-import { readdir } from 'node:fs/promises';
+import { readFile } from 'node:fs/promises';
+import { readdir } from 'node:fs/promises';
 import { join } from 'node:path';
+import { fileURLToPath } from 'node:url';
@@
-const dist = new URL('../dist/', import.meta.url);
-const files = await readdir(dist);
+const distUrl = new URL('../dist/', import.meta.url);
+const distPath = fileURLToPath(distUrl);
+const files = await readdir(distPath);
@@
-  const src = await readFile(join(dist.pathname, f), 'utf8');
+  const src = await readFile(join(distPath, f), 'utf8');

Also applies to: 14-15

packages/mobile-sdk-alpha/scripts/postBuild.mjs (1)

33-45: Expose TypeScript types in dist package.json to avoid consumer resolution issues

Consumers (TS projects, editors) may fail to resolve types when importing from the package root unless types is declared. Add a top‑level "types" entry pointing at the ESM d.ts to ensure stable DX across bundlers and Metro.

Apply this diff:

 const distPackageJson = {
   name: '@selfxyz/mobile-sdk-alpha',
   version: packageJson.version,
   type: 'module',
+  types: './esm/index.d.ts',
   exports: {
     '.': './esm/index.js',
     './browser': './esm/browser.js',
   },
 };

If you want stronger TS resolution for subpaths, we can also introduce typesVersions or exports with a types condition in a follow-up.

packages/mobile-sdk-alpha/src/processing/mrz.ts (4)

118-131: TD1 extraction assumes 2 lines and wrong field positions.

TD1 (3 lines x 30 chars) field offsets here are not aligned with ICAO 9303. Using two concatenated lines will yield incorrect document number, DOB, and expiry extraction.

Recommend either:

  • Implement a standards-compliant TD1 parser using all three lines, or
  • Temporarily drop TD1 support (explicitly reject) until implemented, to avoid returning misleading data.

I can provide a compliant TD1 extraction mapping and tests in a follow-up change.


53-61: TD3 format regex allows non-digit check digits.

The TD3 check digit is numeric, but the regex accepts [0-9ILDSOG], which tolerates OCR confusions at the format stage. This can increase false positives (inputs pass format but fail checks later), which is risky in security-sensitive flows.

A safer approach is to enforce a numeric check digit at format time and handle OCR normalization before parsing if needed.

-  const TD3_line_2_REGEX = /^([A-Z0-9<]{9})([0-9ILDSOG])([A-Z<]{3})/;
+  const TD3_line_2_REGEX = /^([A-Z0-9<]{9})(\d)([A-Z<]{3})/;

62-68: Ensure TD1 MRZ detection strictly requires three 30-character lines

The current validateTD1Format function in packages/mobile-sdk-alpha/src/processing/mrz.ts only concatenates two lines and even permits any line starting with “I”, which:

  • Misclassifies malformed or truncated MRZs as TD1.
  • Risks downstream parsing errors (e.g. wrong check-digit locations) with potential security/KYC implications.

Please refactor to enforce the ICAO-compliant TD1 format (3 lines of 30 characters each) and remove the permissive prefix check.

Key location:

  • packages/mobile-sdk-alpha/src/processing/mrz.ts at validateTD1Format(lines: string[]): boolean (previously lines 62–68)

Suggested minimal hardening diff:

 function validateTD1Format(lines: string[]): boolean {
-  const concatenatedLines = lines[0] + lines[1];
-  const TD1_REGEX =
-    /^(?<documentType>[A-Z0-9<]{2})(?<issuingCountry>[A-Z<]{3})(?<documentNumber>[A-Z0-9<]{9})(?<checkDigitDocumentNumber>[0-9]{1})(?<optionalData1>[A-Z0-9<]{15})(?<dateOfBirth>[0-9]{6})(?<checkDigitDateOfBirth>[0-9]{1})(?<sex>[MF<]{1})(?<dateOfExpiry>[0-9]{6})(?<checkDigitDateOfExpiry>[0-9]{1})(?<nationality>[A-Z<]{3})(?<optionalData2>[A-Z0-9<]{7})/;
-  const isTD1 = TD1_REGEX.test(concatenatedLines) || lines[0].startsWith('I');
-  return isTD1;
+  // TD1 MRZ (ID-1 size) must be exactly 3 lines of 30 characters per ICAO 9303.
+  if (lines.length !== 3) return false;
+  if (!lines.every(line => line.length === 30)) return false;
+  // TODO: Add full regex-based validation and check-digit verification per spec
+  return true;
 }

Follow-up: update extraction and checksum logic to consume three lines and validate all check digits as per ICAO 9303 §5.10.3.4.


136-154: Implement TD1 Composite Check Digit Instead of Hardcoded True

The current implementation in packages/mobile-sdk-alpha/src/processing/mrz.ts (lines 136–154) only validates the document number, birth date, and expiry date check digits, then misleadingly sets compositeChecksum to true. According to ICAO 9303 (TD1 size), you must compute and verify a final composite check digit over specific fields—including filler characters—rather than hardcoding a pass. Failing to do so can allow malformed MRZs to appear valid.

Please update as follows:

• Location: validateTD1CheckDigits (packages/mobile-sdk-alpha/src/processing/mrz.ts:136–154)
• Remove the line

compositeChecksum: true, // TD1 doesn't have a composite check digit like TD3

• Compute the composite string per ICAO 9303 TD1 (positions 6–30 of line 1 and positions 1–7, 9–15, 19–29 of line 2, including ‘<’ fillers) and validate it:

const compositeData =
  concatenatedLines.slice(5, 30) +       // line1 positions 6–30
  concatenatedLines.slice(30, 37) +     // line2 positions 1–7
  concatenatedLines.slice(38, 44) +     // line2 positions 9–15
  concatenatedLines.slice(47, 56);      // line2 positions 19–29

const compositeCheckDigit = concatenatedLines.slice(56, 57);  // position 30 of line2

return {
  passportNumberChecksum: verifyCheckDigit(documentNumber, documentNumberCheckDigit),
  dateOfBirthChecksum: verifyCheckDigit(dateOfBirth, dobCheckDigit),
  dateOfExpiryChecksum: verifyCheckDigit(dateOfExpiry, expiryCheckDigit),
  compositeChecksum: verifyCheckDigit(compositeData, compositeCheckDigit),
};

• Refer to ICAO 9303 TD1 spec for exact character positions and include filler < values when building compositeData (sourceforge.net, github.com).

This change ensures full MRZ integrity checking and prevents clients from trusting an always-true composite flag.

packages/mobile-sdk-alpha/vitest.config.ts (1)

8-10: Use Node as the default test environment and scope JSDOM only to TSX tests

I scanned the packages/mobile-sdk-alpha/tests suite and confirmed that only the following TSX tests import DOM utilities (React Testing Library’s render/renderHook):

  • entry.test.tsx
  • provider.test.tsx

The other tests don’t interact with window/document or use DOM-based assertions. Switching the default environment to node will improve performance and avoid subtle drift, while jsdom is applied only where needed.

Please update your vitest.config.ts accordingly:

 export default defineConfig({
   test: {
     globals: true,
-    environment: 'jsdom',
+    environment: 'node',
+    // Only use JSDOM for TSX tests that render components
+    environmentMatchGlobs: [
+      ['**/*.test.tsx', 'jsdom'],
+    ],
     setupFiles: ['./tests/setup.ts'],
   },
 });
packages/mobile-sdk-alpha/src/client.ts (1)

109-117: Timeout emits error even if proof completes; no cancellation or cleanup

clock.sleep(...).then(() => emit('error', ...)) fires regardless of proof completion, and cancel is a no-op. This will spuriously emit an error after a successful proof or leak a pending timer. Add an abortable timeout and clear it on result() or cancel().

Apply this diff to make the timeout abortable and deterministic:

-    const timeoutMs = opts.timeoutMs ?? cfg.timeouts?.proofMs ?? defaultConfig.timeouts.proofMs;
-    void _adapters.clock.sleep(timeoutMs!, opts.signal).then(() => emit('error', new Error('timeout')));
-    return {
-      id: 'stub',
-      status: 'pending',
-      result: async () => ({ ok: false, reason: 'SELF_ERR_PROOF_STUB' }),
-      cancel: () => {},
-    };
+    const timeoutMs = opts.timeoutMs ?? cfg.timeouts?.proofMs ?? defaultConfig.timeouts.proofMs;
+    const abortController = new AbortController();
+    const timeoutId = setTimeout(() => {
+      // Only emit if not aborted by cancel/result completion
+      if (!abortController.signal.aborted) {
+        emit('error', new Error('timeout'));
+        abortController.abort();
+      }
+    }, timeoutMs!);
+
+    return {
+      id: 'stub',
+      status: 'pending',
+      result: async () => {
+        try {
+          return { ok: false, reason: 'SELF_ERR_PROOF_STUB' };
+        } finally {
+          clearTimeout(timeoutId);
+          abortController.abort();
+        }
+      },
+      cancel: () => {
+        clearTimeout(timeoutId);
+        abortController.abort();
+      },
+    };
packages/mobile-sdk-alpha/src/types/ui.ts (1)

13-20: Define missing commitment types & tighten documentType union

The TypeScript definitions for IdentityCommitment and DSCKeyCommitment were not found in the repo, yet our guidelines mandate their presence alongside VerificationConfig. Additionally, DocumentMetadata.documentType remains a plain string, weakening exhaustiveness and PII-safety checks. Please:

  • Update packages/mobile-sdk-alpha/src/types/ui.ts:
       export interface DocumentMetadata {
         id: string;
    -    documentType: string;
    +    documentType: 'passport' | 'eu_id_card';
         documentCategory: DocumentCategory;
         encryptedBlobRef?: string; // opaque pointer; no plaintext PII
         mock: boolean;
         isRegistered?: boolean;
       }
  • Add (or import) these interfaces in your TS codebase under src/types/ (or another shared types module):
    export interface IdentityCommitment {
      commitment: PoseidonHash;
      nullifier: DomainSeparatedNullifier;
      timestamp: number;         // UTC seconds
      version: number;           // circuit version
      documentType: 'passport' | 'eu_id_card';
    }
    
    export interface DSCKeyCommitment {
      keyCommitment: PoseidonHash;
      domain: string;            // domain separator
      timestamp: number;         // UTC seconds
      version: number;
    }
  • You already have VerificationConfig defined in core/src/types/types.ts. Ensure it continues to align with your platform’s requirements.

These changes enforce stricter typing, guard against missing cases in downstream logic (e.g., NFC vs. EU ID flows), and satisfy our security and PII-handling guidelines.

packages/mobile-sdk-alpha/src/bridge/nativeEvents.ts (1)

12-16: Native event bridge is a no-op — listeners are never attached or removed

addListener returns an unsubscribe that calls removeListener, but removeListener is empty. This can silently break event-driven features relying on native bridges and make debugging painful.

Two minimal options:

  • Implement a basic in-memory registry to attach/detach handlers so feature work can proceed in alpha without platform code.
  • If this is intended only for tests, gate it behind a compile-time flag and log a clear warning.

Example in-memory implementation:

+const registry = new Map<string, Set<EventHandler>>();
+
 export const addListener: NativeEventBridge['addListener'] = (moduleName, eventName, handler) => () =>
-  removeListener(moduleName, eventName, handler);
+  removeListener(moduleName, eventName, handler);
 
-export const removeListener: NativeEventBridge['removeListener'] = () => {};
+export const removeListener: NativeEventBridge['removeListener'] = (moduleName, eventName, handler) => {
+  const key = `${moduleName}:${eventName}`;
+  const set = registry.get(key);
+  if (set) {
+    set.delete(handler);
+    if (set.size === 0) registry.delete(key);
+  }
+};

And wherever native side emits, consult registry to invoke handlers (or wire to NativeEventEmitter in RN).

packages/mobile-sdk-alpha/src/config/defaults.ts (1)

5-10: Missing or incomplete type definitions for IdentityCommitment and DSCKeyCommitment; VerificationConfig fields don’t match spec

Our search shows that there is no exported IdentityCommitment or DSCKeyCommitment type in the SDK, and the existing VerificationConfig in sdk/core/src/types/types.ts only declares minimumAge and excludedCountries—far from the required fields. Without these types, downstream code will drift and break.

Please add or update these definitions (for example in sdk/core/src/types/types.ts or packages/mobile-sdk-alpha/src/types/public.ts):

  • export interface IdentityCommitment

    • commitment: string (Poseidon hash)
    • nullifier: string (domain-separated)
    • timestamp: number (UTC seconds)
    • version: string (circuit semver)
    • documentType: 'passport' | 'eu_id_card'
  • export interface DSCKeyCommitment

    • publicKeyHash: string (Poseidon hash)
    • certificateChain: string[] (hashes)
    • revocationStatus: boolean
    • issuer: string (3-letter country code)
  • export type VerificationConfig

    • circuitVersion: string (semver)
    • complianceRules: string[]
    • timeWindow: number (seconds, max 86400)
    • clockDrift: number (±300 seconds)
    • trustAnchors: string[]
    • revocationRoots: string[]
    • timeSource: "NTP"
    • nullifierScope: string

After defining these, update the default config in packages/mobile-sdk-alpha/src/config/defaults.ts (or corresponding defaults file) to provide sane initial values, and add or extend tests to cover these shapes.

packages/mobile-sdk-alpha/scripts/report-exports.mjs (1)

13-18: Bug: .split('\s+as\s+') is a string split, not a regex; alias parsing will fail.
This will not split on whitespace/as and breaks when encountering re-exports with aliases.

Apply:

-    .map(s => s.split('\s+as\s+').pop())
+    .map(s => s.split(/\s+as\s+/).pop())
packages/mobile-sdk-alpha/tests/setup.ts (1)

32-47: Type error in TS setup: vi is used without import.
In a TS setup file, vi isn’t guaranteed to be globally typed; this can fail type-checking. Import it explicitly.

-/**
- * Vitest setup file for mobile-sdk-alpha tests
- * Reduces console noise during testing
- */
+/**
+ * Vitest setup file for mobile-sdk-alpha tests
+ * Reduces console noise during testing
+ */
+import { vi } from 'vitest';
packages/mobile-sdk-alpha/src/nfc/index.ts (2)

6-17: Expose NFC types and parsing functions at the package entrypoint

To maintain API parity and simplify imports for consumers, re-export the NFC module from the root of the package.

  • File: packages/mobile-sdk-alpha/src/index.ts
    Add the following lines:
+ // NFC
+ export type { NFCScanOptions, DG1, DG2, ParsedNFCResponse } from './nfc';
+ export { parseNFCResponse } from './nfc';

1-26: Missing IdentityCommitment & DSCKeyCommitment TS types

We verified that a VerificationConfig type already exists in your TypeScript SDK (see sdk/core/src/types/types.ts), but neither IdentityCommitment nor DSCKeyCommitment are defined anywhere in the TS codebase. To align with our technical spec and ensure consistency:

• Define the missing types in your shared types module, matching the spec:
– IdentityCommitment: { commitment: bigint; nullifier: bigint; timestamp: number; version: string; documentType: 'passport' | 'eu_id_card'; }
– DSCKeyCommitment: { publicKeyHash: bigint; certificateChain: bigint[]; revocationStatus: boolean; issuer: string; }
• Re-export those new types (alongside the existing VerificationConfig) from your SDK entry point (e.g. packages/mobile-sdk-alpha/src/index.ts or your root index.ts) so consumers can import them uniformly.

Locations for reference:

  • Existing VerificationConfig: sdk/core/src/types/types.ts
  • NFC index file that currently re-exports only DG1/DG2/ParsedNFCResponse: packages/mobile-sdk-alpha/src/nfc/index.ts

Please add the two missing type definitions and update your exports to avoid any downstream confusion.

🧹 Nitpick comments (14)
packages/mobile-sdk-alpha/src/browser.ts (1)

1-2: Normalize SPDX headers across the repository

Our grep scan shows metadata is still appended on the same line as the SPDX identifier in hundreds of files (e.g. packages/mobile-sdk-alpha/src/browser.ts, scripts/check-license-headers.mjs, app/src/…)—which can break SPDX parsers, header-check tooling, and potentially violate max-len lint rules. To keep license headers both machine- and human-friendly, split the SPDX identifier from file metadata:

Suggested update (example for browser.ts):

- // SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
+ // SPDX-License-Identifier: BUSL-1.1
+ // SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc.
+ // License: BUSL-1.1 (see LICENSE); Apache-2.0 starting 2029-06-11

Next steps:

  • Automate header normalization across all affected files (consider a simple codemod or shell script).
  • Enhance scripts/check-license-headers.* to enforce “SPDX-License-Identifier” as a standalone line.
  • Optionally add a lint rule or pre-commit hook to catch regressions early.

Thanks for tackling this cleanup—your license headers will be parser-perfect in no time!

packages/mobile-sdk-alpha/src/types/public.ts (1)

1-2: SPDX header should be machine-parseable and consistent across files

Place the SPDX identifier on a dedicated line and move copyright/change-license notes to subsequent lines to keep scanners happy and avoid ESLint max-len violations.

Apply this diff:

-// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
+// SPDX-License-Identifier: BUSL-1.1
+// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc.
+// License: BUSL-1.1 (see LICENSE); Apache-2.0 starting 2029-06-11
packages/mobile-sdk-alpha/tests/validation/document.test.ts (1)

1-2: Make test file headers SPDX-friendly; avoid semicolon-chaining after the identifier

Same rationale as source files: keep the SPDX identifier on a dedicated line for tool compatibility. Tests can be scanned/published too, so consistency matters.

Apply this diff:

-// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
+// SPDX-License-Identifier: BUSL-1.1
+// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc.
+// License: BUSL-1.1 (see LICENSE); Apache-2.0 starting 2029-06-11
packages/mobile-sdk-alpha/src/components/SelfMobileSdk.tsx (2)

1-2: SPDX header formatting: put the identifier on its own line to satisfy scanners and linters

Avoid chaining additional clauses after the SPDX line.

Apply this diff:

-// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
+// SPDX-License-Identifier: BUSL-1.1
+// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc.
+// License: BUSL-1.1 (see LICENSE); Apache-2.0 starting 2029-06-11

48-55: Remove unused prop pass-through: setDocument is not consumed by OnboardingFlow

OnboardingFlow does not use setDocument. Passing it causes unnecessary prop changes and potential re-renders, and expands the surface area for no benefit.

Apply this diff here:

       <OnboardingFlow
         external={external}
-        setDocument={external.setDocument}
         PassportCamera={customScreens.PassportCamera}
         NFCScanner={customScreens.NFCScanner}
       />

And adjust OnboardingFlow’s props accordingly (see suggested diff in OnboardingFlow.tsx).

packages/mobile-sdk-alpha/src/components/flows/OnboardingFlow.tsx (2)

1-2: Standardize SPDX header formatting for tooling compatibility

Same change: keep SPDX identifier on a dedicated line and move other metadata to following lines.

Apply this diff:

-// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
+// SPDX-License-Identifier: BUSL-1.1
+// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc.
+// License: BUSL-1.1 (see LICENSE); Apache-2.0 starting 2029-06-11

12-17: Prune unused prop and dependency: setDocument is declared and placed in deps but never used

This is dead API that can trigger avoidable rerenders (due to changing function identity) and complicates the surface without benefit. The registration flow uses client.registerDocument directly.

Apply this diff:

 interface OnboardingFlowProps {
   external: ExternalAdapter;
-  setDocument: (doc: DocumentData, documentId: string) => Promise<boolean>;
   PassportCamera?: ComponentType<PassportCameraProps>;
   NFCScanner?: ComponentType<ScreenProps>;
 }
 
-export const OnboardingFlow = ({ external, setDocument, PassportCamera, NFCScanner }: OnboardingFlowProps) => {
+export const OnboardingFlow = ({ external, PassportCamera, NFCScanner }: OnboardingFlowProps) => {
   const [mrzData, setMrzData] = useState<MRZInfo | null>(null);
   const client = useSelfClient();
 
   const handleMRZDetected = useCallback(
     async (mrzData: MRZInfo) => {
       try {
         const status = await client.registerDocument({
           scan: {
             mode: 'mrz',
             passportNumber: mrzData.passportNumber,
             dateOfBirth: mrzData.dateOfBirth,
             dateOfExpiry: mrzData.dateOfExpiry,
             issuingCountry: mrzData.issuingCountry,
           },
         });
 
         if (status.registered) {
           setMrzData(mrzData);
         } else {
           external.onOnboardingFailure(new Error('Registration failed'));
         }
       } catch (error) {
         external.onOnboardingFailure(error as Error);
       }
     },
-    [client, external, setDocument],
+    [client, external],
   );

Note: Remove the prop pass-through in SelfMobileSdk.tsx as well (see related comment there).

Also applies to: 19-20, 23-46

packages/mobile-sdk-alpha/src/qr/index.ts (1)

17-20: Public API currently always throws — consider gating as experimental or removing from stable exports.

Exposing a function that always throws risks runtime crashes in consuming apps. If this is intentionally not yet implemented, gate it behind an experimental/alpha entry point, or make it unmistakable at compile-time.

Option A (strong typing signal):

-export async function scanQRProof(_opts: QRProofOptions): Promise<ScanResult> {
+/** @alpha Not yet implemented; do not use in production. */
+export async function scanQRProof(_opts: QRProofOptions): Promise<never> {
   // Surface a consistent, typed error for unimplemented features
   throw notImplemented('scanQRProof');
}

Option B (packaging): export this from an experimental subpath (src/qr/experimental.ts) and omit it from the stable src/index.ts until implemented.

packages/mobile-sdk-alpha/scripts/report-exports.mjs (1)

6-13: Portability: prefer fileURLToPath over dist.pathname + path.join.
Mixing URL.pathname with path.join can misbehave on Windows (drive letters, leading slash). Convert the URL once and use the resulting path.

-import { join } from 'node:path';
+import { join } from 'node:path';
+import { fileURLToPath } from 'node:url';
 
-const dist = new URL('../dist/', import.meta.url);
-const files = await readdir(dist);
+const dist = new URL('../dist/', import.meta.url);
+const distPath = fileURLToPath(dist);
+const files = await readdir(distPath);
 const report = {};
 
 for (const f of files) {
   if (!f.endsWith('.js')) continue;
-  const src = await readFile(join(dist.pathname, f), 'utf8');
+  const src = await readFile(join(distPath, f), 'utf8');
packages/mobile-sdk-alpha/tests/setup.ts (1)

23-30: Optional: prefer globalThis over global for portability.
Keeps compatibility across Node, browsers, and RN JSI shims.

-if (typeof global !== 'undefined') {
-  (global as any).restoreConsole = () => {
+if (typeof globalThis !== 'undefined') {
+  (globalThis as any).restoreConsole = () => {
     console.warn = originalConsole.warn;
     console.error = originalConsole.error;
     console.log = originalConsole.log;
   };
 }
scripts/check-duplicate-headers.cjs (1)

42-47: Add heavier ignores to prevent slow scans in app workspaces.

Current ignore misses large trees like ios/Pods and android/build which can contain JS helpers. Tightening ignores improves runtime predictability in CI without losing coverage for source files.

Apply this diff:

-      .sync(pattern, {
-        cwd: targetDir,
-        ignore: ['node_modules/**', 'dist/**', 'build/**', '**/*.d.ts'],
-      })
+      .sync(pattern, {
+        cwd: targetDir,
+        ignore: [
+          'node_modules/**',
+          'dist/**',
+          'build/**',
+          '**/*.d.ts',
+          'ios/**',
+          'android/**',
+          '**/Pods/**',
+          'coverage/**',
+          '.next/**',
+          '.turbo/**',
+        ],
+      })
packages/mobile-sdk-alpha/src/nfc/index.ts (2)

1-1: Header string format: validate against centralized header-check regex.

The composite header “BUSL-1.1 …; Apache-2.0 from 2029-06-11” is fine semantically, but linters often match a strict regex. Confirm the root header-check script recognizes this single-line form and the “from YYYY-MM-DD” clause to avoid CI flakes.

If the linter expects a block banner, I can generate a repo-wide codemod to normalize headers.


23-26: Unimplemented API: consider stable error shape and guidance for integrators.

scanNFC throws notImplemented('scanNFC'). For partner apps, return a consistent, documented SdkError subclass (e.g., UnimplementedError) with an actionable message and optionally a docs URL to reduce support churn. This is especially important for a public SDK surface flagged as alpha.

-export async function scanNFC(_opts: NFCScanOptions): Promise<ScanResult> {
-  // Surface a consistent, typed error for unimplemented features
-  throw notImplemented('scanNFC');
-}
+export async function scanNFC(_opts: NFCScanOptions): Promise<ScanResult> {
+  // Keep a stable error code and a docs link for integrators
+  throw notImplemented('scanNFC', {
+    message: 'NFC scanning is not yet available in mobile-sdk-alpha.',
+    docs: 'https://docs.self.xyz/sdk/mobile/nfc#status',
+  });
+}
packages/mobile-sdk-alpha/src/errors/InitError.ts (1)

11-16: Centralize error codes to avoid drift and improve observability.

SELF_ERR_INIT is hardcoded here. Consider consolidating error codes in a shared enum or constants module used across the SDK so logs, metrics, and docs stay aligned.

-import { SdkError } from './SdkError';
+import { SdkError } from './SdkError';
+import { ErrorCode } from '../errors/codes';
@@
-    super(message, 'SELF_ERR_INIT', 'init', false, options);
+    super(message, ErrorCode.InitFailed, 'init', false, options);

Example (new file):

// packages/mobile-sdk-alpha/src/errors/codes.ts
export enum ErrorCode {
  InitFailed = 'SELF_ERR_INIT',
  // ...other codes
}
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d8bf5f9 and 189d64f.

📒 Files selected for processing (57)
  • app/package.json (1 hunks)
  • package.json (1 hunks)
  • packages/mobile-sdk-alpha/.eslintrc.cjs (1 hunks)
  • packages/mobile-sdk-alpha/scripts/postBuild.mjs (1 hunks)
  • packages/mobile-sdk-alpha/scripts/report-exports.mjs (1 hunks)
  • packages/mobile-sdk-alpha/scripts/shimConfigs.js (1 hunks)
  • packages/mobile-sdk-alpha/scripts/validate-exports.mjs (1 hunks)
  • packages/mobile-sdk-alpha/scripts/verify-conditions.mjs (1 hunks)
  • packages/mobile-sdk-alpha/src/adapters/index.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/adapters/web/shims.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/bridge/nativeEvents.native.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/bridge/nativeEvents.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/browser.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/client.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/components/SelfMobileSdk.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/flows/OnboardingFlow.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/screens/PassportCameraScreen.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/components/screens/QRCodeScreen.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/config/defaults.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/config/merge.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/context.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/entry/index.tsx (1 hunks)
  • packages/mobile-sdk-alpha/src/errors/InitError.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/errors/LivenessError.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/errors/MrzParseError.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/errors/NfcParseError.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/errors/SdkError.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/errors/index.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/hooks/useDocumentManager.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/index.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/mrz/index.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/nfc/index.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/processing/mrz.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/processing/nfc.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/qr/index.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/types/public.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/types/ui.ts (1 hunks)
  • packages/mobile-sdk-alpha/src/validation/document.ts (1 hunks)
  • packages/mobile-sdk-alpha/tests/SelfMobileSdk.test.tsx (1 hunks)
  • packages/mobile-sdk-alpha/tests/bridge/nativeEvents.test.ts (1 hunks)
  • packages/mobile-sdk-alpha/tests/client.test.ts (1 hunks)
  • packages/mobile-sdk-alpha/tests/client.test.tsx (1 hunks)
  • packages/mobile-sdk-alpha/tests/config.test.ts (1 hunks)
  • packages/mobile-sdk-alpha/tests/entry.test.tsx (1 hunks)
  • packages/mobile-sdk-alpha/tests/errors.test.ts (1 hunks)
  • packages/mobile-sdk-alpha/tests/processing/mrz.test.ts (1 hunks)
  • packages/mobile-sdk-alpha/tests/processing/nfc.test.ts (1 hunks)
  • packages/mobile-sdk-alpha/tests/provider.test.tsx (1 hunks)
  • packages/mobile-sdk-alpha/tests/setup.ts (1 hunks)
  • packages/mobile-sdk-alpha/tests/utils/testHelpers.ts (1 hunks)
  • packages/mobile-sdk-alpha/tests/validation/document.test.ts (1 hunks)
  • packages/mobile-sdk-alpha/tests/webShim.test.ts (1 hunks)
  • packages/mobile-sdk-alpha/tsup.config.ts (1 hunks)
  • packages/mobile-sdk-alpha/vitest.config.ts (1 hunks)
  • scripts/check-duplicate-headers.cjs (2 hunks)
  • scripts/check-license-headers.mjs (1 hunks)
🧰 Additional context used
📓 Path-based instructions (10)
packages/mobile-sdk-alpha/src/processing/**

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

Place MRZ processing helpers in packages/mobile-sdk-alpha/src/processing/

Files:

  • packages/mobile-sdk-alpha/src/processing/nfc.ts
  • packages/mobile-sdk-alpha/src/processing/mrz.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/technical-specification.mdc)

**/*.{ts,tsx}: Define IdentityCommitment with fields: commitment (Poseidon hash), nullifier (domain-separated), timestamp (UTC number), version (circuit version), documentType ('passport' | 'eu_id_card')
Define DSCKeyCommitment with fields: publicKeyHash (Poseidon hash), certificateChain (hashes), revocationStatus (boolean), issuer (country code)
Define VerificationConfig with fields: circuitVersion (semver), complianceRules array, timeWindow (seconds, 24h), clockDrift (±5 min), trustAnchors, revocationRoots, timeSource (NTP), nullifierScope (domain separation)

Files:

  • packages/mobile-sdk-alpha/src/processing/nfc.ts
  • packages/mobile-sdk-alpha/src/components/screens/PassportCameraScreen.tsx
  • packages/mobile-sdk-alpha/src/client.ts
  • packages/mobile-sdk-alpha/src/types/public.ts
  • packages/mobile-sdk-alpha/src/adapters/web/shims.ts
  • packages/mobile-sdk-alpha/tests/processing/nfc.test.ts
  • packages/mobile-sdk-alpha/tests/config.test.ts
  • packages/mobile-sdk-alpha/vitest.config.ts
  • packages/mobile-sdk-alpha/tests/bridge/nativeEvents.test.ts
  • packages/mobile-sdk-alpha/tests/client.test.tsx
  • packages/mobile-sdk-alpha/src/bridge/nativeEvents.native.ts
  • packages/mobile-sdk-alpha/src/types/ui.ts
  • packages/mobile-sdk-alpha/src/config/merge.ts
  • packages/mobile-sdk-alpha/tests/errors.test.ts
  • packages/mobile-sdk-alpha/src/errors/InitError.ts
  • packages/mobile-sdk-alpha/src/components/SelfMobileSdk.tsx
  • packages/mobile-sdk-alpha/tests/SelfMobileSdk.test.tsx
  • packages/mobile-sdk-alpha/src/hooks/useDocumentManager.ts
  • packages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsx
  • packages/mobile-sdk-alpha/src/mrz/index.ts
  • packages/mobile-sdk-alpha/tsup.config.ts
  • packages/mobile-sdk-alpha/src/entry/index.tsx
  • packages/mobile-sdk-alpha/src/errors/LivenessError.ts
  • packages/mobile-sdk-alpha/src/context.tsx
  • packages/mobile-sdk-alpha/src/processing/mrz.ts
  • packages/mobile-sdk-alpha/tests/webShim.test.ts
  • packages/mobile-sdk-alpha/tests/processing/mrz.test.ts
  • packages/mobile-sdk-alpha/src/browser.ts
  • packages/mobile-sdk-alpha/src/config/defaults.ts
  • packages/mobile-sdk-alpha/tests/utils/testHelpers.ts
  • packages/mobile-sdk-alpha/src/index.ts
  • packages/mobile-sdk-alpha/src/components/flows/OnboardingFlow.tsx
  • packages/mobile-sdk-alpha/src/errors/SdkError.ts
  • packages/mobile-sdk-alpha/src/bridge/nativeEvents.ts
  • packages/mobile-sdk-alpha/src/errors/MrzParseError.ts
  • packages/mobile-sdk-alpha/src/nfc/index.ts
  • packages/mobile-sdk-alpha/tests/client.test.ts
  • packages/mobile-sdk-alpha/src/qr/index.ts
  • packages/mobile-sdk-alpha/tests/entry.test.tsx
  • packages/mobile-sdk-alpha/src/components/screens/QRCodeScreen.tsx
  • packages/mobile-sdk-alpha/tests/validation/document.test.ts
  • packages/mobile-sdk-alpha/src/errors/index.ts
  • packages/mobile-sdk-alpha/tests/setup.ts
  • packages/mobile-sdk-alpha/src/errors/NfcParseError.ts
  • packages/mobile-sdk-alpha/src/validation/document.ts
  • packages/mobile-sdk-alpha/src/adapters/index.ts
  • packages/mobile-sdk-alpha/tests/provider.test.tsx
packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

packages/mobile-sdk-alpha/**/*.{ts,tsx,js,jsx}: Review alpha mobile SDK code for:

  • API consistency with core SDK
  • Platform-neutral abstractions
  • Performance considerations
  • Clear experimental notes or TODOs

Files:

  • packages/mobile-sdk-alpha/src/processing/nfc.ts
  • packages/mobile-sdk-alpha/src/components/screens/PassportCameraScreen.tsx
  • packages/mobile-sdk-alpha/src/client.ts
  • packages/mobile-sdk-alpha/src/types/public.ts
  • packages/mobile-sdk-alpha/src/adapters/web/shims.ts
  • packages/mobile-sdk-alpha/tests/processing/nfc.test.ts
  • packages/mobile-sdk-alpha/tests/config.test.ts
  • packages/mobile-sdk-alpha/vitest.config.ts
  • packages/mobile-sdk-alpha/tests/bridge/nativeEvents.test.ts
  • packages/mobile-sdk-alpha/tests/client.test.tsx
  • packages/mobile-sdk-alpha/src/bridge/nativeEvents.native.ts
  • packages/mobile-sdk-alpha/src/types/ui.ts
  • packages/mobile-sdk-alpha/src/config/merge.ts
  • packages/mobile-sdk-alpha/tests/errors.test.ts
  • packages/mobile-sdk-alpha/src/errors/InitError.ts
  • packages/mobile-sdk-alpha/src/components/SelfMobileSdk.tsx
  • packages/mobile-sdk-alpha/tests/SelfMobileSdk.test.tsx
  • packages/mobile-sdk-alpha/src/hooks/useDocumentManager.ts
  • packages/mobile-sdk-alpha/scripts/shimConfigs.js
  • packages/mobile-sdk-alpha/src/components/screens/NFCScannerScreen.tsx
  • packages/mobile-sdk-alpha/src/mrz/index.ts
  • packages/mobile-sdk-alpha/tsup.config.ts
  • packages/mobile-sdk-alpha/src/entry/index.tsx
  • packages/mobile-sdk-alpha/src/errors/LivenessError.ts
  • packages/mobile-sdk-alpha/src/context.tsx
  • packages/mobile-sdk-alpha/src/processing/mrz.ts
  • packages/mobile-sdk-alpha/tests/webShim.test.ts
  • packages/mobile-sdk-alpha/tests/processing/mrz.test.ts
  • packages/mobile-sdk-alpha/src/browser.ts
  • packages/mobile-sdk-alpha/src/config/defaults.ts
  • packages/mobile-sdk-alpha/tests/utils/testHelpers.ts
  • packages/mobile-sdk-alpha/src/index.ts
  • packages/mobile-sdk-alpha/src/components/flows/OnboardingFlow.tsx
  • packages/mobile-sdk-alpha/src/errors/SdkError.ts
  • packages/mobile-sdk-alpha/src/bridge/nativeEvents.ts
  • packages/mobile-sdk-alpha/src/errors/MrzParseError.ts
  • packages/mobile-sdk-alpha/src/nfc/index.ts
  • packages/mobile-sdk-alpha/tests/client.test.ts
  • packages/mobile-sdk-alpha/src/qr/index.ts
  • packages/mobile-sdk-alpha/tests/entry.test.tsx
  • packages/mobile-sdk-alpha/src/components/screens/QRCodeScreen.tsx
  • packages/mobile-sdk-alpha/tests/validation/document.test.ts
  • packages/mobile-sdk-alpha/src/errors/index.ts
  • packages/mobile-sdk-alpha/tests/setup.ts
  • packages/mobile-sdk-alpha/src/errors/NfcParseError.ts
  • packages/mobile-sdk-alpha/src/validation/document.ts
  • packages/mobile-sdk-alpha/src/adapters/index.ts
  • packages/mobile-sdk-alpha/tests/provider.test.tsx
**/*.{test,spec}.{ts,js,tsx,jsx}

⚙️ CodeRabbit configuration file

**/*.{test,spec}.{ts,js,tsx,jsx}: Review test files for:

  • Test coverage completeness
  • Test case quality and edge cases
  • Mock usage appropriateness
  • Test readability and maintainability

Files:

  • packages/mobile-sdk-alpha/tests/processing/nfc.test.ts
  • packages/mobile-sdk-alpha/tests/config.test.ts
  • packages/mobile-sdk-alpha/tests/bridge/nativeEvents.test.ts
  • packages/mobile-sdk-alpha/tests/client.test.tsx
  • packages/mobile-sdk-alpha/tests/errors.test.ts
  • packages/mobile-sdk-alpha/tests/SelfMobileSdk.test.tsx
  • packages/mobile-sdk-alpha/tests/webShim.test.ts
  • packages/mobile-sdk-alpha/tests/processing/mrz.test.ts
  • packages/mobile-sdk-alpha/tests/client.test.ts
  • packages/mobile-sdk-alpha/tests/entry.test.tsx
  • packages/mobile-sdk-alpha/tests/validation/document.test.ts
  • packages/mobile-sdk-alpha/tests/provider.test.tsx
packages/mobile-sdk-alpha/vitest.config.ts

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

Use Vitest in the SDK with a Node environment configured in packages/mobile-sdk-alpha/vitest.config.ts

Files:

  • packages/mobile-sdk-alpha/vitest.config.ts
packages/mobile-sdk-alpha/src/index.ts

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

Re-export new SDK modules via packages/mobile-sdk-alpha/src/index.ts

Files:

  • packages/mobile-sdk-alpha/src/index.ts
packages/mobile-sdk-alpha/tests/setup.ts

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

Provide Vitest setup file at packages/mobile-sdk-alpha/tests/setup.ts to suppress console noise

Files:

  • packages/mobile-sdk-alpha/tests/setup.ts
packages/mobile-sdk-alpha/src/validation/**

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

Place document validation logic in packages/mobile-sdk-alpha/src/validation/

Files:

  • packages/mobile-sdk-alpha/src/validation/document.ts
package.json

📄 CodeRabbit inference engine (.cursor/rules/technical-specification.mdc)

Distribute the SDK via npm/yarn with proper package metadata

Files:

  • package.json
app/package.json

📄 CodeRabbit inference engine (.cursor/rules/mobile-sdk-migration.mdc)

Expose a 'test:build' script in the app's package.json that builds deps, types, performs bundle analysis, and runs tests

Files:

  • app/package.json
🧠 Learnings (19)
📓 Common learnings
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.799Z
Learning: Applies to packages/mobile-sdk-alpha/README.md : Document new/updated SDK modules and usage in packages/mobile-sdk-alpha/README.md
📚 Learning: 2025-08-24T18:54:04.799Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.799Z
Learning: Applies to packages/mobile-sdk-alpha/src/index.ts : Re-export new SDK modules via packages/mobile-sdk-alpha/src/index.ts

Applied to files:

  • packages/mobile-sdk-alpha/src/client.ts
  • packages/mobile-sdk-alpha/scripts/report-exports.mjs
  • packages/mobile-sdk-alpha/src/types/public.ts
  • packages/mobile-sdk-alpha/src/adapters/web/shims.ts
  • packages/mobile-sdk-alpha/tests/config.test.ts
  • packages/mobile-sdk-alpha/vitest.config.ts
  • packages/mobile-sdk-alpha/tests/bridge/nativeEvents.test.ts
  • packages/mobile-sdk-alpha/tests/client.test.tsx
  • packages/mobile-sdk-alpha/src/bridge/nativeEvents.native.ts
  • packages/mobile-sdk-alpha/src/types/ui.ts
  • packages/mobile-sdk-alpha/src/config/merge.ts
  • packages/mobile-sdk-alpha/tests/errors.test.ts
  • packages/mobile-sdk-alpha/src/errors/InitError.ts
  • packages/mobile-sdk-alpha/src/components/SelfMobileSdk.tsx
  • packages/mobile-sdk-alpha/tests/SelfMobileSdk.test.tsx
  • packages/mobile-sdk-alpha/src/hooks/useDocumentManager.ts
  • packages/mobile-sdk-alpha/scripts/shimConfigs.js
  • packages/mobile-sdk-alpha/src/mrz/index.ts
  • packages/mobile-sdk-alpha/tsup.config.ts
  • packages/mobile-sdk-alpha/src/entry/index.tsx
  • packages/mobile-sdk-alpha/scripts/validate-exports.mjs
  • packages/mobile-sdk-alpha/src/context.tsx
  • packages/mobile-sdk-alpha/src/processing/mrz.ts
  • packages/mobile-sdk-alpha/tests/webShim.test.ts
  • packages/mobile-sdk-alpha/tests/processing/mrz.test.ts
  • packages/mobile-sdk-alpha/src/browser.ts
  • packages/mobile-sdk-alpha/src/config/defaults.ts
  • packages/mobile-sdk-alpha/tests/utils/testHelpers.ts
  • packages/mobile-sdk-alpha/src/index.ts
  • packages/mobile-sdk-alpha/src/components/flows/OnboardingFlow.tsx
  • packages/mobile-sdk-alpha/src/errors/SdkError.ts
  • packages/mobile-sdk-alpha/src/bridge/nativeEvents.ts
  • packages/mobile-sdk-alpha/.eslintrc.cjs
  • packages/mobile-sdk-alpha/src/nfc/index.ts
  • packages/mobile-sdk-alpha/tests/client.test.ts
  • packages/mobile-sdk-alpha/src/qr/index.ts
  • packages/mobile-sdk-alpha/tests/entry.test.tsx
  • packages/mobile-sdk-alpha/src/components/screens/QRCodeScreen.tsx
  • packages/mobile-sdk-alpha/tests/validation/document.test.ts
  • packages/mobile-sdk-alpha/src/errors/index.ts
  • packages/mobile-sdk-alpha/tests/setup.ts
  • packages/mobile-sdk-alpha/src/adapters/index.ts
  • packages/mobile-sdk-alpha/tests/provider.test.tsx
  • packages/mobile-sdk-alpha/scripts/postBuild.mjs
📚 Learning: 2025-08-24T18:54:04.799Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.799Z
Learning: Applies to packages/mobile-sdk-alpha/README.md : Document new/updated SDK modules and usage in packages/mobile-sdk-alpha/README.md

Applied to files:

  • packages/mobile-sdk-alpha/src/client.ts
  • packages/mobile-sdk-alpha/src/types/public.ts
  • packages/mobile-sdk-alpha/src/adapters/web/shims.ts
  • packages/mobile-sdk-alpha/tests/client.test.tsx
  • packages/mobile-sdk-alpha/src/types/ui.ts
  • packages/mobile-sdk-alpha/src/config/merge.ts
  • packages/mobile-sdk-alpha/src/components/SelfMobileSdk.tsx
  • packages/mobile-sdk-alpha/src/hooks/useDocumentManager.ts
  • packages/mobile-sdk-alpha/src/mrz/index.ts
  • packages/mobile-sdk-alpha/src/entry/index.tsx
  • packages/mobile-sdk-alpha/src/context.tsx
  • packages/mobile-sdk-alpha/src/browser.ts
  • packages/mobile-sdk-alpha/tests/utils/testHelpers.ts
  • packages/mobile-sdk-alpha/src/index.ts
  • packages/mobile-sdk-alpha/src/errors/SdkError.ts
  • packages/mobile-sdk-alpha/src/bridge/nativeEvents.ts
  • packages/mobile-sdk-alpha/.eslintrc.cjs
  • packages/mobile-sdk-alpha/tests/client.test.ts
  • packages/mobile-sdk-alpha/scripts/verify-conditions.mjs
  • packages/mobile-sdk-alpha/tests/validation/document.test.ts
  • packages/mobile-sdk-alpha/src/errors/index.ts
  • packages/mobile-sdk-alpha/src/adapters/index.ts
  • package.json
📚 Learning: 2025-08-25T14:25:57.541Z
Learnt from: aaronmgdr
PR: selfxyz/self#951
File: app/src/providers/authProvider.web.tsx:17-18
Timestamp: 2025-08-25T14:25:57.541Z
Learning: The selfxyz/mobile-sdk-alpha/constants/analytics import path is properly configured with SDK exports, Metro aliases, and TypeScript resolution. Import changes from @/consts/analytics to this path are part of valid analytics migration, not TypeScript resolution issues.

Applied to files:

  • packages/mobile-sdk-alpha/src/client.ts
  • packages/mobile-sdk-alpha/src/types/public.ts
  • packages/mobile-sdk-alpha/src/adapters/web/shims.ts
  • packages/mobile-sdk-alpha/tests/client.test.tsx
  • packages/mobile-sdk-alpha/src/config/merge.ts
  • packages/mobile-sdk-alpha/src/components/SelfMobileSdk.tsx
  • packages/mobile-sdk-alpha/tests/SelfMobileSdk.test.tsx
  • packages/mobile-sdk-alpha/src/mrz/index.ts
  • packages/mobile-sdk-alpha/src/entry/index.tsx
  • packages/mobile-sdk-alpha/src/context.tsx
  • packages/mobile-sdk-alpha/tests/webShim.test.ts
  • packages/mobile-sdk-alpha/src/index.ts
  • packages/mobile-sdk-alpha/src/bridge/nativeEvents.ts
  • packages/mobile-sdk-alpha/.eslintrc.cjs
  • packages/mobile-sdk-alpha/tests/client.test.ts
  • packages/mobile-sdk-alpha/src/errors/index.ts
  • packages/mobile-sdk-alpha/src/adapters/index.ts
📚 Learning: 2025-08-24T18:54:04.799Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.799Z
Learning: Applies to packages/mobile-sdk-alpha/tests/setup.ts : Provide Vitest setup file at packages/mobile-sdk-alpha/tests/setup.ts to suppress console noise

Applied to files:

  • packages/mobile-sdk-alpha/src/types/public.ts
  • packages/mobile-sdk-alpha/tests/processing/nfc.test.ts
  • packages/mobile-sdk-alpha/tests/config.test.ts
  • packages/mobile-sdk-alpha/vitest.config.ts
  • packages/mobile-sdk-alpha/tests/bridge/nativeEvents.test.ts
  • packages/mobile-sdk-alpha/tests/client.test.tsx
  • packages/mobile-sdk-alpha/tests/errors.test.ts
  • packages/mobile-sdk-alpha/tests/SelfMobileSdk.test.tsx
  • packages/mobile-sdk-alpha/tsup.config.ts
  • packages/mobile-sdk-alpha/src/entry/index.tsx
  • packages/mobile-sdk-alpha/tests/webShim.test.ts
  • packages/mobile-sdk-alpha/src/browser.ts
  • packages/mobile-sdk-alpha/tests/utils/testHelpers.ts
  • packages/mobile-sdk-alpha/tests/client.test.ts
  • packages/mobile-sdk-alpha/tests/entry.test.tsx
  • packages/mobile-sdk-alpha/tests/validation/document.test.ts
  • packages/mobile-sdk-alpha/tests/setup.ts
  • packages/mobile-sdk-alpha/tests/provider.test.tsx
📚 Learning: 2025-08-24T18:54:04.799Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.799Z
Learning: Applies to packages/mobile-sdk-alpha/package.json : Enable tree shaking for the SDK (e.g., ensure 'sideEffects' is correctly set in package.json and exports are ESM-friendly)

Applied to files:

  • packages/mobile-sdk-alpha/src/adapters/web/shims.ts
  • packages/mobile-sdk-alpha/tests/client.test.tsx
  • packages/mobile-sdk-alpha/tests/SelfMobileSdk.test.tsx
  • packages/mobile-sdk-alpha/scripts/shimConfigs.js
  • packages/mobile-sdk-alpha/src/entry/index.tsx
  • packages/mobile-sdk-alpha/scripts/validate-exports.mjs
  • packages/mobile-sdk-alpha/tests/webShim.test.ts
  • packages/mobile-sdk-alpha/tests/utils/testHelpers.ts
  • packages/mobile-sdk-alpha/src/index.ts
  • packages/mobile-sdk-alpha/.eslintrc.cjs
  • package.json
  • packages/mobile-sdk-alpha/scripts/postBuild.mjs
📚 Learning: 2025-08-24T18:54:04.799Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.799Z
Learning: Applies to packages/mobile-sdk-alpha/vitest.config.ts : Use Vitest in the SDK with a Node environment configured in packages/mobile-sdk-alpha/vitest.config.ts

Applied to files:

  • packages/mobile-sdk-alpha/tests/config.test.ts
  • packages/mobile-sdk-alpha/vitest.config.ts
  • packages/mobile-sdk-alpha/tests/client.test.tsx
  • packages/mobile-sdk-alpha/tests/SelfMobileSdk.test.tsx
  • packages/mobile-sdk-alpha/tests/client.test.ts
  • packages/mobile-sdk-alpha/tests/setup.ts
📚 Learning: 2025-08-24T18:54:04.799Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.799Z
Learning: Applies to packages/mobile-sdk-alpha/package.json : Expose a 'test:build' script in the SDK's package.json that runs build, test, types, and lint

Applied to files:

  • packages/mobile-sdk-alpha/tests/client.test.tsx
  • packages/mobile-sdk-alpha/tests/utils/testHelpers.ts
  • packages/mobile-sdk-alpha/tests/client.test.ts
  • packages/mobile-sdk-alpha/tests/setup.ts
  • package.json
  • packages/mobile-sdk-alpha/scripts/postBuild.mjs
  • app/package.json
📚 Learning: 2025-08-24T18:52:25.765Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.765Z
Learning: Applies to contracts/contracts/IdentityVerificationHubImplV2.sol : Identity Verification Hub: manage multi-step verification for passports and EU ID cards, handle document attestation via ZK proofs, and implement E-PASSPORT and EU_ID_CARD paths in IdentityVerificationHubImplV2.sol

Applied to files:

  • packages/mobile-sdk-alpha/src/types/ui.ts
📚 Learning: 2025-08-24T18:55:07.911Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/technical-specification.mdc:0-0
Timestamp: 2025-08-24T18:55:07.911Z
Learning: Passport verification workflow: NFC data extraction → MRZ validation → DSC verification → Register proof → compliance via ZK → attestation

Applied to files:

  • packages/mobile-sdk-alpha/src/types/ui.ts
📚 Learning: 2025-08-24T18:55:07.911Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/technical-specification.mdc:0-0
Timestamp: 2025-08-24T18:55:07.911Z
Learning: Applies to **/*.{ts,tsx} : Define IdentityCommitment with fields: commitment (Poseidon hash), nullifier (domain-separated), timestamp (UTC number), version (circuit version), documentType ('passport' | 'eu_id_card')

Applied to files:

  • packages/mobile-sdk-alpha/src/types/ui.ts
📚 Learning: 2025-08-24T18:54:04.799Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.799Z
Learning: Applies to packages/mobile-sdk-alpha/src/processing/** : Place MRZ processing helpers in packages/mobile-sdk-alpha/src/processing/

Applied to files:

  • packages/mobile-sdk-alpha/src/mrz/index.ts
  • packages/mobile-sdk-alpha/src/processing/mrz.ts
  • packages/mobile-sdk-alpha/tests/processing/mrz.test.ts
📚 Learning: 2025-08-24T18:54:04.799Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.799Z
Learning: Applies to packages/mobile-sdk-alpha/demo/** : Provide an in-SDK lightweight React Native demo under packages/mobile-sdk-alpha/demo/

Applied to files:

  • packages/mobile-sdk-alpha/src/entry/index.tsx
📚 Learning: 2025-08-24T18:54:04.799Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.799Z
Learning: Applies to packages/mobile-sdk-alpha/src/crypto/** : Place crypto adapters and utilities in packages/mobile-sdk-alpha/src/crypto/

Applied to files:

  • packages/mobile-sdk-alpha/tests/utils/testHelpers.ts
  • packages/mobile-sdk-alpha/src/adapters/index.ts
📚 Learning: 2025-08-24T18:54:04.799Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.799Z
Learning: Applies to packages/mobile-sdk-alpha/src/validation/** : Place document validation logic in packages/mobile-sdk-alpha/src/validation/

Applied to files:

  • packages/mobile-sdk-alpha/tests/validation/document.test.ts
  • packages/mobile-sdk-alpha/src/validation/document.ts
📚 Learning: 2025-08-24T18:52:25.765Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.765Z
Learning: Applies to tests/src/**/*.{test,spec}.{ts,tsx,js,jsx} : Mock console.error in tests to avoid noisy output

Applied to files:

  • packages/mobile-sdk-alpha/tests/setup.ts
📚 Learning: 2025-08-24T18:55:07.911Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/technical-specification.mdc:0-0
Timestamp: 2025-08-24T18:55:07.911Z
Learning: Applies to package.json : Distribute the SDK via npm/yarn with proper package metadata

Applied to files:

  • package.json
📚 Learning: 2025-08-24T18:52:25.766Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.766Z
Learning: Use yarn scripts: yarn ios/android for builds, yarn test for unit tests, and Fastlane for deployments

Applied to files:

  • package.json
  • app/package.json
📚 Learning: 2025-08-24T18:54:04.799Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/mobile-sdk-migration.mdc:0-0
Timestamp: 2025-08-24T18:54:04.799Z
Learning: Applies to app/package.json : Expose a 'test:build' script in the app's package.json that builds deps, types, performs bundle analysis, and runs tests

Applied to files:

  • package.json
  • app/package.json
🧬 Code graph analysis (7)
packages/mobile-sdk-alpha/src/mrz/index.ts (1)
app/src/utils/cameraScanner.ts (1)
  • mrzInfo (35-56)
packages/mobile-sdk-alpha/src/bridge/nativeEvents.ts (1)
app/src/screens/MainScreen.tsx (1)
  • handleNativeEvent (127-139)
packages/mobile-sdk-alpha/src/errors/MrzParseError.ts (1)
app/src/utils/cameraScanner.ts (1)
  • mrzInfo (35-56)
packages/mobile-sdk-alpha/src/nfc/index.ts (1)
app/src/screens/MainScreen.tsx (1)
  • Platform (106-115)
packages/mobile-sdk-alpha/src/components/screens/QRCodeScreen.tsx (1)
app/src/screens/AppScreen.tsx (1)
  • useUserStore (16-106)
scripts/check-license-headers.mjs (1)
scripts/check-duplicate-headers.cjs (2)
  • args (31-31)
  • path (5-5)
scripts/check-duplicate-headers.cjs (1)
scripts/check-license-headers.mjs (3)
  • args (81-81)
  • files (20-20)
  • files (86-86)
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-ios
  • GitHub Check: e2e-ios

Comment on lines 1 to 4
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11

Copy link
Contributor

@coderabbitai coderabbitai bot Aug 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Preserve license banner in built error classes.

As with the NFC module, ensure build settings keep the license header in emitted artifacts. Error classes are commonly imported in end-user apps; distributing them without the BUSL-1.1 banner can create compliance gaps.

Use the same script shared in the NFC file comment to confirm banner/legalComments configuration.


🏁 Script executed:

#!/bin/bash
set -e

echo "Finding tsconfig.json in mobile-sdk-alpha..."
fd tsconfig.json packages/mobile-sdk-alpha

echo -e "\nReading packages/mobile-sdk-alpha/tsconfig.json..."
cat packages/mobile-sdk-alpha/tsconfig.json

echo -e "\nShowing build script in packages/mobile-sdk-alpha/package.json..."
grep -R '"build"' -C2 packages/mobile-sdk-alpha/package.json || true

echo -e "\nSearching for Babel or Webpack config in mobile-sdk-alpha"
fd babel.config.js packages/mobile-sdk-alpha || true
fd webpack.config.js packages/mobile-sdk-alpha || true

Length of output: 1487


🏁 Script executed:

#!/bin/bash
set -e

echo "Searching for tsup.config.ts in repository..."
fd tsup.config.ts || true

echo -e "\nSearching for tsup usage in package.json scripts..."
grep -R "\"tsup\"" -n .

echo -e "\nSearching for legalComments in repo..."
grep -R "legalComments" -n .

echo -e "\nSearching for banner options in mobile-sdk-alpha..."
grep -R "banner" -n packages/mobile-sdk-alpha

echo -e "\nDisplaying postBuild.mjs if present..."
if [ -f packages/mobile-sdk-alpha/scripts/postBuild.mjs ]; then
  sed -n '1,200p' packages/mobile-sdk-alpha/scripts/postBuild.mjs
else
  echo "No postBuild.mjs found"
fi

Length of output: 823


🏁 Script executed:

#!/bin/bash
set -e

echo "Searching for banner in packages/mobile-sdk-alpha/tsup.config.ts..."
grep -R "banner" -n packages/mobile-sdk-alpha/tsup.config.ts || echo "no banner in tsup.config.ts"

echo "Searching for legalComments in packages/mobile-sdk-alpha/tsup.config.ts..."
grep -R "legalComments" -n packages/mobile-sdk-alpha/tsup.config.ts || echo "no legalComments in tsup.config.ts"

Length of output: 585


Ensure the BUSL-1.1 license header is preserved in mobile-sdk-alpha builds

The current packages/mobile-sdk-alpha/tsup.config.ts has no banner or esbuildOptions.legalComments setting, so esbuild will strip all comments (including license headers) by default (esbuild.github.io). Without explicit configuration, your built error-class modules will lack the required BUSL-1.1 banner, creating a compliance gap.

Please update packages/mobile-sdk-alpha/tsup.config.ts to include one of the following:

• Use a custom banner to inject the full license text:

import { defineConfig } from 'tsup'
import fs from 'fs'
const license = fs.readFileSync('./LICENSE.header', 'utf8')

export default defineConfig({
  /* existing options */
  banner: {
    js: license,    // injects the BUSL-1.1 header at the top of each .js output
  },
})

This leverages tsup’s built-in banner support (app.unpkg.com).

• Or leverage esbuild’s legal-comments feature to preserve only “legal comments” (comments starting with /*! or containing @license/@preserve):

import { defineConfig } from 'tsup'

export default defineConfig({
  /* existing options */
  esbuildOptions(options) {
    options.legalComments = 'inline'   // keeps all recognized license comments in-line
    return options
  },
})

This uses esbuild’s legalComments: 'inline' mode to retain license blocks (esbuild.github.io).

After making either change, run yarn build in packages/mobile-sdk-alpha and verify that the BUSL-1.1 header appears atop every emitted JS file.

🤖 Prompt for AI Agents
In packages/mobile-sdk-alpha/src/errors/InitError.ts around lines 1 to 2, the
BUSL-1.1 license header comment present in source will be stripped during
bundling because packages/mobile-sdk-alpha/tsup.config.ts lacks a banner or
esbuildOptions.legalComments setting; update tsup.config.ts to either add a
banner option that injects the full BUSL-1.1 header into emitted JS files or
configure esbuildOptions(options) to set options.legalComments = 'inline' so
license comments (/*! or @license) are preserved, then rebuild and verify the
BUSL header appears at the top of each output file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@transphorm this seems like a good call out.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah will add

Comment on lines 1 to 4
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11

Copy link
Contributor

@coderabbitai coderabbitai bot Aug 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Ensure license header is preserved in distributed bundles (configure banner/legalComments).

Single-line SPDX at source is good, but bundlers often strip comments unless explicitly preserved. For legal/compliance, ensure tsup/esbuild is configured to retain a license banner in built artifacts (e.g., esbuild option legalComments: "eof" and a banner). Otherwise, published SDK builds may omit the BUSL-1.1 header, creating licensing risk for downstream consumers.

Run the following to verify the bundling config preserves license headers:


🏁 Script executed:

#!/bin/bash
# Verify that tsup/esbuild preserves license headers via banner/legalComments.
set -euo pipefail
# Find tsup configs in the repo
fd -a tsup.config.ts
echo "---- Inspecting potential banner/legalComments in tsup configs ----"
fd -a tsup.config.ts | while read -r f; do
  echo "File: $f"
  rg -n -C2 'banner|legalComments|esbuildOptions' "$f" || true
done

Length of output: 1338


Add explicit license‐preservation settings in the mobile‐sdk-alpha bundler config

Our inspection of all tsup.config.ts files shows no banner, legalComments, or esbuildOptions overrides today—so the SPDX header in src/nfc/index.ts won’t survive most bundling pipelines and could be dropped in published artifacts. To fix:

• In packages/mobile-sdk-alpha/tsup.config.ts, extend your defineConfig({…}) to include both a license banner and esbuild’s legalComments option. For example:

 import { defineConfig } from 'tsup'
 
 export default defineConfig({
-  entry: ['src/index.ts'],
+  entry: ['src/index.ts'],
   // …existing options…
+  // preserve license header in output bundles
+  esbuildOptions: (options) => {
+    // keep comments with SPDX in the final file
+    options.legalComments = 'eof'
+  },
+  banner: {
+    js: `// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11`
+  },
 })

This ensures downstream consumers always see the BUSL-1.1 header in distributed bundles rather than losing it to comment stripping.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaronmgdr added this logic

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Copy link
Contributor

@aaronmgdr aaronmgdr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to get this in. maybe we should checkout that suggestion about build step

@transphorm transphorm force-pushed the codex/add-license-header-check-to-mobile-sdk-alpha branch from b0e2c23 to 0c01c80 Compare August 25, 2025 17:14
@transphorm
Copy link
Member Author

@coderabbitai summary

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 25, 2025

✅ Actions performed

Summary regeneration triggered.

@transphorm transphorm merged commit 431f556 into dev Aug 25, 2025
32 checks passed
@transphorm transphorm deleted the codex/add-license-header-check-to-mobile-sdk-alpha branch August 25, 2025 18:30
remicolin added a commit that referenced this pull request Aug 25, 2025
* SDK Go version (#920)

* feat: helper functions and constant for go-sdk

* feat: formatRevealedDataPacked in go

* chore: refactor

* feat: define struct for selfBackendVerifier

* feat: verify function for selfBackendVerifier

* feat(wip): custom hasher

* feat: SelfVerifierBacked in go

* test(wip): scope and userContextHash is failing

* test: zk proof verified

* fix: MockConfigStore getactionId function

* chore: refactor

* chore: remove abi duplicate files

* chore: move configStore to utils

* chore: modified VcAndDiscloseProof struct

* chore: more review changes

* feat: impl DefaultConfig and InMemoryConfigStore

* chore: refactor and export functions

* fix: module import and README

* chore: remove example folder

* chore: remove pointers from VerificationConfig

* chore: coderabbit review fixes

* chore: more coderabbit review fix

* chore: add license

* fix: convert attestationIdd to int

* chore: remove duplicate code

---------

Co-authored-by: ayman <[email protected]>

* Moving proving Utils to common (#935)

* remove react dom

* moves proving utils to the common

* need to use rn components

* fix imports

* add proving-utils and dedeuplicate entry configs for esm and cjs.

* must wrap in text component

* fix metro bundling

* fix mock import

* fix builds and tests

* please save me

* solution?

* fix test

* Move proving inputs to the common package (#937)

* create ofactTree type to share

* move proving inputs from app to register inputs in common

* missed reexport

* ok

* add some validations as suggested by our ai overlords

* Fix mock passport flow (#942)

* fix dev screens

* add hint

* rename

* fix path

* fix mobile-ci path

* fix: extractMRZ (#938)

* fix: extractMRZ

* yarn nice && yarn types

* fix test: remove unused

* fix mobile ci

* add script

---------

Co-authored-by: Justin Hernandez <[email protected]>

* Move Proving attest and cose (#950)

* moved attest and cose utils to common

with cursor converted tests in common to use vitest and converted coseVerify.test to vitest after moving from app to common

what does cryptoLoader do?

* moved away

* get buff

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* SELF-253 feat: add user email feedback (#889)

* feat: add sentry feedback

* add sentry feedback to web

* feat: add custom feedback modal & fix freeze on IOS

* yarn nice

* update lock

* feat: show feedback widget on NFC scan issues (#948)

* feat: show feedback widget on NFC scan issues

* fix ref

* clean up

* fix report issue screen

* abstract send user feedback email logic

* fixes

* change text to Report Issue

* sanitize email and track event messge

* remove unnecessary sanitization

* add sanitize error message tests

* fix tests

* save wip. almost done

* fix screen test

* fix screen test

* remove non working test

---------

Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>

* chore: centralize license header checks (#952)

* chore: centralize license header scripts

* chore: run license header checks from root

* add header to other files

* add header to bundle

* add migration script and update check license headers

* convert license to mobile sdk

* migrate license headers

* remove headers from common; convert remaining

* fix headers

* add license header checks

* update unsupported passport screen (#953)

* update unsupported passport screen

* yarn nice

---------

Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: ayman <[email protected]>
Co-authored-by: Aaron DeRuvo <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Nesopie pushed a commit to Vishalkulkarni45/self that referenced this pull request Aug 27, 2025
* chore: centralize license header scripts

* chore: run license header checks from root

* add header to other files

* add header to bundle

* add migration script and update check license headers

* convert license to mobile sdk

* migrate license headers

* remove headers from common; convert remaining

* fix headers

* add license header checks
transphorm added a commit that referenced this pull request Sep 7, 2025
* update CI

* bump iOS version

* update readme

* update mobile-deploy ci

* bump version iOS

* update workflow to use workload identity federation (#933)

* update workflow to use workload identity federation

* add token permissions

* correct provider name

* chore: incrementing android build version for version 2.6.4 [github action]

---------

Co-authored-by: Self GitHub Actions <[email protected]>

* update ci

* update ci

* update ci

* update ci

* update ci

* fix ci

* fix ci

* fix ci

* remove fastlane use for android

* bump iOS build version

* update CI python script

* iterate on CI

* iterate on CI

* iterate on CI

* Dev (#941)

* SDK Go version (#920)

* feat: helper functions and constant for go-sdk

* feat: formatRevealedDataPacked in go

* chore: refactor

* feat: define struct for selfBackendVerifier

* feat: verify function for selfBackendVerifier

* feat(wip): custom hasher

* feat: SelfVerifierBacked in go

* test(wip): scope and userContextHash is failing

* test: zk proof verified

* fix: MockConfigStore getactionId function

* chore: refactor

* chore: remove abi duplicate files

* chore: move configStore to utils

* chore: modified VcAndDiscloseProof struct

* chore: more review changes

* feat: impl DefaultConfig and InMemoryConfigStore

* chore: refactor and export functions

* fix: module import and README

* chore: remove example folder

* chore: remove pointers from VerificationConfig

* chore: coderabbit review fixes

* chore: more coderabbit review fix

* chore: add license

* fix: convert attestationIdd to int

* chore: remove duplicate code

---------

Co-authored-by: ayman <[email protected]>

* Moving proving Utils to common (#935)

* remove react dom

* moves proving utils to the common

* need to use rn components

* fix imports

* add proving-utils and dedeuplicate entry configs for esm and cjs.

* must wrap in text component

* fix metro bundling

* fix mock import

* fix builds and tests

* please save me

* solution?

* fix test

* Move proving inputs to the common package (#937)

* create ofactTree type to share

* move proving inputs from app to register inputs in common

* missed reexport

* ok

* add some validations as suggested by our ai overlords

* Fix mock passport flow (#942)

* fix dev screens

* add hint

* rename

* fix path

* fix mobile-ci path

* fix: extractMRZ (#938)

* fix: extractMRZ

* yarn nice && yarn types

* fix test: remove unused

* fix mobile ci

* add script

---------

Co-authored-by: Justin Hernandez <[email protected]>

* Move Proving attest and cose (#950)

* moved attest and cose utils to common

with cursor converted tests in common to use vitest and converted coseVerify.test to vitest after moving from app to common

what does cryptoLoader do?

* moved away

* get buff

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* SELF-253 feat: add user email feedback (#889)

* feat: add sentry feedback

* add sentry feedback to web

* feat: add custom feedback modal & fix freeze on IOS

* yarn nice

* update lock

* feat: show feedback widget on NFC scan issues (#948)

* feat: show feedback widget on NFC scan issues

* fix ref

* clean up

* fix report issue screen

* abstract send user feedback email logic

* fixes

* change text to Report Issue

* sanitize email and track event messge

* remove unnecessary sanitization

* add sanitize error message tests

* fix tests

* save wip. almost done

* fix screen test

* fix screen test

* remove non working test

---------

Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>

* chore: centralize license header checks (#952)

* chore: centralize license header scripts

* chore: run license header checks from root

* add header to other files

* add header to bundle

* add migration script and update check license headers

* convert license to mobile sdk

* migrate license headers

* remove headers from common; convert remaining

* fix headers

* add license header checks

* update unsupported passport screen (#953)

* update unsupported passport screen

* yarn nice

---------

Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: ayman <[email protected]>
Co-authored-by: Aaron DeRuvo <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* bump version

* bump yarn.lock

* update ci (#966)

* chore: Manually bump and release v2.6.4 (#961)

* update lock files

* bump and build android

* update build artifacts

* show generate mock document button

* update lock

* fix formatting and update failing e2e test

* revert podfile

* fixes

* fix cold start of the app with deeplink

* update ci

* update ci

* Sync MARKETING_VERSION to iOS project files after version bump

* chore: incrementing android build version for version 2.6.4 [github action] (#976)

Co-authored-by: remicolin <[email protected]>

* chore: add build dependencies step for iOS and Android in mobile deploy workflow

* chore: enhance mobile deploy workflow by adding CMake installation step

* bump android build version

* chore: incrementing android build version for version 2.6.4 [github action] (#985)

Co-authored-by: remicolin <[email protected]>

* chore: configure Metro bundler for production compatibility in mobile deploy workflow

* chore: incrementing android build version for version 2.6.4 [github action] (#987)

Co-authored-by: remicolin <[email protected]>

* Revert "chore: configure Metro bundler for production compatibility in mobile deploy workflow"

This reverts commit 60fc1f2.

* reduce max old space size in mobile-deploy ci

* fix android french id card (#957)

* fix android french id card

* fix common ci cache

* feat: log apdu (#988)

---------

Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>

* unblock ci

* fix merge

* merge fixes

* fix tests

* make ci happy

---------

Co-authored-by: turnoffthiscomputer <[email protected]>
Co-authored-by: pputman-clabs <[email protected]>
Co-authored-by: Self GitHub Actions <[email protected]>
Co-authored-by: turnoffthiscomputer <[email protected]>
Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: ayman <[email protected]>
Co-authored-by: Aaron DeRuvo <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Nesopie added a commit that referenced this pull request Sep 9, 2025
* make contract sdk simpler (#514)

* make contract sdk simpler

* reduce root inputs

* delete convert function

* summarize our library

* update npm package

* update package version

* update attestation id

* add util function to get revealed data

* Revert "make contract sdk simpler (#514)" (#518)

This reverts commit 847b88d.

* merge dev into main (#576)

* Feat: Show error code in SDK (#500)

* feat: emit `error_code` and `reason` in app

* feat: add `onError` in sdk

* feat: Display reason in app

* lint & fmt

* feat: add scrollview in ProofRequestStatusScreen for long reasons

* Fix input generation for 521bit curves (#481)

* fix EC point padding for 521 bit curves

* rename modulus to point in findStartIndexEC as it is a point

* simplify matching logic

* simplify padding logic

* remove comment

* remove log

removing .only so the CI/CD runs circuit tests

fix disclosure test

fix scope in test

fix scope error in circuit tests

remove .only

fix test

* run ci/cd

* Feat/simpler contract sdk (#519)

* make contract sdk simpler

* reduce root inputs

* delete convert function

* summarize our library

* update npm package

* update package version

* update attestation id

* add util function to get revealed data

---------

Co-authored-by: motemotech <[email protected]>

* forgot to include package update (#521)

* Bump version to 2.5.1 (#522)

* bump version

* update fastlane

* fix bump version

* bump build and add todo

* disable commit for now

* [SEL-154] Step 1: Scan your passport (#511)

* simplify navigation logic

* use aesop design hook

* save wip

* add new aesop redesign screens

* save wip design

* refactor nav bar logic

* fix paths

* save wip

* stub progress navbar and save wip

* save wip progress bar animation

* save wip progress bar, almost done with design

* fix progress bar design

* fix bottom padding

* disable git commit for now

* fix flaky android downloads that causes pipeline to crash

* update lock for ci

* [SEL-46] FE: Add minimum bottom padding (#510)

* fix bottom padding for smaller screens

* fix podfile post install hook permissions check

* update pod lock and disable git commit action step for now

* update lock

* fix flaky android downloads that causes pipeline to crash

* fix: improve error handling for forbidden countries list mismatch (#494)

* Update SelfBackendVerifier.ts

* Update constants.ts

* Update formatInputs.ts

* Update formatCallData.ts

* DX: Auto format on save (#526)

* save wip

* use elint instead of prettier to sort imports

* set imports to warn

* sync prettier settigns

* update prettier settings

* save working version

* fix export and disable mobile pipeline for now

* limit auto formatting to the app folder

* remove artefacts

* SEL-187: Make bottom layout scrollable on smaller screens (#525)

* fix design check

* add an option to disable local sending of sentry events

* better sentry enable / disable

* fix scan passport height

* make bottom layout scrollable so it doesn't squish top screen

* simpler logic check. don't create new env var

* fix internet connection issues

* readd comment

* use isConnected instead of internet reachable

* use a dynamic bottom panel height

* add missing recovery screens

* move aesop below

* remove dupe export

* fix rebase

* fix android package download issue

* Feat/extend id support (#517)

* refactor proving impleting xstate, speedup proving

* add disclosure proof support

* keep refactoring provingMachine, clean old implementation

* call init method when switching from dsc to register

* rebase with dev to display why the proof verification failed

* refactor ws connexion between front-end and mobile to retrieve self-app

* update the webclient at proofVerification and use selfAppStore in provingMachine

* fix provintStore.init in ProveScreen

* yarn nice

* fetch data correctly in splash screen

* Bump build versions for 2.5.1 (#531)

* release new builds

* fix app and build versions

* fix env check

* display error animation on failure on loading screen (#532)

* display error animation on failure on loading screen

* remove log

---------

Co-authored-by: Justin Hernandez <[email protected]>

* ci: bump actions/checkout to v4 (#529)

* make contract sdk simpler (#514)

* make contract sdk simpler

* reduce root inputs

* delete convert function

* summarize our library

* update npm package

* update package version

* update attestation id

* add util function to get revealed data

* Revert "make contract sdk simpler (#514)" (#518)

This reverts commit 847b88d.

* ci: bump actions/checkout to v4

---------

Co-authored-by: nicoshark <[email protected]>
Co-authored-by: turnoffthiscomputer <[email protected]>

* fix italy (#530)

* Fix/proving machine endpoint type (#538)

* store endpoint type in proving machine

* yarn nice

* fix splash screen error (#539)

* New bug fix build for v2.5.1 (#540)

* bump new build for dev fixes

* update lock

* reinstall before running local deploy

* SEL-178: Improve haptic feedback library (#535)

* fix dev settings typing

* add dev screens file

* save haptic feedback progress

* change ordedr

* fix initial route and add haptic feedback screen to dev settings options

* add delete scripts (#542)

* update staging registry address (#545)

* feat: Add Disclose history (#533)

* feat: Add Disclose history

* fix: Duplicate history in list

* fix: Outdated disclosures

* Delete app/ios/Self copy-Info.plist

* allow a scale of up to 1.3 (#546)

* allow a scale of up to 1.3

* update lock files

* clean up unused imports

* fix settings

* add common sdk (#537)

* add common sdk

* remove sdk backend api

* remove registry

* regenerate sha256 rsa dsc each time

* download ski-pem dynamically on staging, refactor initpassportDataParsing

* add state machine for button on prove screen, improve ux on splash screen

* fetch ski-pem in production

* fix linter issues

* fix prove screen button bugs

* update podfile.lock and yarn.lock

* run linter in circuits repo

* bump build

* bump version for sentry debugging

* bump ios to version 118

---------

Co-authored-by: Justin Hernandez <[email protected]>

* better connection check (#548)

* Clean up navigation and setup Jest (#549)

* remove dupe account screens and prefer the term home

* organize screen loading better

* sort keys

* rename screen files wip

* fix deleted directory issues

* rename folders

* fix paths and naming

* save working jest import test

* save base working jest navigation test

* finalize navigation refactor and jest test

* update test name and podfile lock

* remove unused packages

* use the correct version of react test renderer

* bump build (#552)

* Eth dublin (#554)

* add mock id card generator

* add genMockIdDoc in common/sdk exports

* onboard developer id using deeplink, allow custom birthdate on mockpassport

* log more dsc info (#558)

* Push notification (#536)

* add push notification feature

* merge new app impl

* change dsc key

* import

* reverse mock dsc

* worked in the ios

* checked in android

* update url and delete console

* delete small changes

* lint

* add yarn.lock

* fix warning message

* add mock notification service for test code

* fix path for the mock implementation

* add mock deeplink to the test code

* nice notificationServiceMock.js

* delete unused firebase related implementation

* fix wording and UI related to notification service

* hotfix on mockdatascreen

---------

Co-authored-by: turnoffthiscomputer <[email protected]>

* Fix deeplink 2 (#560)

* fix deeplink

* fix deeplink

* yarn nice

* feat: Use vision for MRZ scanning (SEL-47) (#557)

* feat: Use vision for MRZ scanning

* modify label to position the smartphone during the OCR scan

---------

Co-authored-by: turnoffthiscomputer <[email protected]>

* SEL-255: improved loading screen with estimated wait times (#550)

* create new loading screen and rename static to misc

* fix route

* save wip loading screen

* save wip animation

* save static wip design

* continue

* splash

* add a loading screen text helper

* add test for loading screen text

* save wip. almost there

* update haptic logic

* better feedback and add dev scren

* save current work

* update text logic and tests

* load passport metadata in loading screen

* simplify and fix tests

* test for additional exponents

* add new animation

* rename file

* consolidate ui useEffect and fix loading screen layout

* fix current state

* remove mockPassportFlow param

* merge new loading screen and new notification logic

* simplify

* update lock

* use passportMetadata instead of metadata

* save simplification

* update loading text based on pr feedback and tests

* Bump v2.5.1: ios 122; android 60 (#561)

* increment build to 120

* bump builds for 2.5.1. ios 121; android 60

* clean up logic

* upgrade react native firebase for privacy manifests

* update react native keychain to fix could not recover issue (#564)

* fix: update ocr corrections (#563)

* Chore: Polish proof history to prep for release (#566)

* clean up nav and home boundaries, passport data screen insets

* migrate proof history screen out of settings

* minor clean up

* save wip

* add new ibm plex mono font and clean up proof detail screen

* remove test data

* remove extra loading screen text

* remove unnecessary ceil

* Bump v2.5.1; ios 123; android 62 (#565)

* bump to build 61

* bump ios version

* update version

* Feature/add prettier formatter (#568)

* Add Prettier configuration and ignore files for code formatting

- Created .prettierignore to exclude specific directories and files from formatting.
- Added .prettierrc.yml with custom settings for print width and trailing commas.
- Updated package.json to include Prettier and its Solidity plugin as dependencies, along with scripts for formatting and checking code.

* Run prettier formatting

* fix nationality using mock passports

* SEL-181 & SEL-252: Update mobile app events (#570)

* improve analytics handling

* add error boundary that flushes segment events before error occurs

* upgrade segment analytics package

* flush analytics when user encounters error screen

* track all click events

* add tracking to loading screen

* better init and click event names

* track cloud backup and modal actions

* use __DEV__ for debugging

* add tracking to account recovery, auth, mock data

* return false instead of throwing

* add more tracking events

* save wip event updating

* abstract analytic event names

* update click events

* clean up

* move reasons comment

* add unsupported passport event

* Feature/enhance self verification root (#569)

* Add SelfVerificationConsumer contract for self-verification logic

- Introduced an abstract contract, SelfVerificationConsumer, that extends SelfVerificationRoot.
- Implemented nullifier tracking, verification success events, and customizable validation and update methods for nullifiers.
- Added error handling for nullifier check failures and hooks for derived contracts to implement custom logic after successful verification.

* Add SelfHappyBirthday contract example using SelfVerificationConsumer

- Introduced SelfHappyBirthday contract that allows users to claim USDC on their birthday.
- Integrated SelfVerificationConsumer for handling verification and nullifier tracking.
- Added functions to set claimable amount and window, along with event emissions for state changes.
- Implemented logic to check if the claim is within the user's birthday window and transfer USDC accordingly.

* Refactor imports in HappyBirthday contract for better organization

- Updated import statements in HappyBirthday.sol to use relative paths for ISelfVerificationRoot, SelfCircuitLibrary, and SelfVerificationConsumer.
- Improved code readability and maintainability by organizing imports more logically.

* Refactor Airdrop contract to use SelfVerificationConsumer for registration logic

- Updated Airdrop contract to inherit from SelfVerificationConsumer instead of SelfVerificationRoot.
- Refactored mappings for user identifiers and nullifiers for improved clarity and functionality.
- Enhanced error handling and updated function parameters for consistency.
- Implemented new validation and update methods for nullifiers, streamlining the registration process.
- Removed deprecated verifySelfProof function and integrated logic into new methods.

* Add events and refactor SelfVerificationRoot and related contracts

- Introduced new events in SelfVerificationRoot for verification configuration updates, scope changes, and attestation ID management.
- Updated Airdrop contract to remove deprecated events and added a new event for Merkle root updates.
- Refactored SelfPassportERC721 to inherit from SelfVerificationConsumer, enhancing verification logic and event handling.
- Improved function parameters for consistency and clarity across contracts.

* Refactor contracts to use SelfVerificationRoot and enhance verification logic

- Removed SelfVerificationConsumer contract and updated related contracts to inherit from SelfVerificationRoot.
- Refactored mappings and event emissions in Airdrop, HappyBirthday, and SelfPassportERC721 for improved clarity and functionality.
- Enhanced verification success hooks to include user identifiers and nullifiers for better tracking.
- Updated constructor parameters for consistency across contracts and improved error handling for user registration and claims.

* Refactor constructor in SelfPassportERC721 for improved readability

* Refactor function parameters in SelfVerificationRoot and related contracts

* Refactor constructor parameter names in IdentityVerificationHub, Airdrop, IdentityRegistry, and ProxyRoot contracts for improved clarity and consistency

* fix getCircuitName function (#575)

* fix getCircuitName function

* fix getCircuitName function

* feat: Read ID cards (#571)

* Update GitHub checkout action from v3 to v4 (#544)

* Bump build version 2.5.2 to test react native keychain (#572)

* bump build and version

* bump version 2.5.2

* don't downgrade react native keychain

* update app/README.md toolchain instructions (#140)

* bump build (#580)

---------

Co-authored-by: Seshanth.S🐺 <[email protected]>
Co-authored-by: turboblitz <[email protected]>
Co-authored-by: motemotech <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: crStiv <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: James Niken <[email protected]>
Co-authored-by: Kevin Lin <[email protected]>
Co-authored-by: leopardracer <[email protected]>
Co-authored-by: Olof Andersson <[email protected]>

* feat(wip): register circuit for aadhaar

* chore: add anon aadhar circuits

* chore: remove sc and disclose selfrica test

* feat: extract aadhaar qr data

* test: aadhaar qr data extract circuit

* test: aadhaar register  circuit

* feat: extract pincode and ph no last 4 digit

* fix: register aadhaar nullifier and commitment

* test: Verify commitment circuit of aadhaar

* feat: add photoHash inside commitment

* feat: build Aadhaar OFAC SMT

* feat: ofac check and reveal data (test done)

* test: qr extractor for custom data input

* feat: add state as reveal data inside VC and disclose

* chore: add comments

* fix: num2Ceil component

* chore: review changes

* chore: use passport SignatureVerifier

* fix: signatureVerifier inputs

* feat: extract ascii values of fields

* feat: provide users the flexibility to reveal specific characters of a field

* chore: refactor

* test: register aadhaar for tampered data

* test(wip): should return 0 if in ofac list

* test: ofac check

* test: register aadhaar circuit for different qr data

* merge dev into main (#683)

* remove sdk/tests (#622)

* remove sdk/tests

* chore: update yarn.lock

---------

Co-authored-by: Ayman <[email protected]>

* fix: add range check on paddedInLength of shaBytesDynamic (#623)

* fix ci (#626)

* implement self uups upgradeable (#592)

* implement self uups upgradeable

* small changes in identityVerificationHubImplV2

* delete aderyn.toml

* chore: add custom verifier

* chnage return output

* feat: use self structs and a Generic output struct

* feat: add userIdentifier, nullifier, forbiddencountries to returned output

* add root view functions from registry

* fix: build and compilation errors

* add userDefined data into selfVerificationRoot

* "resolve conflicts"

* fix compilation problem

* fix how to register verification config

* test: CustomVerifier

* fix verification root and hub integration

* add scope check in hub impl

* replace poseidon hash to ripemd+sha256

* add todo list

* feat: refactor and add test cases for generic formatter

* add performUserIdentifierCheck in basicVerification

* change how to handle additionalData and fix stack too deep

* start adding test codes

* fix dependency problems in monorepo

* fix: forbidden countries (#612)

LGTM!

* able to run test code

* pass happy path

* delete unused codes

* change error code name, add caller address validation and add scripts to run test and build in monorepo

* add all test cases in vcAndDisclose flow

* remove comment out

* chore: use actual user identifier outputs

* success in registration tests

* cover all cases

* pass contractVersion instead of circuitVersion

* fix disclose test

* chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter

* change val name and remove unused lines

* add val name change

* remove userIdentifier from return data

* feat: use GenericDiscloseOutput struct in verfication hook  fix test cases for user identifier

* chore: change the function order for Hub Impl V2 (#625)

* fix nat specs

* add nat spec in SelfStructs

---------

Co-authored-by: Ayman <[email protected]>
Co-authored-by: Nesopie <[email protected]>

* prettier (#629)

* CAN auth - android (#613)

* add missed files

* add NFCMethodSelectionScreen

* bump android build

---------

Co-authored-by: Justin Hernandez <[email protected]>

* feat: add MRZ correction method to NFCMethodSelectionScreen (#627)

* add npm auth token env (#632)

* bump sdk version (#633)

* publish npm package when merging on dev

* bump common sdk version

* replace yarn publish by npm publish

* update common package version

* Simplify dev mode gesture (#635)

* Simplify developer mode gesture

* Enable dev mode on MockData screen with five taps

* add build smt function to common sdk

* update vc_and_disclose_id test (dev branch) (#641)

* fix: vc_and_disclose_id test

* chore: yarn prettier

* Show modal on NFC scan error (#642)

* Add help button and error modal actions

* fix the screen management

* yarn nice

* Bump build v2.5.4: ios 132; android 71 (#631)

* bump version and build numbers

* remove tamagui/toast

* fix marketing version

* fix: update TD1 and TD3 checks (#643)

* bum yarn.lock

* Bump build: ios 133; android 72 and build fixes (#654)

* update gesture version and bump android build

* bump and fix ios build

* update lock files

* fixes

* fix fotoapparat library source

* Update example contracts to include EUID usage (#656)

* refactor: update HappyBirthday contract to V2 with support for E-Passport and EUID cards, introduce bonus multipliers, and enhance verification logic

* refactor: update Airdrop contract to V2 with support for E-Passport and EU ID Card attestations

* refactor: remove BASIS_POINTS constant from Airdrop contract

* feat: introduce SelfIdentityERC721 contract for issuing NFTs based on verified identity credentials, replacing SelfPassportERC721

* fix: update verification functions in Airdrop, HappyBirthday, and SelfIdentityERC721 contracts to use customVerificationHook

* cherry pick commit from add-test-self-verification...

* block non-dev pr to main branch

* audit fixes (#645)

* merge dev branch into main (#624)

* remove sdk/tests (#622)

* remove sdk/tests

* chore: update yarn.lock

---------

Co-authored-by: Ayman <[email protected]>

* fix: add range check on paddedInLength of shaBytesDynamic (#623)

* fix ci (#626)

---------

Co-authored-by: Ayman <[email protected]>
Co-authored-by: Vishalkulkarni45 <[email protected]>

* update contracts (#628)

* remove sdk/tests (#622)

* remove sdk/tests

* chore: update yarn.lock

---------

Co-authored-by: Ayman <[email protected]>

* fix: add range check on paddedInLength of shaBytesDynamic (#623)

* fix ci (#626)

* implement self uups upgradeable (#592)

* implement self uups upgradeable

* small changes in identityVerificationHubImplV2

* delete aderyn.toml

* chore: add custom verifier

* chnage return output

* feat: use self structs and a Generic output struct

* feat: add userIdentifier, nullifier, forbiddencountries to returned output

* add root view functions from registry

* fix: build and compilation errors

* add userDefined data into selfVerificationRoot

* "resolve conflicts"

* fix compilation problem

* fix how to register verification config

* test: CustomVerifier

* fix verification root and hub integration

* add scope check in hub impl

* replace poseidon hash to ripemd+sha256

* add todo list

* feat: refactor and add test cases for generic formatter

* add performUserIdentifierCheck in basicVerification

* change how to handle additionalData and fix stack too deep

* start adding test codes

* fix dependency problems in monorepo

* fix: forbidden countries (#612)

LGTM!

* able to run test code

* pass happy path

* delete unused codes

* change error code name, add caller address validation and add scripts to run test and build in monorepo

* add all test cases in vcAndDisclose flow

* remove comment out

* chore: use actual user identifier outputs

* success in registration tests

* cover all cases

* pass contractVersion instead of circuitVersion

* fix disclose test

* chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter

* change val name and remove unused lines

* add val name change

* remove userIdentifier from return data

* feat: use GenericDiscloseOutput struct in verfication hook  fix test cases for user identifier

* chore: change the function order for Hub Impl V2 (#625)

* fix nat specs

* add nat spec in SelfStructs

---------

Co-authored-by: Ayman <[email protected]>
Co-authored-by: Nesopie <[email protected]>

* prettier (#629)

---------

Co-authored-by: Ayman <[email protected]>
Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: nicoshark <[email protected]>
Co-authored-by: Nesopie <[email protected]>

* fix: vc_and_disclose_id test (#640)

* fix: vc_and_disclose_id test

* chore: yarn prettier

* fix: check if a config id exists

* chore: change the function where the config not set verification is happening

* fix: add await

* feat: add getConfigId function in SelfVerificationRoot (#650)

* feat: add getConfigId function in SelfVerificationRoot

* update comment

---------

Co-authored-by: motemotech <[email protected]>

* chore: fix ofac end index in eu id cards

* chore: fix tests

* fix: example contracts and tests

---------

Co-authored-by: turnoffthiscomputer <[email protected]>
Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: nicoshark <[email protected]>

* Update deployment module for Identity Verification Hub V2 with detailed documentation and library linkage for CustomVerifier. Update initialization process to reflect changes in V2 implementation, ensuring proper setup for proxy deployment. (#658)

* publish npm-package (#651)

* App/eu id updates (#638)

* fix build issues

* generate disclosure proof with euids

* generate disclosure proof with euids

* Eu id updates 2 (#648)

* update vc_and_disclose_id test (dev branch) (#641)

* fix: vc_and_disclose_id test

* chore: yarn prettier

* Show modal on NFC scan error (#642)

* Add help button and error modal actions

* fix the screen management

* yarn nice

* Bump build v2.5.4: ios 132; android 71 (#631)

* bump version and build numbers

* remove tamagui/toast

* fix marketing version

* fix: update TD1 and TD3 checks (#643)

* bum yarn.lock

* add version and user defined data

---------

Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>

* remove the mock user define data

* get the useridentifier as a hash from the user defined data

* chore: add version and userDefinedData

* feat: use the version in register / dsc proofs as well

* update calculateUserIdentifierHash

* yarn nice

* refactor: consolidate user context data handling and update payload structure

* fix typing issues on sha1

* remove console.log(sha1)

* fix sha1 import

* refactor: streamline userDefinedData handling and adjust payload type for circuit

* refactor: update sha1 usage and enhance logging in calculateUserIdentifierHash

* yarn nice

* yarn lint common

* use ts-ignore for sha1 import

* fix app ci tests

* fix typing issue

* remove unused ts-ignore

* cast uuid before calling generateinputs

* bump qrcode version

* add tsup on the qrcode sdk

* fix: exports on selfxyz/qrcode

* update how we define config.version

* fix yarn imports

* yarn format

---------

Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>
Co-authored-by: Ayman <[email protected]>

* Hotfix contract compile error (#660)

* Fix previous rebase error

* Refactor deployment module for Identity Verification Hub V2.

* Fix/sdk (#652)

* fix: sdk build configs

* chore: SelfBackendVerifier (WIP)

* feat: add custom verification

* feat: consider destination chain in user defined data

* chore: export attestation id

* chore: export attestation id

* chore: export config storage

* chore: don't throw an error if the proof is not valid

* chore: trim abi and rm typechain types

* refactor

* chore: rm unnecessary exports

* 📝 Add docstrings to `fix/sdk` (#653)

Docstrings generation was requested by @remicolin.

* #652 (comment)

The following files were modified:

* `sdk/core/src/utils/hash.ts`
* `sdk/core/src/utils/proof.ts`
* `sdk/core/src/utils/utils.ts`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* review fixes

* chore: fix package.json cjs types

* chore: add minor changes to checks

* feat: add InMemoryConfigStore, allIds constant and verificationResult type

* chore: export Verification config

* feat: change the verification config types

* fix: throw issues early if verification config is null

* fix: update yarn.lock file

* chore: lint

* fix: rm ts expect error directive

* fix: contract tests

* use excluded countries instead forbidden countries list

* chore: change types in constnats

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update npm-publish workflow and bump core package version to 1.0.0 (#661)

* update import

* Update get verification config visibility (#664)

* Update deployment module for Identity Verification Hub V2 to correct file paths and module name for deployment commands.

* Add troubleshooting documentation for verification issues in deployHubV2.ts. Include manual verification steps and common failure reasons to assist users during deployment.

* Change visibility of getVerificationConfigV2 function from internal to public in IdentityVerificationHubImplV2 contract to allow external access.

* Apply BUSL v1.1 license headers to app (#665)

* Add BSL license headers to app sources

* prettier

* fix license reference - https://spdx.org/licenses/BUSL-1.1.html

* bump build: android 73 (#659)

* Contracts/deploy staging (#668)

* update scripts

* deploy vc and disclose id

* fix the deployment scripts on staging

* update yarn.lock

* bump ios build and version (#669)

* configure coderabbitai (#670)

* tweak coderabbit

* bump

* more thorough test spec

* Apply BSL to app codebase (#639)

* Clean up root license wording

* Simplify SPDX header

* simplify license and rename BSL to BUSL

* fix merge issues

* fix missing method

---------

Co-authored-by: Justin Hernandez <[email protected]>

* SEL-423 apply xcode build suggestions (#671)

* apply recommended app settings from xcode

* stick to portrait orientation and update target settings

* remove app clip references

* Circuit audit fixes  (#644)

* feat: add range checks before use of LessEqThan and SelectSubArray

* fix: Num2Bits_strict to constrain virtualKey

* bump core version

* bump core version and fix ci

* chore: use npm_auth_token in yarnrc

* chroe: rm yarnrc changes

* chore: update npm publish

* chore: run npm publish manually

* chore: change hub contract address (#675)

* Update npm-publish.yml

* chore: use proper secret when publishing

* feat: enable publishing if workflow was triggered manually

* Contracts/update verifier (#673)

* update hardhat config

* update vc and disclose verifier

* update vc and disclose verifier script and run it

* update test self verification root

* update verifier

* bump sdk version and use new hub address

* chore: update zk-kit binary merkle root dep (#674)

* refactor deployment scripts (#678)

* feat: add register eu id instances (#682)

* feat: add register eu id instances

* feat: add new instances

* chore: update scripts

* chore: fix sig alg

* chore: rm circuits

---------

Co-authored-by: Ayman <[email protected]>
Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: nicoshark <[email protected]>
Co-authored-by: Nesopie <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Kevin Lin <[email protected]>
Co-authored-by: kevinsslin <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Eric Nakagawa <[email protected]>

* fix: commitment hash

* fix: register aadhaar test

* chore: refactor

* feat: reveal data in packed bytes

* feat: add constrain on delimiterIndices

* feat: reveal timestamp

* merge main to feat/aadhaar

* fix: tests

* feat: hash pubKey

* feat: add registry contract

* feat: Update HubImplV2 (WIP)

* add functions to generate aadhaar data (WIP)

* modularize aadhaar data generation (WIP)

* fix(wip): register test

* fix: test qr extractor

* fix

* chore: refactor functions

* feat: add age extractor and tested

* feat: add isMiniumAge check

* fix: prepareAadhaarTestData func

* registry contract tests

* feat: registry contract tests

* feat: extract fields from qr data bytes

* chore: refactor mockData

* feat: move minimum age to revealPackedData

* feat: create a constant.ts to retrive fields from unpacked bytes

* chore: refactor

* fix: exports

* rebase

* rebase

* feat: add public signal ,indices mapping

* chore: add public output to indices mapping

* fix:AADHAAR_PUBLIC_SIGNAL_INDICES

* feat: make nullifier public

* fix: nullifier cal for disclose circuits

* feat: merge isMiniumAgeValid and miniumAge signal

* fix: disclsoe test

* feat: support for user identifier and secret

* chore :refactor

* feat: ofac test last name , firstname

* feat: add forbidden_countries_list check

* feat: add tests for aadhaar (WIP)

* failing ofac tests

* feat: finish contract tests

* fix: merge conflicts

* update the common package to be usable in circuits and contracts

* lint everything

* coderabbit fixes

* chore: update name dob,yob aadhaar ofac tree

* feat: merge ofac and reverse ofac check into one

* test: merged ofac constrain

* SELF-253 feat: add user email feedback (#889)

* feat: add sentry feedback

* add sentry feedback to web

* feat: add custom feedback modal & fix freeze on IOS

* yarn nice

* update lock

* feat: show feedback widget on NFC scan issues (#948)

* feat: show feedback widget on NFC scan issues

* fix ref

* clean up

* fix report issue screen

* abstract send user feedback email logic

* fixes

* change text to Report Issue

* sanitize email and track event messge

* remove unnecessary sanitization

* add sanitize error message tests

* fix tests

* save wip. almost done

* fix screen test

* fix screen test

* remove non working test

---------

Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>

* chore: centralize license header checks (#952)

* chore: centralize license header scripts

* chore: run license header checks from root

* add header to other files

* add header to bundle

* add migration script and update check license headers

* convert license to mobile sdk

* migrate license headers

* remove headers from common; convert remaining

* fix headers

* add license header checks

* update unsupported passport screen (#953)

* update unsupported passport screen

* yarn nice

* feat: support new ofac trees

* fix: qr extractor tests

* chore: remove unassigned age signal

* chore: modify timestamp func comment

* fix: add constrain on photo bytes delimiter

* fix: add range check on minimumAge within 2^7

* fix: range check for country not in list

* chore: remove dummy constrain

* fix: assert lessthan

* fix: check is photoEOI valid

* fix: replace maxDataLength with qrPaddedLength for valid del indices

* feat: update forbidden countries in disclose and disclose id

* feat: convert name to uppercase

* fix: add constrain between delimiter and photoEOI

* feat: support for phno len 4 and 10

* chore: hard-code attestaion_ID to 3

* feat: calculate nullifier using uppercase name

* feat: add real id support

* fix: rebase error

* chore: refactor

* add new nullifier and commitment calc

* fix: reuse uppercase name from verify commitment

* feat: add a function that will iterate though all pubkeys

* chore: skip real id test

* chore: yarn format

* chore: update yarn.lock

* chore: rm trailing / from import

* chore: add support for issuing state

* chore: linting and types

* chore: rm types script from circuits

* chore: add license header

---------

Co-authored-by: nicoshark <[email protected]>
Co-authored-by: turnoffthiscomputer <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>
Co-authored-by: turboblitz <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: crStiv <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: James Niken <[email protected]>
Co-authored-by: Kevin Lin <[email protected]>
Co-authored-by: leopardracer <[email protected]>
Co-authored-by: Olof Andersson <[email protected]>
Co-authored-by: vishal <[email protected]>
Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: kevinsslin <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Eric Nakagawa <[email protected]>
remicolin added a commit that referenced this pull request Sep 22, 2025
* SDK Go version (#920)

* feat: helper functions and constant for go-sdk

* feat: formatRevealedDataPacked in go

* chore: refactor

* feat: define struct for selfBackendVerifier

* feat: verify function for selfBackendVerifier

* feat(wip): custom hasher

* feat: SelfVerifierBacked in go

* test(wip): scope and userContextHash is failing

* test: zk proof verified

* fix: MockConfigStore getactionId function

* chore: refactor

* chore: remove abi duplicate files

* chore: move configStore to utils

* chore: modified VcAndDiscloseProof struct

* chore: more review changes

* feat: impl DefaultConfig and InMemoryConfigStore

* chore: refactor and export functions

* fix: module import and README

* chore: remove example folder

* chore: remove pointers from VerificationConfig

* chore: coderabbit review fixes

* chore: more coderabbit review fix

* chore: add license

* fix: convert attestationIdd to int

* chore: remove duplicate code

---------

Co-authored-by: ayman <[email protected]>

* Moving proving Utils to common (#935)

* remove react dom

* moves proving utils to the common

* need to use rn components

* fix imports

* add proving-utils and dedeuplicate entry configs for esm and cjs.

* must wrap in text component

* fix metro bundling

* fix mock import

* fix builds and tests

* please save me

* solution?

* fix test

* Move proving inputs to the common package (#937)

* create ofactTree type to share

* move proving inputs from app to register inputs in common

* missed reexport

* ok

* add some validations as suggested by our ai overlords

* Fix mock passport flow (#942)

* fix dev screens

* add hint

* rename

* fix path

* fix mobile-ci path

* fix: extractMRZ (#938)

* fix: extractMRZ

* yarn nice && yarn types

* fix test: remove unused

* fix mobile ci

* add script

---------

Co-authored-by: Justin Hernandez <[email protected]>

* Move Proving attest and cose (#950)

* moved attest and cose utils to common

with cursor converted tests in common to use vitest and converted coseVerify.test to vitest after moving from app to common

what does cryptoLoader do?

* moved away

* get buff

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* SELF-253 feat: add user email feedback (#889)

* feat: add sentry feedback

* add sentry feedback to web

* feat: add custom feedback modal & fix freeze on IOS

* yarn nice

* update lock

* feat: show feedback widget on NFC scan issues (#948)

* feat: show feedback widget on NFC scan issues

* fix ref

* clean up

* fix report issue screen

* abstract send user feedback email logic

* fixes

* change text to Report Issue

* sanitize email and track event messge

* remove unnecessary sanitization

* add sanitize error message tests

* fix tests

* save wip. almost done

* fix screen test

* fix screen test

* remove non working test

---------

Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>

* chore: centralize license header checks (#952)

* chore: centralize license header scripts

* chore: run license header checks from root

* add header to other files

* add header to bundle

* add migration script and update check license headers

* convert license to mobile sdk

* migrate license headers

* remove headers from common; convert remaining

* fix headers

* add license header checks

* update unsupported passport screen (#953)

* update unsupported passport screen

* yarn nice

* Migrate Analytics  (#951)

* setup analytics adapter for self mobile sdk client and use in app

* wrap for context

* fix build

* yarn types is an alias for build when build just compiles ts

* ok unlock

* deeper

* ok this looks to work

* fix license check

* make sure it starts with this line

* someone didnt commit

* fix double analytics bug and builds

* lint

* Read document catalog from selfClient (#936)

* [SELF-676] feat: upgrade React Native from 0.75.4 to 0.76.9 (#943)

* chore: upgrade build tooling to Node 22 and AGP 8.6

* chore: upgrade react-native to 0.76.9

* update lock files and formatting

* fix path

* fix: handle hermes-engine cache mismatch in CI after React Native upgrade

- Add fallback logic to run 'pod update hermes-engine' when pod install fails
- This resolves CocoaPods cache issues that occur after React Native version upgrades
- Fixes CI pipeline failures on codex/update-core-tooling-for-react-native-upgrade branch

* fix: improve hermes-engine cache handling in CI

- Preemptively clear CocoaPods cache before pod install
- This prevents dependency analysis failures that occur when cached podspecs conflict
- Addresses the root cause: cache conflicts during 'Analyzing dependencies' phase
- Keeps fallback logic for additional safety

* fix: handle hermes-engine cache in mobile-bundle-analysis workflow

- Add pod-install-with-cache-fix.sh script to handle hermes-engine cache conflicts
- Update install-app:setup script to use the new cache fix approach
- This fixes the mobile-bundle-analysis.yml workflow failures after React Native upgrade
- Proactively clears CocoaPods cache and has fallback for hermes-engine updates

* formatting

* fix: robust hermes-engine cache handling in CI workflows

- Apply comprehensive cache clearing to mobile-ci.yml and mobile-e2e.yml
- Pre-emptively run 'pod update hermes-engine' before pod install
- Clear multiple cache locations to handle CI environment differences
- This prevents 'hermes-engine differs from Pods/Local Podspecs' errors
- Fixes all workflows affected by React Native 0.76.9 upgrade cache issues

* fixes

* clean up

* update lock files

* fix tests

* sort

* fixes

* fix ci

* fix deployment target

* android fixes

* upgrade fix

* fixes

* fix: streamline mobile CI build and caching (#946)

* fix: streamline mobile CI build and caching

* Enable mobile E2E tests on codex/fix-mobile-ci-workflow-errors branch

* test

* simplify and fix path

* workflow fixes

* fix loading on 0.76.9

* clean up unnecessary comments

* fix readme

* finalize upgrade to 0.76.9

* fix android build and upgrade

* fix bundler caching

* download cli to fix "yarn start" issues

* fix cli build erorr

* fix script path

* better path

* abstract build step to prevent race condition

* fixes

* better cache

* fix corepack build error

* update lock

* update lock

* add yarn cache to workflows

* fix test building

* ci caching improvements

* fix common type check

* fix common ci

* better mobile sdk alpha building logic

* chore: speed up mobile e2e workflow (#962)

* chore: speed up mobile e2e workflow

* chore: disable android e2e job

* chore: speed up ios build

* fix: bundle js for ios debug build

* fix e2e

* fix mobile ci (#964)

* feat: improve mixpanel flush strategy (#960)

* feat: improve mixpanel flush strategy

* fixes

* fix build

* update lock

* refactor methods

* conslidate calls

* update package and lock

* refactor: remove namespace imports (#969)

* refactor: remove namespace imports

* refactor: use named fs imports

* refactor(app): replace path and fs namespace imports

* format

* format

* Mixpanel tweaks (#971)

* udpates

* fox

* update license

* Add DSC parsing check (#836)

* Handle missing dsc parsed

* nice

* fix test

* throw

* fix

* chore(app): upgrade dependencies (#968)

* chore(app): upgrade dependencies

* update package

* update lock files

* fixes

* lock

* fix

* Auth Adapter +  (#958)

* basic auth adapater

* remove SelfMobileSDk, this was another architecture which the adapter patern replaced

* rename to avoid confusion with client.test.ts

* basic auth adapater

* remove SelfMobileSDk, this was another architecture which the adapter patern replaced

* rename to avoid confusion with client.test.ts

* self

* fix

* remove prototypes

* make sure its mounted

* fix tests

* fmt

* require required adapters

* fix types

* not a partial

* adds missing exports

* fix missing data

* Fix nfc configuration scanning issue (#978)

* fix nfc scanning on ios and android

* save test

* fix tests

* fix lint

* Chore fix ios nfc scanning and compiling (#979)

* fixes

* silence error

* fix debugge

* fix nfc scanning

* lint and pipeline fixes

* large runner (#980)

* chore: update to macos latest large runner (#981)

* bump up to macos-latest-large

* fix ci

* Move loadSelectedDocument to SDK (#967)



Co-authored-by: Aaron DeRuvo <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* docs: update mobile SDK migration progress (#982)

* docs: record app integration progress

* docs: consolidate mobile SDK migration tracking

* docs: humanize migration tracking and merge prompts

* docs: add common consolidation tasks

* docs: reprioritize migration tasks

* docs: soften migration plan tone

* docs: detail agent prompts with file paths

* docs: catalog Linear tasks for SDK

* updates

* remove artifact management

* moves validateDocument functions into the common package. (#977)

* moves validateDocument functions into the common package.

* fix build issues and lint

* handle bad connections better in nullifiier

* add an abort controler to nullifer fetcher,  ignore fals positives

* import types separately

* take it as an arg

* chore: update yarn.lock

* chore(app): resolve lint warnings (#990)

* chore(app): resolve lint warnings

* update lock

* clean up any types

* fix types

* feedback from cr

* [SELF-703] feat: Migrate mock generator to mobile sdk (#992)

* feat: expose mock generator

* formatting

* fix tests and lint

* rename passport to document

* fix types

* [SELF-698] scaffold mobile sdk demo app (#993)

* chore: scaffold mobile sdk demo app

* test: cover demo app menu

* prettier and types

* sort

* add android app foundation

* fix android loading

* get ios app running

* update script

* cr feedback

* disable fabric

* fixes

* fixes

* fix

* SELF-702: Refactor navigation structure and dev utilities (#994)

* Refactor navigation and dev screens

* refactor: rename passport screens to document

* fixes

* add missing header

* fixes

* type files

* feat: clarify proof verification analytics (#996)

* feat: increase sha256 byte size and add new rsa circuits (#986)

* feat: increase sha256 byte size and add new rsa circuits

* feat: modularise the rsa fp pow mod

* chore: comment signature verifier for testing

* fix: sha256_sha256_sha224_ecdsa_secp224r1

* lint

* chore: implement google play suggestions (#997)

* google play suggestions

* update gitguardian ignore

* remove unused

* chore: address yarn lock issues (#1004)

* address yarn lock issues

* fix postinstall

* skip postinstall for ci (#1005)

* [SELF-654] feat: add native modules (#919)

* feat: add ios native modules

* fix: extractMRZ

* Add android OCR native module

* wire native mrz module with adapter

* wire Native modules and fix tests

* fixes

* fix license header logic

* fix tests

* fix types

* fix: ci test

* fix: android build ci

* fix: ios build CI

* add podfile.lock

* add yarn.lock

* update lock files

* add yarn.lock

* add license

* order methods

* update lock

* pipeline fixes

* prettier

* update lock file

* fix native modules on external apps

* bundle @selfxyz/common into mobile-sdk-alpha

* chore: address yarn lock issues (#1004)

* address yarn lock issues

* fix postinstall

* update lock

* fix build issues

* fix pipeline issue

* fix ci

* fix bad merge

* fix android ci

* fix ci errors

* fix mobile sdk ci. stop gap fix for now until we create a package

* tweaks

* retry aapt2 approach

* use ^0.8.4 instead of ^0.8.0 due to the use of custom errors

* workflow fixes

* fix file

* update

* fix ci

* test ci fix

* fix test

---------

Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>

* chore: update dev with staging 09/06/25 (#1007)

* update CI

* bump iOS version

* update readme

* update mobile-deploy ci

* bump version iOS

* update workflow to use workload identity federation (#933)

* update workflow to use workload identity federation

* add token permissions

* correct provider name

* chore: incrementing android build version for version 2.6.4 [github action]

---------

Co-authored-by: Self GitHub Actions <[email protected]>

* update ci

* update ci

* update ci

* update ci

* update ci

* fix ci

* fix ci

* fix ci

* remove fastlane use for android

* bump iOS build version

* update CI python script

* iterate on CI

* iterate on CI

* iterate on CI

* Dev (#941)

* SDK Go version (#920)

* feat: helper functions and constant for go-sdk

* feat: formatRevealedDataPacked in go

* chore: refactor

* feat: define struct for selfBackendVerifier

* feat: verify function for selfBackendVerifier

* feat(wip): custom hasher

* feat: SelfVerifierBacked in go

* test(wip): scope and userContextHash is failing

* test: zk proof verified

* fix: MockConfigStore getactionId function

* chore: refactor

* chore: remove abi duplicate files

* chore: move configStore to utils

* chore: modified VcAndDiscloseProof struct

* chore: more review changes

* feat: impl DefaultConfig and InMemoryConfigStore

* chore: refactor and export functions

* fix: module import and README

* chore: remove example folder

* chore: remove pointers from VerificationConfig

* chore: coderabbit review fixes

* chore: more coderabbit review fix

* chore: add license

* fix: convert attestationIdd to int

* chore: remove duplicate code

---------

Co-authored-by: ayman <[email protected]>

* Moving proving Utils to common (#935)

* remove react dom

* moves proving utils to the common

* need to use rn components

* fix imports

* add proving-utils and dedeuplicate entry configs for esm and cjs.

* must wrap in text component

* fix metro bundling

* fix mock import

* fix builds and tests

* please save me

* solution?

* fix test

* Move proving inputs to the common package (#937)

* create ofactTree type to share

* move proving inputs from app to register inputs in common

* missed reexport

* ok

* add some validations as suggested by our ai overlords

* Fix mock passport flow (#942)

* fix dev screens

* add hint

* rename

* fix path

* fix mobile-ci path

* fix: extractMRZ (#938)

* fix: extractMRZ

* yarn nice && yarn types

* fix test: remove unused

* fix mobile ci

* add script

---------

Co-authored-by: Justin Hernandez <[email protected]>

* Move Proving attest and cose (#950)

* moved attest and cose utils to common

with cursor converted tests in common to use vitest and converted coseVerify.test to vitest after moving from app to common

what does cryptoLoader do?

* moved away

* get buff

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* SELF-253 feat: add user email feedback (#889)

* feat: add sentry feedback

* add sentry feedback to web

* feat: add custom feedback modal & fix freeze on IOS

* yarn nice

* update lock

* feat: show feedback widget on NFC scan issues (#948)

* feat: show feedback widget on NFC scan issues

* fix ref

* clean up

* fix report issue screen

* abstract send user feedback email logic

* fixes

* change text to Report Issue

* sanitize email and track event messge

* remove unnecessary sanitization

* add sanitize error message tests

* fix tests

* save wip. almost done

* fix screen test

* fix screen test

* remove non working test

---------

Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>

* chore: centralize license header checks (#952)

* chore: centralize license header scripts

* chore: run license header checks from root

* add header to other files

* add header to bundle

* add migration script and update check license headers

* convert license to mobile sdk

* migrate license headers

* remove headers from common; convert remaining

* fix headers

* add license header checks

* update unsupported passport screen (#953)

* update unsupported passport screen

* yarn nice

---------

Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: ayman <[email protected]>
Co-authored-by: Aaron DeRuvo <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* bump version

* bump yarn.lock

* update ci (#966)

* chore: Manually bump and release v2.6.4 (#961)

* update lock files

* bump and build android

* update build artifacts

* show generate mock document button

* update lock

* fix formatting and update failing e2e test

* revert podfile

* fixes

* fix cold start of the app with deeplink

* update ci

* update ci

* Sync MARKETING_VERSION to iOS project files after version bump

* chore: incrementing android build version for version 2.6.4 [github action] (#976)

Co-authored-by: remicolin <[email protected]>

* chore: add build dependencies step for iOS and Android in mobile deploy workflow

* chore: enhance mobile deploy workflow by adding CMake installation step

* bump android build version

* chore: incrementing android build version for version 2.6.4 [github action] (#985)

Co-authored-by: remicolin <[email protected]>

* chore: configure Metro bundler for production compatibility in mobile deploy workflow

* chore: incrementing android build version for version 2.6.4 [github action] (#987)

Co-authored-by: remicolin <[email protected]>

* Revert "chore: configure Metro bundler for production compatibility in mobile deploy workflow"

This reverts commit 60fc1f2580c2f6ad3105d8b904d969412a18bd2e.

* reduce max old space size in mobile-deploy ci

* fix android french id card (#957)

* fix android french id card

* fix common ci cache

* feat: log apdu (#988)

---------

Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>

* unblock ci

* fix merge

* merge fixes

* fix tests

* make ci happy

---------

Co-authored-by: turnoffthiscomputer <[email protected]>
Co-authored-by: pputman-clabs <[email protected]>
Co-authored-by: Self GitHub Actions <[email protected]>
Co-authored-by: turnoffthiscomputer <[email protected]>
Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: ayman <[email protected]>
Co-authored-by: Aaron DeRuvo <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore: fix yarn format (#1009)

* fix yarn format

* yarn format

* fix lint

* undo temporary disabling

* pipeline fixes

* revert nvmrc change

* add new home screen (#1019)

* add new home screen

* fix typing issue

* yarn nice

* chore: update the cpp build script (#1021)

* chore: install node (#1022)

* chore: use node v22 (#1023)

* chore: install yarn (#1024)

* chore: yarn cache (#1025)

* chore: sanitise node version (#1026)

* remove lazy loading (#1018)

* remove lazy loading

* fix tests

* formatting

* fix imports and web ci

* fix tests

* fix building

* fix

* debug ci

* fix web ci issue

* fix

* fix

* fix ci

* remove web render test

* coderabbit feedback

* fix ci

* use import

* fix lint

* fix compiling

* update lock

* update lock

* fix: update yarn.lock hash for @selfxyz/mobile-sdk-alpha

Resolves CI error where yarn install --immutable failed due to
outdated package hash. The hash changed from b2afc4 to f9ebb9.

* fix: update yarn.lock hash after mobile-sdk-alpha changes

- Hash changed from c0e6b9 to 0d0f72 due to package modifications
- Cleaned caches and regenerated lockfile to ensure consistency
- This resolves CI cache mismatch where old artifacts had stale hash

* fix: update yarn.lock hash after building mobile-sdk-alpha

- Final hash: 89f5a6 (includes built dist artifacts)
- Built mobile-sdk-alpha to ensure package is in stable state
- This should resolve CI immutable install errors

* fix yarn lock and build

* chore(ci): improve mobile e2e caching (#1010)

* chore(ci): improve mobile e2e caching

* chore(ci): restore deriveddata cache

* chore(ci): remove ios deriveddata cache

* chore(ci): cache ios derived data

* chore(ci): optimize mobile deploy caching

* chore(ci): enable ccache for ios e2e builds

* fix(ci): add ccache path for ios e2e

* moves ofac and protocol store (#1012)

* move ofact tree fetch to common

* move protocol store to the msdk, fix some dependencies on msdk

* chore: remove register id from register circuits (#1028)

* chore: remove register id from register circuits

* chore: only use 128ram instance

* Feat/build cpp (#1029)

* chore: remove register id from register circuits

* chore: only use 128ram instance

* chore: build 2 circuits at a time

* Remove navigationRef from provingMachine (#1011)

* SDK: minimize amount of data sent through PROVING_PASSPORT_NOT_SUPPORTED event (#1030)

* Fix mock passport generation (#1031)

* fix mock passport generation

* fix mobile ci tests

* Feat/aadhaar (#949)

* make contract sdk simpler (#514)

* make contract sdk simpler

* reduce root inputs

* delete convert function

* summarize our library

* update npm package

* update package version

* update attestation id

* add util function to get revealed data

* Revert "make contract sdk simpler (#514)" (#518)

This reverts commit 847b88d5ecc0d449b976a552f68af38eec8e561b.

* merge dev into main (#576)

* Feat: Show error code in SDK (#500)

* feat: emit `error_code` and `reason` in app

* feat: add `onError` in sdk

* feat: Display reason in app

* lint & fmt

* feat: add scrollview in ProofRequestStatusScreen for long reasons

* Fix input generation for 521bit curves (#481)

* fix EC point padding for 521 bit curves

* rename modulus to point in findStartIndexEC as it is a point

* simplify matching logic

* simplify padding logic

* remove comment

* remove log

removing .only so the CI/CD runs circuit tests

fix disclosure test

fix scope in test

fix scope error in circuit tests

remove .only

fix test

* run ci/cd

* Feat/simpler contract sdk (#519)

* make contract sdk simpler

* reduce root inputs

* delete convert function

* summarize our library

* update npm package

* update package version

* update attestation id

* add util function to get revealed data

---------

Co-authored-by: motemotech <[email protected]>

* forgot to include package update (#521)

* Bump version to 2.5.1 (#522)

* bump version

* update fastlane

* fix bump version

* bump build and add todo

* disable commit for now

* [SEL-154] Step 1: Scan your passport (#511)

* simplify navigation logic

* use aesop design hook

* save wip

* add new aesop redesign screens

* save wip design

* refactor nav bar logic

* fix paths

* save wip

* stub progress navbar and save wip

* save wip progress bar animation

* save wip progress bar, almost done with design

* fix progress bar design

* fix bottom padding

* disable git commit for now

* fix flaky android downloads that causes pipeline to crash

* update lock for ci

* [SEL-46] FE: Add minimum bottom padding (#510)

* fix bottom padding for smaller screens

* fix podfile post install hook permissions check

* update pod lock and disable git commit action step for now

* update lock

* fix flaky android downloads that causes pipeline to crash

* fix: improve error handling for forbidden countries list mismatch (#494)

* Update SelfBackendVerifier.ts

* Update constants.ts

* Update formatInputs.ts

* Update formatCallData.ts

* DX: Auto format on save (#526)

* save wip

* use elint instead of prettier to sort imports

* set imports to warn

* sync prettier settigns

* update prettier settings

* save working version

* fix export and disable mobile pipeline for now

* limit auto formatting to the app folder

* remove artefacts

* SEL-187: Make bottom layout scrollable on smaller screens (#525)

* fix design check

* add an option to disable local sending of sentry events

* better sentry enable / disable

* fix scan passport height

* make bottom layout scrollable so it doesn't squish top screen

* simpler logic check. don't create new env var

* fix internet connection issues

* readd comment

* use isConnected instead of internet reachable

* use a dynamic bottom panel height

* add missing recovery screens

* move aesop below

* remove dupe export

* fix rebase

* fix android package download issue

* Feat/extend id support (#517)

* refactor proving impleting xstate, speedup proving

* add disclosure proof support

* keep refactoring provingMachine, clean old implementation

* call init method when switching from dsc to register

* rebase with dev to display why the proof verification failed

* refactor ws connexion between front-end and mobile to retrieve self-app

* update the webclient at proofVerification and use selfAppStore in provingMachine

* fix provintStore.init in ProveScreen

* yarn nice

* fetch data correctly in splash screen

* Bump build versions for 2.5.1 (#531)

* release new builds

* fix app and build versions

* fix env check

* display error animation on failure on loading screen (#532)

* display error animation on failure on loading screen

* remove log

---------

Co-authored-by: Justin Hernandez <[email protected]>

* ci: bump actions/checkout to v4 (#529)

* make contract sdk simpler (#514)

* make contract sdk simpler

* reduce root inputs

* delete convert function

* summarize our library

* update npm package

* update package version

* update attestation id

* add util function to get revealed data

* Revert "make contract sdk simpler (#514)" (#518)

This reverts commit 847b88d5ecc0d449b976a552f68af38eec8e561b.

* ci: bump actions/checkout to v4

---------

Co-authored-by: nicoshark <[email protected]>
Co-authored-by: turnoffthiscomputer <[email protected]>

* fix italy (#530)

* Fix/proving machine endpoint type (#538)

* store endpoint type in proving machine

* yarn nice

* fix splash screen error (#539)

* New bug fix build for v2.5.1 (#540)

* bump new build for dev fixes

* update lock

* reinstall before running local deploy

* SEL-178: Improve haptic feedback library (#535)

* fix dev settings typing

* add dev screens file

* save haptic feedback progress

* change ordedr

* fix initial route and add haptic feedback screen to dev settings options

* add delete scripts (#542)

* update staging registry address (#545)

* feat: Add Disclose history (#533)

* feat: Add Disclose history

* fix: Duplicate history in list

* fix: Outdated disclosures

* Delete app/ios/Self copy-Info.plist

* allow a scale of up to 1.3 (#546)

* allow a scale of up to 1.3

* update lock files

* clean up unused imports

* fix settings

* add common sdk (#537)

* add common sdk

* remove sdk backend api

* remove registry

* regenerate sha256 rsa dsc each time

* download ski-pem dynamically on staging, refactor initpassportDataParsing

* add state machine for button on prove screen, improve ux on splash screen

* fetch ski-pem in production

* fix linter issues

* fix prove screen button bugs

* update podfile.lock and yarn.lock

* run linter in circuits repo

* bump build

* bump version for sentry debugging

* bump ios to version 118

---------

Co-authored-by: Justin Hernandez <[email protected]>

* better connection check (#548)

* Clean up navigation and setup Jest (#549)

* remove dupe account screens and prefer the term home

* organize screen loading better

* sort keys

* rename screen files wip

* fix deleted directory issues

* rename folders

* fix paths and naming

* save working jest import test

* save base working jest navigation test

* finalize navigation refactor and jest test

* update test name and podfile lock

* remove unused packages

* use the correct version of react test renderer

* bump build (#552)

* Eth dublin (#554)

* add mock id card generator

* add genMockIdDoc in common/sdk exports

* onboard developer id using deeplink, allow custom birthdate on mockpassport

* log more dsc info (#558)

* Push notification (#536)

* add push notification feature

* merge new app impl

* change dsc key

* import

* reverse mock dsc

* worked in the ios

* checked in android

* update url and delete console

* delete small changes

* lint

* add yarn.lock

* fix warning message

* add mock notification service for test code

* fix path for the mock implementation

* add mock deeplink to the test code

* nice notificationServiceMock.js

* delete unused firebase related implementation

* fix wording and UI related to notification service

* hotfix on mockdatascreen

---------

Co-authored-by: turnoffthiscomputer <[email protected]>

* Fix deeplink 2 (#560)

* fix deeplink

* fix deeplink

* yarn nice

* feat: Use vision for MRZ scanning (SEL-47) (#557)

* feat: Use vision for MRZ scanning

* modify label to position the smartphone during the OCR scan

---------

Co-authored-by: turnoffthiscomputer <[email protected]>

* SEL-255: improved loading screen with estimated wait times (#550)

* create new loading screen and rename static to misc

* fix route

* save wip loading screen

* save wip animation

* save static wip design

* continue

* splash

* add a loading screen text helper

* add test for loading screen text

* save wip. almost there

* update haptic logic

* better feedback and add dev scren

* save current work

* update text logic and tests

* load passport metadata in loading screen

* simplify and fix tests

* test for additional exponents

* add new animation

* rename file

* consolidate ui useEffect and fix loading screen layout

* fix current state

* remove mockPassportFlow param

* merge new loading screen and new notification logic

* simplify

* update lock

* use passportMetadata instead of metadata

* save simplification

* update loading text based on pr feedback and tests

* Bump v2.5.1: ios 122; android 60 (#561)

* increment build to 120

* bump builds for 2.5.1. ios 121; android 60

* clean up logic

* upgrade react native firebase for privacy manifests

* update react native keychain to fix could not recover issue (#564)

* fix: update ocr corrections (#563)

* Chore: Polish proof history to prep for release (#566)

* clean up nav and home boundaries, passport data screen insets

* migrate proof history screen out of settings

* minor clean up

* save wip

* add new ibm plex mono font and clean up proof detail screen

* remove test data

* remove extra loading screen text

* remove unnecessary ceil

* Bump v2.5.1; ios 123; android 62 (#565)

* bump to build 61

* bump ios version

* update version

* Feature/add prettier formatter (#568)

* Add Prettier configuration and ignore files for code formatting

- Created .prettierignore to exclude specific directories and files from formatting.
- Added .prettierrc.yml with custom settings for print width and trailing commas.
- Updated package.json to include Prettier and its Solidity plugin as dependencies, along with scripts for formatting and checking code.

* Run prettier formatting

* fix nationality using mock passports

* SEL-181 & SEL-252: Update mobile app events (#570)

* improve analytics handling

* add error boundary that flushes segment events before error occurs

* upgrade segment analytics package

* flush analytics when user encounters error screen

* track all click events

* add tracking to loading screen

* better init and click event names

* track cloud backup and modal actions

* use __DEV__ for debugging

* add tracking to account recovery, auth, mock data

* return false instead of throwing

* add more tracking events

* save wip event updating

* abstract analytic event names

* update click events

* clean up

* move reasons comment

* add unsupported passport event

* Feature/enhance self verification root (#569)

* Add SelfVerificationConsumer contract for self-verification logic

- Introduced an abstract contract, SelfVerificationConsumer, that extends SelfVerificationRoot.
- Implemented nullifier tracking, verification success events, and customizable validation and update methods for nullifiers.
- Added error handling for nullifier check failures and hooks for derived contracts to implement custom logic after successful verification.

* Add SelfHappyBirthday contract example using SelfVerificationConsumer

- Introduced SelfHappyBirthday contract that allows users to claim USDC on their birthday.
- Integrated SelfVerificationConsumer for handling verification and nullifier tracking.
- Added functions to set claimable amount and window, along with event emissions for state changes.
- Implemented logic to check if the claim is within the user's birthday window and transfer USDC accordingly.

* Refactor imports in HappyBirthday contract for better organization

- Updated import statements in HappyBirthday.sol to use relative paths for ISelfVerificationRoot, SelfCircuitLibrary, and SelfVerificationConsumer.
- Improved code readability and maintainability by organizing imports more logically.

* Refactor Airdrop contract to use SelfVerificationConsumer for registration logic

- Updated Airdrop contract to inherit from SelfVerificationConsumer instead of SelfVerificationRoot.
- Refactored mappings for user identifiers and nullifiers for improved clarity and functionality.
- Enhanced error handling and updated function parameters for consistency.
- Implemented new validation and update methods for nullifiers, streamlining the registration process.
- Removed deprecated verifySelfProof function and integrated logic into new methods.

* Add events and refactor SelfVerificationRoot and related contracts

- Introduced new events in SelfVerificationRoot for verification configuration updates, scope changes, and attestation ID management.
- Updated Airdrop contract to remove deprecated events and added a new event for Merkle root updates.
- Refactored SelfPassportERC721 to inherit from SelfVerificationConsumer, enhancing verification logic and event handling.
- Improved function parameters for consistency and clarity across contracts.

* Refactor contracts to use SelfVerificationRoot and enhance verification logic

- Removed SelfVerificationConsumer contract and updated related contracts to inherit from SelfVerificationRoot.
- Refactored mappings and event emissions in Airdrop, HappyBirthday, and SelfPassportERC721 for improved clarity and functionality.
- Enhanced verification success hooks to include user identifiers and nullifiers for better tracking.
- Updated constructor parameters for consistency across contracts and improved error handling for user registration and claims.

* Refactor constructor in SelfPassportERC721 for improved readability

* Refactor function parameters in SelfVerificationRoot and related contracts

* Refactor constructor parameter names in IdentityVerificationHub, Airdrop, IdentityRegistry, and ProxyRoot contracts for improved clarity and consistency

* fix getCircuitName function (#575)

* fix getCircuitName function

* fix getCircuitName function

* feat: Read ID cards (#571)

* Update GitHub checkout action from v3 to v4 (#544)

* Bump build version 2.5.2 to test react native keychain (#572)

* bump build and version

* bump version 2.5.2

* don't downgrade react native keychain

* update app/README.md toolchain instructions (#140)

* bump build (#580)

---------

Co-authored-by: Seshanth.S🐺 <[email protected]>
Co-authored-by: turboblitz <[email protected]>
Co-authored-by: motemotech <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: crStiv <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: James Niken <[email protected]>
Co-authored-by: Kevin Lin <[email protected]>
Co-authored-by: leopardracer <[email protected]>
Co-authored-by: Olof Andersson <[email protected]>

* feat(wip): register circuit for aadhaar

* chore: add anon aadhar circuits

* chore: remove sc and disclose selfrica test

* feat: extract aadhaar qr data

* test: aadhaar qr data extract circuit

* test: aadhaar register  circuit

* feat: extract pincode and ph no last 4 digit

* fix: register aadhaar nullifier and commitment

* test: Verify commitment circuit of aadhaar

* feat: add photoHash inside commitment

* feat: build Aadhaar OFAC SMT

* feat: ofac check and reveal data (test done)

* test: qr extractor for custom data input

* feat: add state as reveal data inside VC and disclose

* chore: add comments

* fix: num2Ceil component

* chore: review changes

* chore: use passport SignatureVerifier

* fix: signatureVerifier inputs

* feat: extract ascii values of fields

* feat: provide users the flexibility to reveal specific characters of a field

* chore: refactor

* test: register aadhaar for tampered data

* test(wip): should return 0 if in ofac list

* test: ofac check

* test: register aadhaar circuit for different qr data

* merge dev into main (#683)

* remove sdk/tests (#622)

* remove sdk/tests

* chore: update yarn.lock

---------

Co-authored-by: Ayman <[email protected]>

* fix: add range check on paddedInLength of shaBytesDynamic (#623)

* fix ci (#626)

* implement self uups upgradeable (#592)

* implement self uups upgradeable

* small changes in identityVerificationHubImplV2

* delete aderyn.toml

* chore: add custom verifier

* chnage return output

* feat: use self structs and a Generic output struct

* feat: add userIdentifier, nullifier, forbiddencountries to returned output

* add root view functions from registry

* fix: build and compilation errors

* add userDefined data into selfVerificationRoot

* "resolve conflicts"

* fix compilation problem

* fix how to register verification config

* test: CustomVerifier

* fix verification root and hub integration

* add scope check in hub impl

* replace poseidon hash to ripemd+sha256

* add todo list

* feat: refactor and add test cases for generic formatter

* add performUserIdentifierCheck in basicVerification

* change how to handle additionalData and fix stack too deep

* start adding test codes

* fix dependency problems in monorepo

* fix: forbidden countries (#612)

LGTM!

* able to run test code

* pass happy path

* delete unused codes

* change error code name, add caller address validation and add scripts to run test and build in monorepo

* add all test cases in vcAndDisclose flow

* remove comment out

* chore: use actual user identifier outputs

* success in registration tests

* cover all cases

* pass contractVersion instead of circuitVersion

* fix disclose test

* chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter

* change val name and remove unused lines

* add val name change

* remove userIdentifier from return data

* feat: use GenericDiscloseOutput struct in verfication hook  fix test cases for user identifier

* chore: change the function order for Hub Impl V2 (#625)

* fix nat specs

* add nat spec in SelfStructs

---------

Co-authored-by: Ayman <[email protected]>
Co-authored-by: Nesopie <[email protected]>

* prettier (#629)

* CAN auth - android (#613)

* add missed files

* add NFCMethodSelectionScreen

* bump android build

---------

Co-authored-by: Justin Hernandez <[email protected]>

* feat: add MRZ correction method to NFCMethodSelectionScreen (#627)

* add npm auth token env (#632)

* bump sdk version (#633)

* publish npm package when merging on dev

* bump common sdk version

* replace yarn publish by npm publish

* update common package version

* Simplify dev mode gesture (#635)

* Simplify developer mode gesture

* Enable dev mode on MockData screen with five taps

* add build smt function to common sdk

* update vc_and_disclose_id test (dev branch) (#641)

* fix: vc_and_disclose_id test

* chore: yarn prettier

* Show modal on NFC scan error (#642)

* Add help button and error modal actions

* fix the screen management

* yarn nice

* Bump build v2.5.4: ios 132; android 71 (#631)

* bump version and build numbers

* remove tamagui/toast

* fix marketing version

* fix: update TD1 and TD3 checks (#643)

* bum yarn.lock

* Bump build: ios 133; android 72 and build fixes (#654)

* update gesture version and bump android build

* bump and fix ios build

* update lock files

* fixes

* fix fotoapparat library source

* Update example contracts to include EUID usage (#656)

* refactor: update HappyBirthday contract to V2 with support for E-Passport and EUID cards, introduce bonus multipliers, and enhance verification logic

* refactor: update Airdrop contract to V2 with support for E-Passport and EU ID Card attestations

* refactor: remove BASIS_POINTS constant from Airdrop contract

* feat: introduce SelfIdentityERC721 contract for issuing NFTs based on verified identity credentials, replacing SelfPassportERC721

* fix: update verification functions in Airdrop, HappyBirthday, and SelfIdentityERC721 contracts to use customVerificationHook

* cherry pick commit from add-test-self-verification...

* block non-dev pr to main branch

* audit fixes (#645)

* merge dev branch into main (#624)

* remove sdk/tests (#622)

* remove sdk/tests

* chore: update yarn.lock

---------

Co-authored-by: Ayman <[email protected]>

* fix: add range check on paddedInLength of shaBytesDynamic (#623)

* fix ci (#626)

---------

Co-authored-by: Ayman <[email protected]>
Co-authored-by: Vishalkulkarni45 <[email protected]>

* update contracts (#628)

* remove sdk/tests (#622)

* remove sdk/tests

* chore: update yarn.lock

---------

Co-authored-by: Ayman <[email protected]>

* fix: add range check on paddedInLength of shaBytesDynamic (#623)

* fix ci (#626)

* implement self uups upgradeable (#592)

* implement self uups upgradeable

* small changes in identityVerificationHubImplV2

* delete aderyn.toml

* chore: add custom verifier

* chnage return output

* feat: use self structs and a Generic output struct

* feat: add userIdentifier, nullifier, forbiddencountries to returned output

* add root view functions from registry

* fix: build and compilation errors

* add userDefined data into selfVerificationRoot

* "resolve conflicts"

* fix compilation problem

* fix how to register verification config

* test: CustomVerifier

* fix verification root and hub integration

* add scope check in hub impl

* replace poseidon hash to ripemd+sha256

* add todo list

* feat: refactor and add test cases for generic formatter

* add performUserIdentifierCheck in basicVerification

* change how to handle additionalData and fix stack too deep

* start adding test codes

* fix dependency problems in monorepo

* fix: forbidden countries (#612)

LGTM!

* able to run test code

* pass happy path

* delete unused codes

* change error code name, add caller address validation and add scripts to run test and build in monorepo

* add all test cases in vcAndDisclose flow

* remove comment out

* chore: use actual user identifier outputs

* success in registration tests

* cover all cases

* pass contractVersion instead of circuitVersion

* fix disclose test

* chore: add natspecs for ImplHubV2, CustomVerifier and GenericFormatter

* change val name and remove unused lines

* add val name change

* remove userIdentifier from return data

* feat: use GenericDiscloseOutput struct in verfication hook  fix test cases for user identifier

* chore: change the function order for Hub Impl V2 (#625)

* fix nat specs

* add nat spec in SelfStructs

---------

Co-authored-by: Ayman <[email protected]>
Co-authored-by: Nesopie <[email protected]>

* prettier (#629)

---------

Co-authored-by: Ayman <[email protected]>
Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: nicoshark <[email protected]>
Co-authored-by: Nesopie <[email protected]>

* fix: vc_and_disclose_id test (#640)

* fix: vc_and_disclose_id test

* chore: yarn prettier

* fix: check if a config id exists

* chore: change the function where the config not set verification is happening

* fix: add await

* feat: add getConfigId function in SelfVerificationRoot (#650)

* feat: add getConfigId function in SelfVerificationRoot

* update comment

---------

Co-authored-by: motemotech <[email protected]>

* chore: fix ofac end index in eu id cards

* chore: fix tests

* fix: example contracts and tests

---------

Co-authored-by: turnoffthiscomputer <[email protected]>
Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: nicoshark <[email protected]>

* Update deployment module for Identity Verification Hub V2 with detailed documentation and library linkage for CustomVerifier. Update initialization process to reflect changes in V2 implementation, ensuring proper setup for proxy deployment. (#658)

* publish npm-package (#651)

* App/eu id updates (#638)

* fix build issues

* generate disclosure proof with euids

* generate disclosure proof with euids

* Eu id updates 2 (#648)

* update vc_and_disclose_id test (dev branch) (#641)

* fix: vc_and_disclose_id test

* chore: yarn prettier

* Show modal on NFC scan error (#642)

* Add help button and error modal actions

* fix the screen management

* yarn nice

* Bump build v2.5.4: ios 132; android 71 (#631)

* bump version and build numbers

* remove tamagui/toast

* fix marketing version

* fix: update TD1 and TD3 checks (#643)

* bum yarn.lock

* add version and user defined data

---------

Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>

* remove the mock user define data

* get the useridentifier as a hash from the user defined data

* chore: add version and userDefinedData

* feat: use the version in register / dsc proofs as well

* update calculateUserIdentifierHash

* yarn nice

* refactor: consolidate user context data handling and update payload structure

* fix typing issues on sha1

* remove console.log(sha1)

* fix sha1 import

* refactor: streamline userDefinedData handling and adjust payload type for circuit

* refactor: update sha1 usage and enhance logging in calculateUserIdentifierHash

* yarn nice

* yarn lint common

* use ts-ignore for sha1 import

* fix app ci tests

* fix typing issue

* remove unused ts-ignore

* cast uuid before calling generateinputs

* bump qrcode version

* add tsup on the qrcode sdk

* fix: exports on selfxyz/qrcode

* update how we define config.version

* fix yarn imports

* yarn format

---------

Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>
Co-authored-by: Ayman <[email protected]>

* Hotfix contract compile error (#660)

* Fix previous rebase error

* Refactor deployment module for Identity Verification Hub V2.

* Fix/sdk (#652)

* fix: sdk build configs

* chore: SelfBackendVerifier (WIP)

* feat: add custom verification

* feat: consider destination chain in user defined data

* chore: export attestation id

* chore: export attestation id

* chore: export config storage

* chore: don't throw an error if the proof is not valid

* chore: trim abi and rm typechain types

* refactor

* chore: rm unnecessary exports

* 📝 Add docstrings to `fix/sdk` (#653)

Docstrings generation was requested by @remicolin.

* https://github.com/selfxyz/self/pull/652#issuecomment-2992046545

The following files were modified:

* `sdk/core/src/utils/hash.ts`
* `sdk/core/src/utils/proof.ts`
* `sdk/core/src/utils/utils.ts`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* review fixes

* chore: fix package.json cjs types

* chore: add minor changes to checks

* feat: add InMemoryConfigStore, allIds constant and verificationResult type

* chore: export Verification config

* feat: change the verification config types

* fix: throw issues early if verification config is null

* fix: update yarn.lock file

* chore: lint

* fix: rm ts expect error directive

* fix: contract tests

* use excluded countries instead forbidden countries list

* chore: change types in constnats

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update npm-publish workflow and bump core package version to 1.0.0 (#661)

* update import

* Update get verification config visibility (#664)

* Update deployment module for Identity Verification Hub V2 to correct file paths and module name for deployment commands.

* Add troubleshooting documentation for verification issues in deployHubV2.ts. Include manual verification steps and common failure reasons to assist users during deployment.

* Change visibility of getVerificationConfigV2 function from internal to public in IdentityVerificationHubImplV2 contract to allow external access.

* Apply BUSL v1.1 license headers to app (#665)

* Add BSL license headers to app sources

* prettier

* fix license reference - https://spdx.org/licenses/BUSL-1.1.html

* bump build: android 73 (#659)

* Contracts/deploy staging (#668)

* update scripts

* deploy vc and disclose id

* fix the deployment scripts on staging

* update yarn.lock

* bump ios build and version (#669)

* configure coderabbitai (#670)

* tweak coderabbit

* bump

* more thorough test spec

* Apply BSL to app codebase (#639)

* Clean up root license wording

* Simplify SPDX header

* simplify license and rename BSL to BUSL

* fix merge issues

* fix missing method

---------

Co-authored-by: Justin Hernandez <[email protected]>

* SEL-423 apply xcode build suggestions (#671)

* apply recommended app settings from xcode

* stick to portrait orientation and update target settings

* remove app clip references

* Circuit audit fixes  (#644)

* feat: add range checks before use of LessEqThan and SelectSubArray

* fix: Num2Bits_strict to constrain virtualKey

* bump core version

* bump core version and fix ci

* chore: use npm_auth_token in yarnrc

* chroe: rm yarnrc changes

* chore: update npm publish

* chore: run npm publish manually

* chore: change hub contract address (#675)

* Update npm-publish.yml

* chore: use proper secret when publishing

* feat: enable publishing if workflow was triggered manually

* Contracts/update verifier (#673)

* update hardhat config

* update vc and disclose verifier

* update vc and disclose verifier script and run it

* update test self verification root

* update verifier

* bump sdk version and use new hub address

* chore: update zk-kit binary merkle root dep (#674)

* refactor deployment scripts (#678)

* feat: add register eu id instances (#682)

* feat: add register eu id instances

* feat: add new instances

* chore: update scripts

* chore: fix sig alg

* chore: rm circuits

---------

Co-authored-by: Ayman <[email protected]>
Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: nicoshark <[email protected]>
Co-authored-by: Nesopie <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Kevin Lin <[email protected]>
Co-authored-by: kevinsslin <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Eric Nakagawa <[email protected]>

* fix: commitment hash

* fix: register aadhaar test

* chore: refactor

* feat: reveal data in packed bytes

* feat: add constrain on delimiterIndices

* feat: reveal timestamp

* merge main to feat/aadhaar

* fix: tests

* feat: hash pubKey

* feat: add registry contract

* feat: Update HubImplV2 (WIP)

* add functions to generate aadhaar data (WIP)

* modularize aadhaar data generation (WIP)

* fix(wip): register test

* fix: test qr extractor

* fix

* chore: refactor functions

* feat: add age extractor and tested

* feat: add isMiniumAge check

* fix: prepareAadhaarTestData func

* registry contract tests

* feat: registry contract tests

* feat: extract fields from qr data bytes

* chore: refactor mockData

* feat: move minimum age to revealPackedData

* feat: create a constant.ts to retrive fields from unpacked bytes

* chore: refactor

* fix: exports

* rebase

* rebase

* feat: add public signal ,indices mapping

* chore: add public output to indices mapping

* fix:AADHAAR_PUBLIC_SIGNAL_INDICES

* feat: make nullifier public

* fix: nullifier cal for disclose circuits

* feat: merge isMiniumAgeValid and miniumAge signal

* fix: disclsoe test

* feat: support for user identifier and secret

* chore :refactor

* feat: ofac test last name , firstname

* feat: add forbidden_countries_list check

* feat: add tests for aadhaar (WIP)

* failing ofac tests

* feat: finish contract tests

* fix: merge conflicts

* update the common package to be usable in circuits and contracts

* lint everything

* coderabbit fixes

* chore: update name dob,yob aadhaar ofac tree

* feat: merge ofac and reverse ofac check into one

* test: merged ofac constrain

* SELF-253 feat: add user email feedback (#889)

* feat: add sentry feedback

* add sentry feedback to web

* feat: add custom feedback modal & fix freeze on IOS

* yarn nice

* update lock

* feat: show feedback widget on NFC scan issues (#948)

* feat: show feedback widget on NFC scan issues

* fix ref

* clean up

* fix report issue screen

* abstract send user feedback email logic

* fixes

* change text to Report Issue

* sanitize email and track event messge

* remove unnecessary sanitization

* add sanitize error message tests

* fix tests

* save wip. almost done

* fix screen test

* fix screen test

* remove non working test

---------

Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>

* chore: centralize license header checks (#952)

* chore: centralize license header scripts

* chore: run license header checks from root

* add header to other files

* add header to bundle

* add migration script and update check license headers

* convert license to mobile sdk

* migrate license headers

* remove headers from common; convert remaining

* fix headers

* add license header checks

* update unsupported passport screen (#953)

* update unsupported passport screen

* yarn nice

* feat: support new ofac trees

* fix: qr extractor tests

* chore: remove unassigned age signal

* chore: modify timestamp func comment

* fix: add constrain on photo bytes delimiter

* fix: add range check on minimumAge within 2^7

* fix: range check for country not in list

* chore: remove dummy constrain

* fix: assert lessthan

* fix: check is photoEOI valid

* fix: replace maxDataLength with qrPaddedLength for valid del indices

* feat: update forbidden countries in disclose and disclose id

* feat: convert name to uppercase

* fix: add constrain between delimiter and photoEOI

* feat: support for phno len 4 and 10

* chore: hard-code attestaion_ID to 3

* feat: calculate nullifier using uppercase name

* feat: add real id support

* fix: rebase error

* chore: refactor

* add new nullifier and commitment calc

* fix: reuse uppercase name from verify commitment

* feat: add a function that will iterate though all pubkeys

* chore: skip real id test

* chore: yarn format

* chore: update yarn.lock

* chore: rm trailing / from import

* chore: add support for issuing state

* chore: linting and types

* chore: rm types script from circuits

* chore: add license header

---------

Co-authored-by: nicoshark <[email protected]>
Co-authored-by: turnoffthiscomputer <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>
Co-authored-by: turboblitz <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: crStiv <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: James Niken <[email protected]>
Co-authored-by: Kevin Lin <[email protected]>
Co-authored-by: leopardracer <[email protected]>
Co-authored-by: Olof Andersson <[email protected]>
Co-authored-by: vishal <[email protected]>
Co-authored-by: Vishalkulkarni45 <[email protected]>
Co-authored-by: kevinsslin <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Eric Nakagawa <[email protected]>

* fix: CLA not supported (#1027)

* fix: CLA not supported

* fix "yarn android" building

* remove unnecessary commands

---------

Co-authored-by: Justin Hernandez <[email protected]>

* chore: bump app version v2.6.5 (#1034)

* update gem lock

* bump build and version

* fix app versions

* chore: fix nfc passport reader private repo access (#1042)

* add internal repo pat

* update nfc passport reader location

* update workflows to use PAT to access NFC Passport Reader

* fix ci

* update logic to access private repo

* build(android): support 16KB page size (#1043)

* build(android): support 16KB page size

* fix 16kb

* update lock

* chore: bump v2.6.5 for release (#1036)

* bump build

* update to ssh clone to fix local build

* update podfile lock

* fix version

* Feat/build aadhaar (#1044)

* feat: build aadhaar circuits as well in the ci

* feat: add register aadhaar case handling

* fix aadhaar register output after building the cpp circuit (#1045)

* fix: metro js crypto module build issues (#1047)

* fix sdk build issues

* fix build error

* sort and fix dependencies

* add constants-browserify

* feat: add new verifiers (#1049)

* feat: add new verifiers

* format: contracts

* fix: ofac check to aadhaar (#1050)

* fix: hub-v2 (#1051)

* Add DisclosureVerified event for comprehensive verification tracking (#945)

* Add VerificationPerformed event to track verification calls

- Added VerificationPerformed event with comprehensive tracking fields
- Captures requestor contract, version, attestation ID, chain ID, config ID, user identifier, output, and user data
- Enhanced _executeVerificationFlow to return additional tracking data
- Event emission placed after verification completion for accurate tracking

* chore: run formatter

* chore: rename verify event name to DisclosureVerified

* move clearPassportData, markCurrentDocumentAsRegistered, reStorePassportDataWithRightCSCA to SDK (#1041)

* Move self app store to mobile sdk (#1040)

* chore(mobile-sdk-alpha): remove unused tslib dependency (#1053)

* remove tslib -- seems unused

* remove deps accidentally added to root

* build file

* remove unused imports (#1055)

* fix: sha256 signed attr tests (#1058)

* fix mock screen launch (#1059)

* Hotfix: Belgium ID cards (#1061)

* feat: parse belgium TD1 mrz android

* feat: Parse Belgium TD1 MRZ IOS

* fix: OFAC trees not found (#1060)

* fix: relax OFAC tree response validation

* test: cover OFAC tree edge cases

* fix stateless

* revert and fix types

* fix tests

* [SELF-723] feat: add structured NFC and Proof logging (#1048)

* feat: add structured NFC logging

* fix ci

* Fix: add deps

* logging fixes. use breadcrumbs

* fix android build

* update SeverityLevel

* [SELF-705] feat: add proof event logging (#1057)

* feat: add proof event logging

* refactor: unify sentry event logging

* fix types

* fix mock

* simplify

* code rabbit feedback

* fix tests

---------

Co-authored-by: seshanthS <[email protected]>

* skip on dev (#1063)

* don't get fancy just disable (#1064)

* saw it building so gonna try (#1065)

* Dev (#1074)

* chore: bump v2.6.5 rd2 (#1067)

* commit wip version bump

* remove from building

* chore: update tooling dependencies (#1069)

* chore: update tooling dependencies

* chore: align react typings and node types

* update lock

* chore: minor fixes across monorepo (#1068)

* small fixes

* fixes

* fix gesture handler error

* ci fixes

* fix yarn build; add workflow ci (#1075)

* add new workspace ci

* disable package version check for now

* build before checks

* format

* fix in future pr

* feat: add functions for disclosing aadhaar attributes (#1033)

* feat: add functions for disclosing aadhaar attributes

* format

* chore: update monorepo artifacts (#1079)

* remove unneeded artifacts, skip building circuits

* update md files

* cleans up unused parts of sdk interface, adds inline documentation, (#1078)

* cleans up unused parts of sdk interface, adds inline documentation,

* fix up build

* yolo

* Feat/aadhaar sdk (#1082)

* feat: add aadhaar support to the ts sdk

* feat: aadhaar support to go sdk

* chore: refactor

* move clearPassportData, markCurrentDocumentAsRegistered, reStorePassportDataWithRightCSCA to SDK (#1041)

* Move self app store to mobile sdk (#1040)

* chore(mobile-sdk-alpha): remove unused tslib dependency (#1053)

* remove tslib -- seems unused

* remove deps accidentally added to root

* build file

* remove unused imports (#1055)

* fix: sha256 signed attr tests (#1058)

* fix mock screen launch (#1059)

* Hotfix: Belgium ID cards (#1061)

* feat: parse belgium TD1 mrz android

* feat: Parse Belgium TD1 MRZ IOS

* fix: OFAC trees not found (#1060)

* fix: relax OFAC tree response validation

* test: cover OFAC tree edge cases

* fix stateless

* revert and fix types

* fix tests

* [SELF-723] feat: add structured NFC and Proof logging (#1048)

* feat: add structured NFC logging

* fix ci

* Fix: add deps

* logging fixes. use breadcrumbs

* fix android build

* update SeverityLevel

* [SELF-705] feat: add proof event logging (#1057)

* feat: add proof event logging

* refactor: unify sentry event logging

* fix types

* fix mock

* simplify

* code rabbit feedback

* fix tests

---------

Co-authored-by: seshanthS <[email protected]>

* skip on dev (#1063)

* don't get fancy just disable (#1064)

* saw it building so gonna try (#1065)

* chore: bump v2.6.5 rd2 (#1067)

* commit wip version bump

* remove from building

* chore: update tooling dependencies (#1069)

* chore: update tooling dependencies

* chore: align react typings and node types

* update lock

* chore: minor fixes across monorepo (#1068)

* small fixes

* fixes

* fix gesture handler error

* ci fixes

* fix yarn build; add workflow ci (#1075)

* add new workspace ci

* disable package version check for now

* build before checks

* format

* fix in future pr

* feat: add functions for disclosing aadhaar attributes (#1033)

* feat: add functions for disclosing aadhaar attributes

* format

* chore: update monorepo artifacts (#1079)

* remove unneeded artifacts, skip building circuits

* update md files

* chore: update hub contract address

* format

* fix: add aadhaar in AllIds

* chore: bump to v1.1.0-beta

---------

Co-authored-by: vishal <[email protected]>
Co-authored-by: Leszek Stachowski <[email protected]>
Co-authored-by: Aaron DeRuvo <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Seshanth.S🐺 <[email protected]>
Co-authored-by: seshanthS <[email protected]>

* feat: change to gcp attestation verification (#959)

* feat: change to gcp attestation verification

* lint

* fix e2e test

* chore: don't check PCR0 mapping if building the app locally

* fmt:fix

---------

Co-authored-by: Justin Hernandez <[email protected]>

* Mobile SDK: move provingMachine from the app (#1052)

* Mobile SDK: move provingMachine from the app

* lint, fixes

* fix web build?

* lint

* fix metro build, add deps

* update lock files

* move the status handlers and proving machine tests

* may it be

* fix up

* yolo

---------

Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Aaron DeRuvo <[email protected]>

* Revert "Mobile SDK: move provingMachine from the app (#1052)" (#1084)

This reverts commit 8983ac22688f731bca8890cbf9be9c85b4ac2bf…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants