30 Commits

Author SHA1 Message Date
Leszek Stachowski
94e2b4dd8f feat: MRZ data confirmation for NFC scanning (#1767)
* feat: MRZ data confirmation for NFC scanning

* - euclid DataConfirmationScreen, InputField -> app
- change date picker library

* lint

* fix build

* fix tests

* remove diff sending + add data confirmation button to trouble screen

* fix: date handling

* fix: greptile PR comments + lint/fmt

* simplify date handling

* update Podfile.lock

* migrate tests to test folder

---------

Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
2026-04-22 15:52:21 -07:00
Nesopie
537b0dd418 fix: gracefully gate passport OCR camera permission (#2008)
* fix(app): gate passport OCR camera in TS to stop Android permission loop (SELF-2645)

Denying the camera system prompt on the Android passport OCR scan screen
previously re-fired the prompt repeatedly (the UI "blinked") because the
native CameraFragment re-requested permission from onResume each time the
permission dialog dismissed. On iOS the scanner view silently stayed black
after denial. Both were caused by permission handling living in the native
layer with no TypeScript gate.

Move the gate to TypeScript:
- Pre-navigation check in DocumentOnboardingScreen routes denials to a
  KYC fallback via useKycLauncher instead of navigating into the camera.
- DocumentCameraScreen tracks permission in a cameraReady state and skips
  the <PassportCamera> render until confirmed granted; AppState foreground
  transitions re-check and dismount on revocation. This eliminates the
  iOS black scanner view entirely.

The broken native Android permission code (CameraFragment onResume +
inverted hasCameraPermission()) is now unreachable dead code. Cleaning it
up is tracked as a follow-up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(ios): link Camera permission handler in Podfile (SELF-2645)

Without `setup_permissions(["Camera"])` in the Podfile, the iOS app has
the react-native-permissions JS wrapper but no native handler linked, so
`check(PERMISSIONS.IOS.CAMERA)` throws and the passport OCR gate falls
through to the "Camera not available" alert on real iPhones with working
cameras.

Run `cd app/ios && pod install` after pulling this commit. The matching
Podfile.lock update will land in a follow-up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* update lock file

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
2026-04-22 07:55:52 -07:00
Seshanth.S
3e5523abdd SELF-2643: use expo-camera for qrcode scanning (#1981)
* use expo-camera for qrcode scanning

* remove unused react import

* greptile review comments

* coderabbit comments

* lint

* update podfile.lock

---------

Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
2026-04-16 23:40:19 -07:00
Nesopie
07352a5ac6 feat: migrate from Sumsub to Didit KYC provider (#1860)
* chore: swap @sumsub/react-native-mobilesdk-module for @didit-protocol/sdk-react-native

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: rename SUMSUB_TEE_URL to DIDIT_TEE_URL

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: rename PendingKycVerification.userId to sessionId

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add Didit integration module, remove Sumsub integration

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add useDiditWebSocket hook, remove useSumsubWebSocket

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add useDiditLauncher hook, remove useSumsubLauncher

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: rename userId to sessionId in pendingKycStore, bump persist version

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: rename sumsub error injection triggers to didit

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: rename KycSuccess route param userId to sessionId

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: update KycSuccessScreen to use useDiditWebSocket and sessionId

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: update all consumer files from Sumsub to Didit

Updates usePendingKycRecovery, selfClientProvider, 5 fallback screens,
LogoConfirmationScreen, HomeScreen, KYCVerifiedScreen, and KycIdCard.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: update jest mocks and config for Didit SDK

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* build: swap Sumsub native deps for Didit in Podfile and build.gradle

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: remove hardcoded sumsub namespace from nullifier generation

Read namespace from id_type field instead of hardcoding 'sumsub'.
The didit-tee encodes id_type as [namespace_len][namespace][doc_type],
so the namespace is already in the signed data.

Also fix deserializeApplicantInfo to parse the namespaced encoding
and extract just the document type for display.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: lint and formatting issues from Didit migration

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add register_kyc support to build_r1cs_wasm.sh and build_cpp.sh

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: use circuits/node_modules paths in build_r1cs_wasm.sh

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: emit ack_success after receiving KYC data to trigger session deletion

The didit-tee now expects the client to ack receipt of signed data,
which triggers DELETE of the session from Didit's API for data cleanup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: use raw bytes for KYC commitment/nullifier instead of deserialize+reserialize

The deserialize→reserialize path strips the namespace prefix from
id_type, producing different bytes than the TEE signed. Work on the
raw base64-decoded bytes directly to match the circuit inputs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: lint

* Revert "fix: lint"

This reverts commit d3dde1460b.

* fix: lint

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 15:49:49 +05:30
Justin Hernandez
9493e84b24 revert pr 1786 lottie json conversion (#1848)
* Revert "chore: convert json to lottie files (#1786)"

This reverts commit 9406bacda8.

* remove dotlottie

* fix regressions

* pr feedback

* formatting

* fixes

* lint
2026-03-12 10:04:30 -07:00
Justin Hernandez
9406bacda8 chore: convert json to lottie files (#1786)
* convert json to lottie files

* add comment for future web dotlottie usage

* fix pipelines; agent feedback

* enable ios e2e

* update lottie

* one more try

* kotlin fix

* attempt fix

* save wip fixes

* fix patch

* final pass

* fix pipelines

* attempt fix

* fix test

* feedback

* fix types
2026-02-28 18:47:25 -08:00
Justin Hernandez
03635abaaf chore: add kmp license headers; update license year range (#1752)
* add kmp license headers and update year

* formatting
2026-02-15 16:56:06 -08:00
Justin Hernandez
ba856226d8 SELF-1812: integrate sumsub into mobile app (#1650)
* sumsub initial pass

* add sumsub tee url

* agent feedback and fixes

* update lock

* agent feedback

* fix types

* agnet feedback

* fix mock

* agent feedback

* lazy load sumsub screen

* white button color

* fix lint

* add debug url link

* allow us to see recordings

* debug maestro run

* disable e2e screen recording for now. don't load sumsub logic when running e2e test

* remove lazy loading

* skip installing sumsub plugin

* retest ios e2e

* get e2e tests passing

* clean up
2026-01-26 14:06:36 -08:00
Aaron DeRuvo
fc82b6b2b3 Prepares app for Euclid (#1473)
* setup IS_EUCLID build variable for conditionally using euclid desgins
create a headless header that only handles the status bar, for the new screens since they manage their own
make sure new screens get proper insets
add recoveryphrase 3.0
fix country picker



* this lint runs twice. once in repo wide lint and once here. so lets just run once to save resources



Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-12-09 12:56:05 +01:00
Justin Hernandez
202d0f8122 SELF-483: Enable backup recovery prompts (#834)
* Guard recovery prompts

* refactor(app): gate recovery prompts with allow list (#1251)

* fix typing

* fix header

* fix app loading

* fix tests

* Limit recovery prompts to home allowlist (#1460)

* fix test

* fix typing pipeline

* format and fix linting and tests

* tests pass

* fix tests

* split up testing

* save wip

* save button fix

* fix count

* fix modal width

* remove consologging

* remove depcrecated login count

* linting

* lint

* early return
2025-12-05 21:34:50 -08:00
Justin Hernandez
cadd7ae5b7 SELF-1192: fix oom tests (#1429)
* fix oom tests?

* update tests

* try fixing tests again

* fix: unblock mobile app jest runner

* fix corrupt yarn lock

* Reduce heavy React Native usage in tests (#1436)

* Reduce heavy React Native usage in tests

* Stabilize mobile tests

* prettier

* ignore podfile.lock

* fix test and gitleaks

* fix path

* update

* fix tests

* address tamagui concern
2025-11-20 11:59:00 -03:00
Seshanth.S
c4dbb902a3 SELF-1060: Move passport-reader (#1349)
* rm passport-reader

* update CI scripts

* yarn nice

* update android workflow files

* ignore leaks

* fix write access error

* ignore passport read build.gradle file

* update message condition

* fix read access

* revert earlier changes. the failures were do to token permissions

* fix wasm test

* update jest

* fix tests

* simplify tests to avoid oom issues

* fix tests

* fix notification test

* fix nfcScanner tests

---------

Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
2025-11-11 16:14:32 -08:00
Justin Hernandez
ccb9e148be App polish for 2.9 rd1 (#1359)
* add useSafeBottomPadding

* add bottom padding to dev screen

* use safe bottom padding

* skip uploading if building android bundle locally

* fix tests

* cache fix script

* clean up country picker, fix font color

* sort package jsons, add watcher for mobile sdk

* formatting

* only bump versions for successfull builds

* move all css

* cleaner script

* kill watchers before starting new one
2025-11-07 10:26:08 -08:00
Aaron DeRuvo
2337eb30f1 Confirm Identification Screen + animation json dist setup (#1306)
* refactor confirm screen

* refactor

* setup animations and confirm-identification screen

* linty

* fix jest tests

* reverse attempts to fix web build. skip web build for now since its not used anyway

* dont code split in a library

* cleanup config for build based on what is actually used in sdk
2025-10-24 15:22:44 +02:00
Justin Hernandez
e01ec188af code rabbit feedback for staging auto deploy logic (#1255)
* code rabbit feedback for staging auto deploy logic

* fix jest test

* cr feedback

* workflow fixes

* fix tests

* restore cache
2025-10-17 07:58:02 -07:00
Aaron DeRuvo
6bdc4ae1d2 Move components to sdk for future use (#1243)
* move components to sdk and refactor a way from tamagui

* linting

* reverting since this is just a local issue for me

* lint

* simple

* yarn

* yolo

* run yarn nice

* fix pipelines

* fix tests

* fix mock

* add fonts to mobile sdk

* more feedback

---------

Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
2025-10-10 16:52:41 -07:00
Aaron DeRuvo
25634e06dc create nice structure for the mobile sdk (#1177)
* create nice structure for the mobile sdk

* spv

* actually dont touch what we dont understand

* fix metro

* fix pretty

* fix types on app and imrpove names

* sneek in actually checking the types in the mobile app.

* not yet

* fix jest imports and name test better
2025-10-02 09:34:22 +02:00
Justin Hernandez
20fa5c5adc [SELF-700] feat: add mock document generator demo (#995)
* feat: add mock document generator demo

* feat: add mock document generator

* fixes

* chore: refresh workflow cache

* update lock

* build

* updates

* more fixes

* code rabbit feedback

* compiles

* save wip

* updates

* merge with dev and fixes

* fix: align hoisting and demo Jest resolver (#1003)

* chore(app): map common src paths and declare svg flag module

* ci fix

* update lock

* save wip

* chore: address yarn lock issues (#1004)

* address yarn lock issues

* fix postinstall

* fix ci

* use metro js proxy

* android build working for /app

* save wip

* fix merge

* pipeline fixes

* format

* fix pipelines

* bump limit and split

* fix pipeline issues

* chore: decouple demo app build (#1013)

* chore: decouple demo app build

* chore: move demo app to workspace

* chore: unpublish demo workspace

* fix mobile sdk tests

* updates

* remove polyfills

* update merge

* update resolutions

* update resolutions

* fix merge

* fix paths

* save wip

* save wip fixes rd2

* working android

* update lock

* save wip ios building

* fix merge

* readd public key

* fixes

* ci fixes

* fixes

* fix web building

* fix ci

* fix tests

* update lock

* fix ci rd2

* formatting and fix ci

* fix

* finalize ci fixes

* fix tests and metro config paths for building

* save wip

* install missing package for pipeline

* fix wip app building

* wip react config

* save working emulator compile

* first round of pr fixes and feedback

* clean up demo app artifacts from sdk

* Add Gradle wrapper files for mobile-sdk-demo Android build

- Added gradlew, gradlew.bat, and gradle/wrapper/ directory
- Updated .gitignore to allow committing Gradle wrapper files
- Fixes Android build error: spawn ./gradlew ENOENT

* codex feedback and fixes

* fix tests

* file renames

* revert back to dev

* add types

* coderabbit fixes

* fix tests

* fix tests

* fix test

* fixes

* fix wip coderabbit issues

* coderabbit suggestions rd 2

* fix ci pipelines and addresss warnings

* cr fixes

* convert kebab to camelCase

* save wip fixes

* update reinstall and lock files

* fixes

* remove file

* fix lint

* fix polyfill fallback issues

* ensure that mock document is not on ofac list

* prettier
2025-09-27 13:59:47 -07:00
Leszek Stachowski
f416211037 move clearPassportData, markCurrentDocumentAsRegistered, reStorePassportDataWithRightCSCA to SDK (#1041) 2025-09-11 15:48:12 +02:00
Justin Hernandez
a1c69981eb 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
2025-09-09 00:55:23 -07:00
Seshanth.S🐺
ec93ad564a [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 <transphorm@gmail.com>
Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
2025-09-06 19:41:13 -07:00
Justin Hernandez
39976c3aff chore(app): upgrade dependencies (#968)
* chore(app): upgrade dependencies

* update package

* update lock files

* fixes

* lock

* fix
2025-08-27 22:02:12 -07:00
Justin Hernandez
431f556542 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
2025-08-25 11:30:23 -07:00
Justin Hernandez
aa359654eb Add additional missing BUSL license headers (#871)
* Exclude Android from license headers

* fixes

* fix formatting

* fix command

* fix license space

* updates

* fix headers

* updates

* new line formatting
2025-08-10 16:53:53 -07:00
Justin Hernandez
d8b2f60c57 Simplify alias tooling and relax export sorting (#867)
* Simplify alias config

* Restore export sorting overrides

* save migration pattern

* alias last minute updates

* fix tests

* improved import sorting

* Implement typed event emitter (#869)

* Implement typed event emitter

* cr suggestion
2025-08-10 13:53:03 -07:00
Justin Hernandez
95a3ce5f0c Alias app imports: @src, @tests (#852)
* Support @src alias tooling

* run script and nice

* convert ts script to cjs, update sources

* convert to cjs

* wip update paths

* nice and updates

* fix tests alias paths

* lint fixes

* add @tests alias support

* update script and tests to fix remaining src alias paths

* updates

* update script

* fix

* update lock file

* fix test target

* update timeout

* update flow

* fix flow
2025-08-08 15:05:08 -07:00
Justin Hernandez
f77cd80663 Temporarily disable recovery redirect and reminder prompts (#733)
* Revert "SEL-487: Prompt user to backup recovery phrase before registering (#715)"

This reverts commit fe14ac655e.

* revert update

* fix safe area context pkg

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

This reverts commit fe14ac655e.

* fix old flow

* more silent tests

* update lock files

* hard code return
2025-07-03 11:01:43 -07:00
Justin Hernandez
fe14ac655e 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
2025-06-30 17:00:29 -07:00
turnoffthiscomputer
0468719f9f 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>
2025-06-23 13:01:23 +02:00
Aaron DeRuvo
0e9c59c0fb SEL-56: Setup Yarn Workspaces (#584) 2025-06-04 11:37:32 +02:00