Commit Graph

83 Commits

Author SHA1 Message Date
Justin Hernandez
38e2bea6c0 bugfix: update migrated components default text color (#1271)
* fix caption and title text color

* fix nfc body text color

* fix issues

* use memo
2025-10-11 12:20:38 -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
Justin Hernandez
e4382d18d2 SELF-831: Add mobile demo app e2e tests (#1185)
* Add mobile SDK demo E2E workflow

* ci: build common before mobile sdk demo e2e

* Fix private pod access for mobile SDK demo e2e

* downgrade react-native-svg

* test fixing android e2e

* fix lock files

* update android e2e terst

* let's not figure out the emulator here. skip

* fix issues
2025-10-09 12:24:31 -07:00
Justin Hernandez
8255a9ac56 chore: tighten types across mobile surface areas (#1209)
* chore(app): tighten types across app workspace

* fixes

* save wip

* save wip linting

* fix any types

* fix types

* fix: import forwardRef directly from react

- Changed from React.forwardRef to forwardRef import
- Resolves linting warning about named exports

* save typing and linting updates

* cr feedback. final pass

* more cr feedback

* pipeline fixes
2025-10-09 09:53:29 -07:00
Leszek Stachowski
8cbb7c252e Mobile SDK: NFC scanning through SelfClient (#1214) 2025-10-08 16:03:02 +02:00
Aaron DeRuvo
bbf340cf4d setup for us to have svgs in the mobile sdk (#1230)
* setup for us to have svgs in the mobile sdk

* never again
2025-10-08 09:31:33 +02:00
Justin Hernandez
fecfc6b1b2 Working demo app mrz scan screen (#1232)
* Add camera permission to demo manifest

* save wip

* save buidling wip

* enable camera

* working mrz scan

* cr feedback
2025-10-07 18:45:20 -07:00
Aaron DeRuvo
f7c5ef0e74 MOVING COUNTRIES: (#1229)
* wip

* move colors

* sort the dev screen menu alphabetically. for sanity

* lint

* move country hooks to sdk

* added peer dep

* add as dev dep

* remove SelfMobileSdk component before someone thinks that it should be used

* mock it like before
2025-10-07 15:05:33 +02:00
Justin Hernandez
8acb2d675c fix demo app tests (#1223) 2025-10-06 15:10:06 -07:00
Leszek Stachowski
bebea4c070 chore: fix dev build (#1213) 2025-10-06 13:07:11 +02:00
Justin Hernandez
e4dab8b820 SELF-808: Implement document camera MRZ demo screen (#1204) 2025-10-06 12:16:42 +02:00
Justin Hernandez
073f77cc98 Address edge-to-edge Google Play Store warnings (#1205)
* Handle camera overlay window insets

* Adopt AndroidX edge-to-edge helpers
2025-10-04 09:29:04 -07:00
Justin Hernandez
0d3439fb59 test: add mobile sdk demo vitest tests (#1203)
* test: restore mobile sdk demo vitest suites

* save fixes

* test: expand mobile sdk demo screen coverage

* fix lint and types

* update packages

* reset test
2025-10-03 21:58:14 -07:00
Aaron DeRuvo
a00cb7e58d move common aadhaar functions to msdk (#1200)
* move common aadhaar functions to msdk

* remove comment

* add license headers
2025-10-03 14:37:53 +02:00
Aaron DeRuvo
187fc185e2 Adds missing check for typescript types to app ci (#1198)
* fix app types and add a ci check

* fix lint check.
2025-10-03 14:27:30 +02:00
Justin Hernandez
318b83fa57 Fix mobile demo app document registration (#1182)
* Enable WebSocket connections in demo client

* save working keychain

* save wip

* save polish tweaks

* downgrade react-native-svg

* abstract components

* onSuccess alert displays only once

* sort by registered first

* add clear all documents button

* formatting and typing

* refresh register document screen after successful registration

* fix double tap on register

* coderabbit feedback

* lock NFCPassportReader to commit

* remove react native picker

* remove lock

* minor fixes
2025-10-02 18:27:11 -07:00
Leszek Stachowski
f2cceb3150 expose useReadMRZ hook for DocumentCameraScreen (#1188) 2025-10-03 00:26:40 +02:00
Leszek Stachowski
c1d30d153a separate MRZ data from userStore (#1187) 2025-10-02 21:40:48 +02:00
turnoffthiscomputer
0a04f44682 Add LoadingUI and DevLoadingScreen components for enhanced loading ex… (#1189)
* Add LoadingUI and DevLoadingScreen components for enhanced loading experience

- Introduced LoadingUI component with customizable animation, action text, and progress indicators.
- Created DevLoadingScreen to facilitate development testing with state selection and loading feedback.
- Updated navigation to include DevLoadingScreen in the dev tools.
- Adjusted loading screen logic to improve user experience during document processing.
- Enhanced loading text management to provide clearer feedback based on current state.
- Added new SVG icon for the loading UI.

This commit improves the overall loading experience in the app, making it more user-friendly and visually appealing.

* Update navigation tests to include DevLoadingScreen for improved development experience
2025-10-02 19:27:27 +02: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
49b0e5529e simplify mobile demo app screens (#1183)
* update layout structure

* fix timeout

* feedback
2025-10-01 21:19:39 -07:00
Justin Hernandez
79fdd04f18 chore: fix prettier v268 (#1181)
* chore(common): format files with Prettier to satisfy CI lint

* security(demo): guard @noble/hashes resolver against path traversal in Metro
2025-10-01 16:38:10 -07:00
Justin Hernandez
fd1f008719 chore: address staging branch issues pr #1169 (#1178)
* fix ios run

* small fixes
2025-10-01 16:12:50 -07:00
turnoffthiscomputer
422d0cc259 App/id picker flow (#1126)
* add new id picker flow

* refactor: update document management screen actions

- Renamed `handleScanDocument` to `handleAddDocument` for clarity.
- Updated navigation from 'DocumentOnboarding' to 'CountryPicker'.
- Removed unused `handleAddAadhaar` function and its associated button.

* address pr feedback

* address lint issues

* fix test

* fix typings and screen

* fix e2e button test

---------

Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
2025-10-01 10:32:11 -07:00
Leszek Stachowski
3b14f09c30 introduce usePrepareDocumentProof in mobile SDK (#1176)
* introduce usePrepareDocumentProof in mobile SDK

* revert haptic feedback + lint
2025-10-01 15:08:48 +02:00
Aaron DeRuvo
1856c9b325 move fcm token storage (#1175)
* move fcm token from proving store to setting store for better separation of concerns.

* use analytics on adapter

* Revert "use analytics on adapter"

This reverts commit 4854d6fa87.

* prettier

* please be good

* ik heb oopsie wooopsie

* remove
2025-10-01 12:59:00 +02:00
Justin Hernandez
c55112d1e0 chore: add polish to the mobile demo app (#1135)
* Improve demo app safe area handling

* refactor: centralize mobile demo screen navigation

* update lock

* update podfile lock

* fix pipelines

* fix tests

* save wip polish

* polish app

* simplify and standardize screens

* small fixes

* fix tests

* Use SDK SelfClientProvider in demo (#1162)

* fix types

* Fix mobile SDK demo Jest mock

* force react-native-svg to 15.12.1

* fix tests

* add types script

* fix document list

* fix types and metro config

* add ignore files to speed up watchman and eslint

* save wip tweaks

* save mock doc screen wip

* use persistant document store

* save polish work in progress

* add polish to screens

* save wip secure storage

* allow cursor to examine react configs

* convert tests to vitest and fix

* fix tests

* prettier

* cr feedback

* fix tests and remove skipped
2025-10-01 00:16:34 -07:00
Justin Hernandez
9ebb9166db small tweaks to bump build v2.6.8 (#1144)
* small tweaks to bump build

* also run mobile e2e and mobile sdk changes

* run mobile demo on sdk changes
2025-09-29 19:02:52 -07:00
Aaron DeRuvo
a826c71f36 Redo "Mobile SDK: move provingMachine from the app (#1052)" (#1084)" (#1114)
* Redo "Mobile SDK: move provingMachine from the app (#1052)" (#1084)"

This reverts commit 3397fcf43b. which reverted merging proving machine migration

* fix build

* lint fix

* fix imports

* pr suggestions

* make sure not to create multiple instances of stores

* WIP: don't expose useSelfAppStore directly in the public API

* Update packages/mobile-sdk-alpha/src/proving/provingMachine.ts

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

* Apply suggestions from code review

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

* dont call protocol store directly

* fix protocol store tests

* fix deeplinks test

* fix web build and exports

* test fixes

* keep reactivity

* remove file name

* WIP: expose stores through SelfClient only

* move protocolStore usage behind SelfClient

* fix deeplinks tests

* lint

* fix provingMachine tests

* remove provingStore from browser exports

* lint

* lint

* fix provingMachine.generatePayload tests

* fix provingMachine.startFetchingData tests

* fix more tests

* remove not exported

* fix more tests

* remove unused

* simplify getAltCSCA signature (fix build?)

* yarn lint

* final touches

---------

Co-authored-by: Leszek Stachowski <leszek.stachowski@self.xyz>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-29 14:17:51 -07: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
Justin Hernandez
f36050ef1d chore: android studio agp assistant; 16kb pagesize fix (#1107)
* upgrade android agp

* update ndk and add manual linker for 16kb

* upgarde ndk
2025-09-20 16:04:59 -07:00
turnoffthiscomputer
2df4dc4619 SELF-725: add iOS qrcode opener and aadhaar screen (#1038)
* add iOS qrcode opener and aadhaar screen

* format

* fix test

* add Image-picker android (#1077)

* add image-picker android

* fix validation

* feat: implement Aadhaar upload success and error screens, enhance AadhaarNavBar with dynamic progress indication

- Added AadhaarUploadedSuccessScreen and AadhaarUploadErrorScreen components for handling upload outcomes.
- Updated AadhaarNavBar to reflect current upload step with dynamic progress bar.
- Integrated new screens into navigation flow for Aadhaar upload process.
- Introduced blue check and warning SVG icons for visual feedback on success and error states.

* feat: generate mock aadhar (#1083)

* feat: generate mock aadhar

* add yarn.lock

* update yarn.lock

* update protocolStore, update types, start modifying provingMachine

* Register mock aadhar (#1093)

* Register mock aadhar

* fix ofac

* temp: generate name

* fix dob

* Add Aadhaar support to ID card component and screens

- Integrated Aadhaar icon and conditional rendering in IdCardLayout.
- Updated AadhaarUploadScreen to process QR codes and store Aadhaar data.
- Modified navigation and button text in AadhaarUploadedSuccessScreen.
- Added mock data generation for Aadhaar in the mobile SDK.
- Updated ManageDocumentsScreen to include Aadhaar document type.
- Enhanced error handling and validation for Aadhaar QR code processing.
- Added utility functions for Aadhaar data extraction and commitment processing.

* aadhaar disclose - wip (#1094)

* fix: timestamp cal of extractQRDataFields

* Feat/aadhar fixes (#1099)

* Fix - android aadhar qr scanner

* fixes

* update text

* yarn nice

* run prettier

* Add mock Aadhaar certificates for development

- Introduced hardcoded Aadhaar test certificates for development purposes.
- Moved Aadhaar mock private and public keys to a dedicated file for better organization.
- Updated the mock ID document generation utility to utilize the new Aadhaar mock certificates.

* prettier write

* add 'add-aadhaar' button (#1100)

* Update .gitleaks.toml to include path for mock certificates in the common/dist directory

* yarn nice

* Enhance Aadhaar error handling with specific error types

- Updated the AadhaarUploadErrorScreen to display different messages based on the error type (general or expired).
- Modified the AadhaarUploadScreen to pass the appropriate error type when navigating to the error screen.
- Set initial parameters for the home screen to include a default error type.

* Update passport handling in proving machine to support Aadhaar document category

- Modified the handling of country code in the useProvingStore to return 'IND' for Aadhaar documents.
- Ensured that the country code is only fetched from passport metadata for non-Aadhaar documents.

* tweak layout, text, change email to support, hide help button

* fix ci, remove aadhaar logging, add aadhaar events

* remove unused aadhaar tracking events

* update globs

* fix gitguardian config

* don't track id

---------

Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
Co-authored-by: Seshanth.S🐺 <35675963+seshanthS@users.noreply.github.com>
Co-authored-by: vishal <vishalkoolkarni0045@gmail.com>
2025-09-19 17:36:01 -07:00
Justin Hernandez
779fea5d2a address version mismatches and package resolutions (#1081)
* fix package version mismatches and resolutions

* fixes

* update lock

* fix comma

* fixes

* fix packages

* update packages

* remove firebase analytics. not needed
2025-09-18 17:35:26 -07:00
Justin Hernandez
a005bde034 [SELF-747] feat: clone android passport reader during setup (#1080)
* chore: remove android private modules doc

* private repo pull

* skip private modules

* remove unused circuits building

* save wip

* format

* restore tsconfig

* fix package install

* fix internal repo cloning

* unify logic and fix cloning

* git clone internal repos efficiently

* formatting

* run app yarn reinstall from root

* coderabbit feedback

* coderabbit suggestions

* remove skip private modules logic

* fix: ensure PAT is passed through yarn-install action and handle missing PAT gracefully

- Update yarn-install action to pass SELFXYZ_INTERNAL_REPO_PAT to yarn install
- Make setup-private-modules.cjs skip gracefully when PAT is unavailable in CI
- Fixes issue where setup script was throwing error instead of skipping for forks

* prettier

* fix clone ci

* clone ci fixes

* fix import export sorts

* fix instructions

* fix: remove SelfAppBuilder re-export to fix duplicate export error

- Remove SelfAppBuilder import/export from @selfxyz/qrcode
- Update README to import SelfAppBuilder directly from @selfxyz/common
- Fixes CI build failure with duplicate export error

* fix: unify eslint-plugin-sort-exports version across workspaces

- Update mobile-sdk-alpha from 0.8.0 to 0.9.1 to match other workspaces
- Removes yarn.lock version conflict causing CI/local behavior mismatch
- Fixes quality-checks workflow linting failure

* fix: bust qrcode SDK build cache to resolve stale SelfAppBuilder issue

- Increment GH_SDK_CACHE_VERSION from v1 to v2
- Forces CI to rebuild artifacts from scratch instead of using cached version
- Resolves quality-checks linter error showing removed SelfAppBuilder export

* skip job

* test yarn cache

* bump cache version to try and fix the issue

* revert cache version

* refactor: use direct re-exports for cleaner qrcode package structure

- Replace import-then-export pattern with direct re-exports
- Keep SelfAppBuilder export with proper alphabetical sorting (before SelfQRcode)
- Maintain API compatibility as documented in README
- Eliminates linter sorting issues while keeping clean code structure

* fix: separate type and value imports in README examples

- Import SelfApp as type since it's an interface
- Import SelfAppBuilder as value since it's a class
- Follows TypeScript best practices and improves tree shaking
2025-09-18 14:55:25 -07:00
Justin Hernandez
3397fcf43b Revert "Mobile SDK: move provingMachine from the app (#1052)" (#1084)
This reverts commit 8983ac2268.
2025-09-17 12:48:42 -07:00
Leszek Stachowski
8983ac2268 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 <justin.hernandez@self.xyz>
Co-authored-by: Aaron DeRuvo <aaron.deruvo@clabs.co>
2025-09-17 15:48:36 +02:00
Nesopie
30cc43e242 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 <transphorm@gmail.com>
2025-09-17 17:36:42 +05:30
Aaron DeRuvo
f85a23ac61 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
2025-09-17 11:15:02 +02:00
Justin Hernandez
5c569e6334 chore: minor fixes across monorepo (#1068)
* small fixes

* fixes

* fix gesture handler error

* ci fixes
2025-09-13 17:55:35 -07:00
Justin Hernandez
94d8fcada5 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
2025-09-12 14:03:18 -07:00
Seshanth.S🐺
85df67604a Hotfix: Belgium ID cards (#1061)
* feat: parse belgium TD1 mrz android

* feat: Parse Belgium TD1 MRZ IOS
2025-09-12 12:11:56 -07:00
Aaron DeRuvo
c2ec367505 chore(mobile-sdk-alpha): remove unused tslib dependency (#1053)
* remove tslib -- seems unused

* remove deps accidentally added to root

* build file
2025-09-11 10:36:45 -07:00
Aaron DeRuvo
1f362b33ce Move self app store to mobile sdk (#1040) 2025-09-11 17:30:01 +02:00
Leszek Stachowski
f416211037 move clearPassportData, markCurrentDocumentAsRegistered, reStorePassportDataWithRightCSCA to SDK (#1041) 2025-09-11 15:48:12 +02:00
Seshanth.S🐺
5702f55039 fix: CLA not supported (#1027)
* fix: CLA not supported

* fix "yarn android" building

* remove unnecessary commands

---------

Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
2025-09-09 12:54:03 -07:00
Leszek Stachowski
c1042f51d1 SDK: minimize amount of data sent through PROVING_PASSPORT_NOT_SUPPORTED event (#1030) 2025-09-09 17:59:48 +02:00
Leszek Stachowski
99c5612e04 Remove navigationRef from provingMachine (#1011) 2025-09-09 16:21:08 +02:00
Aaron DeRuvo
3aabfc984a moves ofac and protocol store (#1012)
* move ofact tree fetch to common

* move protocol store to the msdk, fix some dependencies on msdk
2025-09-09 13:31:43 +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
Justin Hernandez
ff678b359a chore: fix yarn format (#1009)
* fix yarn format

* yarn format

* fix lint

* undo temporary disabling

* pipeline fixes

* revert nvmrc change
2025-09-07 19:48:46 -07:00