Commit Graph

183 Commits

Author SHA1 Message Date
Justin Hernandez
692aaf33dc update spec workflow to use repo-canonical two-layer model (#1865)
* update skills

* fixes and formatting
2026-03-24 13:42:19 -07:00
Seshanth.S
89476718eb Extract Reusable App Adapter Factories for SelfClient Assembly (#1862) 2026-03-24 23:24:14 +05:30
Justin Hernandez
bd2e3c6738 add Euclid 3.0 settings screens, tunnel flow, and audit pipeline skills (#1858)
* feat(webview-app): add Euclid 3.0 settings sub-screens

Add SecurityScreen, NotificationPreferencesScreen, and DevModeScreen
wrappers that import Euclid 3.0 components and wire them with React
Router navigation and bridge adapters. Update SettingsScreen menu items
to navigate to real routes instead of /coming-soon.

Requires @selfxyz/euclid-web to be published with the new screen exports
(SecurityScreen, NotificationPreferencesScreen, DevModeScreen) before
type-check will pass. See docs/superpowers/plans/ for full context.

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

* docs: add settings integration plan and handover

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

* chore: use euclid 1.2.0

* PoC tunnel flow

* updates

* update skills

---------

Co-authored-by: Tranquil-Flow <tranquil_flow@protonmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Leszek Stachowski <leszek.stachowski@self.xyz>
2026-03-23 23:55:31 -07:00
Seshanth.S
60de8d6c1e Feat/webview sdk (#1856)
* feat: add iOS native shell package (NSL-02)

Plain Swift implementation of the WebView host with bridge handlers
for secure storage (Keychain), crypto (EC P-256), and lifecycle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add Android native shell package (NSL-01)

Plain Kotlin implementation of the WebView host with bridge handlers
for secure storage (EncryptedSharedPreferences), crypto (Android Keystore
EC P-256), and lifecycle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: integrate Sumsub Web SDK into ProviderLaunchScreen (WV-05)

Rewrites ProviderLaunchScreen to launch Sumsub Web SDK, adds KYC
provider types, result normalization, and a ProviderResultScreen
for displaying verification outcomes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: update spec status for NSL-01, NSL-02, WV-05 to in-progress

All three items are code-complete but need integration testing
before marking done.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add build-pipeline workstream specs, update NSL-03 and BP-01 status

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add WebView bundle build pipeline (BP-01)

Build script copies webview-app dist into both native shell asset
directories. Gradle preBuild validation fails fast when bundle is
missing. Root package.json gets build:sdk-* scripts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add SDK test apps for Android and iOS (NSL-03)

Minimal test apps to exercise native shells end-to-end:
- Android: Jetpack Compose app using SelfSdk.launch() via composite build
- iOS: SwiftUI app using SelfSdk.createViewController() via local SPM dep

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* update lockfile

* fix: address CodeRabbit PR review findings for native shells

- Fix iOS double callback: add hasEmittedResult flag to LifecycleHandler
  so dismiss() won't fire onCancelled after onResult already emitted
- Fix Android error result codes: use RESULT_FIRST_USER for failed
  verifications instead of always RESULT_OK; add dedicated handler in
  SelfSdk.handleResult
- Fix iOS production query params: append params to file URL via
  URLComponents so WebView receives teeUrl/verificationId/userId
- Fix build:sdk-ios false-green: chain swift build after bundle script
- Add expectedRequestCode param to handleResult for flexibility
- Upgrade security-crypto 1.1.0-alpha06 → 1.1.0 stable
- Improve callback type safety: onSuccess takes raw JSON string,
  onFailure takes SelfSdkException instead of generic Exception
- Add requireBiometric intent comments to both SecureStorageHandlers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address remaining CodeRabbit PR review findings (round 2)

- iOS BridgeResponse: add requestId/success fields, rename result→data to match JS bridge contract
- iOS test app: fix callback deallocation with Coordinator pattern
- ProviderLaunchScreen: fail closed on missing verificationId, fix retry via retryCount state
- ProviderResultScreen: guard unknown status with fallback to error config
- build-webview-bundle.sh: validate index.html before deleting targets
- Package.swift: fix SPM resource path with target path/sources

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 02:26:40 +05:30
Justin Hernandez
a56edbab75 Audit and update specs rd5 (#1850)
* first commit sc-02

* prep for pr

* fix

* specs pass 1

* update specs
2026-03-12 16:22:31 -07:00
Justin Hernandez
95d893fa45 Expose generateKey() and getPublicKey() in CryptoAdapter surface (#1849)
* first commit sc-02

* prep for pr

* fix

* fix

* check result
2026-03-12 16:11:45 -07:00
Seshanth.S
cbe2d7580c set allowFontScaling to false in disclosure screens (#1843)
Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
2026-03-12 12:10:30 -07:00
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
f47b46d465 Add browser host callback contract for WebView verification flow (#1846)
* push code for wv-02 and 03

* save wip

* fixes

* pr feedback fix pipelines

* save spec

* address feedback

* pr feedbacak

* fixes

* format

* fix pipelines

* fix

* fix

* fixes
2026-03-12 07:50:18 -07:00
Justin Hernandez
4934a8c2be Align WebView flow with provider-backed KYC (#1845)
* push code for wv-02 and 03

* pr feddback
2026-03-11 18:43:15 -07:00
Justin Hernandez
25e8ddda37 wv-01 work (#1844) 2026-03-11 14:09:16 -07:00
Justin Hernandez
73d2075ad4 Deduplicate bridge-layer fallback adapters onto engine-owned browser implementations (SC-01) (#1841)
* sc-01 first commmit

* fix pipelines

* fix build

* add missing

* pipeline fixes

* last round of feedback
2026-03-11 12:50:27 -07:00
Justin Hernandez
b53626c16b Fix lifecycle bridge result routing semantics (#1840)
* update specs

* update specs

* harden nfc apdu

* ns-05 work

* pr feedback

* updates

* fixes
2026-03-10 21:58:58 -07:00
Justin Hernandez
774fe295ca Complete RN-03 NFC hardening and stabilize RN SDK tests (#1797)
* udates

* add regression test

* feedback; remove assets

* fix pipeline

* pr feedback

* fixes

* fix pipeline

* finalize rn03 work

* fix ci

* better foramt
2026-03-10 21:40:50 -07:00
Justin Hernandez
2ab33c727a Reject raw APDU commands in KMP NFC bridge (#1839)
* update specs

* update specs

* harden nfc apdu
2026-03-10 20:31:34 -07:00
Justin Hernandez
9102835665 Align KMP callback/result contract with canonical VerificationResult (#1834)
* Align KMP verification result contract

* formatting

* pr feedback
2026-03-10 10:08:06 -07:00
Justin Hernandez
d815e9f0d3 Fix missing DSC parsing for passport/id_card (#1498)
* Handle missing parsed DSC before fetching

* address cr feedback

* formatting

* fix bugs
2026-03-10 09:34:19 -07:00
Justin Hernandez
d7c1556ddc Align KMP verification result contract with canonical SDK types (#1831)
* Align KMP verification result contract

* formatting

* pr feedback

* feedback
2026-03-10 09:02:12 -07:00
Justin Hernandez
7f75ed377c add react native blur effect (#1832) 2026-03-10 08:27:40 -07:00
Justin Hernandez
6b89976758 formatting (#1829) 2026-03-09 22:10:28 -07:00
Justin Hernandez
88e28733b1 Phase 1 Native Consolidation: Extract MRZ OCR/Mapping Helpers and Thin Scanner Views (#1823)
* mrz consolidation

* consolidate mrz swift code

* update specs

* save changes

* fixes

* format

* update spec

* pr feedback

* add tests

* save prep work

* consolidate MRZ handling logic

* fixes

* format

* format

* remove giga

* pr feedback

* update spec

* update

* revert change

* pr feedback

* updates
2026-03-06 17:54:46 -08:00
Justin Hernandez
3ee9822752 Phase 0 Native Consolidation: Baseline Contracts, Bridge Tests (#1822)
* mrz consolidation

* consolidate mrz swift code

* update specs

* save changes

* fixes

* format

* update spec

* pr feedback

* add tests

* remove

* fix pipeline
2026-03-06 14:51:51 -08:00
Justin Hernandez
23ab5d8b17 Consolidate iOS build, config, and integration paths (#1821)
* mrz consolidation

* consolidate mrz swift code

* update specs

* save changes

* fixes

* format

* pr feedback
2026-03-06 13:38:55 -08:00
Justin Hernandez
377f67f0ee Enable composite build for RN test app to resolve KMP SDK locally (#1819)
* mrz consolidation

* Add Gradle substitution for shared module (#1820)
2026-03-06 12:13:55 -08:00
Justin Hernandez
be9f2d8f8b Consolidate RN test app Android MRZ scanner onto shared SDK handler (#1817)
* first pass at consolidation work

* fix gap

* update spec

* fix pipeline

* pr feedback
2026-03-06 10:10:55 -08:00
Justin Hernandez
cde591b998 feat(rn-sdk-test-app): native MRZ camera with progressive detection UX (#1816)
* save wip

* save working code

* finalize code

* pr feedback

* fix
2026-03-05 22:48:41 -08:00
Justin Hernandez
62a11cdca3 chore: rename kmp sdk test app folder (#1815)
* chore: rename kmp sdk test app folder

* update ignore

* fix path
2026-03-05 18:37:46 -08:00
Justin Hernandez
a367e7eecb Update specs to be agentic (#1811)
* save chunk 1e work

* chunk 2f

* pr feedback

* fix pr feedback

* cr feedback

* remove dupe var

* feedback from cr

* add kmp:start dx helper

* save web consolidtion work for later

* add specs

* update

* pr fixes

* update reorg plan

* add coverage gaps spec

* pr feedback

* save current wip iteration

* finalize spec work
2026-03-05 16:20:46 -08:00
Justin Hernandez
44ded24886 Wire WebView camera adapter and harden Android SDK launch flow (#1805)
* save chunk 1e work

* chunk 2f

* pr feedback

* fix pr feedback

* cr feedback

* remove dupe var

* feedback from cr

* add kmp:start dx helper

* save web consolidtion work for later

* add specs

* update

* pr fixes

* update reorg plan
2026-03-05 12:14:02 -08:00
Justin Hernandez
2e907bc67c chore: clean up dependencies and bump react-native-svg to 15.14.0 (#1808)
* update lock

* fix package resolutions

* re-add blur

* fix patch
2026-03-03 23:16:10 -08:00
Justin Hernandez
d5001eef8d Add RN SDK test app harness and update spec validation scope (#1798)
* fill gps

* pr feedback

* add easy demo install script, sort package.json files

* get app running

* fix ios running

* rename app

* fix pipeline issues

* pr feedback

* fix pipelines

* fix

* update
2026-03-02 19:52:23 -08: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
408e2fa4de kmp wrap up handoff work (#1785)
* save wip

* finalize pr

* pr feedback

* update specs. feedback

* add handoff security doc
2026-02-25 17:51:43 -08:00
Justin Hernandez
ac1e6fdb44 [SELF-2033] bugfix: clipped card header (#1778)
* simplify Id and Kyc Card to make it easier to fix header

* format

* fix global Buffer polyfill

* fix padding

* remove dev card screen

* minor fixes
2026-02-19 23:27:59 -08:00
turnoffthiscomputer
c00241d327 Feat/person1 2 3 implementation (#1770)
* add ios swift handlers

* Add lifecycle completion and optional relay listener

* agent feedback

* save wip

* fix compiling

* finalize feedback

* agent feedback

* fix ci

* udpate specs

* feat: implement React Native adapters for authentication, documents, and networking

- Added new adapters for authentication, document management, and network communication tailored for React Native.
- Introduced `createAuthAdapter`, `createDocumentsAdapter`, and `createNetworkAdapter` to streamline integration with React Native's capabilities.
- Updated `SelfClientProvider` to utilize the new adapter factory for improved modularity and maintainability.
- Enhanced package dependencies to include necessary libraries for secure storage and hashing.

This update enhances the SDK's functionality and prepares it for better cross-platform compatibility.

* refactor: update specs to streamline documentation and remove obsolete entries

- Removed the "Keep / Modify / Delete" section from the specs to simplify the document structure.
- Updated the remaining specifications to reflect the current architecture and integration paths, including the introduction of the new `SPEC-RN-SDK.md` for the `<SelfVerification />` RN WebView wrapper component.
- This change enhances clarity and aligns the documentation with recent architectural decisions.

* prettier

* update gitignore to include swift build paths

* update gems

* address pr feedback and pipeline errors

* agent feedback. also include follow up work items

* add spec guide rules

* add markdown files to prettier formatting and update

* add status line update spec guide

* add new specs

* formatting

* format all markdown files

* more formatting

* consolidate into overview

* update spec and template guidelines

* refactor specs

* save wip

* move status up

* feat: add biometrics and camera bridge adapters

Create biometrics adapter (authenticate, isAvailable, getBiometryType) and camera adapter (scanMRZ, isAvailable) matching the native KMP handler response shapes. Wire both into webview-app SelfClientProvider. Includes 6 new tests (50 total, all passing).

* feat: add web fallback adapters and wire in SelfClientProvider

- Create IndexedDB documents adapter and console/fetch
    analytics adapter in webview-bridge (documents-web.ts,
    analytics-web.ts) per Person 1 spec Section 4
  - Create equivalent browser adapters in mobile-sdk-alpha
    per Person 4 Chunk 4F (documents, crypto, analytics,
    haptic)
  - Wire web fallbacks into SelfClientProvider — documents
    and analytics no longer cross the bridge
  - 32 new tests across both packages, all passing
  - fake-indexeddb added as devDep to both packages

* feat: remove 4 Android web-fallback handlers

  - Delete DocumentsBridgeHandler (146 LOC)
  - Delete CryptoBridgeHandler (177 LOC)
  - Delete AnalyticsBridgeHandler (94 LOC)
  - Delete HapticBridgeHandler (94 LOC)
  - Remove registrations from SelfVerificationActivity
  - Android now registers 5 handlers: NFC, Camera,
    Biometrics, SecureStorage, Lifecycle
  - Documents, crypto, analytics, and haptic are now
    handled by web fallback adapters in the WebView

* style: align DocumentsBridgeHandler param extraction

  Standardize iOS DocumentsBridgeHandler to use
  ?.jsonPrimitive?.content for parameter extraction,
  matching the convention used by all other iOS handlers.

* feat: add MiniPay sample app

  Create Compose Multiplatform sample app showing how
  third-party integrators embed Self identity verification
  via SelfSdk.launch(). Two native screens (Home, Result);
  all verification logic runs in the SDK's WebView.

  Shared Kotlin (commonMain):
  - App.kt: NavHost with home/result navigation
  - MainViewModel.kt: SDK launch + callback routing
  - HomeScreen.kt: status card + "Verify Identity" button
  - ResultScreen.kt: success/failure with error mapping
  - Theme.kt: MiniPay-style Material 3 colors

  Android:
  - MainApplication.kt: SelfSdk.configure() in onCreate
  - MainActivity.kt: passes SDK instance to Compose
  - AndroidManifest.xml: NFC, Camera, Biometric, Internet
    permissions + NFC TECH_DISCOVERED intent filter
  - res/xml/nfc_tech_filter.xml: IsoDep for passport NFC

  iOS Kotlin:
  - MainViewController.kt: ComposeUIViewController entry

  iOS Swift (iosApp/):
  - iOSApp.swift: provider registration with
    SdkProviderRegistry (same pattern as kmp-test-app)
  - ContentView.swift: UIViewControllerRepresentable
  - Xcode project with NFC/Camera entitlements

  Spec deviation — single-module vs two-module:
  The spec directory diagram (lines 88-120) shows a
  separate androidApp/ module, but the spec's own build
  config (lines 384-447) has composeApp using the
  androidApplication plugin — meaning composeApp IS the
  Android app. These contradict: you cannot have two
  androidApplication modules. The existing kmp-test-app
  uses the same single composeApp pattern. We follow the
  build config + test app precedent.

  Build verified on all targets:
  - compileDebugKotlinAndroid: BUILD SUCCESSFUL
  - compileKotlinIosArm64: BUILD SUCCESSFUL
  - compileKotlinIosSimulatorArm64: BUILD SUCCESSFUL

* style: Rename webAnalyticsAdapter to consoleAnalyticsAdapter

  Align web analytics adapter naming with updated spec
  (specs/person1-webview/SPEC.md section 4c).

  - Rename webAnalyticsAdapter → consoleAnalyticsAdapter
  - Rename WebAnalyticsOptions → ConsoleAnalyticsOptions
  - Update barrel export in adapters/index.ts
  - Update import in SelfClientProvider.tsx
  - Update all references in analytics-web.test.ts

  The new name better describes the adapter's purpose: a
  console-logging (+ optional HTTP endpoint) fallback for
  environments without a native bridge.

  Verified: webview-bridge build clean, 63/63 tests pass,
  webview-app type-check clean.

* refactor: Align Person 4 adapters with updated spec

  Rename haptic + fix crypto algo normalization per updated
  specs/person4-sdk-core/SPEC.md (Chunk 4F).

  Haptic:
  - createNoOpHapticFeedback → createNoOpHapticAdapter
  - Updated barrel export, re-export, and test references

  Crypto:
  - Replace static ALGO_MAP lookup with regex normalization:
    algo.toUpperCase().replace(/^SHA(\d)/, 'SHA-$1')
  - Handles all variants: sha256, SHA256, sha-256, SHA-256
  - Add tests for already-hyphenated and uppercase inputs

  Verified: 20/20 browser adapter tests pass, tsc clean.

* fix: resolve 7 Android device testing bugs in SDK + MiniPay

Fix issues found during physical device testing (Pixel 8
Pro) of the MiniPay sample app end-to-end flow.

SDK fixes (kmp-sdk):
- Use activityResultRegistry.register() instead of
  activity.registerForActivityResult() to avoid
  IllegalStateException when registering after onStart
- Replace FragmentActivity with ComponentActivity
  (AndroidX 1.9.x changed the class hierarchy)
- Change SelfVerificationActivity theme to
  Theme.AppCompat.NoActionBar (AppCompatActivity
  requires an AppCompat theme)
- Rewrite AndroidWebViewHost to use WebViewAssetLoader
  with custom PathHandler, serving bundled Vite assets
  under https://appassets.androidplatform.net/ to fix
  CORS, history.replaceState, and asset path resolution
- Add runtime permission requests for Camera + NFC in
  SelfVerificationActivity.onCreate()

MiniPay fixes (kmp-minipay-sample):
- Create expect/actual platformLaunch to thread Android
  Activity to SDK without leaking platform types into
  commonMain
- Set debug = false to load bundled assets instead of
  emulator dev server URL

Tested on Pixel 8 Pro: app launches, verification
WebView opens, camera scans for MRZ. Full passport
scan untested (no document available).

* feat: implement @selfxyz/rn-sdk React Native SDK

  Thin <SelfVerification /> component wrapping react-native-webview
  that embeds Self's identity verification flow. Bridges NFC, camera,
  biometrics, keychain, and lifecycle to native via MessageRouter.

  - MessageRouter: routes WebView bridge messages to domain handlers
  - 5 handlers: lifecycle, biometrics, secureStorage, nfc, camera
  - Platform.select asset loading (Android file://, iOS RNFS bundle)
  - 59 unit tests, build + typecheck clean
  - ReactNativeWebView transport detection added to webview-bridge

* fix: Remove dead code and persist verification state

Claude identified some gaps in the spec. Fixed to match:

  - Delete unused onVerificationSuccess/Failure/Cancelled methods
    from MainViewModel (sdkCallback handles all cases)
  - Add expect/actual AppStorage (SharedPreferences / NSUserDefaults)
    to persist HomeState across app restarts
  - Update homeState eagerly in sdkCallback.onSuccess() so Android
    system back button shows correct state on HomeScreen

* refactor: migrate webview-app from Tamagui to @selfxyz/euclid-web

  Replace Tamagui + react-native-web UI framework with Self's
  official euclid-web component library across all 10 screens.
  Simplify Vite config, remove RN aliases, and fix country flag
  emoji rendering with proper ISO 3166-1 alpha-3 to alpha-2
  conversion.

  - Remove tamagui, @tamagui/config, react-native-web deps
  - Add @selfxyz/euclid-web and @selfxyz/euclid-core
  - Rewrite 6 screens as euclid direct replacements
  - Compose 4 screens from euclid primitives
  - Fix fonts.css for euclid font family names
  - Add shared countryFlags utility (alpha-3 → alpha-2 lookup)
  - Clean up tsconfig.json and stale .tamagui cache

* fix pipeline

* formatting

* fix tests

* fix type error

* address feedback

* fix formatting

* update specs and create handoff doc for new pull request

---------

Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
Co-authored-by: Tranquil-Flow <tranquil_flow@protonmail.com>
2026-02-18 21:32:20 -08:00
Justin Hernandez
d5a03a6f64 refactor specs with new style (#1769)
* add new specs

* formatting

* format all markdown files

* more formatting

* consolidate into overview

* update spec and template guidelines

* refactor specs

* save wip

* move status up

* wip

* update specs with missing items, remove stale items, add wave planning

* finalize specs and formatting

* formatting

* agent feedback, reviews

* formatting and feedback

* finalize feedback

* more feedback

* pr feedback

* formatting
2026-02-17 21:31:01 -08:00
turnoffthiscomputer
21c5e9b394 Add VERIFICATION_COMPLETE event and optional relay listener for WebView mode (#1765)
* Add lifecycle completion and optional relay listener

* fix ci

* udpate specs

* feat: implement React Native adapters for authentication, documents, and networking

- Added new adapters for authentication, document management, and network communication tailored for React Native.
- Introduced `createAuthAdapter`, `createDocumentsAdapter`, and `createNetworkAdapter` to streamline integration with React Native's capabilities.
- Updated `SelfClientProvider` to utilize the new adapter factory for improved modularity and maintainability.
- Enhanced package dependencies to include necessary libraries for secure storage and hashing.

This update enhances the SDK's functionality and prepares it for better cross-platform compatibility.

* refactor: update specs to streamline documentation and remove obsolete entries

- Removed the "Keep / Modify / Delete" section from the specs to simplify the document structure.
- Updated the remaining specifications to reflect the current architecture and integration paths, including the introduction of the new `SPEC-RN-SDK.md` for the `<SelfVerification />` RN WebView wrapper component.
- This change enhances clarity and aligns the documentation with recent architectural decisions.

* prettier

* update gitignore to include swift build paths

* update gems

* address pr feedback and pipeline errors

* agent feedback. also include follow up work items

* fix ws send guard + document unresolved coderabbit review items in specs

- Add readyState guard to WsConn.send() to throw a clear error instead of
  InvalidStateError when socket is not OPEN
- Fix stale abort listener leak: clean up abort handler unconditionally on
  socket close, not only when caller registers onClose
- Add "Chunk 3F implementation notes" to SPEC-PERSON3-SDK-CORE for SHA
  algorithm name mapping and fake-indexeddb test requirement
- Add "Spec Corrections" section to SPEC-RN-SDK documenting 5 issues
  (peerDep, missing router arg, iOS source, randomUUID, RNFS) to address
  during implementation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* formatting

---------

Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 14:48:41 -08:00
Evi Nova
fca391c6f1 Fix/quick webview fixes (#1764)
Claude noticed some stuff to clean up in previous day's code.

* fix: add missing uuid dep, fix redundant ternary, register DINOT-Bold

- Add uuid as direct dependency instead of relying on hoisting
  - Remove redundant success ternary in VerificationResultScreen
  - Fix ComingSoonScreen to match documentType codes from IDSelectionScreen
  - Register DINOT-Bold font family in Tamagui config

* chore: unpushed fixes

* chore: force CI
2026-02-17 13:52:05 +10:00
turnoffthiscomputer
74695784d5 fix: resolve kmp-sdk build failure on iOS native test compilation
Replace assert() with assertTrue() in MrzKeyUtilsTest to avoid
ExperimentalNativeApi opt-in requirement on Kotlin/Native. Also
gitignore the copyWebViewAssets build artifact (shared/src/main/).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 18:44:45 +01:00
Evi Nova
64a4f04c6a Feat/webview+bridge (#1763)
* feat: add @selfxyz/webview-bridge protocol library

Pure TypeScript bridge for WebView-to-native communication via postMessage JSON.

  - WebViewBridge class: request/response lifecycle, event subscriptions, timeouts
  - 9 adapter factories: NFC scanner (120s timeout, abort support), crypto
    (WebCrypto hash + bridge sign), auth, documents, storage, analytics,
    haptic, navigation (React Router mapping), lifecycle
  - MockNativeBridge test utility for testing without native
  - Schema validation with typed errors
  - 44 tests passing (bridge, schema, adapters)
  - Build: tsup → ESM + CJS + DTS

* chore: gitignore Android SDK and platform directories

Add app/build-tools, licenses, ndk, platform-tools, platforms and mobile-sdk-alpha equivalents to .gitignore.

* feat: add @selfxyz/webview-app shell with routing, providers, and stubs

Scaffolds the private @selfxyz/webview-app Vite package that runs inside
  the KMP SDK's native WebView.

  - Vite config with @vitejs/plugin-react + @tamagui/vite-plugin,
    react-native → react-native-web alias, lottie-react-native → lottie-react
  - Tamagui config copied from app/ with custom fonts (advercase, dinot, plexMono)
  - 4 OTF font files copied to public/fonts/ with @font-face CSS
  - BridgeProvider: singleton WebViewBridge context (debug in dev mode)
  - SelfClientProvider: wires all 9 bridge adapters (nfc, crypto, auth,
    documents, storage, analytics, haptic, navigation, lifecycle) and
    fires lifecycle.ready() on mount
  - BrowserRouter with 11 routes + catch-all redirect
  - 10 stub screen components (to be implemented in follow-up commits)
  - CSS reset tuned for WebView (no scroll, no tap highlight, no user-select)

  Verified: tsc --noEmit passes, vite build produces dist/index.html + 520KB bundle.

* feat(webview-app): implement all 10 WebView screens

Replace stub screens with full implementations wired to bridge adapters.

  Onboarding flow (5 screens):
  - CountryPickerScreen: searchable country list from local JSON data
  - IDSelectionScreen: passport/ID card/other document type selection
  - DocumentCameraScreen: MRZ scanning via bridge camera adapter
  - DocumentNFCScreen: NFC chip reading with progress, 120s timeout, abort
  - ConfirmIdentificationScreen: ownership confirmation via lifecycle.setResult

  App screens (5 screens):
  - HomeScreen: document catalog with empty/loaded states
  - ProvingScreen: disclosure item review + proof generation
  - VerificationResultScreen: success/failure result display
  - SettingsScreen: account menu items + dismiss SDK
  - ComingSoonScreen: placeholder for unimplemented features

* chore: yarn prettier
2026-02-16 21:41:02 +10:00
Justin Hernandez
a2eb8a1a67 fix code ql issues (#1756) 2026-02-16 00:16:25 -08:00
Justin Hernandez
709f7b36b2 chore: code quality feedback for 2.9.16 (#1754)
* code quality feedback

* agent feedback
2026-02-15 21:54:29 -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
9ad5388f05 feat: introduce kmp sdk & demo app (#1749)
* add kotlin debug app

* add specs

* first kmp sdk version

* add deploy script

* save working nfc implementation

* save demo app flow wip

* agent feedback

* show viewfinder on mrz

* save working scan

* add kotlin formatting

* remove mrz overlay

* fix expiry date

* add feedback to mrz san

* save improved nfc scanning

* save wip

* save gitignore and md state

* add logging and error handling. get iOS demo app working

* format

* add swift formatting

* enable iOS camera

* save ios mrz implementation

* nfc scanning works

* final optimizations

* add tests

* fixes

* better linting

* agent feedback

* bug fixes

* formatting

* agent feedback

* fix app breaking on run

* consolidate kotlin and swift clean up commands

* fix pipeline by installing swiftlint

* fix blurry scanning

* fix ci

---------

Co-authored-by: turnoffthiscomputer <colin.remi07@gmail.com>
2026-02-15 12:03:12 -08:00
Justin Hernandez
de8787ef1a chore: enable sumsub (#1737)
* enable sumsub

* bugbot feedback
2026-02-12 14:42:18 -08:00
Justin Hernandez
7c49a3261f chore: address additional sumsub feedback (#1735)
* agent feedback

* fix settings screen color
2026-02-12 11:09:22 -08:00
Leszek Stachowski
abf01c82c0 Show badge for inactive documents (#1487)
* Show badge for inactive documents

* fix

* refactor to use the new flag

* add inactive check to ProveScreen

* lint

* fix for proving button not working

* use new qrHashlogic

* increase bundle size threshold to 46MB

* remove commented out line

* add kyc related changes

---------

Co-authored-by: seshanthS <seshanth@protonmail.com>
2026-02-12 11:05:47 -08:00
Seshanth.S
886e02f53d SELF-1938 sumsub integration (#1661)
* Sumsub: Update keychain and types

* sumsub: ProvingMachine changes - WIP

* fix: remove duplicate identifier

* update proving machine

* Refactor && Continue onchain registration if user left the app

* fix register flow

* Add hooks to KycSuccessScreen

* Integrate KycVerifiedScreen (#1686)

* Integrate KycVerifiedScreen & Fix race conditions

* yarn lint

* lint

* lint

* add mock kyc

* fix disclose flow

* yarn lint

* Feat/add kyc home screen card design (#1708)

* feat: add new designs to the kycIdCard

* refactor: Update KycIdCard design to match IdCard styling

* feat: update document cards + dev document

* feat: update empty id card for new design

* feat: update pending document card design

* feat: update expired doc + unregistered doc cards from new design

* fix: unregisted id card button links to continue registration screen

* fix: logo design on document cards

* feat: add 6 different backgrounds for ids

deterministically shows 1 of 6 backgrounds for each document | fix: fixed document designs not displaying correctly.

* chore: trigger CI rebuild

* feat: Integrate PendingIdCard to Homescreen

* fix KycIdCard.tsx

---------

Co-authored-by: seshanthS <seshanth@protonmail.com>

* lint

* fix tests

* fix: cleanup only on unmount

* coderabbit comments

* fix: cleanup unused code

* fix: edge case for German Passports with D<< nationality code

* fix tests

* review comments

* review comments

* lint

* Hide duplicated cards in Homescreen

* remove console.log

* fix patch

* remove unused vars

* agent updates

* agent feedback

* abstract colors and formatting

* agent feedback

* Regenerate Sumsub patch-package patch

* fix: handle malformed kyc payload in card background selector

* re-add for clean up

---------

Co-authored-by: Evi Nova <66773372+Tranquil-Flow@users.noreply.github.com>
Co-authored-by: Evi Nova <tranquil_flow@protonmail.com>
Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
2026-02-11 13:51:10 -08:00
Justin Hernandez
df208e787b chore: fix staging pipelines for 2.9.15 (#1715)
* fix versions

* update publish logic
2026-02-06 13:27:20 -08:00
Justin Hernandez
a1b04f2b03 chore: enable SumSub Fisherman device intelligence with privacy compliance (#1714)
* clean up permissions

* updates for permissions

* update permissions and packages

* fix: mark device ID collection as linked in privacy manifest

Address CodeRabbit feedback:
- Set NSPrivacyCollectedDataTypeLinked to true (device signals are tied to applicant identity)
- Clarify Android Data Safety checklist requirements with explicit data-linking declaration

Co-authored-by: Cursor <cursoragent@cursor.com>

* remove for now

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06 12:08:08 -08:00