[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
This commit is contained in:
Justin Hernandez
2025-09-27 13:59:47 -07:00
committed by GitHub
parent 0dc8b18d40
commit 20fa5c5adc
183 changed files with 4316 additions and 1454 deletions

View File

@@ -136,6 +136,11 @@ const _generateCircuitInputs = async (
circuitTypeWithDocumentExtension = `${circuitType}${document === 'passport' ? '' : '_id'}`;
break;
case 'dsc':
if (document === 'aadhaar') {
throw new Error(
'DSC circuit type is not supported for Aadhaar documents',
);
}
({ inputs, circuitName, endpointType, endpoint } = generateTEEInputsDSC(
passportData as PassportData,
protocolStore[document].csca_tree as string[][],
@@ -1014,7 +1019,7 @@ export const useProvingStore = create<ProvingState>((set, get) => {
step: 'protocol_store_fetch',
document,
});
await useProtocolStore.getState()[document].fetch_all(env!);
await useProtocolStore.getState().aadhaar.fetch_all(env!);
break;
}
logProofEvent('info', 'Data fetch succeeded', context, {
@@ -1114,10 +1119,17 @@ export const useProvingStore = create<ProvingState>((set, get) => {
secret as string,
{
getCommitmentTree,
getAltCSCA: (docType: DocumentCategory) =>
docType === 'aadhaar'
? useProtocolStore.getState().aadhaar.public_keys
: useProtocolStore.getState()[docType].alternative_csca,
getAltCSCA: (docType: DocumentCategory) => {
if (docType === 'aadhaar') {
const publicKeys =
useProtocolStore.getState().aadhaar.public_keys;
// Convert string[] to Record<string, string> format expected by AlternativeCSCA
return publicKeys
? Object.fromEntries(publicKeys.map(key => [key, key]))
: {};
}
return useProtocolStore.getState()[docType].alternative_csca;
},
},
);
logProofEvent(