mirror of
https://github.com/selfxyz/self.git
synced 2026-04-27 03:01:15 -04:00
* feat: add passport validation * refactor: consume sdk passport validator in app * feat: add tracking hook to passport validation * feat: add validation callbacks * docs: clarify passport validator * fix: validate passport hash algorithms * abstract properly * fix tests * format * fix logger and bundler * fix tests * fix tests and bundling * fix format * update lock * fix types * fixes * fixes * don't leak pii * done * revert error
2.3 KiB
2.3 KiB
Migration Checklist
Detailed task prompts are listed in MIGRATION_PROMPTS.md.
- Group new capabilities into modular directories and re-export them from
src/index.tsusing named exports (initial stubs:mrz/,qr/).
1. Processing helpers (MRZ) ✅ COMPLETED
- Finalize MRZ utilities.
- Re-export helpers through the SDK entry point.
- Create modular structure with
src/mrz/andsrc/qr/modules. - Implement proper error handling using
notImplementedhelper. - Use type aliases instead of empty interfaces for better tree shaking.
2. Validation module ✅ COMPLETED
- Port stateless document checks.
- Cover validation logic with unit tests.
3. Proof input generation
- Port register and disclose TEE input helpers.
4. Crypto adapters
- Runtime-selectable adapter using WebCrypto with
@noble/*fallbacks. - Parity tests across implementations.
- Detect WebCrypto availability on React Native/Hermes environments.
- Ensure CSPRNG-backed random number generation.
- Use timing-safe comparison for secret values.
5. TEE session management
- WebSocket wrapper supporting abort, timeout, and progress events.
6. Attestation verification
- PCR0 check and public-key extraction.
- Minimal certificate-chain validation.
7. Protocol synchronization
- Fetch protocol trees with pagination and a TTL cache.
- Verify computed roots against server data.
- Implement rate limiting with exponential backoff and jitter.
- Set memory bounds for concatenated trees and honor Retry-After headers.
8. Artifact management
- Manifest schema & integrity verification.
- CDN downloads with caching and storage adapter.
- Verify manifest signature with pinned public key before caching.
- Enforce CDN allowlist and Content-Length checks.
- Stream hashing to avoid buffering large files.
9. Sample applications
- React Native and web demos showcasing core flows.
- iOS
OpenPassportURL scheme.
10. Integrate SDK into /app
- Consume
@selfxyz/mobile-sdk-alphainside theappworkspace. - Replace MRZ modules with SDK adapters and wire processing helpers.
- Validate builds and unit tests.
11. In-SDK lightweight demo
- Embedded React Native demo inside the SDK with theming hooks.
- Provide build and run instructions.