SELF-1000: address passport data not found issue (#1329)

* update lock files

* use isUserRegisteredWithAlternativeCSCA

* update lock

* fix building release version

* aadhaar fix for public keys

* fix aadhaar check and add tess

* fix test types

* fix mocked data

* coderabbit feedback

* update tests and remove cruft

* update lock and aar file

* fix script and building aar file, add assets for recovery
This commit is contained in:
Justin Hernandez
2025-10-30 10:53:23 -07:00
committed by GitHub
parent 4c2670253f
commit 2e51e268df
8 changed files with 629 additions and 196 deletions

View File

@@ -34,12 +34,7 @@ import { generateCommitment, generateNullifier } from './passport.js';
import { LeanIMT } from '@openpassport/zk-kit-lean-imt';
export type PassportSupportStatus =
| 'passport_metadata_missing'
| 'csca_not_found'
| 'registration_circuit_not_supported'
| 'dsc_circuit_not_supported'
| 'passport_supported';
export type AlternativeCSCA = Record<string, string>;
function validateRegistrationCircuit(
passportData: IDDocument,
@@ -70,6 +65,13 @@ function validateDscCircuit(
return { isValid: !!isValid, circuitName: circuitNameDsc };
}
export type PassportSupportStatus =
| 'passport_metadata_missing'
| 'csca_not_found'
| 'registration_circuit_not_supported'
| 'dsc_circuit_not_supported'
| 'passport_supported';
export async function checkDocumentSupported(
passportData: IDDocument,
opts: {
@@ -137,8 +139,6 @@ export async function checkIfPassportDscIsInTree(
}
return true;
}
type AlternativeCSCA = Record<string, string>;
type AadhaarPublicKeys = null | Array<string>;
export function generateCommitmentInApp(