Skip to content

Conversation

@Nesopie
Copy link
Collaborator

@Nesopie Nesopie commented Jun 20, 2025

Summary by CodeRabbit

  • New Features

    • Introduced dynamic verification configuration with on-chain contract lookups and storage interface.
    • Added new error handling for configuration mismatches.
    • Added support for extracting and formatting revealed attestation data.
    • New utility functions for data unpacking and hashing.
    • Introduced new ABIs for contract interactions.
    • Added a default configuration store implementation.
    • Introduced interface for configuration storage management.
  • Refactor

    • Major overhaul of the verification flow to use dynamic configuration and contract-based validation.
    • Consolidated and streamlined error handling in verification.
    • Removed hardcoded contract addresses and legacy ABI files.
    • Updated exports to reflect refined API surface.
  • Chores

    • Updated package build scripts and module entry points for improved compatibility.
    • Enhanced TypeScript and bundler configurations for modern module support.
    • Improved .gitignore and project references for better development workflow.
    • Adjusted JSON imports and bundler configurations in QR code package.
  • Bug Fixes

    • Improved type safety and export structure in several modules.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 20, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

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

Walkthrough

This update introduces a major refactor of the verification logic within the core SDK, shifting from static, hardcoded contract interactions to a dynamic, configuration-driven approach. It adds new utility modules, type definitions, and error handling, while restructuring package exports and build configurations to support dual module formats and improved type safety. Several obsolete ABIs and constants are removed, and new contract interfaces are integrated.

Changes

Files / Groups Change Summary
common/package.json
sdk/core/package.json
sdk/qrcode/package.json
Updated "types" field paths, added/modified exports for dual module support, restructured build scripts and dependencies.
sdk/core/index.ts
sdk/core/src/index.ts
Updated imports/exports, removed getUserIdentifier, changed SelfApp to type-only export, added new types and config store export, adjusted import extensions.
sdk/core/src/SelfBackendVerifier.ts Refactored verification logic to use dynamic config storage and on-chain contract lookups; updated constructor and method signatures; removed static setters; consolidated error handling.
sdk/core/src/errors.ts Added new ConfigMismatch enum and ConfigMismatchError class for detailed config error reporting.
sdk/core/src/types/types.ts Added type aliases for VerificationConfig, GenericDiscloseOutput, and AttestationId.
sdk/core/src/store/interface.ts Introduced IConfigStorage interface for async config management.
sdk/core/src/store/DefaultConfigStore.ts Added DefaultConfigStore class implementing IConfigStorage.
sdk/core/src/utils/constants.ts Added constants for attestation data indices and revealed data field mappings.
sdk/core/src/utils/hash.ts Added calculateUserIdentifierHash utility function.
sdk/core/src/utils/id.ts Added formatRevealedDataPacked function and output type for parsing packed reveal data.
sdk/core/src/utils/proof.ts Added utilities for extracting revealed data bytes from public signals.
sdk/core/src/utils/utils.ts Replaced parsing utilities with unpackReveal and unpackForbiddenCountriesList functions.
sdk/core/src/abi/IdentityVerificationHubImpl.json
sdk/core/src/abi/Registry.json
sdk/core/src/abi/Verifier.json
Added new/partial ABIs for dynamic contract interaction.
sdk/core/src/abi/IdentityRegistryImplV1.ts
sdk/core/src/abi/VerifyAll.ts
sdk/core/src/constants/contractAddresses.ts
Removed obsolete contract ABIs and hardcoded contract address constants.
sdk/core/scripts/copyAbi.sh
sdk/core/.gitignore
Minor changes: added trailing newlines and new ignore patterns.
sdk/core/tsconfig.json
sdk/qrcode/tsconfig.json
Updated output directories, module targets, and added project references.
sdk/qrcode/components/SelfQRcode.tsx Updated JSON imports to use explicit type annotations.
sdk/qrcode/tsup.config.ts Added new build configuration for tsup bundler.

Sequence Diagram(s)

sequenceDiagram
    participant App
    participant SelfBackendVerifier
    participant ConfigStorage
    participant IdentityVerificationHub
    participant Registry
    participant Verifier

    App->>SelfBackendVerifier: verify(attestationId, proof, userContextData)
    SelfBackendVerifier->>ConfigStorage: getConfig(attestationId)
    SelfBackendVerifier->>IdentityVerificationHub: registry(attestationId)
    SelfBackendVerifier->>Registry: checkIdentityCommitmentRoot(root)
    SelfBackendVerifier->>IdentityVerificationHub: discloseVerifier(attestationId)
    SelfBackendVerifier->>Verifier: verifyProof(proof, pubSignals)
    SelfBackendVerifier-->>App: Verification result object
Loading

Possibly related PRs

Poem

A hop and a leap, new contracts to seek,
With hashes and configs, our logic’s unique!
No more old addresses, no static old ways,
Now rabbits fetch configs in dynamic arrays.
With types and new stores, our code’s feeling bright—
Let’s verify safely, from morning till night!
🐇✨


🪧 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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • 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.

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: 8

🔭 Outside diff range comments (1)
sdk/qrcode/tsup.config.ts (1)

1-16: Ensure JSON import assertions are supported

You’re importing JSON with assertions in your code, but tsup doesn’t enable JSON loaders by default. Builds will fail unless you configure loaders. For example, add:

 export const tsup: Options = {
+  loader: { '.json': 'json' },
+  sourcemap: true,
   splitting: true,
   clean: true,
   dts: true,
   format: ['cjs', 'esm'],
   skipNodeModulesBundle: true,
   entryPoints: ['index.ts', 'animations/**/*', 'components/**/*', 'utils/**/*'],
   watch: env === 'development',
   target: 'es2020',
   outDir: 'dist',
 };
🧹 Nitpick comments (11)
sdk/core/scripts/fix-imports.js (1)

16-19: Consider making the regex more robust.

The current regex works for basic cases but could be improved to handle edge cases more reliably.

Consider this more robust regex pattern:

-      const modifiedContent = content.replace(
-        /from ['"](\.\/[^'"]+)['"]/g,
-        'from "$1.js"'
-      );
+      const modifiedContent = content.replace(
+        /from\s+(['"])(\.\/[^'"]*(?<!\.js))\1/g,
+        'from $1$2.js$1'
+      );

This improvement:

  • Handles whitespace between from and the quote
  • Uses negative lookbehind to avoid double .js extensions
  • Preserves the original quote style (single vs double)
sdk/core/src/types/types.ts (1)

12-14: Clarify the purpose of duplicate type aliases.

Both VerificationConfig and GenericDiscloseStruct are aliased to the same type SelfStructs.VerificationConfigV2Struct. This could cause confusion about their intended usage.

Consider either:

  1. Using a single alias if they serve the same purpose
  2. Adding comments to clarify their different use cases
  3. Removing one if it's redundant
+// Configuration for identity verification
 export type VerificationConfig = SelfStructs.VerificationConfigV2Struct;

+// Generic structure for data disclosure (legacy alias?)
 export type GenericDiscloseStruct = SelfStructs.VerificationConfigV2Struct;
sdk/core/src/store/interface.ts (1)

3-23: Well-designed interface with minor documentation typo.

The interface design is clean and appropriate for configuration storage abstraction. The async methods and JSDoc documentation are well-structured.

Fix the typo in the documentation:

-   * @param id - An identifiier associated with the verification config
+   * @param id - An identifier associated with the verification config
-   * @param id - An identifiier associated with the verification config
+   * @param id - An identifier associated with the verification config
sdk/core/src/store/DefaultConfigStore.ts (1)

4-14: Limited implementation ignores ID parameter.

This implementation ignores the id parameter in both getConfig and setConfig, making it essentially a single-configuration store rather than a multi-configuration storage system as the interface suggests.

Consider documenting this limitation or implementing a proper multi-configuration store:

 export class DefaultConfigStore implements IConfigStorage {
-  constructor(private config: VerificationConfig) {}
+  private configs: Map<string, VerificationConfig> = new Map();
+
+  constructor(defaultConfig?: VerificationConfig) {
+    if (defaultConfig) {
+      this.configs.set('default', defaultConfig);
+    }
+  }

-  async getConfig(_id: string): Promise<VerificationConfig> {
-    return this.config;
+  async getConfig(id: string): Promise<VerificationConfig> {
+    const config = this.configs.get(id);
+    if (!config) {
+      throw new Error(`Configuration not found for id: ${id}`);
+    }
+    return config;
   }

-  async setConfig(_id: string, config: VerificationConfig): Promise<boolean> {
-    this.config = config;
+  async setConfig(id: string, config: VerificationConfig): Promise<boolean> {
+    this.configs.set(id, config);
     return true;
   }
sdk/core/src/utils/proof.ts (2)

4-13: Replace magic numbers with named constants for better maintainability.

The hardcoded values (93, 31, 94) should be extracted to named constants to improve code readability and maintainability.

+const REVEALED_DATA_CONSTANTS = {
+  ATTESTATION_1_TOTAL_BYTES: 93,
+  ATTESTATION_2_TOTAL_BYTES: 94,
+  BYTES_PER_CHUNK: 31,
+} as const;
+
 export function getRevealedDataPublicSignalsLength(attestationId: AttestationId): number {
   switch (attestationId) {
     case 1:
-      return 93 / 31;
+      return REVEALED_DATA_CONSTANTS.ATTESTATION_1_TOTAL_BYTES / REVEALED_DATA_CONSTANTS.BYTES_PER_CHUNK;
     case 2:
-      return Math.ceil(94 / 31);
+      return Math.ceil(REVEALED_DATA_CONSTANTS.ATTESTATION_2_TOTAL_BYTES / REVEALED_DATA_CONSTANTS.BYTES_PER_CHUNK);
     default:
       throw new Error(`Invalid attestation ID: ${attestationId}`);
   }
 }

34-42: Remove commented-out code.

If this code is not needed, it should be removed to keep the codebase clean. If it might be needed in the future, consider documenting the reason or creating a TODO comment.

-// export async function getUserIdentifier(
-//   publicSignals: PublicSignals,
-//   user_identifier_type: UserIdType = 'uuid'
-// ): Promise<string> {
-//   return castToUserIdentifier(
-//     BigInt(publicSignals[CIRCUIT_CONSTANTS.VC_AND_DISCLOSE_USER_IDENTIFIER_INDEX]),
-//     user_identifier_type
-//   );
-// }
sdk/core/src/errors.ts (1)

13-28: Robust error class implementation.

The ConfigMismatchError class properly extends Error with correct prototype chaining and supports aggregating multiple configuration issues into a single error. The message formatting is clear and informative.

Consider adding a toString() method for better logging and debugging:

+ toString(): string {
+   return `${this.name}: ${this.message}`;
+ }
sdk/core/src/utils/utils.ts (2)

1-22: Solid implementation with room for improvement.

The unpackReveal function correctly handles packed data decoding using BigInt operations. The logic properly supports both string and array inputs and different ID types.

Consider these improvements for better maintainability:

+ // Byte counts for different ID types: [field1, field2, field3, field4?]
  const bytesCount = id_type === 'passport' ? [31, 31, 31] : [31, 31, 31, 27];
  const bytesArray = packedArray.flatMap((element: string, index: number) => {
    const bytes = bytesCount[index] || 31; // Use 31 as default if index is out of range
+   // Convert string to BigInt for bit operations
    const elementBigInt = BigInt(element);
-   const byteMask = BigInt(255); // 0xFF
+   const BYTE_MASK = BigInt(0xFF); // Mask for extracting single bytes
    const bytesOfElement = [...Array(bytes)].map((_, byteIndex) => {
+     // Extract byte at position byteIndex using bit shifting
-     return (elementBigInt >> (BigInt(byteIndex) * BigInt(8))) & byteMask;
+     return (elementBigInt >> (BigInt(byteIndex) * BigInt(8))) & BYTE_MASK;
    });
    return bytesOfElement;
  });

24-34: Efficient country code extraction.

The function correctly uses unpackReveal and groups decoded characters into 3-character country codes with proper length validation.

Add input validation for better error handling:

export function unpackForbiddenCountriesList(forbiddenCountriesList_packed: string[]) {
+ if (!Array.isArray(forbiddenCountriesList_packed)) {
+   throw new Error('forbiddenCountriesList_packed must be an array');
+ }
  const trimmed = unpackReveal(forbiddenCountriesList_packed, 'id');
sdk/core/src/utils/constants.ts (1)

32-75: Comprehensive revealed data index mappings.

The revealedDataIndices provides detailed start/end index pairs for all revealed data fields with proper type construction using template literals. The different layouts for attestation IDs 1 and 2 are well-defined.

Consider adding JSDoc comments to document the different data layouts:

+ /**
+  * Index mappings for revealed data fields by attestation ID.
+  * Different attestation IDs have different data layouts and field positions.
+  */
export const revealedDataIndices: Record<AttestationId, Record<`${RevealedDataFields}Start` | `${RevealedDataFields}End`, number>> = {
+  /** Attestation ID 1: Passport-based layout */
    // ... existing fields
+  /** Attestation ID 2: ID card-based layout */  
    // ... existing fields
sdk/core/app/contracts/common.ts (1)

1-131: Consider removing file duplication.

This file is identical to sdk/core/src/typechain-types/common.ts. Consider having one location import from the other to avoid maintaining duplicate code.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a9f6207 and dbc3255.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (41)
  • common/package.json (1 hunks)
  • sdk/core/app/contracts/IdentityVerificationHubImpl.ts (1 hunks)
  • sdk/core/app/contracts/common.ts (1 hunks)
  • sdk/core/app/contracts/factories/IdentityVerificationHubImpl__factory.ts (1 hunks)
  • sdk/core/app/contracts/factories/index.ts (1 hunks)
  • sdk/core/app/contracts/index.ts (1 hunks)
  • sdk/core/index.ts (1 hunks)
  • sdk/core/package.json (3 hunks)
  • sdk/core/scripts/copyAbi.sh (1 hunks)
  • sdk/core/scripts/fix-imports.js (1 hunks)
  • sdk/core/src/SelfBackendVerifier.ts (1 hunks)
  • sdk/core/src/abi/IdentityRegistryImplV1.ts (0 hunks)
  • sdk/core/src/abi/IdentityVerificationHubImpl.json (1 hunks)
  • sdk/core/src/abi/Registry.json (1 hunks)
  • sdk/core/src/abi/Verifier.json (1 hunks)
  • sdk/core/src/abi/VerifyAll.ts (0 hunks)
  • sdk/core/src/constants/contractAddresses.ts (0 hunks)
  • sdk/core/src/errors.ts (1 hunks)
  • sdk/core/src/index.ts (1 hunks)
  • sdk/core/src/store/DefaultConfigStore.ts (1 hunks)
  • sdk/core/src/store/interface.ts (1 hunks)
  • sdk/core/src/typechain-types/IdentityVerificationHubImpl.ts (1 hunks)
  • sdk/core/src/typechain-types/Registry.ts (1 hunks)
  • sdk/core/src/typechain-types/Verifier.ts (1 hunks)
  • sdk/core/src/typechain-types/common.ts (1 hunks)
  • sdk/core/src/typechain-types/factories/IdentityVerificationHubImpl__factory.ts (1 hunks)
  • sdk/core/src/typechain-types/factories/Registry__factory.ts (1 hunks)
  • sdk/core/src/typechain-types/factories/Verifier__factory.ts (1 hunks)
  • sdk/core/src/typechain-types/factories/index.ts (1 hunks)
  • sdk/core/src/typechain-types/index.ts (1 hunks)
  • sdk/core/src/types/types.ts (1 hunks)
  • sdk/core/src/utils/constants.ts (1 hunks)
  • sdk/core/src/utils/hash.ts (1 hunks)
  • sdk/core/src/utils/id.ts (1 hunks)
  • sdk/core/src/utils/proof.ts (1 hunks)
  • sdk/core/src/utils/utils.ts (1 hunks)
  • sdk/core/tsconfig.json (2 hunks)
  • sdk/qrcode/components/SelfQRcode.tsx (1 hunks)
  • sdk/qrcode/package.json (2 hunks)
  • sdk/qrcode/tsconfig.json (2 hunks)
  • sdk/qrcode/tsup.config.ts (1 hunks)
💤 Files with no reviewable changes (3)
  • sdk/core/src/constants/contractAddresses.ts
  • sdk/core/src/abi/IdentityRegistryImplV1.ts
  • sdk/core/src/abi/VerifyAll.ts
🧰 Additional context used
🪛 Biome (1.9.4)
sdk/core/src/typechain-types/factories/Registry__factory.ts

[error] 30-38: Avoid classes that contain only static members.

Prefer using simple functions instead of classes with only static members.

(lint/complexity/noStaticOnlyClass)

sdk/core/app/contracts/factories/IdentityVerificationHubImpl__factory.ts

[error] 821-836: Avoid classes that contain only static members.

Prefer using simple functions instead of classes with only static members.

(lint/complexity/noStaticOnlyClass)

sdk/core/src/typechain-types/factories/Verifier__factory.ts

[error] 45-53: Avoid classes that contain only static members.

Prefer using simple functions instead of classes with only static members.

(lint/complexity/noStaticOnlyClass)

sdk/core/src/typechain-types/Registry.ts

[error] 94-94: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

sdk/core/src/typechain-types/factories/IdentityVerificationHubImpl__factory.ts

[error] 976-991: Avoid classes that contain only static members.

Prefer using simple functions instead of classes with only static members.

(lint/complexity/noStaticOnlyClass)

sdk/core/src/typechain-types/Verifier.ts

[error] 113-113: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

sdk/core/app/contracts/IdentityVerificationHubImpl.ts

[error] 471-471: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 475-475: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 481-481: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 495-495: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 511-511: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 521-521: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 527-527: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 543-543: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 549-549: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 555-555: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 561-561: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 570-570: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 576-576: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 601-601: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 606-606: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 613-613: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 628-628: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 648-648: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 659-659: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 667-667: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 676-676: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 681-681: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 688-688: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 695-695: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 705-705: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 712-712: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)

sdk/core/src/typechain-types/IdentityVerificationHubImpl.ts

[error] 364-364: An empty interface is equivalent to {}.

Safe fix: Use a type alias instead.

(lint/suspicious/noEmptyInterface)


[error] 530-530: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 538-538: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 548-548: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 576-576: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 596-596: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 606-606: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 612-612: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 628-628: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 638-638: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 648-648: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 654-654: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 663-663: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 669-669: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 681-681: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 694-694: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 703-703: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 714-714: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 739-739: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 764-764: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 775-775: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 783-783: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 800-800: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 809-809: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 820-820: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 827-827: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 837-837: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 844-844: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)


[error] 854-854: void is confusing outside a return type or a type parameter.

Unsafe fix: Use undefined instead.

(lint/suspicious/noConfusingVoidType)

🪛 Gitleaks (8.26.0)
sdk/core/src/typechain-types/IdentityVerificationHubImpl.ts

866-866: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: run_circuit_tests
🔇 Additional comments (39)
sdk/core/scripts/copyAbi.sh (1)

38-38: Trivial newline addition
The added newline at the end of the script has no impact on its functionality.

sdk/qrcode/tsconfig.json (1)

26-31: Verify referenced project’s composite settings

Ensure the referenced ../../common project’s tsconfig.json also has "composite": true to support project references. You can run:

#!/bin/bash
grep -R '"composite"' common/tsconfig.json || echo "❌ composite not set in common/tsconfig.json"
sdk/qrcode/components/SelfQRcode.tsx (1)

4-5: Confirm runtime support for JSON import assertions

The new imports:

import CHECK_ANIMATION from '../animations/check_animation.json' with { type: 'json' };
import X_ANIMATION from '../animations/x_animation.json' with { type: 'json' };

require bundler and runtime support for import assertions. Verify that your build (tsup/webpack) and Node runtime handle this syntax correctly.

sdk/core/src/index.ts (1)

1-1: Explicit .js extension for ESM compatibility

Updating the export to include the .js extension aligns with ESM resolution requirements. This change is correct.

sdk/core/tsconfig.json (2)

6-7: LGTM! ESM output configuration looks correct

The changes to use ./dist/esm for both declaration and output directories properly support the ES module build structure mentioned in the AI summary.


18-22: Good addition of project references

Adding the reference to the common package supports the new modular structure and shared typings mentioned in the PR summary.

sdk/core/app/contracts/factories/index.ts (1)

1-4: LGTM! Standard autogenerated factory export

The file follows proper conventions for autogenerated TypeScript contract factories with appropriate linting disables and clear export structure.

sdk/core/src/typechain-types/factories/index.ts (1)

4-6: LGTM! Proper ESM factory exports

The exports use .js extensions which is correct for ESM modules, and the three contract factories align with the refactored identity verification system.

sdk/core/src/utils/hash.ts (1)

3-9: Hash implementation looks correct, verify against smart contract expectations

The double-hash implementation (SHA-256 → RIPEMD-160) is correct and follows common blockchain patterns. The padding to 40 characters matches RIPEMD-160's 160-bit output.

Ensure this hash algorithm matches what the IdentityVerificationHubImpl contract expects for user identifier validation.

#!/bin/bash
# Description: Search for hash-related functions in smart contracts to verify algorithm compatibility
# Expected: Find references to SHA-256 and RIPEMD-160 or similar hash functions

echo "Searching for hash-related contract code..."
rg -A 5 -B 5 "sha256|ripemd|hash.*user.*identifier" --type solidity
rg -A 5 -B 5 "calculateUserIdentifier|userContextHash" 
sdk/core/app/contracts/index.ts (1)

4-6: LGTM! Well-structured contract exports

The export structure properly separates types from factories and provides both specific and namespace-based import options, following TypeScript best practices.

sdk/core/src/abi/Registry.json (1)

1-30: LGTM! Well-structured ABI artifact.

The ABI artifact follows standard Hardhat format and correctly defines the IIdentityRegistryV1 interface. The checkIdentityCommitmentRoot function signature is appropriate for its purpose, and the empty bytecode fields are correct for an interface.

sdk/core/scripts/fix-imports.js (1)

26-26: LGTM! Proper error handling.

The script correctly handles async operations and provides adequate error reporting for a utility script.

sdk/core/src/abi/Verifier.json (1)

1-36: LGTM! Standard ZK proof verification ABI.

The ABI correctly defines a verifyProof function with standard zero-knowledge proof parameters. The specific pubSignals array size of 21 elements appears to be tailored for the circuit requirements of this identity verification system.

sdk/core/src/typechain-types/index.ts (1)

1-10: LGTM! Well-structured typechain exports.

The index file correctly follows typechain conventions and provides both individual and namespaced exports for contract types and factories. The .js extensions are properly included for ES modules compatibility.

sdk/core/src/types/types.ts (2)

16-16: LGTM! Well-defined AttestationId type.

The AttestationId type as keyof typeof discloseIndices provides type safety for attestation identifiers and ensures they match the available disclosure indices.


3-3: Verify the import path for constants.

The import path 'src/utils/constants.js' appears to be absolute from the project root. Ensure this resolves correctly from the current file location.

#!/bin/bash
# Description: Verify the constants file exists and the import path is correct

# Check if the constants file exists at the expected location
fd -t f "constants.ts" --exec echo "Found constants file: {}"

# Check the relative path from types.ts to constants.ts
echo "Current file location: sdk/core/src/types/types.ts"
echo "Expected constants location based on import: sdk/core/src/utils/constants.ts"

# Verify the actual path relationship
find . -name "constants.ts" -path "*/sdk/core/src/utils/*" | head -1
sdk/core/index.ts (2)

1-10: LGTM! Clean import/export refactoring.

The changes properly introduce the new configuration storage abstractions while maintaining consistency with ES module requirements. The .js extension addition and type-only exports follow best practices.


20-23: Exports align well with the new architecture.

The new exports for AttestationId, IConfigStorage, and DefaultConfigStore properly expose the configuration storage abstraction to consumers of the SDK.

sdk/core/src/typechain-types/factories/Registry__factory.ts (1)

1-39: Autogenerated contract factory follows standard patterns.

This autogenerated file correctly implements the standard ethers.js contract factory pattern. The static analysis warning about classes with only static members can be safely ignored here - this is the established convention for TypeChain-generated contract factories and provides the expected interface for contract interaction.

sdk/core/src/store/DefaultConfigStore.ts (1)

16-18: Placeholder implementation needs completion.

The getActionId method returns an empty string, which appears to be a placeholder implementation. This could cause issues if the action ID is expected to be meaningful in the verification flow.

Consider implementing proper action ID generation or document that this is intentionally a no-op implementation.

sdk/core/src/typechain-types/factories/Verifier__factory.ts (1)

1-54: Autogenerated ZK proof verifier factory is correctly implemented.

This autogenerated factory correctly implements the standard pattern for ZK proof verification contracts. The ABI properly defines the verifyProof function with elliptic curve proof parameters and public signals. The static analysis warning about static-only classes can be safely ignored as this follows the established TypeChain convention.

sdk/core/app/contracts/factories/IdentityVerificationHubImpl__factory.ts (1)

1-836: Autogenerated contract factory looks properly structured.

This autogenerated TypeScript factory for the IdentityVerificationHubImpl contract follows standard typechain patterns and provides the necessary ABI and connection utilities for type-safe smart contract interaction.

Note: The static analysis warning about static-only classes can be safely ignored for autogenerated contract factories, as this pattern is standard in the ethers.js ecosystem.

sdk/core/src/typechain-types/factories/IdentityVerificationHubImpl__factory.ts (1)

1-991: Autogenerated factory is properly structured with ES module compatibility.

This typechain-generated factory correctly uses ES module imports and follows standard patterns for contract interaction. The ABI appears more comprehensive than the version in /app/contracts/, suggesting this may be a newer or more complete version.

sdk/core/package.json (3)

4-25: Excellent modernization of package configuration for dual module support.

The addition of ES module support with proper conditional exports ensures compatibility across different module systems. The configuration correctly handles both CommonJS and ES modules with appropriate type declarations for each.


30-30: Build system upgrade to tsup improves output flexibility.

Switching from tsc to tsup enables dual format output (CJS/ESM) with source maps and declaration files, which aligns well with the new module architecture.


53-68: Dependencies properly support the new typechain integration.

The addition of typechain and @typechain/ethers-v6 enables generation of the typed contract interfaces, while tsup supports the modernized build process.

sdk/core/src/utils/id.ts (2)

5-34: Well-structured data extraction and formatting function.

The function properly handles the complex task of extracting various identity fields from packed byte arrays. The string cleaning operations and type conversions are appropriate for processing attestation data.


36-48: Comprehensive type definition for disclosed data.

The GenericDiscloseOutput type properly captures all the relevant fields from the identity verification process with appropriate TypeScript types.

sdk/core/src/utils/proof.ts (1)

20-32: Core byte extraction logic is well-implemented.

The bit manipulation operations correctly extract bytes from the packed public signals using proper masking and shifting techniques.

sdk/qrcode/package.json (2)

11-22: Excellent dual module support implementation.

The new exports configuration properly supports both ESM and CommonJS environments, which aligns with modern Node.js best practices.


30-30: Verify tsup configuration exists.

The build script references tsup.config.ts which should exist to ensure consistent build behavior.

#!/bin/bash
# Description: Check if tsup configuration file exists
# Expected: tsup.config.ts should exist in the sdk/qrcode directory

fd -t f "tsup.config.ts" sdk/qrcode/
sdk/core/src/errors.ts (1)

1-11: Well-structured error type definitions.

The ConfigMismatch enum provides clear, typed error categorization that will improve debugging and error handling throughout the verification flow.

sdk/core/src/typechain-types/Registry.ts (1)

1-96: Well-structured autogenerated contract interface.

The TypeScript interface provides proper type safety for the Registry contract with ethers.js v6 patterns. The single checkIdentityCommitmentRoot method is correctly typed with appropriate BigNumberish input and boolean return types.

Note: The static analysis warning about {} type on line 94 is a false positive. In autogenerated typechain code, {} is the correct type for an empty filters object when the contract doesn't emit events.

sdk/core/src/utils/constants.ts (1)

1-30: Well-structured constant definitions with proper typing.

The discloseIndices object provides clear mappings for different attestation IDs with proper TypeScript typing using as const. The structure enables type-safe access to various data field indices.

The passportNoSmtRootIndex: 99 for attestation ID 2 seems unusually high compared to other indices. Please verify this is intentional:

#!/bin/bash
# Description: Search for references to passportNoSmtRootIndex to understand its usage
# Expected: Find usage patterns that explain why index 99 is used for attestation 2

rg -A 3 -B 3 "passportNoSmtRootIndex"
sdk/core/src/typechain-types/Verifier.ts (1)

1-114: LGTM! Standard autogenerated contract interface.

The Verifier contract interface is properly structured for zkSNARK proof verification with the expected verifyProof method signature.

sdk/core/app/contracts/IdentityVerificationHubImpl.ts (1)

1-886: LGTM! Comprehensive contract interface for the identity verification hub.

The autogenerated interface properly defines all contract methods, events, and proof structures needed for the identity verification system.

sdk/core/src/typechain-types/common.ts (1)

1-131: LGTM! Standard typechain common types.

The file provides essential type definitions for type-safe contract interactions using ethers.js.

sdk/core/src/typechain-types/IdentityVerificationHubImpl.ts (1)

1-1041: Skip autogenerated file
This TypeScript interface is fully autogenerated by TypeChain (Autogenerated file. Do not edit manually.). Manual review of generated definitions is unnecessary.

sdk/core/src/abi/IdentityVerificationHubImpl.json (1)

1-970: Skip autogenerated ABI artifact
This JSON ABI is generated by the Solidity build toolchain (hh-sol-artifact-1). No manual changes or in-depth review are required.

const CELO_MAINNET_RPC_URL = 'https://forno.celo.org';
const CELO_TESTNET_RPC_URL = 'https://alfajores-forno.celo-testnet.org';

const IDENTITY_VERIFICATION_HUB_ADDRESS = '0x0000000000000000000000000000000000000000';
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Critical: Identity verification hub address is set to zero address.

The IDENTITY_VERIFICATION_HUB_ADDRESS is hardcoded to 0x0000000000000000000000000000000000000000, which will cause all contract interactions to fail. This needs to be updated to the actual deployed contract address.

🤖 Prompt for AI Agents
In sdk/core/src/SelfBackendVerifier.ts at line 17, the constant
IDENTITY_VERIFICATION_HUB_ADDRESS is incorrectly set to the zero address, which
will cause contract interactions to fail. Replace this placeholder with the
actual deployed contract address for the identity verification hub to ensure
proper functionality.

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: 3

♻️ Duplicate comments (4)
sdk/core/src/SelfBackendVerifier.ts (4)

17-17: Critical: Identity verification hub address is still set to zero address.

This is the same issue identified in previous reviews. The IDENTITY_VERIFICATION_HUB_ADDRESS remains hardcoded to the zero address, which will cause all contract interactions to fail in production.


96-97: Remove duplicate forbidden countries list assignment.

The forbiddenCountriesList variable is assigned the same value twice, which is redundant.

-const forbiddenCountriesList = unpackForbiddenCountriesList(verificationConfig.forbiddenCountriesListPacked.map(String));
const forbiddenCountriesListVerificationConfig = unpackForbiddenCountriesList(verificationConfig.forbiddenCountriesListPacked.map(String));

99-100: Fix comparison logic for forbidden countries validation.

The current logic incorrectly compares if verification config countries are in the forbidden list, but it should verify that the user's nationality validation logic is correct.


146-146: Fix incorrect method name for verifier lookup.

The method discloseVerifier doesn't exist in the contract interface. Based on previous reviews, it should be vcAndDiscloseCircuitVerifier.

🧹 Nitpick comments (2)
sdk/core/src/SelfBackendVerifier.ts (2)

111-114: Simplify timestamp parsing logic.

The current timestamp parsing is overly complex and error-prone. Consider using a more direct approach.

-const circuitTimestampYy = [2, 0, publicSignals[discloseIndices[attestationId].currentDateIndex], publicSignals[discloseIndices[attestationId].currentDateIndex + 1]];
-const circuitTimestampMm = [publicSignals[discloseIndices[attestationId].currentDateIndex + 2], publicSignals[discloseIndices[attestationId].currentDateIndex + 3]];
-const circuitTimestampDd = [publicSignals[discloseIndices[attestationId].currentDateIndex + 4], publicSignals[discloseIndices[attestationId].currentDateIndex + 5]];
-const circuitTimestamp = new Date(Number(circuitTimestampYy.join('')), Number(circuitTimestampMm.join('')) - 1, Number(circuitTimestampDd.join('')));
+const dateIndex = discloseIndices[attestationId].currentDateIndex;
+const year = 2000 + Number(publicSignals[dateIndex] + publicSignals[dateIndex + 1]);
+const month = Number(publicSignals[dateIndex + 2] + publicSignals[dateIndex + 3]) - 1;
+const day = Number(publicSignals[dateIndex + 4] + publicSignals[dateIndex + 5]);
+const circuitTimestamp = new Date(year, month, day);

148-150: Improve error handling for verifier contract lookup.

The generic error message doesn't provide enough context for debugging. Consider preserving the original error information.

-}catch (error) {
-  throw new Error('Verifier contract not found');
-}
+} catch (error) {
+  throw new Error(`Verifier contract not found: ${error instanceof Error ? error.message : 'Unknown error'}`);
+}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 601b35b and 9dcbc3c.

📒 Files selected for processing (5)
  • sdk/core/index.ts (1 hunks)
  • sdk/core/src/SelfBackendVerifier.ts (1 hunks)
  • sdk/core/src/types/types.ts (1 hunks)
  • sdk/core/src/utils/id.ts (1 hunks)
  • sdk/core/src/utils/utils.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • sdk/core/src/utils/utils.ts
  • sdk/core/src/utils/id.ts
  • sdk/core/index.ts
  • sdk/core/src/types/types.ts
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: run_circuit_tests

coderabbitai bot added a commit that referenced this pull request Jun 20, 2025
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`
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 20, 2025

Note

Generated docstrings for this pull request at #653

@remicolin remicolin changed the base branch from main to dev June 20, 2025 16:10
coderabbitai bot and others added 3 commits June 20, 2025 21:48
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>
@remicolin remicolin merged commit 72a7f81 into dev Jun 23, 2025
7 checks passed
@remicolin remicolin deleted the fix/sdk branch June 23, 2025 12:25
remicolin added a commit that referenced this pull request Jun 24, 2025
* 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

---------

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]>
0xturboblitz pushed a commit that referenced this pull request Jun 25, 2025
* 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)

---------

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]>
remicolin added a commit that referenced this pull request Jun 25, 2025
* 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]>
remicolin added a commit that referenced this pull request Aug 20, 2025
* 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

* merge dev to main (#657)

* 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

---------

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]>

* 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)

* Dev (#677)

* 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)

---------

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]>

* 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

* update the smart contracts scripts (#684)

* remove the && false

* fix euid (#685)

* keep build and version in sync (#686)

* fix env set to null

* fix: circuit for register ci (#690)

* fix: circuit for register ci

* fix: rm duplicate workflow_dispatch

* feat: add better error handling (#691)

* fix: older than bug (#692)

* bump: sdk/[email protected]

* fix: config not found bug

* decrease parallel circuits to 3

* ci: add prettier check for contract sdk (#602)

* Add Prettier check for code formatting in contracts workflow

* Update contracts workflow: remove unused checkout action and fix build step name

* Run formatter

* Run lint fix

* chore: update build_cpp to 2 concurrent builds

* Contract/fix sdk (#695)

* fix contracts sdk

* fix contracts sdk

* Fix contract example v2 (#694)

* feat: add verification config ID functionality to Airdrop, HappyBirthday, and SelfIdentityERC721 contracts

* Run formatter

* SEL-473: Add lint rule for BUSL headers (#698)

* chore(app): enforce license header via eslint

* update lock and order

* fix formatting

* SEL-444: Fix android cloud backup (#697)

* feat(android): migrate google backup

* update lock and google services config

* add bulk format command

* backup fixes

* working drive settings!!!!!!!!

* remove unneeded intent filter

* add tests

* coderabbit feedback

* coderabbit feedback

* abstract google method

* coderabbit feedback and fix test

* more coderabbit suggestions and tests fixes

* chore: update relayer verifier enum to include the register circuits (#699)

* fix env sample (#700)

* Abstract iOS cloud backup logic (#701)

* feat(ios): abstract cloud backup logic

* prettier and cr feedback

* tested on iOS and android and functionality is the same

* Fix navigation serialization warnings (#702)

* test: cover modal callbacks

* coderabbit feedback

* feat(app): clarify passport linking (#704)

* Show NFC support message (#708)

* SEL-425: Add document management analytics events (#706)

* Add document management analytics

* coderabbit feedback

* SEL-447: Improve proof failure feedback (#707)

* feat: flag stale proofs as failed

* make a constant

* format

* SEL-330: Add backup check after verification (#711)

* route to save phrase if backup disabled

* format

* SEL-483: Implement recovery backup prompts (#710)

* feat: prompt users to back up account

* feat: prompt users to back up account

* format

* Add tests for recovery prompt logic

* more lint updates

* fix imports

* fix unused import

* update cursor suggestions

* implement coderabbit suggestions and fix tests

* SEL-472: Enable production push notifications (#703)

* chore: leave sandbox apns token comment

* tweak entitlement

* coderabbit ai feedback

* firebase tweaks

* Chore: ensure there is an extra empty line after the license declaration (#712)

* ensure there is an extra empty line after the license declaration

* ignore adding header to cjs config files

* add missing license header

* ignore linting metro config

* bump version and add mainnet hub address

* Bugfix: Show recovery prompt only when user has docs (#714)

* feat(app): prompt recovery only when docs exist

* cr feedbacl

* SEL-487: Prompt user to backup recovery phrase before registering (#715)

* feat: prompt backup before registration

* coderabbit feedback

* fix tests

* coderabbitai feedback and fix tests

* Remove StartupFlushPolicy (#717)

* SEL-479: Multi-ID onboarding mvp flow (#688)

* save new launch screen wip

* save wip

* finalize launch look

* replace launch screen

* rename

* update camera onboarding and scan screen

* update tips looks

* update nfc scan issue screens

* update copy

* add launch screen todo

* fix casing

* update launch screen link, copy and add tracking event

* bump project version to match app store

* match app store

* updated supported bio id link

* add dialog message support back in

* cr feedback

* bump version and build

* update images

* tweak animation layout

* loop with setTimeout

* fix onboarding assets (#719)

* feat: add flag to use PACEPolling (#680)

* feat: add flag to use PACEPolling

* fix: santize before storing in store

* bump ios build number and update podfile lock

* prettier

* bump build

* feat: add flag to use PACEPolling

* fix: santize before storing in store

* bump ios build number and update podfile lock

* prettier

* bump build

---------

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

* fix backup button label (#722)

* update version to 2.6.0 and bump build numbers (#721)

* SEL-179 & SEL-312: Add gitleaks and GitGuardian scanning (#705)

* chore: add secret scanning setup

* fix: correct GitGuardian action path

* cr feedbacak

* test husky commit

* pr feedback

* fix workflows

* tweaks

* fix versions

* upgrade: migrate from husky v8 to v9

- Update husky from ^8.0.0 to ^9.1.7
- Change prepare script from 'husky install' to 'husky'
- Remove v8 hook structure (shebang, husky.sh sourcing)
- Delete .husky/_/ directory as it's not needed in v9
- Maintain gitleaks pre-commit hook functionality

* coderabbitai feedback

* add bulk sort command (#723)

* feat(app): redirect empty docs to launch (#725)

* Apply consistent safe area padding across screens (#726)

* Contracts/update verifiers (#729)

* update the verifiers

* update deployment script

* update deployment script and deploy to prod

* prettier run write

* App/ethcc fixes (#730)

* fix mock data screen

* increase timout between dsc and register proof

* fix the isUserRegisteredWithAlternativeCSCA function

* yarn nice

* allow people to switch to a mock id (#732)

* yarn nice

* chore: update default config id method

* chore: use named exports

* Update README.md

* Temporarily disable recovery redirect and reminder prompts  (#733)

* Revert "SEL-487: Prompt user to backup recovery phrase before registering (#715)"

This reverts commit fe14ac655e11b4b9e0c4023002b84fcc79bedd31.

* revert update

* fix safe area context pkg

* Revert "SEL-487: Prompt user to backup recovery phrase before registering (#715)"

This reverts commit fe14ac655e11b4b9e0c4023002b84fcc79bedd31.

* fix old flow

* more silent tests

* update lock files

* hard code return

* SEL-486: Fix unwrap DO (#718)

* update podfile: unwrapDO

* update lock

* bump version and builds

* bump build; forgot to enable logs

* fix version to not interfere with release

---------

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

* SEL-494: Update proving machine event tracking (#734)

* Add extensive proof analytics instrumentation

* prettier and sort events by key name

* remove loading screen race condition redirect (#736)

* Chore: new build for v2.6.0 ios 145 android 81 (#737)

* bump version and build

* properly bump app

* bump build

* Improve manual mobile deploy workflow and docs (#728)

* Add basic Fastlane helper tests

* Upgrade fastlane and enhance helper tests (#738)

* simplify mobile deploy pipelines and make them manual. update readme

* update fastlane dev readme

* update tests and add helper script

* cr feedback, update tests, revert circuits package.json sort change

* tweaks

* fix slack

* cr feedback and fixes

* add better cjs eslint support

* save wip. add confirmation check script. update scripts

* remove auto increment feature

* migrate readme items over to DEV due to fastlane auto regen docs flow

* use regular xcode

* fix hermes compiler path

* coderabbit feedback

* reinstall when on local dev

* fix upload

* simplify

* simplify confirmation feedback with tests

* fix mobile deploys

* cr feedback

* test iOS building

* fix trigger logic

* cr feedback

* updates

* fix env var

* fix order

* re-enable upload to testflight for ios

* updated notes

* chore: update readme

* Bugfix: android deeplinks (#742)

* bugfix: deep linking

* add android manifest test

* bump build and version

* format readme

* fix deeplink genmockiddoc

* add the gender to the deeplink optoin

* bump version (#743)

* fix the female bug

* bump build 148 (#744)

* SEL-496: Add Firebase Remote Config and dev feature flag screen (#735)

* feat: add remote config support

* update lock

* tweak config logic. add feature flag viewing screen

* add tests

* allow for local overriding of feature flags

* save local override work

* save wip

* clean up ui

* update screen to handle multi value types

* fix tests

* cr feedback and fix tests

* remote config upates. fix tests, codex feedback

* Improve AGENTS workflow notes (#747)

* clarify workflow instructions

* agents feedback

* Address minor mobile deployment bugs (#745)

* feat: improve deployment tooling

* cr feedback

* for temp testing

* clean build artifacts after deploy

* add deploy source

* uncomment ios commands

* Add tests for minor deployment fixes (#750)

* Add test coverage for deployment scripts and Fastfile

* format

* increase github check to 5 minutes

* Extend platform build file tests (#748)

* Add build file tests

* cr feedback

* Add proving machine tests (#749)

* Add actor mock helper and tests

* format tests

* fix tests

* wip fix tests

* address cr feedback

* Add thorough test cases for mobile app (#752)

* Add actor mock helper and tests

* format tests

* fix tests

* Revert non-app tests

* update tests

* fix tests

* coderabbit feedback

* revert change

* remove spurious tests

* don't use crypto in core sdk

* Start of Web App (#689)

* Add .cursorignore to optimize AI editor performance and security (#758)

Prevents Cursor AI from accessing sensitive files (keys, credentials,
deployment configs) and large generated artifacts that slow down indexing.
Keeps source code accessible while excluding build outputs, node_modules,
and circuit/contract compilation artifacts across the monorepo.

* SEL-504: fix fonts and some styles (#762)

* fix fonts and some styles

* dry config

* fix some warnings

* lets start with coverage for app (#763)

* lets start with coverage for app

* lint

* better setup

* SEL-559: Update td1 regex (#760)

* feat: update td1 regex

* update review comments

* fix: NPE on expirationDate regex

* fix user defined data (#766)

* fix: name formatting for middle name

* bump: sdk/core to 1.0.7-beta.1

* Feat/retrieve OFAC trees from api (#769)

* retrieve the ofac trees from the api

* remove the ofac trees from the common repo

* fix ofac test

* yarn nice

* yarn nice

* yarn nice

* refactor ofac fetching

* Release new build v2.6.2 (#779)

* bump version and build

* ignore podfile

* Remove failing version test (#780)

* remove version check test

* remove test all together

* SEL-269: Update ESLint rules & lock prettier config (#781)

* Update ESLint config and lock prettier config

* Refine ESLint config and fix lint issues

* Apply eslint fixes

* Use socketIo alias (#782)

* move gesture handler

* save wip updates

* fix svg imports

* update tsconfig

* eslint updates

* eslint fixes

* improve ignore folders

* coderabbit feedback

* Fix style prop shorthands (#787)

* Expand view style props

* Expand remaining style props

* update types

* fix pipeline

* fix test env check

* nicer casting

* fix booleans

* update deeplink url handling and make it more robust

* add socket error handler

* Add COSE signature verification tests (#788)

* Update ESLint config and lock prettier config

* Refine ESLint config and fix lint issues

* save wip updates

* eslint updates

* eslint fixes

* Add COSE signature verification tests

* fix tests

* SEL-553: Show NFC Progress (#764)

* feat: add haptics

* fix: BAC FAILED error event

* update lock file

---------

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

* SEL-566: Navigate Home based on document validity (#768)

* feat: navigate home if atleast one valid document is present

* update comments

* Review: Remove unnecessary continue statement

* feat: add tracking

* SEL-544: Generate Mock DSC on mock-passport flow (#772)

* feat: Generate mock DSC on mock-passport flow

* Remove console log

* yarn format

* revert to mock dsc generation

* SEL-570: Display user ID in prove screen (#790)

* Display user ID on prove screen

* Add user ID formatting util and tests

* Clarify user ID formatting

* fix nice

* add tests and save toggle wip

* update tests based on feedback

* say connected wallet when wallet

* fix: Add localhost validation to prevent invalid endpoint usage in QR Code SDK (#794)

* Feat/mobile deployment automation (#759)

* feat: add version management system with build number tracking

- Add version.json to track iOS/Android build numbers separately
- Create version.cjs script for build number management
- Add Fastlane version_manager.rb helper
- Keep npm version for semver, version.json for build tracking

* feat: integrate version.json with Fastlane deployment process

## What Changed
- Updated iOS and Android Fastlane lanes to use version.json for build number management
- Added automatic build number increment on deployment
- Added deployment timestamp tracking

## How It Works

### iOS Deployment
1. Reads current build number from version.json
2. Increments iOS build number (e.g., 148 → 149)
3. Updates Xcode project with new build number via increment_build_number
4. Proceeds with TestFlight deployment
5. Updates lastDeployed timestamp on successful upload

### Android Deployment
1. Reads current build number from version.json
2. Increments Android build number (e.g., 82 → 83)
3. Updates build.gradle with new version code via increment_version_code
4. Proceeds with Play Store deployment
5. Updates lastDeployed timestamp on successful upload

## Why This Change
- Eliminates manual version/build number entry
- Prevents version conflicts between deployments
- Provides single source of truth for build numbers
- Enables automatic deployments without human intervention
- Tracks deployment history with timestamps

## Dependencies
- Requires version.json file (already created in previous commit)
- Uses existing Fastlane plugins:
  - increment_build_number (iOS - built-in)
  - increment_version_code (Android - from plugin)
- Version numbers still managed by npm version command

* feat: enhance deploy confirmation with version.json info

* fix: use ENV variable directly in increment_build_number to avoid secret masking

* fix: correct xcodeproj path for GitHub Actions workflow

* feat: add test mode to workflow for safe testing

- Skip store uploads when test_mode is true
- Test version bumps and builds without deployment
- Prevent accidental pushes to TestFlight/Play Store

* fix: use gradle_file_path instead of gradle_file for increment_version_code

* fix: use gsub to remove ../ prefix for CI compatibility

* chore: remove accidentally committed files

- Remove .cursor/mcp.json
- Remove .cursorignore
- Remove deployment-automation-summary.md
- Remove deployment-meeting-questions.md
- Remove pipeline.md

* feat: auto-commit version.json after successful deployment

- Commits version.json changes back to repository
- Only runs when test_mode is false
- Uses [skip ci] to prevent infinite loops
- Checks for actual changes before committing

* feat : update package.json in build step using npm version

* feat: add comprehensive caching to mobile deployment workflow

- Add caching for Yarn dependencies, Ruby gems, CocoaPods, Gradle, and Android NDK
- Implement cache versioning strategy for easy cache invalidation
- Fix cache order: caches now restored after checkout but before dependency installation
- Update mobile-setup action to skip installs when dependencies are cached
- Add cache size monitoring to track usage against GitHub's 10GB limit
- Fix Slack notification bug: skip notifications in test_mode
- Add detailed logging for package.json version updates (show from/to versions)

Expected performance improvement: ~50% faster builds (from ~15min to ~7-10min)

* fix: move bundler config after Ruby setup in mobile-setup action

* fix: rename cache env vars to avoid Yarn conflicts

Yarn was interpreting YARN_CACHE_VERSION as its own config setting.
Prefixed all cache version env vars with GH_ to avoid conflicts.

* fix: remove bundler deployment mode to allow Gemfile updates

The deployment mode was causing bundler to fail when Gemfile
changed (nokogiri was removed). CI should be able to update
the lockfile as needed.

* feat: implement strict lock file enforcement (Option 1)

- Re-enable bundler deployment mode for strict Gemfile.lock checking
- Use yarn install --immutable for strict yarn.lock checking
- Add clear error messages when lock files are out of date
- Add pre-checks to verify lock files exist
- This ensures reproducible builds and makes caching maximally effective

When developers change dependencies, they must now:
1. Run yarn install or bundle install locally
2. Commit the updated lock files
3. CI will fail with helpful instructions if they forget

* fix: update Gemfile.lock for CI environment

Remove nokogiri from Gemfile.lock since it's excluded in CI
environments (GITHUB_ACTIONS=true). This allows the strict
lock file checks to pass in CI.

* fix: correct yarn.lock path for monorepo workspace

The project uses Yarn workspaces with yarn.lock at the repository
root, not in the app directory. Updated paths to check for yarn.lock
at workspace root and use it for cache keys.

* fix: handle both boolean and string test_mode parameter

The test_mode parameter was only checking for string 'true' but
could be passed as boolean true from command line. Now handles both
cases to ensure test mode works correctly for iOS and Android.

* fix: address code review feedback for mobile deployment workflow

- Replace jq with Node.js for version extraction (jq not available on macOS runners)
- Fix concurrent commit race condition by creating separate update-version job
- Add platform validation to version_manager.rb and version.cjs scripts
- Use POSIX-compatible single = for shell string comparisons
- Ensure single atomic commit when deploying to both platforms

* fix: formatting and linting issues

- Remove trailing spaces from workflow YAML file
- Fix prettier formatting in JavaScript files
- Add -y flag to yarn version command for non-interactive mode
- Address all lint warnings from CI

---------

Co-authored-by: Jayaditya Gupta <[email protected]>

* fix: increment iOS build number

* fix: bump app version to 2.6.3 for iOS release

* App/deeplink callback (#789)

* add deepllinkCallback support

* bump package version

* yarn nice

* fix background countdown

* cast the URL to prevent malicious code introduction

* fix: use cleanDocumentNumber (#784)

* increment iOS bundle version

* Feat/push to dev main (#767)

* feat: add version management system with build number tracking

- Add version.json to track iOS/Android build numbers separately
- Create version.cjs script for build number management
- Add Fastlane version_manager.rb helper
- Keep npm version for semver, version.json for build tracking

* feat: integrate version.json with Fastlane deployment process

## What Changed
- Updated iOS and Android Fastlane lanes to use version.json for build number management
- Added automatic build number increment on deployment
- Added deployment timestamp tracking

## How It Works

### iOS Deployment
1. Reads current build number from version.json
2. Increments iOS build number (e.g., 148 → 149)
3. Updates Xcode project with new build number via increment_build_number
4. Proceeds with TestFlight deployment
5. Updates lastDeployed timestamp on successful upload

### Android Deployment
1. Reads current build number from version.json
2. Increments Android build number (e.g., 82 → 83)
3. Updates build.gradle with new version code via increment_version_code
4. Proceeds with Play Store deployment
5. Updates lastDeployed timestamp on successful upload

## Why This Change
- Eliminates manual version/build number entry
- Prevents version conflicts between deployments
- Provides single source of truth for build numbers
- Enables automatic deployments without human intervention
- Tracks deployment history with timestamps

## Dependencies
- Requires version.json file (already created in previous commit)
- Uses existing Fastlane plugins:
  - increment_build_number (iOS - built-in)
  - increment_version_code (Android - from plugin)
- Version numbers still managed by npm version command

* feat: enhance deploy confirmation with version.json info

* fix: use ENV variable directly in increment_build_number to avoid secret masking

* fix: correct xcodeproj path for GitHub Actions workflow

* feat: add test mode to workflow for safe testing

- Skip store uploads when test_mode is true
- Test version bumps and builds without deployment
- Prevent accidental pushes to TestFlight/Play Store

* fix: use gradle_file_path instead of gradle_file for increment_version_code

* fix: use gsub to remove ../ prefix for CI compatibility

* chore: remove accidentally committed files

- Remove .cursor/mcp.json
- Remove .cursorignore
- Remove deployment-automation-summary.md
- Remove deployment-meeting-questions.md
- Remove pipeline.md

* feat: auto-commit version.json after successful deployment

- Commits version.json changes back to repository
- Only runs when test_mode is false
- Uses [skip ci] to prevent infinite loops
- Checks for actual changes before committing

* feat : update package.json in build step using npm version

* feat: add comprehensive caching to mobile deployment workflow

- Add caching for Yarn dependencies, Ruby gems, CocoaPods, Gradle, and Android NDK
- Implement cache versioning strategy for easy cache invalidation
- Fix cache order: caches now restored after checkout but before dependency installation
- Update mobile-setup action to skip installs when dependencies are cached
- Add cache size monitoring to track usage against GitHub's 10GB limit
- Fix Slack notification bug: skip notifications in test_mode
- Add detailed logging for package.json version updates (show from/to versions)

Expected performance improvement: ~50% faster builds (from ~15min to ~7-10min)

* fix: move bundler config after Ruby setup in mobile-setup action

* fix: rename cache env vars to avoid Yarn conflicts

Yarn was interpreting YARN_CACHE_VERSION as its own config setting.
Prefixed all cache version env vars with GH_ to avoid conflicts.

* fix: remove bundler deployment mode to allow Gemfile updates

The deployment mode was causing bundler to fail when Gemfile
changed (nokogiri was removed). CI should be able to update
the lockfile as needed.

* feat: implement strict lock file enforcement (Option 1)

- Re-enable bundler deployment mode for strict Gemfile.lock checking
- Use yarn install --immutable for strict yarn.lock checking
- Add clear error messages when lock files are out of date
- Add pre-checks to verify lock files exist
- This ensures reproducible builds and makes caching maximally effective

When developers change dependencies, they must now:
1. Run yarn install or bundle install locally
2. Commit the updated lock files
3. CI will fail with helpful instructions if they forget

* fix: update Gemfile.lock for CI environment

Remove nokogiri from Gemfile.lock since it's excluded in CI
environments (GITHUB_ACTIONS=true). This allows the strict
lock file checks to pass in CI.

* fix: correct yarn.lock path for monorepo workspace

The project uses Yarn workspaces with yarn.lock at the repository
root, not in the app directory. Updated paths to check for yarn.lock
at workspace root and use it for cache keys.

* fix: handle both boolean and string test_mode parameter

The test_mode parameter was only checking for string 'true' but
could be passed as boolean true from command line. Now handles both
cases to ensure test mode works correctly for iOS and Android.

* fix: address code review feedback for mobile deployment workflow

- Replace jq with Node.js for version extraction (jq not available on macOS runners)
- Fix concurrent commit race condition by creating separate update-version job
- Add platform validation to version_manager.rb and version.cjs scripts
- Use POSIX-compatible single = for shell string comparisons
- Ensure single atomic commit when deploying to both platforms

* fix: formatting and linting issues

- Remove trailing spaces from workflow YAML file
- Fix prettier formatting in JavaScript files
- Add -y flag to yarn version command for non-interactive mode
- Address all lint warnings from CI

* feat: implement automated branch-based mobile deployments

- Add mobile-deploy-auto.yml workflow that triggers on PR merges to dev/main
- Update mobile-deploy.yml to support workflow_call for reusability
- Add deployment_track, version_bump, and auto_deploy parameters
- Create new Fastlane lanes (deploy_auto) for iOS and Android
- Implement smart version bumping based on PR labels (major/minor/patch)
- Add graceful error handling for Play Store permission issues
- Enhance Slack notifications with deployment track information

This enables automatic deployments when PRs are merged:
- dev branch → internal testing track
- main branch → production track
- Skip deployment with [skip-deploy] in PR or no-deploy label

* feat: add automated git tagging and release system

- Add automatic git tagging for production deployments (v2.5.5, platform-specific tags)
- Create GitHub releases with changelogs for production deployments
- Add manual release script (yarn release) for version bumping and tagging
- Implement simple changelog generation from git history
- Add comprehensive deployment documentation in .github/MOBILE_DEPLOYMENT.md
- Update app/README.md with deployment commands and workflows

This completes the release automation system requested in the ticket for
manual tagging and versioning with automated changelogs and release notes.

---------

Co-authored-by: Jayaditya Gupta <[email protected]>

* Implement basic code splitting

* cm feedback

* update lock

* yarn nice

* add typing to crypto loader

* fix type. more opportunities

* lint suggestions

* build dependencies before linting

* fix build command

* save updated imports

* update build checks

* fix import

* fix imports and test

* fix install commands

* Update Gemfile.lock to exclude nokogiri in CI environments

- Regenerated Gemfile.lock with GITHUB_ACTIONS=true to match the conditional
  nokogiri exclusion in the Ge…
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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants