180 Commits

Author SHA1 Message Date
Justin Hernandez
07addb2a9a chore: add TypeScript tooling (#891)
* chore: add TypeScript tooling

* chore: remove unused tsconfig and migration script

* update settings

* add knip config

* format

* more reliable circuits tests

* fix workflow

* fix types

* updates

* ts updates

* more updates

* fix upgrade

* fixes
2025-08-13 21:02:07 -07:00
Justin Hernandez
7a7a597545 Optimize CI workflows and add core SDK checks (#885)
* Parallelize mobile SDK CI and add core workflow

* fix tests for now

* test build improvements

* fix: add explicit Corepack setup to fix Yarn version issues in CI

* security: add minimal permissions, pin actions to SHAs, and improve checksum verification

* refactor: remove redundant Corepack setup from npm-publish and core-sdk-ci workflows

* simplify action versions
2025-08-12 18:12:56 -07:00
Justin Hernandez
2ed8bcfe53 feat: modernize sdk/qrcode build pipeline (#872)
* Modernize qrcode build

* chore(qrcode): add lint helpers

* fix sdk qrcode

* add new qrcode ci

* fix formatting

* qrcode fixes

* fixes

* fixes rd2

* enable corepack

* enable corepack

* build caching

* update caching

* cr feedback
2025-08-10 21:22:02 -07:00
Justin Hernandez
29c620badd Add composite cache actions (#874)
* Add composite cache actions

* cr feedback

* add cache versions
2025-08-10 19:16:31 -07:00
Justin Hernandez
cd2ec0d9c5 Cache dependencies in mobile workflows (#873)
* Cache mobile build deps

* updates
2025-08-10 18:28:44 -07:00
Justin Hernandez
b59dbe1b05 Chore: mobile sdk refinements (#858)
* Add sdk-alpha package with MRZ helper

* chore: add migration report script

* Add lint config and MRZ tests to sdk-alpha

* fix tests

* fixes. wip

* fixes

* fix bundler tests

* mrz improvements based on cr feedback

* prettier

* fix build errors

* Document browser shim (#859)

* Validate required adapters (#861)

* Use sdkError for web scanner shim (#862)

* Document new workspaces in AGENTS (#864)

* Add client tests (#860)

* Use deep merge for client config (#863)

* Add config merge helper

* format

* Add SDK alpha CI workflow (#865)

* rename

* rename file

* update workflow

* coderabbit feedback and fixes

* fix linter

* fix import paths

* wip fixes

* updates

* fix tests

* formatting

* update workflow

* remove console mocks

* rename folder and fixes

* fix tests

* save wip

* auto format on save for all sdk package files

* fixes

* cr feedback

* fix pipelines
2025-08-09 17:14:56 -07:00
Justin Hernandez
343515c35f chore: add Node version file (#853) 2025-08-07 17:48:25 -07:00
Justin Hernandez
5305ef83fc Feat: Improved import export sorting for app and common (#833)
* save import sorting work

* remove dupe headers and fix type errors

* sort imports and exports

* fix errors from export sorting

* fix tests

* codex feedback

* fix exports

* fix exports and tweak test build

* fix export and format

* fix license headers

* fix app building and clean up test errors

* fix android local e2e test

* improve caching

* final fixes

* remove invalid option

* fix sorting and get random values loading

* fix import sorting
2025-08-06 15:18:42 -07:00
Justin Hernandez
fdb932eeba Feat: Lightweight e2e tests for iOS and Android (#840)
* Add Maestro e2e testing

* Run Maestro flows in parallel

* Fix mobile e2e workflow

* Fix e2e script flow path

* prettier

* fix

* prettier

* standardize yml files and new formatting commands

* fix ndk

* fix exclusions

* use double quotes for yml files

* feedback

* fixes

* fixes

* fix

* fix ios job

* unneeded

* fix workflows

* fix launch workflow

* fix

* fix pipeline

* workflow fixes

* install app to emulators

* better logging

* save current version of test script

* android works. ios wip. update locks

* fix pipelines

* cr feedback

* fix android e2e test

* Split mobile e2e workflow by platform (#842)

* Replace react-native-quick-crypto with @noble/hashes (#841)

* Add tests for ethers polyfills

* Add crypto utils

* Inline crypto polyfills into ethers util

* sort and update gemfile lock

* update lock

* chore: incrementing ios build number for version 2.6.3 [github action]

* android works. ios wip. update locks

* Specify Maestro platform

* Fix Android build step in e2e workflow

* fix android

* update ios

* add concurrency

* update Podfile.lock

* fix android

* prettier

* fix

* fix android pipeline

* try job again

* fix ios

* fix android

* fix ios

* fix command

* use android runner now that path is fixed

* fix android e2e test

* fix adb

* add caching

* fix build

* speed up build

* fix

* test emulator options

* updates

* fix pipeline

* fix

* fix script and move on

* add comment

---------

Co-authored-by: Self GitHub Actions <action@github.com>

* feedback

* fixes

* ignore for now

* ignore

* fix tests

* fix ios simulator booting

* fix ios test

* shutdown after run

* fix ios test

* better timing

* increase ios timeout

* fix both flows

* fix pipeline

* combine command

* fix ios

* break up build steps for better caching

* remove cache

* fix ios and android test pipelines

* update logic

---------

Co-authored-by: Self GitHub Actions <action@github.com>
2025-08-06 12:41:09 -07:00
Justin Hernandez
82d26669bc Enable tree-shakeable exports (#823)
* Add tree-shakeable exports

* Migrate imports for tree-shakeable paths

* Document ESM extension requirement

* udpates

* install new lock

* yarn nice

* build deps

* save working index export no wildcard approach

* save wip

* fix building

* add tree shaking doc and examples

* sort package json files

* update package.json

* fix analyzing web

* make sure that web is built

* wip tree shaking

* building works again. save wip logic

* use granular imports

* wip test

* save wip

* Remove hardcoded .d.ts files and setup automatic TypeScript declaration generation

- Remove redundant constants.d.ts, types.d.ts, utils.d.ts files
- Add build:types script to automatically generate TypeScript declarations
- Update tsup config to disable DTS generation (handled separately)
- Update .gitignore to prevent future commits of generated .d.ts files
- Fixes import resolution errors in app by ensuring declarations are always generated

* Add .gitignore rules for generated TypeScript declarations

* ignore dts files

* Remove redundant index.js re-export files

- Remove constants.js, types.js, utils.js as they're redundant with tsup build
- These were just re-exports pointing to dist files that tsup generates
- package.json exports already point directly to built files
- Update .gitignore to prevent future commits of these generated files
- tsup handles all the building, no manual re-export files needed

* save current wip fixes

* add tsup config for web building

* common prettier and fix imports

* prettier

* fix tests

* implement level 3 tree shaking

* improve splitting

* optimize vite web building and prettier

* remove comments

* sort export params

* feedback and fix pipelines

* fix circuit-names path

* fix test

* fix building

* sort

* fix building

* allow cursor to edit scripts

* fix loadDocumentCatalog undefined

* fix build settings

* fix build settings

* additional metro tree shaking

* improved discovery script for xcode building

* pr feedback and fix camelCasing

* simplify shim setup

* fix xcode building and add command to test building

* remove comment

* simplify
2025-08-02 16:55:05 -07:00
Justin Hernandez
17e1633ee7 Update NDK and packaging (#820)
* Update NDK version and packaging options

* Update NDK references

* update lock files

* readme updates
2025-08-01 16:18:12 -07:00
jayssj11
dcc341673f fix android build failure (#827)
- Modified package.json to create separate install commands for iOS and Android
  - Updated mobile-setup/action.yml to use platform-specific install commands
  - Android builds will no longer try to run pod install and increment ios build number
2025-07-31 18:35:55 +08:00
jayssj11
76db38a9bb Test/pipeline trigger demo (#826)
* test: trigger CI/CD pipeline with harmless comment update

Testing the auto-deploy workflow after recent fixes

* fix: remove duplicate checkout in mobile-setup action

The mobile-setup action was doing its own checkout which could cause
inconsistencies between iOS and Android jobs. The main workflow already
handles checkout, so this duplicate checkout was causing Android builds
to fail with Gemfile.lock errors while iOS passed.

* fix: enable checkout for Android builds

The checkout step was conditionally skipped for Android builds,
causing 'yarn.lock and Gemfile.lock missing' errors. Both iOS
and Android need the repository checked out to access lock files.
2025-07-31 17:58:23 +08:00
jayssj11
5b5c09c53b Test/pipeline trigger demo (#825)
* test: trigger CI/CD pipeline with harmless comment update

Testing the auto-deploy workflow after recent fixes

* fix: remove duplicate checkout in mobile-setup action

The mobile-setup action was doing its own checkout which could cause
inconsistencies between iOS and Android jobs. The main workflow already
handles checkout, so this duplicate checkout was causing Android builds
to fail with Gemfile.lock errors while iOS passed.
2025-07-31 17:46:58 +08:00
Justin Hernandez
86656fdca6 Fix lazy loading, web build; revert tree shaking for now (#815)
* Revert "fix yarn web (#814)"

This reverts commit bf158fd977.

* Revert "add hermes ios engine"

This reverts commit f6defcfb12.

* Revert "codex feedback"

This reverts commit df35a47f72.

* Revert "merge with dev"

This reverts commit 47a8d9d2f1.

* Revert "update Gemfile.lock and remove lock when reinstalling"

This reverts commit 5f25752f77.

* Revert "test package update"

This reverts commit 19dcba0e42.

* Revert "revert install cmd changes"

This reverts commit 5427bd12a1.

* Revert "Fix CI build by excluding nokogiri in GitHub Actions/Act environments"

This reverts commit dbff69a13e.

* Revert "prettier"

This reverts commit 87f421456f.

* Revert "fix building"

This reverts commit fbbefd2a3d.

* Revert "optimize path resolving"

This reverts commit 23b1118b8e.

* Revert "fix loading"

This reverts commit f0c884b43b.

* Revert "clean up dupe bundle install"

This reverts commit 5428567bbe.

* Revert "fix metro loading"

This reverts commit 3a766001dc.

* Revert "remove passport provider lazy loading"

This reverts commit 5f793a54b3.

* Revert "allow cursor to edit Gemfile and update lock file"

This reverts commit b6f7158e8e.

* Revert "Update Gemfile.lock to exclude nokogiri in CI environments"

This reverts commit 243640152d.

* Revert "fix install commands"

This reverts commit 2dc7d7c1c9.

* Revert "fix imports and test"

This reverts commit 83d6308029.

* Revert "fix import"

This reverts commit fa42b07ce4.

* Revert "update build checks"

This reverts commit b281f15a16.

* Revert "save updated imports"

This reverts commit 215bca4bee.

* Revert "fix build command"

This reverts commit 37f95bc8fb.

* Revert "build dependencies before linting"

This reverts commit 9e57e017ca.

* Revert "lint suggestions"

This reverts commit ff9b9d2c7c.

* Revert "fix type. more opportunities"

This reverts commit 7ad82d5817.

* Revert "add typing to crypto loader"

This reverts commit d55eec8f44.

* Revert "yarn nice"

This reverts commit df1c2dbd9b.

* Revert "update lock"

This reverts commit 04692ba3b5.

* Revert "cm feedback"

This reverts commit 848071f315.

* fix file name

* fix web loading

* fix border width styling

* fix package commands

* fix import and update lock

* fixes from reverted commits

* more fixes for web building

* fix yarn web:build

* add yarn web:build workflow

* cm feedback

* final fixes

* fix for and vitge

* fix loading
2025-07-30 22:27:49 -07:00
Justin Hernandez
2da0f8014a Add bundle analysis workflow (#802)
* Add bundle analysis workflow

* Fix bundle analysis workflow

* Add adjustable bundle size warning

* pretty

* update pull request paths

* update Gemfile.lock

* rename

* pipeline tweaks

* fix tests
2025-07-29 11:49:59 -07:00
Jayaditya Gupta
9229c76a9b lockfile update 2025-07-29 14:30:16 +05:30
jayssj11
ee297e71f9 fix: add required permissions to mobile-deploy-auto workflow (#800)
- Add contents: write and pull-requests: write permissions
- This allows the workflow to call mobile-deploy.yml with proper permissions
- Fixes the startup failure when PR is merged
2025-07-29 14:06:03 +08:00
jayssj11
9a5cb5321c fix: correct workflow syntax for reusable workflows (#798)
* fix: correct workflow syntax for reusable workflows

- Split deploy job into deploy-ios and deploy-android
- Fixed platforms output to use JSON array format
- Resolves startup_failure error

* fix: update mobile-deploy.yml to support workflow_call events

- Remove github.event_name == 'workflow_dispatch' conditions
- Use inputs context directly which works for both workflow_dispatch and workflow_call
- Update deployment status messages to show input parameters
- This allows mobile-deploy-auto.yml to successfully trigger deployments

* fix: correct job dependencies and input references in mobile-deploy.yml

- Fix create-release-tags job to depend on 'update-version' not 'update-version-files'
- Change github.event.inputs.test_mode to inputs.test_mode for workflow_call compatibility
- Remove redundant workflow_dispatch check in production condition
- Fix test_mode comparison to use boolean instead of string
- This resolves the workflow validation errors
2025-07-29 13:33:27 +08:00
Justin Hernandez
b281f15a16 update build checks 2025-07-28 21:54:31 -07:00
Justin Hernandez
37f95bc8fb fix build command 2025-07-28 21:54:31 -07:00
Justin Hernandez
9e57e017ca build dependencies before linting 2025-07-28 21:54:31 -07:00
jayssj11
c269e66f10 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 <nightmare@Jayadityas-MacBook-Pro.local>
2025-07-29 12:42:39 +08:00
jayssj11
7d5545bc91 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 <nightmare@Jayadityas-MacBook-Pro.local>
2025-07-28 13:39:47 +08:00
Justin Hernandez
b841b19d96 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
2025-07-03 22:32:14 -07:00
Justin Hernandez
7aeb16b69b 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
2025-07-01 17:47:45 -07:00
Kevin Lin
66c3df7fcb 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
2025-06-28 07:30:29 +08:00
Nesopie
47ef8da161 fix: circuit for register ci (#690)
* fix: circuit for register ci

* fix: rm duplicate workflow_dispatch
2025-06-27 17:19:07 +02:00
Nesopie
83ad584f03 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
2025-06-25 19:59:38 +02:00
Ayman
e685991d75 chore: merge main into dev 2025-06-25 08:23:09 +05:30
Ayman
a8af8ec1e7 feat: enable publishing if workflow was triggered manually 2025-06-24 15:58:31 +05:30
Ayman
ca4a9d59e8 chore: use proper secret when publishing 2025-06-24 15:54:20 +05:30
turnoffthiscomputer
49de54966e merge dev to main (#657)
* remove sdk/tests (#622)

* remove sdk/tests

* chore: update yarn.lock

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>

* 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 <aymanshaik1015@gmail.com>
Co-authored-by: Nesopie <87437291+Nesopie@users.noreply.github.com>

* prettier (#629)

* CAN auth - android (#613)

* add missed files

* add NFCMethodSelectionScreen

* bump android build

---------

Co-authored-by: Justin Hernandez <transphorm@gmail.com>

* 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 <aymanshaik1015@gmail.com>

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

* fix ci (#626)

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>
Co-authored-by: Vishalkulkarni45 <109329073+Vishalkulkarni45@users.noreply.github.com>

* update contracts (#628)

* remove sdk/tests (#622)

* remove sdk/tests

* chore: update yarn.lock

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>

* 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 <aymanshaik1015@gmail.com>
Co-authored-by: Nesopie <87437291+Nesopie@users.noreply.github.com>

* prettier (#629)

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>
Co-authored-by: Vishalkulkarni45 <109329073+Vishalkulkarni45@users.noreply.github.com>
Co-authored-by: nicoshark <i.am.nicoshark@gmail.com>
Co-authored-by: Nesopie <87437291+Nesopie@users.noreply.github.com>

* 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 <i.am.nicoshark@gmail.com>

* chore: fix ofac end index in eu id cards

* chore: fix tests

* fix: example contracts and tests

---------

Co-authored-by: turnoffthiscomputer <98749896+remicolin@users.noreply.github.com>
Co-authored-by: Vishalkulkarni45 <109329073+Vishalkulkarni45@users.noreply.github.com>
Co-authored-by: nicoshark <i.am.nicoshark@gmail.com>

* 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 <109329073+Vishalkulkarni45@users.noreply.github.com>
Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
Co-authored-by: Seshanth.S🐺 <35675963+seshanthS@users.noreply.github.com>

* 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 <109329073+Vishalkulkarni45@users.noreply.github.com>
Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
Co-authored-by: Seshanth.S🐺 <35675963+seshanthS@users.noreply.github.com>
Co-authored-by: Ayman <aymanshaik1015@gmail.com>

* 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 <transphorm@gmail.com>

* 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 <aymanshaik1015@gmail.com>
Co-authored-by: Vishalkulkarni45 <109329073+Vishalkulkarni45@users.noreply.github.com>
Co-authored-by: nicoshark <i.am.nicoshark@gmail.com>
Co-authored-by: Nesopie <87437291+Nesopie@users.noreply.github.com>
Co-authored-by: Seshanth.S🐺 <35675963+seshanthS@users.noreply.github.com>
Co-authored-by: Justin Hernandez <transphorm@gmail.com>
Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
Co-authored-by: Kevin Lin <86810837+kevinsslin@users.noreply.github.com>
Co-authored-by: kevinsslin <kk123750964@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Eric Nakagawa <ericnakagawa@gmail.com>
2025-06-24 12:18:48 +02:00
Nesopie
650e9b960c Update npm-publish.yml 2025-06-24 15:41:11 +05:30
Ayman
bc486e13d2 chore: run npm publish manually 2025-06-24 14:39:04 +05:30
Ayman
8e5065a333 chore: update npm publish 2025-06-24 14:36:26 +05:30
Ayman
0a1771706d bump core version and fix ci 2025-06-24 14:10:36 +05:30
Nesopie
42eff712b3 Update npm-publish workflow and bump core package version to 1.0.0 (#661) 2025-06-23 14:34:53 +02:00
turnoffthiscomputer
ddcaac9392 block non-dev pr to main branch 2025-06-22 18:28:50 +02:00
turnoffthiscomputer
40edfd7e44 replace yarn publish by npm publish 2025-06-16 23:21:21 +02:00
turnoffthiscomputer
4e57997b96 publish npm package when merging on dev 2025-06-16 23:13:24 +02:00
turnoffthiscomputer
6750848529 add npm auth token env (#632) 2025-06-16 21:54:10 +02:00
turnoffthiscomputer
de4bf207ee merge dev branch into main (#624)
* remove sdk/tests (#622)

* remove sdk/tests

* chore: update yarn.lock

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>

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

* fix ci (#626)

---------

Co-authored-by: Ayman <aymanshaik1015@gmail.com>
Co-authored-by: Vishalkulkarni45 <109329073+Vishalkulkarni45@users.noreply.github.com>
2025-06-16 12:14:19 +02:00
turnoffthiscomputer
9efe1b0902 fix ci (#626) 2025-06-16 11:31:11 +02:00
Nesopie
f4f5903b40 fix: circuit tests and tsconfigs (#621)
* fix: circuit tests and tsconfigs

* fix-ci: downgrade typescript version

* fix: yarn.lock

* fix: linting in common
2025-06-13 14:16:23 +02:00
emmmm
2a6c00f6bd ci: bump setup-node to v4 (#606)
* Update action.yml

* Update circuits.yml

* Update contracts.yml

* Update npm-publish.yml
2025-06-12 14:01:00 -07:00
Aaron DeRuvo
253d414dd4 attempt to have apps cocoa pods etc be built in ci (#590) 2025-06-04 14:01:23 +02:00
Aaron DeRuvo
0e9c59c0fb SEL-56: Setup Yarn Workspaces (#584) 2025-06-04 11:37:32 +02:00
leopardracer
b7a79a4ef6 Update GitHub checkout action from v3 to v4 (#544) 2025-05-27 14:47:08 +02:00
James Niken
f0d2f6d94e 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 847b88d5ec.

* ci: bump actions/checkout to v4

---------

Co-authored-by: nicoshark <i.am.nicoshark@gmail.com>
Co-authored-by: turnoffthiscomputer <98749896+remicolin@users.noreply.github.com>
2025-04-26 13:00:53 -07:00