@zkpassport/sdk 0.21.0-beta.2 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/logger.ts","../../src/offline-query.ts","../../package.json","../../src/constants.ts","../../src/public-input-checker.ts","../../src/assets/abi/ZKPassportVerifier.json","../../src/solidity-verifier.ts","../../src/dashboard-api.ts","../../src/bb-verifier.ts","../../src/verifier-api.ts","../../src/index.ts"],"names":["noLogger","_","registerLocale","i18en","normalizeCountry","country","normalizedCountry","getAlpha3Code","numericalCompare","fnName","key","value","requestId","requestIdToConfig","rangeCompare","generalCompare","createOfflineQuery","config","topic","hasConditions","assertNotPolicyLocked","method","builder","start","end","v","countries","lists","options","mode","query","id","version","VERSION","DEFAULT_VALIDITY","DEFAULT_DATE_VALUE","DASHBOARD_API_BASE_URL","VERIFIER_API_BASE_URL","ZKPASSPORT_IOS_APP_ID_HASH","ZKPASSPORT_IOS_APP_CLIP_APP_ID_HASH","ZKPASSPORT_ANDROID_APP_ID_HASH","APPLE_APP_ATTEST_ROOT_KEY_HASH","GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH","GOOGLE_APP_ATTEST_ECDSA_P384_ROOT_KEY_HASH","CURRENT_DATE_FUTURE_TOLERANCE_MS","ATTESTED_ID_PROOF_MAX_AGE_MS","withDocumentType","PublicInputChecker","proof","originalQuery","queryResult","queryResultErrors","isCorrect","disclosedBytes","layout","disclosedDataPassport","DisclosedData","disclosedDataIDCard","birthdatePassport","birthdateIDCard","areDatesEqual","expiryDatePassport","expiryDateIDCard","nationalityPassport","nationalityIDCard","documentNumberPassport","documentNumberIDCard","genderPassport","genderIDCard","issuingCountryPassport","issuingCountryIDCard","fullnamePassport","fullnameIDCard","formatName","firstnamePassport","firstnameIDCard","lastnamePassport","lastnameIDCard","currentTime","minAge","getMinAgeFromCommittedInputs","maxAge","getMaxAgeFromCommittedInputs","minDate","getBirthdateMinDateTimestamp","SECONDS_BETWEEN_1900_AND_1970","maxDate","getBirthdateMaxDateTimestamp","expectedPlusOneDay","expectedMinusOneDay","getMinDateFromCommittedInputs","getMaxDateFromCommittedInputs","countryList","i","domain","proofData","scope","getServiceScopeHash","getServiceScopeFromDisclosureProof","getScopeHash","getServiceSubScopeFromDisclosureProof","scopeErrorMessage","check","devMode","invalid","registryClient","createRegistryClient","getChainFromQuery","error","section","field","root","outer","timestamp","registry","isEmptyRoot","EMPTY_ATTESTATION_REVOCATION_ROOT","boundData","bindMismatches","sanctionsCommittedInputs","isCorrectRoot","facematchCommittedInputs","commitsRevocationRoot","EXPECTED_ENVIRONMENT","requestedMode","revocationRoot","isCorrectRevocationRoot","circuitName","validity","today","currentDate","getCurrentDateFromDisclosureProof","todayToCurrentDate","expectedDifference","committedInputKeys","has","keys","k","flag","message","hasDisclose","isComparison","c","isDisclosure","age","nationality","issuingCountry","discloseOnlyFields","proofs","oprfKeyId","allowedVerificationMethods","DEFAULT_ALLOWED_VERIFICATION_METHODS","commitmentIn","commitmentOut","uniqueIdentifier","uniqueIdentifierType","oprfPublicKeyHash","p","proofOrder","AADHAAR_CIRCUIT_NAME","sortedProofs","a","b","getIndex","name","disclosureProofNames","verificationMethod","firstDisclosureProof","bundleDate","getProofData","getNumberOfPublicInputs","bundleRootTimestamp","isForEVM","getCurrentDateFromOuterProof","rootTimestamp","certificateRegistryRoot","getCertificateRegistryRootFromOuterProof","isCorrectCertificateRegistryRoot","queryResultErrorsCertificateRegistryRoot","circuitRegistryRoot","getCircuitRegistryRootFromOuterProof","isCorrectCircuitRegistryRoot","queryResultErrorsCircuitRegistryRoot","paramCommitments","getParamCommitmentsFromOuterProof","isAttestedOuter","isAadhaarOuter","hasVerificationMethod","getVerificationMethodFromOuterProof","VerificationMethod","getTierForVerificationMethod","VerificationTier","committedInputs","keysInCommittedInputs","isCorrectAttestation","attestationErrors","getScopeFromOuterProof","getSubscopeFromOuterProof","ageCommittedInputs","ageParameterCommitment","getAgeEVMParameterCommitment","getAgeParameterCommitment","isCorrectAge","queryResultErrorsAge","birthdateCommittedInputs","birthdateParameterCommitment","getDateEVMParameterCommitment","ProofType","getDateParameterCommitment","isCorrectBirthdate","queryResultErrorsBirthdate","expiryCommittedInputs","expiryParameterCommitment","isCorrectExpiryDate","queryResultErrorsExpiryDate","discloseCommittedInputs","discloseParameterCommitment","getDiscloseEVMParameterCommitment","getDiscloseParameterCommitment","isCorrectDisclose","queryResultErrorsDisclose","inclusionCheckNationalityCommittedInputs","inclusionCheckNationalityParameterCommitment","getCountryEVMParameterCommitment","getCountryParameterCommitment","isCorrectNationalityInclusion","queryResultErrorsNationalityInclusion","inclusionCheckIssuingCountryCommittedInputs","inclusionCheckIssuingCountryParameterCommitment","isCorrectIssuingCountryInclusion","queryResultErrorsIssuingCountryInclusion","exclusionCheckNationalityCommittedInputs","exclusionCheckNationalityParameterCommitment","isCorrectNationalityExclusion","queryResultErrorsNationalityExclusion","exclusionCheckIssuingCountryCommittedInputs","exclusionCheckIssuingCountryParameterCommitment","isCorrectIssuingCountryExclusion","queryResultErrorsIssuingCountryExclusion","bindCommittedInputs","bindParameterCommitment","getBindEVMParameterCommitment","formatBoundData","getBindParameterCommitment","isCorrectBind","queryResultErrorsBind","exclusionCheckSanctionsCommittedInputs","exclusionCheckSanctionsParameterCommitment","getSanctionsEvmParameterCommitment","getSanctionsParameterCommitment","isCorrectSanctionsExclusion","queryResultErrorsSanctionsExclusion","commitsAttestationRevocationRoot","facematchParameterCommitment","getFacematchEvmParameterCommitment","getFacematchParameterCommitment","isCorrectFacematch","queryResultErrorsFacematch","getNullifierFromOuterProof","getNullifierTypeFromOuterProof","getOprfPkHashFromOuterProof","getCommitmentOutFromAttestedIdProof","getVerificationMethodFromAttestedIdProof","committedKey","isAndroidAttestedIdCircuit","committed","attestedAt","getCurrentDateFromAttestedIdProof","isCorrectDate","dateErrors","expectedParamCommitment","getAttestedIdParameterCommitment","paramCommitment","getParameterCommitmentFromAttestedIdProof","getCommitmentOutFromAadhaarProof","getCertificateRegistryRootFromAadhaarProof","getCommitmentFromDSCProof","merkleRoot","getMerkleRootFromDSCProof","getCommitmentInFromIDDataProof","getCommitmentOutFromIDDataProof","getCommitmentInFromIntegrityProof","getCommitmentOutFromIntegrityProof","getVerificationMethodFromIntegrityProof","getCommitmentInFromDisclosureProof","getParameterCommitmentFromDisclosureProof","calculatedParamCommitment","isCorrectScope","queryResultErrorsScope","isCorrectCurrentDate","queryResultErrorsCurrentDate","getNullifierFromDisclosureProof","getNullifierTypeFromDisclosureProof","paramCommittment","nullifierProofs","distinct","values","none","nullifiers","nullifierTypes","NullifierType","oprfPkHashes","getOprfPkHashFromDisclosureProof","isQueryComplete","completenessErrors","oprfPk","getOprfPublicKey","OPRF_DEFAULT_KEY_ID","expectedPkHash","hashOprfPublicKey","proofPkHash","isAadhaarNationalityConditionAllowed","scheme","isVerificationMethodAllowed","attestationParamCommitment","fail","expected","received","android","getAttestedIdEvmParameterCommitment","parameters","rootKeys","appIdHash","integrityAnchors","GOOGLE_PLAY_INTEGRITY_PUBKEY_HASH","ZKPassportVerifier_default","SolidityVerifier","_SolidityVerifier","validityPeriodInSeconds","committedInputCounts","inputs","facematchStyleInputs","committedInputCount","getCommittedInputCount","compressedCommittedInputs","formattedCountries","proofType","ProofTypeLength","rightPadArrayWithZeros","x","minDateBytes","numberToBytesBE","maxDateBytes","parameterCommitments","commitment","committedInput","rawHashedInputs","sha256","hexToBytes","hashedInputs","bytesToHex","count","circuitVersionToBytes32","rpcUrl","createPublicClient","http","address","abi","functionName","client","params","result","toHex","bytes","length","getFacematchCommittedInputLength","submitProof","policyId","payload","response","e","V6_MIN_CIRCUIT_VERSION","getBBVersionForCircuitVersion","circuitVersion","parts","isAtLeast","createUltraHonkVerifier","bbVersion","writingDirectory","clearStaleCrsCacheOnVersionChange","crsPath","UltraHonkVerifierBackend","Barretenberg","barretenberg","BBVerifier","circuit","Buffer","BB_VERSION_KEY","BB_CRS_DB_NAME","BB_CRS_CACHE_VERSION","store","dbExists","db","resolve","req","minimum","index","minimumPart","verifyWithVerifierApi","body","DEFAULT_PURPOSE","getRegistryClientOptions","circuitsUrl","base","_chainId","hash","realNullifierType","enforceVerificationMethodPolicy","enforceUniqueIdentifierType","requestedType","proofTypeName","onResultDeprecationWarned","warnOnResultDeprecated","ZKPassport","_domain","hasFailedProofs","requestSucceeded","callback","reason","proofStorageEnabled","verification","verified","request","formatQueryResultDates","policy","bind","conditions","policyQuery","svc","localConfig","hasFaceMatch","hasStrictFacematch","url","logo","purpose","projectID","topicOverride","keyPairOverride","replayMissedMessages","cloudProverUrl","bridgeUrl","returnDeepLink","verifierMode","overrides","serializeAllowedVerificationMethods","dashboardConfig","bridge","Bridge","reconnection","event","notVerified","localParams","apiParams","localResult","formattedResult","isCircuitVersion","bbVerifier","uniqueIdentifierFromPublicInputs","uniqueIdentifierTypeFromPublicInputs","queryResultErrorsFromPublicInputs","verificationMethodFromPublicInputs","circuitManifest","isOuterEVM","proofName","hostedPackagedCircuit","base64Config","base64Service","pubkey","nullifierType"],"mappings":"6rGASO,IAAMA,CAAAA,CAAW,CACtB,KAAA,CAAO,CAAA,GAAIC,CAAAA,GAAa,CAAC,EACzB,IAAA,CAAM,CAAA,GAAIA,CAAAA,GAAa,CAAC,EACxB,IAAA,CAAM,CAAA,GAAIA,CAAAA,GAAa,CAAC,EACxB,KAAA,CAAO,CAAA,GAAIA,CAAAA,GAAa,CAAC,CAC3B,CAAA,CCIAC,cAAAA,CAAeC,EAAK,CAAA,CAEb,SAASC,GAAiBC,CAAAA,CAAmC,CAClE,GAAIA,CAAAA,GAAY,0BACd,OAAO,KAAA,CAET,IAAIC,CAAAA,CAEJ,OAAAA,CAAAA,CADeC,aAAAA,CAAcF,CAAAA,CAAwB,IAAI,CAAA,EAC1BA,CAAAA,EAA0B,KAAA,CAClDC,CACT,CAEO,SAASE,EAAAA,CACdC,CAAAA,CACAC,EACAC,CAAAA,CACAC,CAAAA,CACAC,CAA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C,CAMO,aAAA,CAAcA,CAAAA,CAAmB,CAClC,IAAA,CAAK,cAAcA,CAAS,CAAA,GAC9B,IAAA,CAAK,aAAA,CAAcA,CAAS,CAAA,CAAE,KAAA,EAAM,CACpC,OAAO,IAAA,CAAK,aAAA,CAAcA,CAAS,CAAA,CAAA,CAErC,OAAO,IAAA,CAAK,gBAAA,CAAiBA,CAAS,CAAA,CACtC,OAAO,IAAA,CAAK,aAAA,CAAcA,CAAS,CAAA,CACnC,OAAO,IAAA,CAAK,kBAAA,CAAmBA,CAAS,EACxC,OAAO,IAAA,CAAK,aAAA,CAAcA,CAAS,EACnC,OAAO,IAAA,CAAK,uBAAA,CAAwBA,CAAS,EAC7C,OAAO,IAAA,CAAK,cAAA,CAAeA,CAAS,CAAA,CACpC,OAAO,IAAA,CAAK,aAAA,CAAcA,CAAS,CAAA,CACnC,IAAA,CAAK,0BAAA,CAA2BA,CAAS,CAAA,CAAI,EAAC,CAC9C,IAAA,CAAK,2BAA2BA,CAAS,CAAA,CAAI,EAAC,CAC9C,IAAA,CAAK,wBAAA,CAAyBA,CAAS,CAAA,CAAI,EAAC,CAC5C,IAAA,CAAK,+BAAA,CAAgCA,CAAS,EAAI,EAAC,CACnD,IAAA,CAAK,yBAAA,CAA0BA,CAAS,CAAA,CAAI,EAAC,CAC7C,IAAA,CAAK,kBAAA,CAAmBA,CAAS,CAAA,CAAI,GACrC,IAAA,CAAK,iBAAA,CAAkBA,CAAS,CAAA,CAAI,EAAC,CACrC,IAAA,CAAK,iBAAA,CAAkBA,CAAS,EAAI,EAAC,CACrC,IAAA,CAAK,gBAAA,CAAiBA,CAAS,CAAA,CAAI,GACrC,CAKO,gBAAA,EAAmB,CACxB,IAAA,IAAWA,CAAAA,IAAa,KAAK,aAAA,CAC3B,IAAA,CAAK,aAAA,CAAcA,CAAS,EAEhC,CACF","file":"index.js","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport const customLogger = {\n debug: (message: string, ...args: any[]) => console.debug(message, ...args),\n info: (message: string, ...args: any[]) => console.info(message, ...args),\n warn: (message: string, ...args: any[]) => console.warn(message, ...args),\n error: (message: string, ...args: any[]) => console.error(message, ...args),\n}\n\nexport const noLogger = {\n debug: (..._: any[]) => {},\n info: (..._: any[]) => {},\n warn: (..._: any[]) => {},\n error: (..._: any[]) => {},\n}\n","import { Alpha3Code, getAlpha3Code, registerLocale } from \"i18n-iso-countries\"\nimport i18en from \"i18n-iso-countries/langs/en.json\"\nimport type {\n BoundData,\n CountryName,\n DisclosableIDCredential,\n FacematchMode,\n IDCredential,\n IDCredentialValue,\n NumericalIDCredential,\n Query,\n SanctionsCountries,\n SanctionsLists,\n SupportedChain,\n} from \"@zkpassport/utils\"\nimport type { OfflineQueryBuilderResult, QueryBuilder } from \"./types\"\n\n// Country-name normalization needs the English locale registered (idempotent)\nregisterLocale(i18en)\n\nexport function normalizeCountry(country: CountryName | Alpha3Code) {\n if (country === \"Zero Knowledge Republic\") {\n return \"ZKR\"\n }\n let normalizedCountry: Alpha3Code | \"ZKR\" | undefined = undefined\n const alpha3 = getAlpha3Code(country as CountryName, \"en\") as Alpha3Code | \"ZKR\" | undefined\n normalizedCountry = alpha3 || (country as Alpha3Code) || \"ZKR\"\n return normalizedCountry as Alpha3Code | \"ZKR\"\n}\n\nexport function numericalCompare(\n fnName: \"gte\" | \"gt\" | \"lte\" | \"lt\",\n key: NumericalIDCredential,\n value: number | Date,\n requestId: string,\n requestIdToConfig: Record<string, Query>,\n) {\n requestIdToConfig[requestId][key] = {\n ...requestIdToConfig[requestId][key],\n [fnName]: value,\n }\n}\n\nexport function rangeCompare(\n key: NumericalIDCredential,\n value: [number | Date, number | Date],\n requestId: string,\n requestIdToConfig: Record<string, Query>,\n) {\n requestIdToConfig[requestId][key] = {\n ...requestIdToConfig[requestId][key],\n range: value,\n }\n}\n\nexport function generalCompare(\n fnName: \"in\" | \"out\" | \"eq\",\n key: IDCredential,\n value: any, // eslint-disable-line\n requestId: string,\n requestIdToConfig: Record<string, Query>,\n) {\n requestIdToConfig[requestId][key] = {\n ...requestIdToConfig[requestId][key],\n [fnName]: value,\n }\n}\n\n// Same Query output as request()'s builder, with no bridge/network/class deps\nexport function createOfflineQuery(): QueryBuilder<\"offline\"> {\n const config: Record<string, Query> = { query: {} }\n const topic = \"query\"\n let hasConditions = false\n\n const assertNotPolicyLocked = (method: string) => {\n if (config[topic].policy) {\n throw new Error(\n `Cannot call .${method}() on a policy-driven query. The query for policy '${config[topic].policy}' is immutable.`,\n )\n }\n hasConditions = true\n }\n\n const builder: QueryBuilder<\"offline\"> = {\n eq: <T extends IDCredential>(key: T, value: IDCredentialValue<T>) => {\n assertNotPolicyLocked(\"eq\")\n if (key === \"issuing_country\" || key === \"nationality\") {\n value = normalizeCountry(value as CountryName) as IDCredentialValue<T>\n }\n generalCompare(\"eq\", key, value, topic, config)\n return builder as unknown as QueryBuilder\n },\n gte: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n assertNotPolicyLocked(\"gte\")\n numericalCompare(\"gte\", key, value, topic, config)\n if (key === \"age\" && ((value as number) < 1 || (value as number) >= 100)) {\n throw new Error(\"Age must be between 1 and 99 (inclusive)\")\n }\n return builder as unknown as QueryBuilder\n },\n gt: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n assertNotPolicyLocked(\"gt\")\n numericalCompare(\"gt\", key, value, topic, config)\n return builder as unknown as QueryBuilder\n },\n lte: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n assertNotPolicyLocked(\"lte\")\n numericalCompare(\"lte\", key, value, topic, config)\n return builder as unknown as QueryBuilder\n },\n lt: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n assertNotPolicyLocked(\"lt\")\n numericalCompare(\"lt\", key, value, topic, config)\n return builder as unknown as QueryBuilder\n },\n range: <T extends NumericalIDCredential>(\n key: T,\n start: IDCredentialValue<T>,\n end: IDCredentialValue<T>,\n ) => {\n assertNotPolicyLocked(\"range\")\n rangeCompare(key, [start, end], topic, config)\n return builder as unknown as QueryBuilder\n },\n in: <T extends \"nationality\" | \"issuing_country\">(key: T, value: IDCredentialValue<T>[]) => {\n assertNotPolicyLocked(\"in\")\n value = value.map((v) => normalizeCountry(v as CountryName)) as IDCredentialValue<T>[]\n generalCompare(\"in\", key, value, topic, config)\n return builder as unknown as QueryBuilder\n },\n out: <T extends \"nationality\" | \"issuing_country\">(key: T, value: IDCredentialValue<T>[]) => {\n assertNotPolicyLocked(\"out\")\n value = value.map((v) => normalizeCountry(v as CountryName)) as IDCredentialValue<T>[]\n generalCompare(\"out\", key, value, topic, config)\n return builder as unknown as QueryBuilder\n },\n disclose: (key: DisclosableIDCredential) => {\n assertNotPolicyLocked(\"disclose\")\n config[topic][key] = {\n ...config[topic][key],\n disclose: true,\n }\n return builder as unknown as QueryBuilder\n },\n bind: <T extends keyof BoundData>(\n key: T,\n value: T extends \"chain\"\n ? SupportedChain\n : T extends \"user_address\"\n ? `0x${string}`\n : string | undefined,\n ) => {\n // Runtime payload: composes with policies (it only adds committed data)\n config[topic].bind = {\n ...config[topic].bind,\n [key]: value,\n }\n return builder as unknown as QueryBuilder\n },\n sanctions: (\n countries: SanctionsCountries = \"all\",\n lists: SanctionsLists = \"all\",\n options: { strict?: boolean } = { strict: false },\n ) => {\n assertNotPolicyLocked(\"sanctions\")\n config[topic].sanctions = {\n ...config[topic].sanctions,\n countries,\n lists,\n strict: options.strict ?? false,\n }\n return builder as unknown as QueryBuilder\n },\n facematch: (mode: FacematchMode = \"strict\") => {\n assertNotPolicyLocked(\"facematch\")\n config[topic].facematch = { mode }\n return builder as unknown as QueryBuilder\n },\n raw: (query: Query) => {\n assertNotPolicyLocked(\"raw\")\n config[topic] = query\n return builder\n },\n policy: (id: string) => {\n if (typeof id !== \"string\" || id.length === 0) {\n throw new Error(\".policy() requires a non-empty string id.\")\n }\n if (config[topic].policy) {\n throw new Error(\n `Cannot call .policy() more than once on a request (already set to '${config[topic].policy}').`,\n )\n }\n if (hasConditions) {\n throw new Error(\n \"Cannot combine .policy() with builder methods like .gte()/.disclose()/etc.\",\n )\n }\n config[topic].policy = id\n return builder\n },\n done: (() => {\n return { query: config[topic] } satisfies OfflineQueryBuilderResult\n }) as QueryBuilder<\"offline\">[\"done\"],\n }\n return builder\n}\n","{\n \"name\": \"@zkpassport/sdk\",\n \"version\": \"0.21.0-beta.2\",\n \"description\": \"Privacy-preserving identity verification using passports and ID cards\",\n \"author\": \"ZKPassport\",\n \"license\": \"Apache-2.0\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/zkpassport/zkpassport-packages\",\n \"directory\": \"packages/zkpassport-sdk\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/esm/index.js\",\n \"types\": \"./dist/esm/index.d.ts\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/esm/index.d.ts\",\n \"default\": \"./dist/esm/index.js\"\n },\n \"require\": {\n \"types\": \"./dist/cjs/index.d.cts\",\n \"default\": \"./dist/cjs/index.cjs\"\n }\n },\n \"./popup\": {\n \"import\": {\n \"types\": \"./dist/esm/popup.d.ts\",\n \"default\": \"./dist/esm/popup.js\"\n },\n \"require\": {\n \"types\": \"./dist/cjs/popup.d.cts\",\n \"default\": \"./dist/cjs/popup.cjs\"\n }\n },\n \"./query\": {\n \"import\": {\n \"types\": \"./dist/esm/query.d.ts\",\n \"default\": \"./dist/esm/query.js\"\n },\n \"require\": {\n \"types\": \"./dist/cjs/query.d.cts\",\n \"default\": \"./dist/cjs/query.cjs\"\n }\n }\n },\n \"scripts\": {\n \"build\": \"tsup --config tsup.config.ts\",\n \"dev:build\": \"DEV_BUILD=true bun run build\",\n \"clean\": \"rimraf dist tsconfig.tsbuildinfo\",\n \"test\": \"bun test\",\n \"coverage\": \"bun test --coverage\",\n \"check\": \"prettier -c src tests && eslint src tests --ext .ts\",\n \"format\": \"prettier -c -w src tests\",\n \"validate-package\": \"../../scripts/validate-package.sh\",\n \"prepublishOnly\": \"../../scripts/prepublish.sh\"\n },\n \"files\": [\n \"dist/esm\",\n \"dist/cjs\",\n \"dist/types\"\n ],\n \"keywords\": [\n \"zkpassport\",\n \"zkpassport-sdk\",\n \"sdk\"\n ],\n \"dependencies\": {\n \"@aztec-foundation/bb.js\": \"6.0.0\",\n \"@aztec/bb.js\": \"5.0.0\",\n \"@noble/ciphers\": \"^1.2.1\",\n \"@noble/hashes\": \"^2.0.1\",\n \"@noble/secp256k1\": \"^2.2.3\",\n \"@noir-lang/noir_js\": \"1.0.0-beta.22\",\n \"@obsidion/bridge\": \"^0.12.3\",\n \"@zkpassport/registry\": \"workspace:*\",\n \"@zkpassport/utils\": \"workspace:*\",\n \"buffer\": \"^6.0.3\",\n \"i18n-iso-countries\": \"^7.12.0\",\n \"pako\": \"^2.1.0\",\n \"tslib\": \"^2.8.1\",\n \"viem\": \"^2.27.2\",\n \"ws\": \"^8.18.0\"\n },\n \"devDependencies\": {\n \"@types/pako\": \"^2.0.3\",\n \"@types/ws\": \"^8.5.12\"\n },\n \"packageManager\": \"bun@1.3.1\"\n}\n","import { version } from \"../package.json\"\n\nexport const VERSION = version\nexport const DEFAULT_VALIDITY = 7 * 24 * 60 * 60 // 7 days\nexport const DEFAULT_DATE_VALUE = new Date(0)\n\n// Base URL for the ZKPassport dashboard API (per-domain config, proof submission).\nexport const DASHBOARD_API_BASE_URL = \"https://dashboard-api.zkpassport.id\"\n\n// Base URL for the ZKPassport verifier API, which can verify proofs this SDK cannot.\nexport const VERIFIER_API_BASE_URL = \"https://verifier.zkpassport.id\"\n\n// 32-byte zero value, formatted as a 0x-prefixed hex string.\nexport const ZERO_BYTES32 = \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n\n// This is the app id hash for the ZKPassport app\n// i.e. hash of `YL5MS3Z639.app.zkpassport.zkpassport`\nexport const ZKPASSPORT_IOS_APP_ID_HASH =\n \"0x1fa73686cf510f8f85757b0602de0dd72a13e68ae2092462be8b72662e7f179b\"\n\n// This is the app id hash for the ZKPassport App Clip on iOS\n// i.e. hash of `YL5MS3Z639.app.zkpassport.zkpassport.clip`\nexport const ZKPASSPORT_IOS_APP_CLIP_APP_ID_HASH =\n \"0x1409355f7733451c37093c8aac68611b102c0f270c9961d74ef6cfa6f888d3f0\"\n\n// This is the app id hash for the ZKPassport app on Android\n// i.e. hash of `app.zkpassport.zkpassport`\nexport const ZKPASSPORT_ANDROID_APP_ID_HASH =\n \"0x24d9929b248be7eeecaa98e105c034a50539610f3fdd4cb9c8983ef4100d615d\"\n\n// This is the hash of the root key of Apple's App Attest\n// c.f. https://www.apple.com/certificateauthority/Apple_App_Attestation_Root_CA.pem\nexport const APPLE_APP_ATTEST_ROOT_KEY_HASH =\n \"0x2532418a107c5306fa8308c22255792cf77e4a290cbce8a840a642a3e591340b\"\n\n// This is the hash of the RSA root key of Google's App Attest\n// c.f. https://developer.android.com/privacy-and-security/security-key-attestation#root_certificate\nexport const GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH =\n \"0x16700a2d9168a194fc85f237af5829b5a2be05b8ae8ac4879ada34cf54a9c211\"\n\n// This is the hash of the ECDSA P384 root key of Google's App Attest\n// c.f. https://developer.android.com/privacy-and-security/security-key-attestation#root_certificate\nexport const GOOGLE_APP_ATTEST_ECDSA_P384_ROOT_KEY_HASH =\n \"0x0e1889bec6c1d686abcf08360ff404f803ab345881ea8cba6aad33b7f7f7ffe0\"\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport {\n type ProofResult,\n type QueryResult,\n AADHAAR_CIRCUIT_NAME,\n getCertificateRegistryRootFromAadhaarProof,\n isAadhaarNationalityConditionAllowed,\n getCommitmentOutFromAadhaarProof,\n getChainFromQuery,\n getProofData,\n getCommitmentFromDSCProof,\n getCommitmentInFromIDDataProof,\n getCommitmentOutFromIDDataProof,\n getNullifierFromDisclosureProof,\n getCommitmentInFromIntegrityProof,\n getCommitmentOutFromIntegrityProof,\n EMPTY_ATTESTATION_REVOCATION_ROOT,\n getCommitmentOutFromAttestedIdProof,\n getParameterCommitmentFromAttestedIdProof,\n getVerificationMethodFromAttestedIdProof,\n getCurrentDateFromAttestedIdProof,\n isAndroidAttestedIdCircuit,\n GOOGLE_PLAY_INTEGRITY_PUBKEY_HASH,\n getVerificationMethodFromIntegrityProof,\n getVerificationMethodFromOuterProof,\n commitsAttestationRevocationRoot,\n hasVerificationMethod,\n isVerificationMethodAllowed,\n DEFAULT_ALLOWED_VERIFICATION_METHODS,\n VerificationMethod,\n type AllowedVerificationMethod,\n getCommitmentInFromDisclosureProof,\n getMerkleRootFromDSCProof,\n getCurrentDateFromDisclosureProof,\n DisclosedData,\n formatName,\n getNumberOfPublicInputs,\n getParameterCommitmentFromDisclosureProof,\n getCountryParameterCommitment,\n getDiscloseParameterCommitment,\n getDateParameterCommitment,\n getCertificateRegistryRootFromOuterProof,\n getParamCommitmentsFromOuterProof,\n AgeCommittedInputs,\n DiscloseCommittedInputs,\n getMinAgeFromCommittedInputs,\n getMaxAgeFromCommittedInputs,\n getAgeParameterCommitment,\n DateCommittedInputs,\n CountryCommittedInputs,\n getMinDateFromCommittedInputs,\n getMaxDateFromCommittedInputs,\n getCurrentDateFromOuterProof,\n getNullifierFromOuterProof,\n getAgeEVMParameterCommitment,\n getDateEVMParameterCommitment,\n getDiscloseEVMParameterCommitment,\n getCountryEVMParameterCommitment,\n ProofType,\n getScopeHash,\n ProofData,\n getScopeFromOuterProof,\n getSubscopeFromOuterProof,\n getServiceScopeHash,\n BoundData,\n BindCommittedInputs,\n getBindEVMParameterCommitment,\n getBindParameterCommitment,\n formatBoundData,\n getCircuitRegistryRootFromOuterProof,\n areDatesEqual,\n getBirthdateMinDateTimestamp,\n getBirthdateMaxDateTimestamp,\n SanctionsCommittedInputs,\n getSanctionsEvmParameterCommitment,\n getSanctionsParameterCommitment,\n SECONDS_BETWEEN_1900_AND_1970,\n FacematchCommittedInputs,\n AttestedIdCommittedInputs,\n getFacematchEvmParameterCommitment,\n getFacematchParameterCommitment,\n getAttestedIdEvmParameterCommitment,\n getAttestedIdParameterCommitment,\n getTierForVerificationMethod,\n VerificationTier,\n NullifierType,\n getNullifierTypeFromOuterProof,\n getNullifierTypeFromDisclosureProof,\n getServiceScopeFromDisclosureProof,\n getServiceSubScopeFromDisclosureProof,\n getOprfPkHashFromDisclosureProof,\n getOprfPkHashFromOuterProof,\n OPRF_DEFAULT_KEY_ID,\n getOprfPublicKey,\n hashOprfPublicKey,\n Query,\n} from \"@zkpassport/utils\"\nimport { QueryResultErrors } from \"./types\"\nimport { createRegistryClient, type RegistryClient } from \"@zkpassport/registry\"\nimport {\n APPLE_APP_ATTEST_ROOT_KEY_HASH,\n DEFAULT_DATE_VALUE,\n DEFAULT_VALIDITY,\n GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH,\n GOOGLE_APP_ATTEST_ECDSA_P384_ROOT_KEY_HASH,\n ZKPASSPORT_ANDROID_APP_ID_HASH,\n ZKPASSPORT_IOS_APP_CLIP_APP_ID_HASH,\n ZKPASSPORT_IOS_APP_ID_HASH,\n} from \"./constants\"\n\n// Allowance for clock/timezone skew between the proving device and the verifier\nconst CURRENT_DATE_FUTURE_TOLERANCE_MS = 24 * 60 * 60 * 1000\n// How old an attested ID proof's date may be; the app renews its proofs after 28 days\nconst ATTESTED_ID_PROOF_MAX_AGE_MS = 30 * 24 * 60 * 60 * 1000\n\nexport function withDocumentType(query: Query): Query {\n const needed = (\n [\n \"firstname\",\n \"lastname\",\n \"fullname\",\n \"birthdate\",\n \"expiry_date\",\n \"nationality\",\n \"gender\",\n \"document_number\",\n ] as const\n ).some((key) => query[key]?.disclose || query[key]?.eq !== undefined)\n if (!needed || query.document_type?.disclose || query.document_type?.eq !== undefined) {\n return query\n }\n return { ...query, document_type: { ...query.document_type, disclose: true } }\n}\n\nexport class PublicInputChecker {\n public static checkDiscloseBytesPublicInputs(\n proof: ProofResult,\n originalQuery: Query,\n queryResult: QueryResult,\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n // Expose document_type if any fields are disclosed\n originalQuery = withDocumentType(originalQuery)\n // We can't be certain that the disclosed data is for a passport or an ID card\n // so we need to check both (unless the document type is revealed)\n const disclosedBytes =\n (proof.committedInputs?.disclose_bytes as DiscloseCommittedInputs)?.disclosedBytes ??\n (proof.committedInputs?.disclose_bytes_evm as DiscloseCommittedInputs)?.disclosedBytes\n const layout = disclosedBytes?.[0]\n ? String.fromCharCode(disclosedBytes[0]) === \"P\"\n ? \"passport\"\n : \"id_card\"\n : undefined\n const disclosedDataPassport = DisclosedData.fromDisclosedBytes(\n disclosedBytes,\n layout ?? \"passport\",\n )\n const disclosedDataIDCard = DisclosedData.fromDisclosedBytes(\n disclosedBytes,\n layout ?? \"id_card\",\n )\n if (queryResult.document_type) {\n // Document type is always at the same index in the disclosed data\n if (\n queryResult.document_type.eq &&\n queryResult.document_type.eq.result &&\n queryResult.document_type.eq.expected !== disclosedDataPassport.documentType\n ) {\n console.warn(\"Document type does not match the expected document type\")\n isCorrect = false\n queryResultErrors.document_type = {\n ...queryResultErrors.document_type,\n eq: {\n expected: `${queryResult.document_type.eq.expected}`,\n received: `${disclosedDataPassport.documentType ?? disclosedDataIDCard.documentType}`,\n message: \"Document type does not match the expected document type\",\n },\n }\n }\n if (\n queryResult.document_type.disclose &&\n queryResult.document_type.disclose.result !== disclosedDataIDCard.documentType\n ) {\n console.warn(\"Document type does not match the disclosed document type in query result\")\n isCorrect = false\n queryResultErrors.document_type = {\n ...queryResultErrors.document_type,\n disclose: {\n expected: `${queryResult.document_type.disclose?.result}`,\n received: `${disclosedDataIDCard.documentType ?? disclosedDataPassport.documentType}`,\n message: \"Document type does not match the disclosed document type in query result\",\n },\n }\n }\n if (\n queryResult.document_type.eq &&\n (originalQuery.document_type?.eq === undefined ||\n queryResult.document_type.eq.expected !== originalQuery.document_type.eq)\n ) {\n console.warn(\"Document type eq does not match the original query\")\n isCorrect = false\n queryResultErrors.document_type = {\n ...queryResultErrors.document_type,\n eq: {\n expected: `${originalQuery.document_type?.eq}`,\n received: `${queryResult.document_type.eq.expected}`,\n message: \"Document type eq does not match the original query\",\n },\n }\n }\n if (queryResult.document_type.disclose && !originalQuery.document_type?.disclose) {\n console.warn(\"Document type disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.document_type = {\n ...queryResultErrors.document_type,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.document_type.disclose.result}`,\n message: \"Document type disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.birthdate) {\n const birthdatePassport = disclosedDataPassport.dateOfBirth\n const birthdateIDCard = disclosedDataIDCard.dateOfBirth\n if (\n queryResult.birthdate.eq &&\n queryResult.birthdate.eq.result &&\n !areDatesEqual(queryResult.birthdate.eq.expected, birthdatePassport) &&\n !areDatesEqual(queryResult.birthdate.eq.expected, birthdateIDCard)\n ) {\n console.warn(\"Birthdate does not match the expected birthdate\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n eq: {\n expected: `${queryResult.birthdate.eq.expected.toISOString()}`,\n received: `${birthdatePassport?.toISOString() ?? birthdateIDCard?.toISOString()}`,\n message: \"Birthdate does not match the expected birthdate\",\n },\n }\n }\n if (\n queryResult.birthdate.disclose &&\n !areDatesEqual(queryResult.birthdate.disclose.result, birthdatePassport) &&\n !areDatesEqual(queryResult.birthdate.disclose.result, birthdateIDCard)\n ) {\n console.warn(\"Birthdate does not match the disclosed birthdate in query result\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n disclose: {\n expected: `${queryResult.birthdate.disclose.result.toISOString()}`,\n received: `${birthdatePassport?.toISOString() ?? birthdateIDCard?.toISOString()}`,\n message: \"Birthdate does not match the disclosed birthdate in query result\",\n },\n }\n }\n if (\n queryResult.birthdate.eq &&\n (originalQuery.birthdate?.eq === undefined ||\n !areDatesEqual(queryResult.birthdate.eq.expected, originalQuery.birthdate.eq as Date))\n ) {\n console.warn(\"Birthdate eq does not match the original query\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n eq: {\n expected: `${(originalQuery.birthdate?.eq as Date)?.toISOString?.() ?? \"undefined\"}`,\n received: `${queryResult.birthdate.eq.expected.toISOString()}`,\n message: \"Birthdate eq does not match the original query\",\n },\n }\n }\n if (queryResult.birthdate.disclose && !originalQuery.birthdate?.disclose) {\n console.warn(\"Birthdate disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.birthdate.disclose.result}`,\n message: \"Birthdate disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.expiry_date) {\n const expiryDatePassport = disclosedDataPassport.dateOfExpiry\n const expiryDateIDCard = disclosedDataIDCard.dateOfExpiry\n if (\n queryResult.expiry_date.eq &&\n queryResult.expiry_date.eq.result &&\n !areDatesEqual(queryResult.expiry_date.eq.expected, expiryDatePassport) &&\n !areDatesEqual(queryResult.expiry_date.eq.expected, expiryDateIDCard)\n ) {\n console.warn(\"Expiry date does not match the expected expiry date\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n eq: {\n expected: `${queryResult.expiry_date.eq.expected.toISOString()}`,\n received: `${expiryDatePassport?.toISOString() ?? expiryDateIDCard?.toISOString()}`,\n message: \"Expiry date does not match the expected expiry date\",\n },\n }\n }\n if (\n queryResult.expiry_date.disclose &&\n !areDatesEqual(queryResult.expiry_date.disclose.result, expiryDatePassport) &&\n !areDatesEqual(queryResult.expiry_date.disclose.result, expiryDateIDCard)\n ) {\n console.warn(\"Expiry date does not match the disclosed expiry date in query result\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n disclose: {\n expected: `${queryResult.expiry_date.disclose.result.toISOString()}`,\n received: `${expiryDatePassport?.toISOString() ?? expiryDateIDCard?.toISOString()}`,\n message: \"Expiry date does not match the disclosed expiry date in query result\",\n },\n }\n }\n if (\n queryResult.expiry_date.eq &&\n (originalQuery.expiry_date?.eq === undefined ||\n !areDatesEqual(queryResult.expiry_date.eq.expected, originalQuery.expiry_date.eq as Date))\n ) {\n console.warn(\"Expiry date eq does not match the original query\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n eq: {\n expected: `${(originalQuery.expiry_date?.eq as Date)?.toISOString?.() ?? \"undefined\"}`,\n received: `${queryResult.expiry_date.eq.expected.toISOString()}`,\n message: \"Expiry date eq does not match the original query\",\n },\n }\n }\n if (queryResult.expiry_date.disclose && !originalQuery.expiry_date?.disclose) {\n console.warn(\"Expiry date disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.expiry_date.disclose.result}`,\n message: \"Expiry date disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.nationality) {\n const nationalityPassport = disclosedDataPassport.nationality\n const nationalityIDCard = disclosedDataIDCard.nationality\n if (\n queryResult.nationality.eq &&\n queryResult.nationality.eq.result &&\n queryResult.nationality.eq.expected !== nationalityPassport &&\n queryResult.nationality.eq.expected !== nationalityIDCard\n ) {\n console.warn(\"Nationality does not match the expected nationality\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n eq: {\n expected: `${queryResult.nationality.eq.expected}`,\n received: `${nationalityPassport ?? nationalityIDCard}`,\n message: \"Nationality does not match the expected nationality\",\n },\n }\n }\n if (\n queryResult.nationality.disclose &&\n queryResult.nationality.disclose.result !== nationalityPassport &&\n queryResult.nationality.disclose.result !== nationalityIDCard\n ) {\n console.warn(\"Nationality does not match the disclosed nationality in query result\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n disclose: {\n expected: `${queryResult.nationality.disclose.result}`,\n received: `${nationalityPassport ?? nationalityIDCard}`,\n message: \"Nationality does not match the disclosed nationality in query result\",\n },\n }\n }\n if (\n queryResult.nationality.eq &&\n (originalQuery.nationality?.eq === undefined ||\n queryResult.nationality.eq.expected !== originalQuery.nationality.eq)\n ) {\n console.warn(\"Nationality eq does not match the original query\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n eq: {\n expected: `${originalQuery.nationality?.eq}`,\n received: `${queryResult.nationality.eq.expected}`,\n message: \"Nationality eq does not match the original query\",\n },\n }\n }\n if (queryResult.nationality.disclose && !originalQuery.nationality?.disclose) {\n console.warn(\"Nationality disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.nationality.disclose.result}`,\n message: \"Nationality disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.document_number) {\n const documentNumberPassport = disclosedDataPassport.documentNumber\n const documentNumberIDCard = disclosedDataIDCard.documentNumber\n if (\n queryResult.document_number.eq &&\n queryResult.document_number.eq.result &&\n queryResult.document_number.eq.expected !== documentNumberPassport &&\n queryResult.document_number.eq.expected !== documentNumberIDCard\n ) {\n console.warn(\"Document number does not match the expected document number\")\n isCorrect = false\n queryResultErrors.document_number = {\n ...queryResultErrors.document_number,\n eq: {\n expected: `${queryResult.document_number.eq.expected}`,\n received: `${documentNumberPassport ?? documentNumberIDCard}`,\n message: \"Document number does not match the expected document number\",\n },\n }\n }\n if (\n queryResult.document_number.disclose &&\n queryResult.document_number.disclose.result !== documentNumberPassport &&\n queryResult.document_number.disclose.result !== documentNumberIDCard\n ) {\n console.warn(\"Document number does not match the disclosed document number in query result\")\n isCorrect = false\n queryResultErrors.document_number = {\n ...queryResultErrors.document_number,\n disclose: {\n expected: `${queryResult.document_number.disclose.result}`,\n received: `${documentNumberPassport ?? documentNumberIDCard}`,\n message: \"Document number does not match the disclosed document number in query result\",\n },\n }\n }\n if (\n queryResult.document_number.eq &&\n (originalQuery.document_number?.eq === undefined ||\n queryResult.document_number.eq.expected !== originalQuery.document_number.eq)\n ) {\n console.warn(\"Document number eq does not match the original query\")\n isCorrect = false\n queryResultErrors.document_number = {\n ...queryResultErrors.document_number,\n eq: {\n expected: `${originalQuery.document_number?.eq}`,\n received: `${queryResult.document_number.eq.expected}`,\n message: \"Document number eq does not match the original query\",\n },\n }\n }\n if (queryResult.document_number.disclose && !originalQuery.document_number?.disclose) {\n console.warn(\"Document number disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.document_number = {\n ...queryResultErrors.document_number,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.document_number.disclose.result}`,\n message: \"Document number disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.gender) {\n const genderPassport = disclosedDataPassport.gender\n const genderIDCard = disclosedDataIDCard.gender\n if (\n queryResult.gender.eq &&\n queryResult.gender.eq.result &&\n queryResult.gender.eq.expected !== genderPassport &&\n queryResult.gender.eq.expected !== genderIDCard\n ) {\n console.warn(\"Gender does not match the expected gender\")\n isCorrect = false\n queryResultErrors.gender = {\n ...queryResultErrors.gender,\n eq: {\n expected: `${queryResult.gender.eq.expected}`,\n received: `${genderPassport ?? genderIDCard}`,\n message: \"Gender does not match the expected gender\",\n },\n }\n }\n if (\n queryResult.gender.disclose &&\n queryResult.gender.disclose.result !== genderPassport &&\n queryResult.gender.disclose.result !== genderIDCard\n ) {\n console.warn(\"Gender does not match the disclosed gender in query result\")\n isCorrect = false\n queryResultErrors.gender = {\n ...queryResultErrors.gender,\n disclose: {\n expected: `${queryResult.gender.disclose.result}`,\n received: `${genderPassport ?? genderIDCard}`,\n message: \"Gender does not match the disclosed gender in query result\",\n },\n }\n }\n if (\n queryResult.gender.eq &&\n (originalQuery.gender?.eq === undefined ||\n queryResult.gender.eq.expected !== originalQuery.gender.eq)\n ) {\n console.warn(\"Gender eq does not match the original query\")\n isCorrect = false\n queryResultErrors.gender = {\n ...queryResultErrors.gender,\n eq: {\n expected: `${originalQuery.gender?.eq}`,\n received: `${queryResult.gender.eq.expected}`,\n message: \"Gender eq does not match the original query\",\n },\n }\n }\n if (queryResult.gender.disclose && !originalQuery.gender?.disclose) {\n console.warn(\"Gender disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.gender = {\n ...queryResultErrors.gender,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.gender.disclose.result}`,\n message: \"Gender disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.issuing_country) {\n const issuingCountryPassport = disclosedDataPassport.issuingCountry\n const issuingCountryIDCard = disclosedDataIDCard.issuingCountry\n if (\n queryResult.issuing_country.eq &&\n queryResult.issuing_country.eq.result &&\n queryResult.issuing_country.eq.expected !== issuingCountryPassport &&\n queryResult.issuing_country.eq.expected !== issuingCountryIDCard\n ) {\n console.warn(\"Issuing country does not match the expected issuing country\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n eq: {\n expected: `${queryResult.issuing_country.eq.expected}`,\n received: `${issuingCountryPassport ?? issuingCountryIDCard}`,\n message: \"Issuing country does not match the expected issuing country\",\n },\n }\n }\n if (\n queryResult.issuing_country.disclose &&\n queryResult.issuing_country.disclose.result !== issuingCountryPassport &&\n queryResult.issuing_country.disclose.result !== issuingCountryIDCard\n ) {\n console.warn(\"Issuing country does not match the disclosed issuing country in query result\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n disclose: {\n expected: `${queryResult.issuing_country.disclose.result}`,\n received: `${issuingCountryPassport ?? issuingCountryIDCard}`,\n message: \"Issuing country does not match the disclosed issuing country in query result\",\n },\n }\n }\n if (\n queryResult.issuing_country.eq &&\n (originalQuery.issuing_country?.eq === undefined ||\n queryResult.issuing_country.eq.expected !== originalQuery.issuing_country.eq)\n ) {\n console.warn(\"Issuing country eq does not match the original query\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n eq: {\n expected: `${originalQuery.issuing_country?.eq}`,\n received: `${queryResult.issuing_country.eq.expected}`,\n message: \"Issuing country eq does not match the original query\",\n },\n }\n }\n if (queryResult.issuing_country.disclose && !originalQuery.issuing_country?.disclose) {\n console.warn(\"Issuing country disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.issuing_country.disclose.result}`,\n message: \"Issuing country disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.fullname) {\n const fullnamePassport = disclosedDataPassport.name\n const fullnameIDCard = disclosedDataIDCard.name\n if (\n queryResult.fullname.eq &&\n queryResult.fullname.eq.result &&\n formatName(queryResult.fullname.eq.expected).toLowerCase() !==\n fullnamePassport.toLowerCase() &&\n formatName(queryResult.fullname.eq.expected).toLowerCase() !== fullnameIDCard.toLowerCase()\n ) {\n console.warn(\"Fullname does not match the expected fullname\")\n isCorrect = false\n queryResultErrors.fullname = {\n ...queryResultErrors.fullname,\n eq: {\n expected: `${queryResult.fullname.eq.expected}`,\n received: `${fullnamePassport ?? fullnameIDCard}`,\n message: \"Fullname does not match the expected fullname\",\n },\n }\n }\n if (\n queryResult.fullname.disclose &&\n formatName(queryResult.fullname.disclose.result).toLowerCase() !==\n fullnamePassport.toLowerCase() &&\n formatName(queryResult.fullname.disclose.result).toLowerCase() !==\n fullnameIDCard.toLowerCase()\n ) {\n console.warn(\"Fullname does not match the disclosed fullname in query result\")\n isCorrect = false\n queryResultErrors.fullname = {\n ...queryResultErrors.fullname,\n disclose: {\n expected: `${queryResult.fullname.disclose.result}`,\n received: `${fullnamePassport ?? fullnameIDCard}`,\n message: \"Fullname does not match the disclosed fullname in query result\",\n },\n }\n }\n if (\n queryResult.fullname.eq &&\n (originalQuery.fullname?.eq === undefined ||\n formatName(queryResult.fullname.eq.expected).toLowerCase() !==\n formatName(originalQuery.fullname.eq as string).toLowerCase())\n ) {\n console.warn(\"Fullname eq does not match the original query\")\n isCorrect = false\n queryResultErrors.fullname = {\n ...queryResultErrors.fullname,\n eq: {\n expected: `${originalQuery.fullname?.eq}`,\n received: `${queryResult.fullname.eq.expected}`,\n message: \"Fullname eq does not match the original query\",\n },\n }\n }\n if (queryResult.fullname.disclose && !originalQuery.fullname?.disclose) {\n console.warn(\"Fullname disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.fullname = {\n ...queryResultErrors.fullname,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.fullname.disclose.result}`,\n message: \"Fullname disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.firstname) {\n // If fullname was not revealed, then the name could be either the first name or last name\n const firstnamePassport =\n disclosedDataPassport.firstName && disclosedDataPassport.firstName.length > 0\n ? disclosedDataPassport.firstName\n : disclosedDataPassport.name\n const firstnameIDCard =\n disclosedDataIDCard.firstName && disclosedDataIDCard.firstName.length > 0\n ? disclosedDataIDCard.firstName\n : disclosedDataIDCard.name\n if (\n queryResult.firstname.eq &&\n queryResult.firstname.eq.result &&\n formatName(queryResult.firstname.eq.expected).toLowerCase() !==\n firstnamePassport.toLowerCase() &&\n formatName(queryResult.firstname.eq.expected).toLowerCase() !==\n firstnameIDCard.toLowerCase()\n ) {\n console.warn(\"Firstname does not match the expected firstname\")\n isCorrect = false\n queryResultErrors.firstname = {\n ...queryResultErrors.firstname,\n eq: {\n expected: `${queryResult.firstname.eq.expected}`,\n received: `${firstnamePassport ?? firstnameIDCard}`,\n message: \"Firstname does not match the expected firstname\",\n },\n }\n }\n if (\n queryResult.firstname.disclose &&\n formatName(queryResult.firstname.disclose.result).toLowerCase() !==\n firstnamePassport.toLowerCase() &&\n formatName(queryResult.firstname.disclose.result).toLowerCase() !==\n firstnameIDCard.toLowerCase()\n ) {\n console.warn(\"Firstname does not match the disclosed firstname in query result\")\n isCorrect = false\n queryResultErrors.firstname = {\n ...queryResultErrors.firstname,\n disclose: {\n expected: `${queryResult.firstname.disclose.result}`,\n received: `${firstnamePassport ?? firstnameIDCard}`,\n message: \"Firstname does not match the disclosed firstname in query result\",\n },\n }\n }\n if (\n queryResult.firstname.eq &&\n (originalQuery.firstname?.eq === undefined ||\n formatName(queryResult.firstname.eq.expected).toLowerCase() !==\n formatName(originalQuery.firstname.eq as string).toLowerCase())\n ) {\n console.warn(\"Firstname eq does not match the original query\")\n isCorrect = false\n queryResultErrors.firstname = {\n ...queryResultErrors.firstname,\n eq: {\n expected: `${originalQuery.firstname?.eq}`,\n received: `${queryResult.firstname.eq.expected}`,\n message: \"Firstname eq does not match the original query\",\n },\n }\n }\n if (queryResult.firstname.disclose && !originalQuery.firstname?.disclose) {\n console.warn(\"Firstname disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.firstname = {\n ...queryResultErrors.firstname,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.firstname.disclose.result}`,\n message: \"Firstname disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.lastname) {\n // If fullname was not revealed, then the name could be either the first name or last name\n const lastnamePassport =\n disclosedDataPassport.lastName && disclosedDataPassport.lastName.length > 0\n ? disclosedDataPassport.lastName\n : disclosedDataPassport.name\n const lastnameIDCard =\n disclosedDataIDCard.lastName && disclosedDataIDCard.lastName.length > 0\n ? disclosedDataIDCard.lastName\n : disclosedDataIDCard.name\n if (\n queryResult.lastname.eq &&\n queryResult.lastname.eq.result &&\n formatName(queryResult.lastname.eq.expected).toLowerCase() !==\n lastnamePassport.toLowerCase() &&\n formatName(queryResult.lastname.eq.expected).toLowerCase() !== lastnameIDCard.toLowerCase()\n ) {\n console.warn(\"Lastname does not match the expected lastname\")\n isCorrect = false\n queryResultErrors.lastname = {\n ...queryResultErrors.lastname,\n eq: {\n expected: `${queryResult.lastname.eq.expected}`,\n received: `${lastnamePassport ?? lastnameIDCard}`,\n message: \"Lastname does not match the expected lastname\",\n },\n }\n }\n if (\n queryResult.lastname.disclose &&\n formatName(queryResult.lastname.disclose.result).toLowerCase() !==\n lastnamePassport.toLowerCase() &&\n formatName(queryResult.lastname.disclose.result).toLowerCase() !==\n lastnameIDCard.toLowerCase()\n ) {\n console.warn(\"Lastname does not match the disclosed lastname in query result\")\n isCorrect = false\n queryResultErrors.lastname = {\n ...queryResultErrors.lastname,\n disclose: {\n expected: `${queryResult.lastname.disclose.result}`,\n received: `${lastnamePassport ?? lastnameIDCard}`,\n message: \"Lastname does not match the disclosed lastname in query result\",\n },\n }\n }\n if (\n queryResult.lastname.eq &&\n (originalQuery.lastname?.eq === undefined ||\n formatName(queryResult.lastname.eq.expected).toLowerCase() !==\n formatName(originalQuery.lastname.eq as string).toLowerCase())\n ) {\n console.warn(\"Lastname eq does not match the original query\")\n isCorrect = false\n queryResultErrors.lastname = {\n ...queryResultErrors.lastname,\n eq: {\n expected: `${originalQuery.lastname?.eq}`,\n received: `${queryResult.lastname.eq.expected}`,\n message: \"Lastname eq does not match the original query\",\n },\n }\n }\n if (queryResult.lastname.disclose && !originalQuery.lastname?.disclose) {\n console.warn(\"Lastname disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.lastname = {\n ...queryResultErrors.lastname,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.lastname.disclose.result}`,\n message: \"Lastname disclose is not in the original query\",\n },\n }\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkAgePublicInputs(\n proof: ProofResult,\n originalQuery: Query,\n queryResult: QueryResult,\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n const currentTime = new Date()\n // TODO: Fix unused variable\n const _today = new Date(\n currentTime.getFullYear(),\n currentTime.getMonth(),\n currentTime.getDate(),\n 0,\n 0,\n 0,\n 0,\n )\n const minAge = getMinAgeFromCommittedInputs(\n (proof.committedInputs?.compare_age as AgeCommittedInputs) ??\n (proof.committedInputs?.compare_age_evm as AgeCommittedInputs),\n )\n const maxAge = getMaxAgeFromCommittedInputs(\n (proof.committedInputs?.compare_age as AgeCommittedInputs) ??\n (proof.committedInputs?.compare_age_evm as AgeCommittedInputs),\n )\n if (queryResult.age) {\n if (\n queryResult.age.gte &&\n queryResult.age.gte.result &&\n minAge !== (queryResult.age.gte.expected as number)\n ) {\n console.warn(\"Age is not greater than or equal to the expected age\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n gte: {\n expected: queryResult.age.gte.expected,\n received: minAge,\n message: \"Age is not greater than or equal to the expected age\",\n },\n }\n }\n if (\n queryResult.age.gt &&\n queryResult.age.gt.result &&\n minAge !== (queryResult.age.gt.expected as number) + 1\n ) {\n console.warn(\"Age is not greater than the expected age\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n gt: {\n expected: queryResult.age.gt.expected,\n received: minAge,\n message: \"Age is not greater than the expected age\",\n },\n }\n }\n if (\n queryResult.age.lt &&\n queryResult.age.lt.result &&\n maxAge !== (queryResult.age.lt.expected as number) - 1\n ) {\n console.warn(\"Age is not less than the expected age\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n lt: {\n expected: queryResult.age.lt.expected,\n received: maxAge,\n message: \"Age is not less than the expected age\",\n },\n }\n }\n if (\n queryResult.age.lte &&\n queryResult.age.lte.result &&\n maxAge !== (queryResult.age.lte.expected as number)\n ) {\n console.warn(\"Age is not less than or equal to the expected age\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n lte: {\n expected: queryResult.age.lte.expected,\n received: maxAge,\n message: \"Age is not less than or equal to the expected age\",\n },\n }\n }\n if (\n queryResult.age.eq &&\n queryResult.age.eq.result &&\n (minAge !== (queryResult.age.eq.expected as number) ||\n maxAge !== (queryResult.age.eq.expected as number))\n ) {\n console.warn(\"Age does not match the expected age\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n eq: {\n expected: queryResult.age.eq.expected,\n received: minAge !== (queryResult.age.eq.expected as number) ? minAge : maxAge,\n message: \"Age does not match the expected age\",\n },\n }\n }\n if (queryResult.age.range) {\n if (\n queryResult.age.range.result &&\n (minAge !== (queryResult.age.range.expected[0] as number) ||\n maxAge !== (queryResult.age.range.expected[1] as number))\n ) {\n console.warn(\"Age is not in the expected range\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n range: {\n expected: queryResult.age.range.expected,\n received: [minAge, maxAge],\n message: \"Age is not in the expected range\",\n },\n }\n }\n }\n if (\n !queryResult.age.lt &&\n !queryResult.age.lte &&\n !queryResult.age.eq &&\n !queryResult.age.range &&\n maxAge != 0\n ) {\n console.warn(\"Maximum age should be equal to 0\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n disclose: {\n expected: 0,\n received: maxAge,\n message: \"Maximum age should be equal to 0\",\n },\n }\n }\n if (\n !queryResult.age.gte &&\n !queryResult.age.gt &&\n !queryResult.age.eq &&\n !queryResult.age.range &&\n minAge != 0\n ) {\n console.warn(\"Minimum age should be equal to 0\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n disclose: {\n expected: 0,\n received: minAge,\n message: \"Minimum age should be equal to 0\",\n },\n }\n }\n if (\n queryResult.age.disclose &&\n (queryResult.age.disclose.result !== minAge || queryResult.age.disclose.result !== maxAge)\n ) {\n console.warn(\"Age does not match the disclosed age in query result\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n disclose: {\n expected: `${minAge}`,\n received: `${queryResult.age.disclose.result}`,\n message: \"Age does not match the disclosed age in query result\",\n },\n }\n }\n } else {\n console.warn(\"Age is not set in the query result\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n disclose: {\n message: \"Age is not set in the query result\",\n },\n }\n }\n if (\n queryResult.age?.gte &&\n (originalQuery.age?.gte === undefined ||\n queryResult.age.gte.expected !== originalQuery.age.gte)\n ) {\n console.warn(\"Age gte does not match the original query\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n gte: {\n expected: originalQuery.age?.gte,\n received: queryResult.age.gte.expected,\n message: \"Age gte does not match the original query\",\n },\n }\n }\n if (\n queryResult.age?.gt &&\n (originalQuery.age?.gt === undefined || queryResult.age.gt.expected !== originalQuery.age.gt)\n ) {\n console.warn(\"Age gt does not match the original query\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n gt: {\n expected: originalQuery.age?.gt,\n received: queryResult.age.gt.expected,\n message: \"Age gt does not match the original query\",\n },\n }\n }\n if (\n queryResult.age?.lt &&\n (originalQuery.age?.lt === undefined || queryResult.age.lt.expected !== originalQuery.age.lt)\n ) {\n console.warn(\"Age lt does not match the original query\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n lt: {\n expected: originalQuery.age?.lt,\n received: queryResult.age.lt.expected,\n message: \"Age lt does not match the original query\",\n },\n }\n }\n if (\n queryResult.age?.lte &&\n (originalQuery.age?.lte === undefined ||\n queryResult.age.lte.expected !== originalQuery.age.lte)\n ) {\n console.warn(\"Age lte does not match the original query\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n lte: {\n expected: originalQuery.age?.lte,\n received: queryResult.age.lte.expected,\n message: \"Age lte does not match the original query\",\n },\n }\n }\n if (\n queryResult.age?.eq &&\n (originalQuery.age?.eq === undefined || queryResult.age.eq.expected !== originalQuery.age.eq)\n ) {\n console.warn(\"Age eq does not match the original query\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n eq: {\n expected: originalQuery.age?.eq,\n received: queryResult.age.eq.expected,\n message: \"Age eq does not match the original query\",\n },\n }\n }\n if (\n queryResult.age?.range &&\n (originalQuery.age?.range === undefined ||\n queryResult.age.range.expected[0] !== originalQuery.age.range[0] ||\n queryResult.age.range.expected[1] !== originalQuery.age.range[1])\n ) {\n console.warn(\"Age range does not match the original query\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n range: {\n expected: originalQuery.age?.range,\n received: queryResult.age.range.expected,\n message: \"Age range does not match the original query\",\n },\n }\n }\n if (queryResult.age?.disclose && !originalQuery.age?.disclose) {\n console.warn(\"Age disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.age.disclose.result}`,\n message: \"Age disclose is not in the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkBirthdatePublicInputs(\n proof: ProofResult,\n originalQuery: Query,\n queryResult: QueryResult,\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n const currentTime = new Date()\n // TODO: Fix unused variable\n const _today = new Date(\n currentTime.getFullYear(),\n currentTime.getMonth(),\n currentTime.getDate(),\n 0,\n 0,\n 0,\n )\n const minDate = getBirthdateMinDateTimestamp(\n (proof.committedInputs?.compare_birthdate as DateCommittedInputs) ??\n (proof.committedInputs?.compare_birthdate_evm as DateCommittedInputs),\n -1 * SECONDS_BETWEEN_1900_AND_1970,\n )\n const maxDate = getBirthdateMaxDateTimestamp(\n (proof.committedInputs?.compare_birthdate as DateCommittedInputs) ??\n (proof.committedInputs?.compare_birthdate_evm as DateCommittedInputs),\n -1 * SECONDS_BETWEEN_1900_AND_1970,\n )\n if (queryResult.birthdate) {\n if (\n queryResult.birthdate.gte &&\n queryResult.birthdate.gte.result &&\n !areDatesEqual(minDate, queryResult.birthdate.gte.expected)\n ) {\n console.warn(\"Birthdate is not greater than or equal to the expected birthdate\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n gte: {\n expected: queryResult.birthdate.gte.expected,\n received: minDate,\n message: \"Birthdate is not greater than or equal to the expected birthdate\",\n },\n }\n }\n if (queryResult.birthdate.gt && queryResult.birthdate.gt.result) {\n const expectedPlusOneDay = new Date(queryResult.birthdate.gt.expected as Date)\n expectedPlusOneDay.setDate(expectedPlusOneDay.getDate() + 1)\n if (!areDatesEqual(minDate, expectedPlusOneDay)) {\n console.warn(\"Birthdate is not greater than the expected birthdate\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n gt: {\n expected: queryResult.birthdate.gt.expected,\n received: minDate,\n message: \"Birthdate is not greater than the expected birthdate\",\n },\n }\n }\n }\n if (\n queryResult.birthdate.lte &&\n queryResult.birthdate.lte.result &&\n !areDatesEqual(maxDate, queryResult.birthdate.lte.expected)\n ) {\n console.warn(\"Birthdate is not less than the expected birthdate\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n lte: {\n expected: queryResult.birthdate.lte.expected,\n received: maxDate,\n message: \"Birthdate is not less than the expected birthdate\",\n },\n }\n }\n if (queryResult.birthdate.lt && queryResult.birthdate.lt.result) {\n const expectedMinusOneDay = new Date(queryResult.birthdate.lt.expected as Date)\n expectedMinusOneDay.setDate(expectedMinusOneDay.getDate() - 1)\n if (!areDatesEqual(maxDate, expectedMinusOneDay)) {\n console.warn(\"Birthdate is not less than the expected birthdate\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n lt: {\n expected: queryResult.birthdate.lt.expected,\n received: maxDate,\n message: \"Birthdate is not less than the expected birthdate\",\n },\n }\n }\n }\n if (queryResult.birthdate.range) {\n if (\n queryResult.birthdate.range.result &&\n (!areDatesEqual(minDate, queryResult.birthdate.range.expected[0]) ||\n !areDatesEqual(maxDate, queryResult.birthdate.range.expected[1]))\n ) {\n console.warn(\"Birthdate is not in the expected range\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n range: {\n expected: queryResult.birthdate.range.expected,\n received: [minDate, maxDate],\n message: \"Birthdate is not in the expected range\",\n },\n }\n }\n }\n if (\n !queryResult.birthdate.lte &&\n !queryResult.birthdate.lt &&\n !queryResult.birthdate.eq &&\n !queryResult.birthdate.range &&\n !areDatesEqual(maxDate, DEFAULT_DATE_VALUE)\n ) {\n console.warn(\"Maximum birthdate should be equal to default date value\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n disclose: {\n expected: `${DEFAULT_DATE_VALUE.toISOString()}`,\n received: `${maxDate.toISOString()}`,\n message: \"Maximum birthdate should be equal to default date value\",\n },\n }\n }\n if (\n !queryResult.birthdate.gte &&\n !queryResult.birthdate.gt &&\n !queryResult.birthdate.eq &&\n !queryResult.birthdate.range &&\n !areDatesEqual(minDate, DEFAULT_DATE_VALUE)\n ) {\n console.warn(\"Minimum birthdate should be equal to default date value\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n disclose: {\n expected: `${DEFAULT_DATE_VALUE.toISOString()}`,\n received: `${minDate.toISOString()}`,\n message: \"Minimum birthdate should be equal to default date value\",\n },\n }\n }\n } else {\n console.warn(\"Birthdate is not set in the query result\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n disclose: {\n message: \"Birthdate is not set in the query result\",\n },\n }\n }\n if (\n queryResult.birthdate?.gte &&\n (originalQuery.birthdate?.gte === undefined ||\n !areDatesEqual(queryResult.birthdate.gte.expected, originalQuery.birthdate.gte as Date))\n ) {\n console.warn(\"Birthdate gte does not match the original query\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n gte: {\n expected: originalQuery.birthdate?.gte,\n received: queryResult.birthdate.gte.expected,\n message: \"Birthdate gte does not match the original query\",\n },\n }\n }\n if (\n queryResult.birthdate?.gt &&\n (originalQuery.birthdate?.gt === undefined ||\n !areDatesEqual(queryResult.birthdate.gt.expected, originalQuery.birthdate.gt as Date))\n ) {\n console.warn(\"Birthdate gt does not match the original query\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n gt: {\n expected: originalQuery.birthdate?.gt,\n received: queryResult.birthdate.gt.expected,\n message: \"Birthdate gt does not match the original query\",\n },\n }\n }\n if (\n queryResult.birthdate?.lte &&\n (originalQuery.birthdate?.lte === undefined ||\n !areDatesEqual(queryResult.birthdate.lte.expected, originalQuery.birthdate.lte as Date))\n ) {\n console.warn(\"Birthdate lte does not match the original query\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n lte: {\n expected: originalQuery.birthdate?.lte,\n received: queryResult.birthdate.lte.expected,\n message: \"Birthdate lte does not match the original query\",\n },\n }\n }\n if (\n queryResult.birthdate?.lt &&\n (originalQuery.birthdate?.lt === undefined ||\n !areDatesEqual(queryResult.birthdate.lt.expected, originalQuery.birthdate.lt as Date))\n ) {\n console.warn(\"Birthdate lt does not match the original query\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n lt: {\n expected: originalQuery.birthdate?.lt,\n received: queryResult.birthdate.lt.expected,\n message: \"Birthdate lt does not match the original query\",\n },\n }\n }\n if (\n queryResult.birthdate?.range &&\n (originalQuery.birthdate?.range === undefined ||\n !areDatesEqual(\n queryResult.birthdate.range.expected[0],\n originalQuery.birthdate.range[0] as Date,\n ) ||\n !areDatesEqual(\n queryResult.birthdate.range.expected[1],\n originalQuery.birthdate.range[1] as Date,\n ))\n ) {\n console.warn(\"Birthdate range does not match the original query\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n range: {\n expected: originalQuery.birthdate?.range,\n received: queryResult.birthdate.range.expected,\n message: \"Birthdate range does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkExpiryDatePublicInputs(\n proof: ProofResult,\n originalQuery: Query,\n queryResult: QueryResult,\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n const currentTime = new Date()\n // TODO: Fix unused variable\n const _today = new Date(\n currentTime.getFullYear(),\n currentTime.getMonth(),\n currentTime.getDate(),\n 0,\n 0,\n 0,\n )\n const minDate = getMinDateFromCommittedInputs(\n (proof.committedInputs?.compare_expiry as DateCommittedInputs) ??\n (proof.committedInputs?.compare_expiry_evm as DateCommittedInputs),\n )\n const maxDate = getMaxDateFromCommittedInputs(\n (proof.committedInputs?.compare_expiry as DateCommittedInputs) ??\n (proof.committedInputs?.compare_expiry_evm as DateCommittedInputs),\n )\n if (queryResult.expiry_date) {\n if (\n queryResult.expiry_date.gte &&\n queryResult.expiry_date.gte.result &&\n !areDatesEqual(minDate, queryResult.expiry_date.gte.expected)\n ) {\n console.warn(\"Expiry date is not greater than or equal to the expected expiry date\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n gte: {\n expected: queryResult.expiry_date.gte.expected,\n received: minDate,\n message: \"Expiry date is not greater than or equal to the expected expiry date\",\n },\n }\n }\n if (\n queryResult.expiry_date.lte &&\n queryResult.expiry_date.lte.result &&\n !areDatesEqual(maxDate, queryResult.expiry_date.lte.expected)\n ) {\n console.warn(\"Expiry date is not less than the expected expiry date\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n lte: {\n expected: queryResult.expiry_date.lte.expected,\n received: maxDate,\n message: \"Expiry date is not less than the expected expiry date\",\n },\n }\n }\n if (queryResult.expiry_date.range) {\n if (\n queryResult.expiry_date.range.result &&\n (!areDatesEqual(minDate, queryResult.expiry_date.range.expected[0]) ||\n !areDatesEqual(maxDate, queryResult.expiry_date.range.expected[1]))\n ) {\n console.warn(\"Expiry date is not in the expected range\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n range: {\n expected: queryResult.expiry_date.range.expected,\n received: [minDate, maxDate],\n message: \"Expiry date is not in the expected range\",\n },\n }\n }\n }\n if (\n !queryResult.expiry_date.lte &&\n !queryResult.expiry_date.lt &&\n !queryResult.expiry_date.eq &&\n !queryResult.expiry_date.range &&\n !areDatesEqual(maxDate, DEFAULT_DATE_VALUE)\n ) {\n console.warn(\"Maximum expiry date should be equal to default date value\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n disclose: {\n expected: `${DEFAULT_DATE_VALUE.toISOString()}`,\n received: `${maxDate.toISOString()}`,\n message: \"Maximum expiry date should be equal to default date value\",\n },\n }\n }\n if (\n !queryResult.expiry_date.gte &&\n !queryResult.expiry_date.gt &&\n !queryResult.expiry_date.eq &&\n !queryResult.expiry_date.range &&\n !areDatesEqual(minDate, DEFAULT_DATE_VALUE)\n ) {\n console.warn(\"Minimum expiry date should be equal to default date value\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n disclose: {\n expected: `${DEFAULT_DATE_VALUE.toISOString()}`,\n received: `${minDate.toISOString()}`,\n message: \"Minimum expiry date should be equal to default date value\",\n },\n }\n }\n } else {\n console.warn(\"Expiry date is not set in the query result\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n disclose: {\n message: \"Expiry date is not set in the query result\",\n },\n }\n }\n if (\n queryResult.expiry_date?.gte &&\n (originalQuery.expiry_date?.gte === undefined ||\n !areDatesEqual(queryResult.expiry_date.gte.expected, originalQuery.expiry_date.gte as Date))\n ) {\n console.warn(\"Expiry date gte does not match the original query\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n gte: {\n expected: originalQuery.expiry_date?.gte,\n received: queryResult.expiry_date.gte.expected,\n message: \"Expiry date gte does not match the original query\",\n },\n }\n }\n if (\n queryResult.expiry_date?.gt &&\n (originalQuery.expiry_date?.gt === undefined ||\n !areDatesEqual(queryResult.expiry_date.gt.expected, originalQuery.expiry_date.gt as Date))\n ) {\n console.warn(\"Expiry date gt does not match the original query\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n gt: {\n expected: originalQuery.expiry_date?.gt,\n received: queryResult.expiry_date.gt.expected,\n message: \"Expiry date gt does not match the original query\",\n },\n }\n }\n if (\n queryResult.expiry_date?.lte &&\n (originalQuery.expiry_date?.lte === undefined ||\n !areDatesEqual(queryResult.expiry_date.lte.expected, originalQuery.expiry_date.lte as Date))\n ) {\n console.warn(\"Expiry date lte does not match the original query\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n lte: {\n expected: originalQuery.expiry_date?.lte,\n received: queryResult.expiry_date.lte.expected,\n message: \"Expiry date lte does not match the original query\",\n },\n }\n }\n if (\n queryResult.expiry_date?.lt &&\n (originalQuery.expiry_date?.lt === undefined ||\n !areDatesEqual(queryResult.expiry_date.lt.expected, originalQuery.expiry_date.lt as Date))\n ) {\n console.warn(\"Expiry date lt does not match the original query\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n lt: {\n expected: originalQuery.expiry_date?.lt,\n received: queryResult.expiry_date.lt.expected,\n message: \"Expiry date lt does not match the original query\",\n },\n }\n }\n if (\n queryResult.expiry_date?.range &&\n (originalQuery.expiry_date?.range === undefined ||\n !areDatesEqual(\n queryResult.expiry_date.range.expected[0],\n originalQuery.expiry_date.range[0] as Date,\n ) ||\n !areDatesEqual(\n queryResult.expiry_date.range.expected[1],\n originalQuery.expiry_date.range[1] as Date,\n ))\n ) {\n console.warn(\"Expiry date range does not match the original query\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n range: {\n expected: originalQuery.expiry_date?.range,\n received: queryResult.expiry_date.range.expected,\n message: \"Expiry date range does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkNationalityExclusionPublicInputs(\n originalQuery: Query,\n queryResult: QueryResult,\n countryList: string[],\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n if (\n queryResult.nationality &&\n queryResult.nationality.out &&\n queryResult.nationality.out.result\n ) {\n if (\n !queryResult.nationality.out.expected?.every((country) => countryList.includes(country))\n ) {\n console.warn(\"Nationality exclusion list does not match the one from the query results\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n out: {\n expected: queryResult.nationality.out.expected,\n received: countryList,\n message: \"Nationality exclusion list does not match the one from the query results\",\n },\n }\n }\n } else if (!queryResult.nationality || !queryResult.nationality.out) {\n console.warn(\"Nationality exclusion is not set in the query result\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n out: {\n message: \"Nationality exclusion is not set in the query result\",\n },\n }\n }\n // Check the countryList is in ascending order\n // If the prover doesn't use a sorted list then the proof cannot be trusted\n // as it is requirement in the circuit for the exclusion check to work\n for (let i = 1; i < countryList.length; i++) {\n if (countryList[i] < countryList[i - 1]) {\n console.warn(\n \"The nationality exclusion list has not been sorted, and thus the proof cannot be trusted\",\n )\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n out: {\n message:\n \"The nationality exclusion list has not been sorted, and thus the proof cannot be trusted\",\n },\n }\n }\n }\n if (\n queryResult.nationality?.out &&\n (originalQuery.nationality?.out === undefined ||\n queryResult.nationality.out.expected?.length !==\n (originalQuery.nationality.out as string[]).length ||\n !queryResult.nationality.out.expected?.every((country) =>\n (originalQuery.nationality!.out as string[]).includes(country),\n ))\n ) {\n console.warn(\"Nationality exclusion list does not match the original query\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n out: {\n expected: originalQuery.nationality?.out as string[],\n received: queryResult.nationality.out.expected,\n message: \"Nationality exclusion list does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkIssuingCountryExclusionPublicInputs(\n originalQuery: Query,\n queryResult: QueryResult,\n countryList: string[],\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n\n if (\n queryResult.issuing_country &&\n queryResult.issuing_country.out &&\n queryResult.issuing_country.out.result\n ) {\n if (\n !queryResult.issuing_country.out.expected?.every((country) => countryList.includes(country))\n ) {\n console.warn(\"Issuing country exclusion list does not match the one from the query results\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n out: {\n expected: queryResult.issuing_country.out.expected,\n received: countryList,\n message: \"Issuing country exclusion list does not match the one from the query results\",\n },\n }\n }\n } else if (!queryResult.issuing_country || !queryResult.issuing_country.out) {\n console.warn(\"Issuing country exclusion is not set in the query result\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n out: {\n message: \"Issuing country exclusion is not set in the query result\",\n },\n }\n }\n // Check the countryList is in ascending order\n // If the prover doesn't use a sorted list then the proof cannot be trusted\n // as it is requirement in the circuit for the exclusion check to work\n for (let i = 1; i < countryList.length; i++) {\n if (countryList[i] < countryList[i - 1]) {\n console.warn(\n \"The issuing country exclusion list has not been sorted, and thus the proof cannot be trusted\",\n )\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n out: {\n message:\n \"The issuing country exclusion list has not been sorted, and thus the proof cannot be trusted\",\n },\n }\n }\n }\n if (\n queryResult.issuing_country?.out &&\n (originalQuery.issuing_country?.out === undefined ||\n queryResult.issuing_country.out.expected?.length !==\n (originalQuery.issuing_country.out as string[]).length ||\n !queryResult.issuing_country.out.expected?.every((country) =>\n (originalQuery.issuing_country!.out as string[]).includes(country),\n ))\n ) {\n console.warn(\"Issuing country exclusion list does not match the original query\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n out: {\n expected: originalQuery.issuing_country?.out as string[],\n received: queryResult.issuing_country.out.expected,\n message: \"Issuing country exclusion list does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkNationalityInclusionPublicInputs(\n originalQuery: Query,\n queryResult: QueryResult,\n countryList: string[],\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n if (\n queryResult.nationality &&\n queryResult.nationality.in &&\n queryResult.nationality.in.result\n ) {\n if (!queryResult.nationality.in.expected?.every((country) => countryList.includes(country))) {\n console.warn(\"Nationality inclusion list does not match the one from the query results\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n in: {\n expected: queryResult.nationality.in.expected,\n received: countryList,\n message: \"Nationality inclusion list does not match the one from the query results\",\n },\n }\n }\n } else if (!queryResult.nationality || !queryResult.nationality.in) {\n console.warn(\"Nationality inclusion is not set in the query result\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n in: {\n message: \"Nationality inclusion is not set in the query result\",\n },\n }\n }\n if (\n queryResult.nationality?.in &&\n (originalQuery.nationality?.in === undefined ||\n queryResult.nationality.in.expected?.length !==\n (originalQuery.nationality.in as string[]).length ||\n !queryResult.nationality.in.expected?.every((country) =>\n (originalQuery.nationality!.in as string[]).includes(country),\n ))\n ) {\n console.warn(\"Nationality inclusion list does not match the original query\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n in: {\n expected: originalQuery.nationality?.in as string[],\n received: queryResult.nationality.in.expected,\n message: \"Nationality inclusion list does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkIssuingCountryInclusionPublicInputs(\n originalQuery: Query,\n queryResult: QueryResult,\n countryList: string[],\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n\n if (\n queryResult.issuing_country &&\n queryResult.issuing_country.in &&\n queryResult.issuing_country.in.result\n ) {\n if (\n !queryResult.issuing_country.in.expected?.every((country) => countryList.includes(country))\n ) {\n console.warn(\"Issuing country inclusion list does not match the one from the query results\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n in: {\n expected: queryResult.issuing_country.in.expected,\n received: countryList,\n message: \"Issuing country inclusion list does not match the one from the query results\",\n },\n }\n }\n } else if (!queryResult.issuing_country || !queryResult.issuing_country.in) {\n console.warn(\"Issuing country inclusion is not set in the query result\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n in: {\n message: \"Issuing country inclusion is not set in the query result\",\n },\n }\n }\n if (\n queryResult.issuing_country?.in &&\n (originalQuery.issuing_country?.in === undefined ||\n queryResult.issuing_country.in.expected?.length !==\n (originalQuery.issuing_country.in as string[]).length ||\n !queryResult.issuing_country.in.expected?.every((country) =>\n (originalQuery.issuing_country!.in as string[]).includes(country),\n ))\n ) {\n console.warn(\"Issuing country inclusion list does not match the original query\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n in: {\n expected: originalQuery.issuing_country?.in as string[],\n received: queryResult.issuing_country.in.expected,\n message: \"Issuing country inclusion list does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkScopeFromDisclosureProof(\n domain: string,\n proofData: ProofData,\n queryResultErrors: Partial<QueryResultErrors>,\n key: string,\n scope?: string,\n ) {\n // The OPRF nodes cannot know which domain or scope a proof was made for\n if (domain === \"*\") {\n return { isCorrect: true, queryResultErrors }\n }\n let isCorrect = true\n if (getServiceScopeHash(domain) !== getServiceScopeFromDisclosureProof(proofData)) {\n console.warn(\"The proof comes from a different domain than the one expected\")\n isCorrect = false\n if (!queryResultErrors[key as keyof QueryResultErrors]) {\n queryResultErrors[key as keyof QueryResultErrors] = {}\n }\n queryResultErrors[key as keyof QueryResultErrors]!.scope = {\n expected: `Scope: ${getServiceScopeHash(domain).toString()}`,\n received: `Scope: ${getServiceScopeFromDisclosureProof(proofData).toString()}`,\n message: \"The proof comes from a different domain than the one expected\",\n }\n }\n if (getScopeHash(scope) !== getServiceSubScopeFromDisclosureProof(proofData)) {\n const scopeErrorMessage = scope\n ? \"The proof uses a different scope than the one expected\"\n : \"The proof uses a scope but none was passed to verify()\"\n console.warn(scopeErrorMessage)\n isCorrect = false\n if (!queryResultErrors[key as keyof QueryResultErrors]) {\n queryResultErrors[key as keyof QueryResultErrors] = {}\n }\n queryResultErrors[key as keyof QueryResultErrors]!.scope = {\n expected: `Scope: ${getScopeHash(scope).toString()}`,\n received: `Scope: ${getServiceSubScopeFromDisclosureProof(proofData).toString()}`,\n message: scopeErrorMessage,\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n private static async checkRegistryRoot(\n check: (registry: RegistryClient) => Promise<boolean>,\n devMode: boolean | undefined,\n originalQuery: Query,\n queryResultErrors: any,\n invalid: {\n section: string\n field: string\n expected: string\n received: string\n message: string\n },\n registryClient?: RegistryClient,\n ) {\n let isCorrect: boolean\n try {\n isCorrect = await check(\n registryClient ?? createRegistryClient(getChainFromQuery(originalQuery, Boolean(devMode))),\n )\n } catch (error) {\n console.warn(error)\n isCorrect = false\n }\n if (!isCorrect) {\n console.warn(invalid.message)\n const { section, field, ...error } = invalid\n queryResultErrors[section] = { ...queryResultErrors[section], [field]: error }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static async checkCertificateRegistryRoot(\n root: string,\n queryResultErrors: any,\n outer?: boolean,\n devMode?: boolean,\n // Point in time to check validity at, in seconds; defaults to now\n timestamp?: number,\n originalQuery: Query = {},\n registryClient?: RegistryClient,\n ) {\n return this.checkRegistryRoot(\n (registry) => registry.isCertificateRootValid(root, timestamp),\n devMode,\n originalQuery,\n queryResultErrors,\n {\n section: outer ? \"outer\" : \"sig_check_dsc\",\n field: \"certificate\",\n expected: \"A valid root from ZKPassport Registry\",\n received: `Got invalid certificate registry root: ${root}`,\n message: \"The ID was signed by an unrecognized root certificate\",\n },\n registryClient,\n )\n }\n\n public static async checkCircuitRegistryRoot(\n root: string,\n queryResultErrors: any,\n devMode?: boolean,\n // Same as above, see checkCertificateRegistryRoot\n timestamp?: number,\n originalQuery: Query = {},\n registryClient?: RegistryClient,\n ) {\n return this.checkRegistryRoot(\n (registry) => registry.isCircuitRootValid(root, timestamp),\n devMode,\n originalQuery,\n queryResultErrors,\n {\n section: \"outer\",\n field: \"circuit\",\n expected: \"A valid circuit from ZKPassport Registry\",\n received: `Got invalid circuit registry root: ${root}`,\n message: \"The proof uses an unrecognized circuit\",\n },\n registryClient,\n )\n }\n\n public static async checkSanctionsRegistryRoot(\n root: string,\n queryResultErrors: any,\n devMode?: boolean,\n // Same as above, see checkCertificateRegistryRoot\n timestamp?: number,\n originalQuery: Query = {},\n registryClient?: RegistryClient,\n ) {\n return this.checkRegistryRoot(\n (registry) => registry.isSanctionsRootValid(root, timestamp),\n devMode,\n originalQuery,\n queryResultErrors,\n {\n section: \"sanctions\",\n field: \"eq\",\n expected: \"A valid root from ZKPassport Registry\",\n received: `Got invalid sanctions registry root: ${root}`,\n message: \"Invalid sanctions registry root\",\n },\n registryClient,\n )\n }\n\n /**\n * An Android attestation chain must have been checked against a revocation tree root the\n * registry holds, or against the empty tree's root while the registry has no root yet\n */\n public static async checkAttestationRevocationRoot(\n root: string,\n queryResultErrors: any,\n section: \"facematch\" | \"attested_id\",\n devMode?: boolean,\n // Same as above, see checkCertificateRegistryRoot\n timestamp?: number,\n originalQuery: Query = {},\n registryClient?: RegistryClient,\n ) {\n const isEmptyRoot = BigInt(root) === BigInt(EMPTY_ATTESTATION_REVOCATION_ROOT)\n return this.checkRegistryRoot(\n async (registry) =>\n isEmptyRoot\n ? BigInt(await registry.getLatestAttestationRevocationRoot()) === 0n\n : registry.isAttestationRevocationRootValid(root, timestamp),\n devMode,\n originalQuery,\n queryResultErrors,\n {\n section,\n field: \"revocation\",\n expected: \"A valid root from ZKPassport Registry\",\n received: `Got invalid attestation revocation root: ${root}`,\n message: \"The device attestation was checked against an unrecognized revocation list\",\n },\n registryClient,\n )\n }\n\n public static checkBindPublicInputs(\n originalQuery: Query,\n queryResult: QueryResult,\n boundData: BoundData,\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n\n if (queryResult.bind) {\n const bindMismatches: string[] = []\n if (\n queryResult.bind.user_address?.toLowerCase().replace(\"0x\", \"\") !==\n boundData.user_address?.toLowerCase().replace(\"0x\", \"\")\n ) {\n console.warn(\"Bound user address does not match the one from the query results\")\n isCorrect = false\n bindMismatches.push(\n `user_address: expected ${queryResult.bind.user_address}, received ${boundData.user_address}`,\n )\n }\n if (queryResult.bind.chain !== boundData.chain) {\n console.warn(\"Bound chain id does not match the one from the query results\")\n isCorrect = false\n bindMismatches.push(\n `chain: expected ${queryResult.bind.chain}, received ${boundData.chain}`,\n )\n }\n if (\n queryResult.bind.custom_data?.trim().toLowerCase() !==\n boundData.custom_data?.trim().toLowerCase()\n ) {\n console.warn(\"Bound custom data does not match the one from the query results\")\n isCorrect = false\n bindMismatches.push(\n `custom_data: expected ${queryResult.bind.custom_data}, received ${boundData.custom_data}`,\n )\n }\n if (bindMismatches.length > 0) {\n queryResultErrors.bind = {\n ...queryResultErrors.bind,\n eq: {\n expected: `${queryResult.bind.user_address}, ${queryResult.bind.chain}, ${queryResult.bind.custom_data}`,\n received: `${boundData.user_address}, ${boundData.chain}, ${boundData.custom_data}`,\n message: `Bound data does not match: ${bindMismatches.join(\"; \")}`,\n },\n }\n }\n }\n if (\n originalQuery.bind === undefined ||\n boundData.user_address?.toLowerCase().replace(\"0x\", \"\") !==\n originalQuery.bind.user_address?.toLowerCase().replace(\"0x\", \"\") ||\n boundData.chain !== originalQuery.bind.chain ||\n boundData.custom_data?.trim().toLowerCase() !==\n originalQuery.bind.custom_data?.trim().toLowerCase()\n ) {\n console.warn(\"Bound data does not match the original query\")\n isCorrect = false\n queryResultErrors.bind = {\n ...queryResultErrors.bind,\n eq: {\n expected: `${originalQuery.bind?.user_address}, ${originalQuery.bind?.chain}, ${originalQuery.bind?.custom_data}`,\n received: `${boundData.user_address}, ${boundData.chain}, ${boundData.custom_data}`,\n message: \"Bound data does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static async checkSanctionsExclusionPublicInputs(\n originalQuery: Query,\n queryResult: QueryResult,\n sanctionsCommittedInputs: SanctionsCommittedInputs,\n devMode?: boolean,\n // Same as above, see checkCertificateRegistryRoot\n timestamp?: number,\n registryClient?: RegistryClient,\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n // Validate the committed strict mode directly against the request\n if (sanctionsCommittedInputs.isStrict !== (originalQuery.sanctions?.strict ?? false)) {\n console.warn(\"Sanctions strict mode does not match the original query\")\n isCorrect = false\n queryResultErrors.sanctions = {\n ...queryResultErrors.sanctions,\n eq: {\n expected: `strict: ${originalQuery.sanctions?.strict ?? false}`,\n received: `strict: ${sanctionsCommittedInputs.isStrict}`,\n message: \"Sanctions strict mode does not match the original query\",\n },\n }\n }\n const { isCorrect: isCorrectRoot } = await this.checkSanctionsRegistryRoot(\n sanctionsCommittedInputs.rootHash,\n queryResultErrors,\n devMode,\n timestamp,\n originalQuery,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectRoot\n if (queryResult.sanctions && queryResult.sanctions.passed) {\n if (queryResult.sanctions.isStrict !== sanctionsCommittedInputs.isStrict) {\n console.warn(\"Invalid sanctions strict mode\")\n isCorrect = false\n queryResultErrors.sanctions = {\n ...queryResultErrors.sanctions,\n eq: {\n expected: queryResult.sanctions.isStrict.toString(),\n received: sanctionsCommittedInputs.isStrict.toString(),\n message: \"Invalid sanctions strict mode\",\n },\n }\n }\n }\n if (\n queryResult.sanctions &&\n (originalQuery.sanctions === undefined ||\n queryResult.sanctions.isStrict !== (originalQuery.sanctions.strict ?? false))\n ) {\n console.warn(\"Sanctions config does not match the original query\")\n isCorrect = false\n queryResultErrors.sanctions = {\n ...queryResultErrors.sanctions,\n eq: {\n expected: `strict: ${originalQuery.sanctions?.strict ?? false}`,\n received: `strict: ${queryResult.sanctions.isStrict}`,\n message: \"Sanctions config does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static async checkFacematchPublicInputs(\n originalQuery: Query,\n queryResult: QueryResult,\n facematchCommittedInputs: FacematchCommittedInputs,\n devMode?: boolean,\n // Same as above, see checkCertificateRegistryRoot\n timestamp?: number,\n registryClient?: RegistryClient,\n // False for a proof of circuits before 0.23.0, which has no revocation root to check\n commitsRevocationRoot: boolean = true,\n ) {\n let isCorrect = true\n const queryResultErrors: Partial<QueryResultErrors> = {}\n // Validate the committed facematch parameters against the request\n // Check if the root key is either from Apple (iOS) or Google (Android)\n if (\n facematchCommittedInputs.rootKeyLeaf !== APPLE_APP_ATTEST_ROOT_KEY_HASH &&\n facematchCommittedInputs.rootKeyLeaf !== GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH &&\n facematchCommittedInputs.rootKeyLeaf !== GOOGLE_APP_ATTEST_ECDSA_P384_ROOT_KEY_HASH\n ) {\n console.warn(\"Invalid facematch root key hash\")\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n eq: {\n expected: `${APPLE_APP_ATTEST_ROOT_KEY_HASH} (iOS) or ${GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH} (Android) or ${GOOGLE_APP_ATTEST_ECDSA_P384_ROOT_KEY_HASH} (Android)`,\n received: facematchCommittedInputs.rootKeyLeaf,\n message: \"Invalid facematch root key hash\",\n },\n }\n }\n const EXPECTED_ENVIRONMENT = \"production\"\n if (facematchCommittedInputs.environment !== EXPECTED_ENVIRONMENT) {\n console.warn(\"Invalid facematch environment, it should be production\")\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n eq: {\n expected: EXPECTED_ENVIRONMENT,\n received: facematchCommittedInputs.environment,\n message: \"Invalid facematch environment, it should be production\",\n },\n }\n }\n if (\n facematchCommittedInputs.appIdHash !== ZKPASSPORT_IOS_APP_ID_HASH &&\n facematchCommittedInputs.appIdHash !== ZKPASSPORT_IOS_APP_CLIP_APP_ID_HASH &&\n facematchCommittedInputs.appIdHash !== ZKPASSPORT_ANDROID_APP_ID_HASH\n ) {\n console.warn(\n \"Invalid facematch app id hash, the attestation should be coming from the ZKPassport app\",\n )\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n eq: {\n expected: `${ZKPASSPORT_IOS_APP_ID_HASH} (iOS) or ${ZKPASSPORT_IOS_APP_CLIP_APP_ID_HASH} (iOS App Clip) or ${ZKPASSPORT_ANDROID_APP_ID_HASH} (Android)`,\n received: facematchCommittedInputs.appIdHash,\n message:\n \"Invalid facematch app id hash, the attestation should be coming from the ZKPassport app\",\n },\n }\n }\n const requestedMode = originalQuery.facematch?.mode\n if (\n (queryResult.facematch && facematchCommittedInputs.mode !== queryResult.facematch.mode) ||\n (requestedMode !== undefined && facematchCommittedInputs.mode !== requestedMode)\n ) {\n console.warn(\"Invalid facematch mode\")\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n eq: {\n expected: originalQuery.facematch?.mode,\n received: facematchCommittedInputs.mode,\n message: \"Invalid facematch mode\",\n },\n }\n }\n if (!commitsRevocationRoot) return { isCorrect, queryResultErrors }\n const revocationRoot = facematchCommittedInputs.revocationRoot ?? \"0x0\"\n if (facematchCommittedInputs.rootKeyLeaf === APPLE_APP_ATTEST_ROOT_KEY_HASH) {\n if (BigInt(revocationRoot) !== 0n) {\n console.warn(\"An iOS face match has no revocation root\")\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n revocation: {\n expected: \"0\",\n received: revocationRoot,\n message: \"An iOS face match has no revocation root\",\n },\n }\n }\n } else {\n const { isCorrect: isCorrectRevocationRoot } = await this.checkAttestationRevocationRoot(\n revocationRoot,\n queryResultErrors,\n \"facematch\",\n devMode,\n timestamp,\n originalQuery,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectRevocationRoot\n }\n return { isCorrect, queryResultErrors }\n }\n\n private static async checkCurrentDate(\n circuitName: keyof QueryResultErrors,\n proofData: ProofData,\n validity: number,\n queryResultErrors: Partial<QueryResultErrors>,\n ) {\n const currentTime = new Date()\n const today = new Date(\n currentTime.getFullYear(),\n currentTime.getMonth(),\n currentTime.getDate(),\n 0,\n 0,\n 0,\n 0,\n )\n const currentDate = getCurrentDateFromDisclosureProof(proofData)\n const todayToCurrentDate = today.getTime() - currentDate.getTime()\n const expectedDifference = validity ? validity * 1000 : DEFAULT_VALIDITY * 1000\n let isCorrect = true\n if (todayToCurrentDate >= expectedDifference) {\n console.warn(\"The date used to check the validity of the ID falls out of the validity period\")\n isCorrect = false\n if (!queryResultErrors[circuitName as keyof QueryResultErrors]) {\n queryResultErrors[circuitName as keyof QueryResultErrors] = {}\n }\n queryResultErrors[circuitName as keyof QueryResultErrors]!.date = {\n expected: `Difference: ${validity} seconds`,\n received: `Difference: ${Math.round(todayToCurrentDate / 1000)} seconds`,\n message: \"The date used to check the validity of the ID falls out of the validity period\",\n }\n }\n // Reject a current_date set in the future\n if (currentDate.getTime() - today.getTime() > CURRENT_DATE_FUTURE_TOLERANCE_MS) {\n console.warn(\"The date used to check the validity of the ID is in the future\")\n isCorrect = false\n if (!queryResultErrors[circuitName as keyof QueryResultErrors]) {\n queryResultErrors[circuitName as keyof QueryResultErrors] = {}\n }\n queryResultErrors[circuitName as keyof QueryResultErrors]!.date = {\n expected: `Difference: ${validity} seconds`,\n received: `Difference: ${Math.round(todayToCurrentDate / 1000)} seconds`,\n message: \"The date used to check the validity of the ID is in the future\",\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n // Enforce that every condition in `originalQuery` is actually backed by a proof\n private static checkQueryCompleteness(\n originalQuery: Query,\n committedInputKeys: Set<string>,\n ): { isCorrect: boolean; queryResultErrors: Partial<QueryResultErrors> } {\n let isCorrect = true\n const queryResultErrors: Partial<QueryResultErrors> = {}\n const has = (...keys: string[]) => keys.some((k) => committedInputKeys.has(k))\n const flag = (field: keyof QueryResultErrors, message: string) => {\n isCorrect = false\n queryResultErrors[field] = {\n ...queryResultErrors[field],\n commitment: {\n expected: \"A proof covering the requested condition\",\n received: \"No matching proof was provided\",\n message,\n },\n }\n }\n const hasDisclose = has(\"disclose_bytes\", \"disclose_bytes_evm\")\n const isComparison = (c?: {\n gte?: unknown\n gt?: unknown\n lte?: unknown\n lt?: unknown\n range?: unknown\n }) =>\n !!c &&\n (c.gte !== undefined ||\n c.gt !== undefined ||\n c.lte !== undefined ||\n c.lt !== undefined ||\n c.range !== undefined)\n const isDisclosure = (c?: { eq?: unknown; disclose?: unknown }) =>\n !!c && (c.eq !== undefined || c.disclose === true)\n\n const age = originalQuery.age\n if ((isComparison(age) || age?.eq !== undefined) && !has(\"compare_age\", \"compare_age_evm\")) {\n flag(\"age\", \"The proof does not verify the requested age condition\")\n }\n\n if (\n isComparison(originalQuery.birthdate) &&\n !has(\"compare_birthdate\", \"compare_birthdate_evm\")\n ) {\n flag(\"birthdate\", \"The proof does not verify the requested birthdate condition\")\n }\n if (isDisclosure(originalQuery.birthdate) && !hasDisclose) {\n flag(\"birthdate\", \"The proof does not disclose the requested birthdate\")\n }\n if (isComparison(originalQuery.expiry_date) && !has(\"compare_expiry\", \"compare_expiry_evm\")) {\n flag(\"expiry_date\", \"The proof does not verify the requested expiry date condition\")\n }\n if (isDisclosure(originalQuery.expiry_date) && !hasDisclose) {\n flag(\"expiry_date\", \"The proof does not disclose the requested expiry date\")\n }\n\n const nationality = originalQuery.nationality\n if (\n nationality?.in !== undefined &&\n !has(\"inclusion_check_nationality\", \"inclusion_check_nationality_evm\")\n ) {\n flag(\"nationality\", \"The proof does not verify the requested nationality inclusion\")\n }\n if (\n nationality?.out !== undefined &&\n !has(\"exclusion_check_nationality\", \"exclusion_check_nationality_evm\")\n ) {\n flag(\"nationality\", \"The proof does not verify the requested nationality exclusion\")\n }\n if (isDisclosure(nationality) && !hasDisclose) {\n flag(\"nationality\", \"The proof does not disclose the requested nationality\")\n }\n\n const issuingCountry = originalQuery.issuing_country\n if (\n issuingCountry?.in !== undefined &&\n !has(\"inclusion_check_issuing_country\", \"inclusion_check_issuing_country_evm\")\n ) {\n flag(\"issuing_country\", \"The proof does not verify the requested issuing country inclusion\")\n }\n if (\n issuingCountry?.out !== undefined &&\n !has(\"exclusion_check_issuing_country\", \"exclusion_check_issuing_country_evm\")\n ) {\n flag(\"issuing_country\", \"The proof does not verify the requested issuing country exclusion\")\n }\n if (isDisclosure(issuingCountry) && !hasDisclose) {\n flag(\"issuing_country\", \"The proof does not disclose the requested issuing country\")\n }\n\n const discloseOnlyFields: Array<keyof QueryResultErrors> = [\n \"firstname\",\n \"lastname\",\n \"fullname\",\n \"document_number\",\n \"document_type\",\n \"gender\",\n ]\n for (const field of discloseOnlyFields) {\n if (\n isDisclosure((originalQuery as Record<string, unknown>)[field] as never) &&\n !hasDisclose\n ) {\n flag(field, `The proof does not disclose the requested ${field}`)\n }\n }\n\n if (originalQuery.bind && !has(\"bind\", \"bind_evm\")) {\n flag(\"bind\", \"The proof does not verify the requested bound data\")\n }\n\n if (\n originalQuery.sanctions &&\n !has(\"exclusion_check_sanctions\", \"exclusion_check_sanctions_evm\")\n ) {\n flag(\"sanctions\", \"The proof does not verify the requested sanctions exclusion\")\n }\n\n if (originalQuery.facematch && !has(\"facematch\", \"facematch_evm\")) {\n flag(\"facematch\", \"The proof does not verify the requested FaceMatch\")\n }\n\n if (!isCorrect) {\n console.warn(\"The proof does not verify all the requested conditions and information\")\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static async checkPublicInputs(\n domain: string,\n proofs: Array<ProofResult>,\n originalQuery: Query,\n queryResult: QueryResult,\n validity?: number,\n scope?: string,\n oprfKeyId?: string,\n devMode?: boolean,\n registryClient?: RegistryClient,\n allowedVerificationMethods: readonly AllowedVerificationMethod[] = DEFAULT_ALLOWED_VERIFICATION_METHODS,\n ) {\n let commitmentIn: bigint | undefined\n let commitmentOut: bigint | undefined\n let isCorrect = true\n let uniqueIdentifier: string | undefined\n let uniqueIdentifierType: NullifierType | undefined\n let oprfPublicKeyHash: bigint | undefined\n const currentTime = new Date()\n const today = new Date(\n currentTime.getFullYear(),\n currentTime.getMonth(),\n currentTime.getDate(),\n 0,\n 0,\n 0,\n 0,\n )\n let queryResultErrors: Partial<QueryResultErrors> = {}\n\n // An outer proof has no commitment other proofs could link to, so it must come alone\n if (proofs.length > 1 && proofs.some((p) => p.name?.startsWith(\"outer\"))) {\n console.warn(\"An outer proof must be the only proof provided\")\n queryResultErrors.outer = {\n commitment: {\n expected: \"Number of proofs: 1\",\n received: `Number of proofs: ${proofs.length}`,\n message: \"An outer proof must be the only proof provided\",\n },\n }\n return {\n isCorrect: false,\n uniqueIdentifier: undefined,\n uniqueIdentifierType: undefined,\n queryResultErrors,\n }\n }\n\n const proofOrder = [\n // Tier 2 base: the device attested the camera-read ID, in place of the three chip proofs\n \"attested_id\",\n AADHAAR_CIRCUIT_NAME,\n \"sig_check_dsc\",\n \"sig_check_id_data\",\n \"data_check_integrity\",\n \"disclose_bytes\",\n \"compare_age\",\n \"compare_birthdate\",\n \"compare_expiry\",\n \"exclusion_check_nationality\",\n \"inclusion_check_nationality\",\n \"exclusion_check_issuing_country\",\n \"inclusion_check_issuing_country\",\n \"bind\",\n \"exclusion_check_sanctions\",\n \"facematch\",\n ]\n // Since the order is important for the commitments, we need to sort the proofs\n // by their expected order: root signature check -> ID signature check -> integrity check -> disclosure\n const sortedProofs = proofs.sort((a, b) => {\n const getIndex = (proof: ProofResult) => {\n const name = proof.name || \"\"\n return proofOrder.findIndex((p) => name.startsWith(p))\n }\n return getIndex(a) - getIndex(b)\n })\n\n // Registry roots are checked as of the proofs' own date, so older proofs still verify\n const disclosureProofNames = proofOrder.slice(5)\n // What verified the ID, read from the base proof (or the outer)\n let verificationMethod: VerificationMethod | undefined\n const firstDisclosureProof = sortedProofs.find((p) =>\n disclosureProofNames.some((name) => p.name?.startsWith(name)),\n )\n const bundleDate = firstDisclosureProof\n ? getCurrentDateFromDisclosureProof(\n getProofData(\n firstDisclosureProof.proof as string,\n getNumberOfPublicInputs(firstDisclosureProof.name!, firstDisclosureProof.version),\n ),\n )\n : undefined\n const bundleRootTimestamp = bundleDate ? Math.floor(bundleDate.getTime() / 1000) : undefined\n\n for (const proof of sortedProofs!) {\n const proofData = getProofData(\n proof.proof as string,\n getNumberOfPublicInputs(proof.name!, proof.version),\n )\n if (proof.name?.startsWith(\"outer\")) {\n const isForEVM = proof.name?.startsWith(\"outer_evm\")\n const currentDate = getCurrentDateFromOuterProof(proofData)\n const rootTimestamp = Math.floor(currentDate.getTime() / 1000)\n const certificateRegistryRoot = getCertificateRegistryRootFromOuterProof(proofData)\n const {\n isCorrect: isCorrectCertificateRegistryRoot,\n queryResultErrors: queryResultErrorsCertificateRegistryRoot,\n } = await this.checkCertificateRegistryRoot(\n certificateRegistryRoot.toString(16),\n queryResultErrors,\n true,\n devMode,\n rootTimestamp,\n originalQuery,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectCertificateRegistryRoot\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCertificateRegistryRoot,\n }\n\n const circuitRegistryRoot = getCircuitRegistryRootFromOuterProof(proofData)\n const {\n isCorrect: isCorrectCircuitRegistryRoot,\n queryResultErrors: queryResultErrorsCircuitRegistryRoot,\n } = await this.checkCircuitRegistryRoot(\n circuitRegistryRoot.toString(16),\n queryResultErrors,\n devMode,\n rootTimestamp,\n originalQuery,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectCircuitRegistryRoot\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCircuitRegistryRoot,\n }\n\n const todayToCurrentDate = today.getTime() - currentDate.getTime()\n const expectedDifference = validity ? validity * 1000 : DEFAULT_VALIDITY * 1000\n if (todayToCurrentDate >= expectedDifference) {\n console.warn(\n `The date used to check the validity of the ID is older than the validity period`,\n )\n isCorrect = false\n queryResultErrors.outer = {\n ...queryResultErrors.outer,\n date: {\n expected: `Difference: ${validity} seconds`,\n received: `Difference: ${Math.round(todayToCurrentDate / 1000)} seconds`,\n message:\n \"The date used to check the validity of the ID is older than the validity period\",\n },\n }\n }\n // Reject a current_date set in the future\n if (currentDate.getTime() - today.getTime() > CURRENT_DATE_FUTURE_TOLERANCE_MS) {\n console.warn(\"The date used to check the validity of the ID is in the future\")\n isCorrect = false\n queryResultErrors.outer = {\n ...queryResultErrors.outer,\n date: {\n expected: `Difference: ${validity} seconds`,\n received: `Difference: ${Math.round(todayToCurrentDate / 1000)} seconds`,\n message: \"The date used to check the validity of the ID is in the future\",\n },\n }\n }\n const paramCommitments = getParamCommitmentsFromOuterProof(proofData, proof.version)\n // A Tier 2 outer proof always carries its scheme, whatever version it states, so a proof\n // can't pass as a chip read by leaving out its version\n const isAttestedOuter = proof.name!.includes(\"_attested_\")\n const isAadhaarOuter = proof.name!.includes(\"_aadhaar_\")\n verificationMethod =\n isAttestedOuter || isAadhaarOuter || hasVerificationMethod(proof.version)\n ? getVerificationMethodFromOuterProof(proofData)\n : VerificationMethod.ICAO_CHIP\n if (isAadhaarOuter && verificationMethod !== VerificationMethod.UIDAI_AADHAAR) {\n console.warn(\"An Aadhaar outer proof states another verification method\")\n isCorrect = false\n queryResultErrors.outer = {\n ...queryResultErrors.outer,\n certificate: {\n expected: `Verification method ${VerificationMethod.UIDAI_AADHAAR}`,\n received: `Verification method ${verificationMethod}`,\n message: \"An Aadhaar outer proof states another verification method\",\n },\n }\n }\n if (\n isAttestedOuter &&\n getTierForVerificationMethod(verificationMethod) !== VerificationTier.DEVICE_ATTESTED\n ) {\n console.warn(\"A Tier 2 outer proof states a scheme of another tier\")\n isCorrect = false\n queryResultErrors.outer = {\n ...queryResultErrors.outer,\n certificate: {\n expected: \"A device-attested verification method\",\n received: `Verification method ${verificationMethod}`,\n message: \"A Tier 2 outer proof states a scheme of another tier\",\n },\n }\n }\n const committedInputs = proof.committedInputs\n const keysInCommittedInputs = Object.keys(committedInputs || {})\n if (keysInCommittedInputs.length !== paramCommitments.length) {\n console.warn(\"The proof does not verify all the requested conditions and information\")\n isCorrect = false\n queryResultErrors.outer = {\n ...queryResultErrors.outer,\n commitment: {\n expected: `Number of parameter commitments: ${paramCommitments.length}`,\n received: `Number of disclosure proofs provided: ${keysInCommittedInputs.length}`,\n message: \"The proof does not verify all the requested conditions and information\",\n },\n }\n }\n if (getTierForVerificationMethod(verificationMethod) === VerificationTier.DEVICE_ATTESTED) {\n const { isCorrect: isCorrectAttestation, queryResultErrors: attestationErrors } =\n await this.checkOuterDeviceAttestation(\n verificationMethod,\n committedInputs,\n paramCommitments[0],\n isForEVM,\n )\n isCorrect = isCorrect && isCorrectAttestation\n queryResultErrors = { ...queryResultErrors, ...attestationErrors }\n }\n if (getServiceScopeHash(domain) !== getScopeFromOuterProof(proofData)) {\n console.warn(\"The proof comes from a different domain than the one expected\")\n isCorrect = false\n queryResultErrors.outer = {\n ...queryResultErrors.outer,\n scope: {\n expected: `Scope: ${getServiceScopeHash(domain).toString()}`,\n received: `Scope: ${getScopeFromOuterProof(proofData).toString()}`,\n message: \"The proof comes from a different domain than the one expected\",\n },\n }\n }\n if (getScopeHash(scope) !== getSubscopeFromOuterProof(proofData)) {\n const scopeErrorMessage = scope\n ? \"The proof uses a different scope than the one expected\"\n : \"The proof uses a scope but none was passed to verify()\"\n console.warn(scopeErrorMessage)\n isCorrect = false\n queryResultErrors.outer = {\n ...queryResultErrors.outer,\n scope: {\n expected: `Scope: ${getScopeHash(scope).toString()}`,\n received: `Scope: ${getSubscopeFromOuterProof(proofData).toString()}`,\n message: scopeErrorMessage,\n },\n }\n }\n if (!!committedInputs?.compare_age || !!committedInputs?.compare_age_evm) {\n const ageCommittedInputs =\n (committedInputs?.compare_age as AgeCommittedInputs) ??\n (committedInputs?.compare_age_evm as AgeCommittedInputs)\n const ageParameterCommitment = isForEVM\n ? await getAgeEVMParameterCommitment(\n ageCommittedInputs.minAge,\n ageCommittedInputs.maxAge,\n )\n : await getAgeParameterCommitment(ageCommittedInputs.minAge, ageCommittedInputs.maxAge)\n if (!paramCommitments.includes(ageParameterCommitment)) {\n console.warn(\"This proof does not verify the age\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n commitment: {\n expected: `Age parameter commitment: ${ageParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the age\",\n },\n }\n }\n const { isCorrect: isCorrectAge, queryResultErrors: queryResultErrorsAge } =\n this.checkAgePublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectAge\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsAge,\n }\n }\n if (!!committedInputs?.compare_birthdate || !!committedInputs?.compare_birthdate_evm) {\n const birthdateCommittedInputs =\n (committedInputs?.compare_birthdate as DateCommittedInputs) ??\n (committedInputs?.compare_birthdate_evm as DateCommittedInputs)\n const birthdateParameterCommitment = isForEVM\n ? await getDateEVMParameterCommitment(\n ProofType.BIRTHDATE,\n birthdateCommittedInputs.minDateTimestamp,\n birthdateCommittedInputs.maxDateTimestamp,\n 0,\n )\n : await getDateParameterCommitment(\n ProofType.BIRTHDATE,\n birthdateCommittedInputs.minDateTimestamp,\n birthdateCommittedInputs.maxDateTimestamp,\n 0,\n )\n if (!paramCommitments.includes(birthdateParameterCommitment)) {\n console.warn(\"This proof does not verify the birthdate\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n commitment: {\n expected: `Birthdate parameter commitment: ${birthdateParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the birthdate\",\n },\n }\n }\n const { isCorrect: isCorrectBirthdate, queryResultErrors: queryResultErrorsBirthdate } =\n this.checkBirthdatePublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectBirthdate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsBirthdate,\n }\n }\n if (!!committedInputs?.compare_expiry || !!committedInputs?.compare_expiry_evm) {\n const expiryCommittedInputs =\n (committedInputs?.compare_expiry as DateCommittedInputs) ??\n (committedInputs?.compare_expiry_evm as DateCommittedInputs)\n const expiryParameterCommitment = isForEVM\n ? await getDateEVMParameterCommitment(\n ProofType.EXPIRY_DATE,\n expiryCommittedInputs.minDateTimestamp,\n expiryCommittedInputs.maxDateTimestamp,\n )\n : await getDateParameterCommitment(\n ProofType.EXPIRY_DATE,\n expiryCommittedInputs.minDateTimestamp,\n expiryCommittedInputs.maxDateTimestamp,\n )\n if (!paramCommitments.includes(expiryParameterCommitment)) {\n console.warn(\"This proof does not verify the expiry date\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n commitment: {\n expected: `Expiry date parameter commitment: ${expiryParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the expiry date\",\n },\n }\n }\n const { isCorrect: isCorrectExpiryDate, queryResultErrors: queryResultErrorsExpiryDate } =\n this.checkExpiryDatePublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectExpiryDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsExpiryDate,\n }\n }\n if (!!committedInputs?.disclose_bytes || !!committedInputs?.disclose_bytes_evm) {\n const discloseCommittedInputs =\n (committedInputs?.disclose_bytes as DiscloseCommittedInputs) ??\n (committedInputs?.disclose_bytes_evm as DiscloseCommittedInputs)\n const discloseParameterCommitment = isForEVM\n ? await getDiscloseEVMParameterCommitment(\n discloseCommittedInputs.discloseMask,\n discloseCommittedInputs.disclosedBytes,\n )\n : await getDiscloseParameterCommitment(\n discloseCommittedInputs.discloseMask,\n discloseCommittedInputs.disclosedBytes,\n )\n if (!paramCommitments.includes(discloseParameterCommitment)) {\n console.warn(\"This proof does not verify any of the data disclosed\")\n isCorrect = false\n queryResultErrors.disclose = {\n ...queryResultErrors.disclose,\n commitment: {\n expected: `Disclosure parameter commitment: ${discloseParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify any of the data disclosed\",\n },\n }\n }\n const { isCorrect: isCorrectDisclose, queryResultErrors: queryResultErrorsDisclose } =\n this.checkDiscloseBytesPublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectDisclose\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsDisclose,\n }\n }\n if (\n !!committedInputs?.inclusion_check_nationality ||\n !!committedInputs?.inclusion_check_nationality_evm\n ) {\n const inclusionCheckNationalityCommittedInputs =\n (committedInputs?.inclusion_check_nationality as CountryCommittedInputs) ??\n (committedInputs?.inclusion_check_nationality_evm as CountryCommittedInputs)\n const inclusionCheckNationalityParameterCommitment = isForEVM\n ? await getCountryEVMParameterCommitment(\n ProofType.NATIONALITY_INCLUSION,\n inclusionCheckNationalityCommittedInputs.countries,\n )\n : await getCountryParameterCommitment(\n ProofType.NATIONALITY_INCLUSION,\n inclusionCheckNationalityCommittedInputs.countries,\n )\n if (!paramCommitments.includes(inclusionCheckNationalityParameterCommitment)) {\n console.warn(\"This proof does not verify the inclusion of the nationality\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n commitment: {\n expected: `Nationality parameter commitment: ${inclusionCheckNationalityParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the inclusion of the nationality\",\n },\n }\n }\n const countryList = inclusionCheckNationalityCommittedInputs.countries\n const {\n isCorrect: isCorrectNationalityInclusion,\n queryResultErrors: queryResultErrorsNationalityInclusion,\n } = this.checkNationalityInclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectNationalityInclusion\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsNationalityInclusion,\n }\n }\n if (\n !!committedInputs?.inclusion_check_issuing_country ||\n !!committedInputs?.inclusion_check_issuing_country_evm\n ) {\n const inclusionCheckIssuingCountryCommittedInputs =\n (committedInputs?.inclusion_check_issuing_country as CountryCommittedInputs) ??\n (committedInputs?.inclusion_check_issuing_country_evm as CountryCommittedInputs)\n const inclusionCheckIssuingCountryParameterCommitment = isForEVM\n ? await getCountryEVMParameterCommitment(\n ProofType.ISSUING_COUNTRY_INCLUSION,\n inclusionCheckIssuingCountryCommittedInputs.countries,\n )\n : await getCountryParameterCommitment(\n ProofType.ISSUING_COUNTRY_INCLUSION,\n inclusionCheckIssuingCountryCommittedInputs.countries,\n )\n if (!paramCommitments.includes(inclusionCheckIssuingCountryParameterCommitment)) {\n console.warn(\"This proof does not verify the inclusion of the issuing country\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n commitment: {\n expected: `Issuing country parameter commitment: ${inclusionCheckIssuingCountryParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the inclusion of the issuing country\",\n },\n }\n }\n const countryList = inclusionCheckIssuingCountryCommittedInputs.countries\n const {\n isCorrect: isCorrectIssuingCountryInclusion,\n queryResultErrors: queryResultErrorsIssuingCountryInclusion,\n } = this.checkIssuingCountryInclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectIssuingCountryInclusion\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsIssuingCountryInclusion,\n }\n }\n if (\n !!committedInputs?.exclusion_check_nationality ||\n !!committedInputs?.exclusion_check_nationality_evm\n ) {\n const exclusionCheckNationalityCommittedInputs =\n (committedInputs?.exclusion_check_nationality as CountryCommittedInputs) ??\n (committedInputs?.exclusion_check_nationality_evm as CountryCommittedInputs)\n const exclusionCheckNationalityParameterCommitment = isForEVM\n ? await getCountryEVMParameterCommitment(\n ProofType.NATIONALITY_EXCLUSION,\n exclusionCheckNationalityCommittedInputs.countries,\n )\n : await getCountryParameterCommitment(\n ProofType.NATIONALITY_EXCLUSION,\n exclusionCheckNationalityCommittedInputs.countries,\n )\n if (!paramCommitments.includes(exclusionCheckNationalityParameterCommitment)) {\n console.warn(\"This proof does not verify the exclusion of the nationality\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n commitment: {\n expected: `Nationality parameter commitment: ${exclusionCheckNationalityParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the exclusion of the nationality\",\n },\n }\n }\n const countryList = exclusionCheckNationalityCommittedInputs.countries\n const {\n isCorrect: isCorrectNationalityExclusion,\n queryResultErrors: queryResultErrorsNationalityExclusion,\n } = this.checkNationalityExclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectNationalityExclusion\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsNationalityExclusion,\n }\n }\n if (\n !!committedInputs?.exclusion_check_issuing_country ||\n !!committedInputs?.exclusion_check_issuing_country_evm\n ) {\n const exclusionCheckIssuingCountryCommittedInputs =\n (committedInputs?.exclusion_check_issuing_country as CountryCommittedInputs) ??\n (committedInputs?.exclusion_check_issuing_country_evm as CountryCommittedInputs)\n const exclusionCheckIssuingCountryParameterCommitment = isForEVM\n ? await getCountryEVMParameterCommitment(\n ProofType.ISSUING_COUNTRY_EXCLUSION,\n exclusionCheckIssuingCountryCommittedInputs.countries,\n )\n : await getCountryParameterCommitment(\n ProofType.ISSUING_COUNTRY_EXCLUSION,\n exclusionCheckIssuingCountryCommittedInputs.countries,\n )\n if (!paramCommitments.includes(exclusionCheckIssuingCountryParameterCommitment)) {\n console.warn(\"This proof does not verify the exclusion of the issuing country\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n commitment: {\n expected: `Issuing country parameter commitment: ${exclusionCheckIssuingCountryParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the exclusion of the issuing country\",\n },\n }\n }\n const countryList = exclusionCheckIssuingCountryCommittedInputs.countries\n const {\n isCorrect: isCorrectIssuingCountryExclusion,\n queryResultErrors: queryResultErrorsIssuingCountryExclusion,\n } = this.checkIssuingCountryExclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectIssuingCountryExclusion\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsIssuingCountryExclusion,\n }\n }\n if (!!committedInputs?.bind || !!committedInputs?.bind_evm) {\n const bindCommittedInputs =\n (committedInputs?.bind as BindCommittedInputs) ??\n (committedInputs?.bind_evm as BindCommittedInputs)\n const bindParameterCommitment = isForEVM\n ? await getBindEVMParameterCommitment(formatBoundData(bindCommittedInputs.data))\n : await getBindParameterCommitment(formatBoundData(bindCommittedInputs.data))\n if (!paramCommitments.includes(bindParameterCommitment)) {\n console.warn(\"This proof does not verify the bound data\")\n isCorrect = false\n queryResultErrors.bind = {\n ...queryResultErrors.bind,\n commitment: {\n expected: `Bind parameter commitment: ${bindParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the bound data\",\n },\n }\n }\n const { isCorrect: isCorrectBind, queryResultErrors: queryResultErrorsBind } =\n this.checkBindPublicInputs(originalQuery, queryResult, bindCommittedInputs.data)\n isCorrect = isCorrect && isCorrectBind\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsBind,\n }\n }\n if (\n !!committedInputs?.exclusion_check_sanctions ||\n !!committedInputs?.exclusion_check_sanctions_evm\n ) {\n const exclusionCheckSanctionsCommittedInputs =\n (committedInputs?.exclusion_check_sanctions as SanctionsCommittedInputs) ??\n (committedInputs?.exclusion_check_sanctions_evm as SanctionsCommittedInputs)\n const exclusionCheckSanctionsParameterCommitment = isForEVM\n ? await getSanctionsEvmParameterCommitment(\n exclusionCheckSanctionsCommittedInputs.rootHash,\n exclusionCheckSanctionsCommittedInputs.isStrict,\n )\n : await getSanctionsParameterCommitment(\n exclusionCheckSanctionsCommittedInputs.rootHash,\n exclusionCheckSanctionsCommittedInputs.isStrict,\n )\n if (!paramCommitments.includes(exclusionCheckSanctionsParameterCommitment)) {\n console.warn(\"This proof does not verify the exclusion from the sanction lists\")\n isCorrect = false\n queryResultErrors.sanctions = {\n ...queryResultErrors.sanctions,\n commitment: {\n expected: `Sanctions parameter commitment: ${exclusionCheckSanctionsParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the exclusion from the sanction lists\",\n },\n }\n }\n const {\n isCorrect: isCorrectSanctionsExclusion,\n queryResultErrors: queryResultErrorsSanctionsExclusion,\n } = await this.checkSanctionsExclusionPublicInputs(\n originalQuery,\n queryResult,\n exclusionCheckSanctionsCommittedInputs,\n devMode,\n rootTimestamp,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectSanctionsExclusion\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsSanctionsExclusion,\n }\n }\n if (!!committedInputs?.facematch || !!committedInputs?.facematch_evm) {\n const facematchCommittedInputs =\n (committedInputs?.facematch as FacematchCommittedInputs) ??\n (committedInputs?.facematch_evm as FacematchCommittedInputs)\n const commitsRevocationRoot = commitsAttestationRevocationRoot(proof.version)\n const facematchParameterCommitment = isForEVM\n ? await getFacematchEvmParameterCommitment(\n BigInt(facematchCommittedInputs.rootKeyLeaf),\n facematchCommittedInputs.environment === \"development\" ? 0n : 1n,\n BigInt(facematchCommittedInputs.appIdHash),\n facematchCommittedInputs.mode === \"regular\" ? 1n : 2n,\n undefined,\n BigInt(facematchCommittedInputs.revocationRoot ?? 0),\n commitsRevocationRoot,\n )\n : await getFacematchParameterCommitment(\n BigInt(facematchCommittedInputs.rootKeyLeaf),\n facematchCommittedInputs.environment === \"development\" ? 0n : 1n,\n BigInt(facematchCommittedInputs.appIdHash),\n facematchCommittedInputs.mode === \"regular\" ? 1n : 2n,\n undefined,\n BigInt(facematchCommittedInputs.revocationRoot ?? 0),\n commitsRevocationRoot,\n )\n if (!paramCommitments.includes(facematchParameterCommitment)) {\n console.warn(\"This proof does not verify FaceMatch\")\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n commitment: {\n expected: `Facematch parameter commitment: ${facematchParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify FaceMatch\",\n },\n }\n }\n const { isCorrect: isCorrectFacematch, queryResultErrors: queryResultErrorsFacematch } =\n await this.checkFacematchPublicInputs(\n originalQuery,\n queryResult,\n facematchCommittedInputs,\n devMode,\n bundleRootTimestamp,\n registryClient,\n commitsRevocationRoot,\n )\n isCorrect = isCorrect && isCorrectFacematch\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsFacematch,\n }\n }\n uniqueIdentifier = getNullifierFromOuterProof(proofData, proof.version).toString(10)\n uniqueIdentifierType = getNullifierTypeFromOuterProof(proofData, proof.version)\n oprfPublicKeyHash = getOprfPkHashFromOuterProof(proofData, proof.version)\n } else if (proof.name?.startsWith(\"attested_id\")) {\n commitmentOut = getCommitmentOutFromAttestedIdProof(proofData)\n verificationMethod = getVerificationMethodFromAttestedIdProof(proofData)\n const committedKey = isAndroidAttestedIdCircuit(proof.name)\n ? \"attested_id_android\"\n : \"attested_id_ios\"\n const committed = proof.committedInputs?.[committedKey] as\n AttestedIdCommittedInputs | undefined\n const attestedAt = getCurrentDateFromAttestedIdProof(proofData)\n const { isCorrect: isCorrectDate, queryResultErrors: dateErrors } =\n this.checkAttestedIdDate(attestedAt)\n isCorrect = isCorrect && isCorrectDate\n queryResultErrors = { ...queryResultErrors, ...dateErrors }\n if (!committed) {\n console.warn(\"The attested ID proof carries no committed attestation parameters\")\n isCorrect = false\n queryResultErrors.attested_id = {\n ...queryResultErrors.attested_id,\n commitment: {\n expected: `Committed inputs for ${committedKey}`,\n received: \"none\",\n message: \"The attested ID proof carries no committed attestation parameters\",\n },\n }\n } else {\n const expectedParamCommitment = await getAttestedIdParameterCommitment(\n BigInt(committed.rootKeyLeaf),\n committed.environment === \"development\" ? 0n : 1n,\n BigInt(committed.appIdHash),\n committed.mode === \"regular\" ? 1n : 2n,\n BigInt(committed.integrityPubkeyHash),\n BigInt(committed.revocationRoot ?? 0),\n )\n const paramCommitment = getParameterCommitmentFromAttestedIdProof(proofData)\n if (paramCommitment !== expectedParamCommitment) {\n console.warn(\"The attested ID proof does not match its committed parameters\")\n isCorrect = false\n queryResultErrors.attested_id = {\n ...queryResultErrors.attested_id,\n commitment: {\n expected: `Parameter commitment: ${expectedParamCommitment.toString()}`,\n received: `Parameter commitment: ${paramCommitment.toString()}`,\n message: \"The attested ID proof does not match its committed parameters\",\n },\n }\n }\n const { isCorrect: isCorrectAttestation, queryResultErrors: attestationErrors } =\n this.checkAttestedIdParameters(committed, committedKey === \"attested_id_android\")\n isCorrect = isCorrect && isCorrectAttestation\n queryResultErrors = { ...queryResultErrors, ...attestationErrors }\n if (committedKey === \"attested_id_android\") {\n const { isCorrect: isCorrectRevocationRoot } =\n await this.checkAttestationRevocationRoot(\n committed.revocationRoot ?? \"0x0\",\n queryResultErrors,\n \"attested_id\",\n devMode,\n attestedAt ? Math.floor(attestedAt.getTime() / 1000) : bundleRootTimestamp,\n originalQuery,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectRevocationRoot\n }\n }\n } else if (proof.name === AADHAAR_CIRCUIT_NAME) {\n commitmentOut = getCommitmentOutFromAadhaarProof(proofData)\n verificationMethod = getVerificationMethodFromAttestedIdProof(proofData)\n const {\n isCorrect: isCorrectCertificateRegistryRoot,\n queryResultErrors: queryResultErrorsCertificateRegistryRoot,\n } = await this.checkCertificateRegistryRoot(\n getCertificateRegistryRootFromAadhaarProof(proofData).toString(16),\n queryResultErrors,\n false,\n devMode,\n bundleRootTimestamp,\n originalQuery,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectCertificateRegistryRoot\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCertificateRegistryRoot,\n }\n } else if (proof.name?.startsWith(\"sig_check_dsc\")) {\n commitmentOut = getCommitmentFromDSCProof(proofData)\n const merkleRoot = getMerkleRootFromDSCProof(proofData)\n const {\n isCorrect: isCorrectCertificateRegistryRoot,\n queryResultErrors: queryResultErrorsCertificateRegistryRoot,\n } = await this.checkCertificateRegistryRoot(\n merkleRoot.toString(16),\n queryResultErrors,\n false,\n devMode,\n bundleRootTimestamp,\n originalQuery,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectCertificateRegistryRoot\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCertificateRegistryRoot,\n }\n } else if (proof.name?.startsWith(\"sig_check_id_data\")) {\n commitmentIn = getCommitmentInFromIDDataProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the certificate signature and ID signature\",\n )\n isCorrect = false\n queryResultErrors.sig_check_id_data = {\n ...queryResultErrors.sig_check_id_data,\n commitment: {\n expected: `Commitment: ${commitmentOut?.toString() || \"undefined\"}`,\n received: `Commitment: ${commitmentIn?.toString() || \"undefined\"}`,\n message:\n \"Failed to check the link between the certificate signature and ID signature\",\n },\n }\n }\n commitmentOut = getCommitmentOutFromIDDataProof(proofData)\n } else if (proof.name?.startsWith(\"data_check_integrity\")) {\n commitmentIn = getCommitmentInFromIntegrityProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\"Failed to check the link between the ID signature and the data signed\")\n isCorrect = false\n queryResultErrors.data_check_integrity = {\n ...queryResultErrors.data_check_integrity,\n commitment: {\n expected: `Commitment: ${commitmentOut?.toString() || \"undefined\"}`,\n received: `Commitment: ${commitmentIn?.toString() || \"undefined\"}`,\n message: \"Failed to check the link between the ID signature and the data signed\",\n },\n }\n }\n commitmentOut = getCommitmentOutFromIntegrityProof(proofData)\n // Integrity proofs made before circuit version 0.23.0 carry no scheme: they are ICAO\n verificationMethod =\n getVerificationMethodFromIntegrityProof(proofData) ?? VerificationMethod.ICAO_CHIP\n } else if (proof.name === \"disclose_bytes\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the data to disclose\",\n )\n isCorrect = false\n queryResultErrors.disclose = {\n ...queryResultErrors.disclose,\n commitment: {\n expected: `Commitment: ${commitmentOut?.toString() || \"undefined\"}`,\n received: `Commitment: ${commitmentIn?.toString() || \"undefined\"}`,\n message:\n \"Failed to check the link between the validity of the ID and the data to disclose\",\n },\n }\n }\n const paramCommitment = getParameterCommitmentFromDisclosureProof(proofData)\n const calculatedParamCommitment = await getDiscloseParameterCommitment(\n (proof.committedInputs?.disclose_bytes as DiscloseCommittedInputs).discloseMask!,\n (proof.committedInputs?.disclose_bytes as DiscloseCommittedInputs).disclosedBytes!,\n )\n if (paramCommitment !== calculatedParamCommitment) {\n console.warn(\"The disclosed data does not match the data committed by the proof\")\n isCorrect = false\n queryResultErrors.disclose = {\n ...queryResultErrors.disclose,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommitment}`,\n message: \"The disclosed data does not match the data committed by the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"disclose\",\n scope,\n )\n isCorrect = isCorrect && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectDisclose, queryResultErrors: queryResultErrorsDisclose } =\n this.checkDiscloseBytesPublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectDisclose && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsDisclose,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"disclose\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"compare_age\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the age derived from it\",\n )\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the age derived from it\",\n },\n }\n }\n const paramCommitment = getParameterCommitmentFromDisclosureProof(proofData)\n const committedInputs = proof.committedInputs?.compare_age as AgeCommittedInputs\n const calculatedParamCommitment = await getAgeParameterCommitment(\n committedInputs.minAge,\n committedInputs.maxAge,\n )\n if (paramCommitment !== calculatedParamCommitment) {\n console.warn(\n \"The conditions for the age check do not match the conditions checked by the proof\",\n )\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommitment}`,\n message:\n \"The conditions for the age check do not match the conditions checked by the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(domain, proofData, queryResultErrors, \"age\", scope)\n const { isCorrect: isCorrectAge, queryResultErrors: queryResultErrorsAge } =\n this.checkAgePublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectAge && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsAge,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"age\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"compare_birthdate\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the birthdate derived from it\",\n )\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the birthdate derived from it\",\n },\n }\n }\n const paramCommitment = getParameterCommitmentFromDisclosureProof(proofData)\n const committedInputs = proof.committedInputs?.compare_birthdate as DateCommittedInputs\n const calculatedParamCommitment = await getDateParameterCommitment(\n ProofType.BIRTHDATE,\n committedInputs.minDateTimestamp,\n committedInputs.maxDateTimestamp,\n 0,\n )\n if (paramCommitment !== calculatedParamCommitment) {\n console.warn(\n \"The conditions for the birthdate check do not match the conditions checked by the proof\",\n )\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommitment}`,\n message:\n \"The conditions for the birthdate check do not match the conditions checked by the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"birthdate\",\n scope,\n )\n const { isCorrect: isCorrectBirthdate, queryResultErrors: queryResultErrorsBirthdate } =\n this.checkBirthdatePublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectBirthdate && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsBirthdate,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"birthdate\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"compare_expiry\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and its expiry date\",\n )\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and its expiry date\",\n },\n }\n }\n const paramCommitment = getParameterCommitmentFromDisclosureProof(proofData)\n const committedInputs = proof.committedInputs?.compare_expiry as DateCommittedInputs\n const calculatedParamCommitment = await getDateParameterCommitment(\n ProofType.EXPIRY_DATE,\n committedInputs.minDateTimestamp,\n committedInputs.maxDateTimestamp,\n )\n if (paramCommitment !== calculatedParamCommitment) {\n console.warn(\n \"The conditions for the expiry date check do not match the conditions checked by the proof\",\n )\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommitment}`,\n message:\n \"The conditions for the expiry date check do not match the conditions checked by the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"expiry_date\",\n scope,\n )\n const { isCorrect: isCorrectExpiryDate, queryResultErrors: queryResultErrorsExpiryDate } =\n this.checkExpiryDatePublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectExpiryDate && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsExpiryDate,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"expiry_date\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"exclusion_check_nationality\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the nationality exclusion check\",\n )\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the nationality exclusion check\",\n },\n }\n }\n const countryList = (\n proof.committedInputs?.exclusion_check_nationality as CountryCommittedInputs\n ).countries\n const paramCommittment = getParameterCommitmentFromDisclosureProof(proofData)\n const calculatedParamCommitment = await getCountryParameterCommitment(\n ProofType.NATIONALITY_EXCLUSION,\n countryList,\n true,\n )\n if (paramCommittment !== calculatedParamCommitment) {\n console.warn(\n \"The committed country list for the exclusion check does not match the one from the proof\",\n )\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommittment}`,\n message:\n \"The committed country list for the exclusion check does not match the one from the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"nationality\",\n scope,\n )\n const {\n isCorrect: isCorrectNationalityExclusion,\n queryResultErrors: queryResultErrorsNationalityExclusion,\n } = this.checkNationalityExclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectNationalityExclusion && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsNationalityExclusion,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"nationality\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"exclusion_check_issuing_country\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the issuing country exclusion check\",\n )\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the issuing country exclusion check\",\n },\n }\n }\n const countryList = (\n proof.committedInputs?.exclusion_check_issuing_country as CountryCommittedInputs\n ).countries\n const paramCommittment = getParameterCommitmentFromDisclosureProof(proofData)\n const calculatedParamCommitment = await getCountryParameterCommitment(\n ProofType.ISSUING_COUNTRY_EXCLUSION,\n countryList,\n true,\n )\n if (paramCommittment !== calculatedParamCommitment) {\n console.warn(\n \"The committed country list for the issuing country exclusion check does not match the one from the proof\",\n )\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommittment}`,\n message:\n \"The committed country list for the issuing country exclusion check does not match the one from the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"issuing_country\",\n scope,\n )\n const {\n isCorrect: isCorrectIssuingCountryExclusion,\n queryResultErrors: queryResultErrorsIssuingCountryExclusion,\n } = this.checkIssuingCountryExclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectIssuingCountryExclusion && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsIssuingCountryExclusion,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"issuing_country\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"inclusion_check_nationality\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the nationality inclusion check\",\n )\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the nationality inclusion check\",\n },\n }\n }\n const countryList = (\n proof.committedInputs?.inclusion_check_nationality as CountryCommittedInputs\n ).countries\n const paramCommittment = getParameterCommitmentFromDisclosureProof(proofData)\n const calculatedParamCommitment = await getCountryParameterCommitment(\n ProofType.NATIONALITY_INCLUSION,\n countryList,\n false,\n )\n if (paramCommittment !== calculatedParamCommitment) {\n console.warn(\n \"The committed country list for the nationality inclusion check does not match the one from the proof\",\n )\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommittment}`,\n message:\n \"The committed country list for the nationality inclusion check does not match the one from the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"nationality\",\n scope,\n )\n const {\n isCorrect: isCorrectNationalityInclusion,\n queryResultErrors: queryResultErrorsNationalityInclusion,\n } = this.checkNationalityInclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectNationalityInclusion && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsNationalityInclusion,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"nationality\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"inclusion_check_issuing_country\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the issuing country inclusion check\",\n )\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the issuing country inclusion check\",\n },\n }\n }\n const countryList = (\n proof.committedInputs?.inclusion_check_issuing_country as CountryCommittedInputs\n ).countries\n const paramCommittment = getParameterCommitmentFromDisclosureProof(proofData)\n const calculatedParamCommitment = await getCountryParameterCommitment(\n ProofType.ISSUING_COUNTRY_INCLUSION,\n countryList,\n false,\n )\n if (paramCommittment !== calculatedParamCommitment) {\n console.warn(\n \"The committed country list for the issuing country inclusion check does not match the one from the proof\",\n )\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommittment}`,\n message:\n \"The committed country list for the issuing country inclusion check does not match the one from the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"issuing_country\",\n scope,\n )\n const {\n isCorrect: isCorrectIssuingCountryInclusion,\n queryResultErrors: queryResultErrorsIssuingCountryInclusion,\n } = this.checkIssuingCountryInclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectIssuingCountryInclusion && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsIssuingCountryInclusion,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"issuing_country\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"bind\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\"Failed to check the link between the validity of the ID and the bound data\")\n isCorrect = false\n queryResultErrors.bind = {\n ...queryResultErrors.bind,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message: \"Failed to check the link between the validity of the ID and the bound data\",\n },\n }\n }\n const bindCommittedInputs = proof.committedInputs?.bind as BindCommittedInputs\n const paramCommittment = getParameterCommitmentFromDisclosureProof(proofData)\n const calculatedParamCommitment = await getBindParameterCommitment(\n formatBoundData(bindCommittedInputs.data),\n )\n if (paramCommittment !== calculatedParamCommitment) {\n console.warn(\"The bound data does not match the one from the proof\")\n isCorrect = false\n queryResultErrors.bind = {\n ...queryResultErrors.bind,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommittment}`,\n message: \"The bound data does not match the one from the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(domain, proofData, queryResultErrors, \"bind\", scope)\n const { isCorrect: isCorrectBind, queryResultErrors: queryResultErrorsBind } =\n this.checkBindPublicInputs(originalQuery, queryResult, bindCommittedInputs.data)\n isCorrect = isCorrect && isCorrectBind && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsBind,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"bind\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"exclusion_check_sanctions\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the sanctions exclusion check\",\n )\n isCorrect = false\n queryResultErrors.sanctions = {\n ...queryResultErrors.sanctions,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the sanctions exclusion check\",\n },\n }\n }\n const exclusionCheckSanctionsCommittedInputs = proof.committedInputs\n ?.exclusion_check_sanctions as SanctionsCommittedInputs\n const calculatedParamCommitment = await getSanctionsParameterCommitment(\n exclusionCheckSanctionsCommittedInputs.rootHash,\n exclusionCheckSanctionsCommittedInputs.isStrict,\n )\n const paramCommittment = getParameterCommitmentFromDisclosureProof(proofData)\n if (paramCommittment !== calculatedParamCommitment) {\n console.warn(\n \"The sanction lists check against do not match the sanction lists from the proof\",\n )\n isCorrect = false\n queryResultErrors.sanctions = {\n ...queryResultErrors.sanctions,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment.toString()}`,\n received: `Commitment: ${paramCommittment.toString()}`,\n message:\n \"The sanction lists check against do not match the sanction lists from the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"sanctions\",\n scope,\n )\n const {\n isCorrect: isCorrectSanctionsExclusion,\n queryResultErrors: queryResultErrorsSanctionsExclusion,\n } = await this.checkSanctionsExclusionPublicInputs(\n originalQuery,\n queryResult,\n exclusionCheckSanctionsCommittedInputs,\n devMode,\n bundleRootTimestamp,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectSanctionsExclusion && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsSanctionsExclusion,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"sanctions\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name?.startsWith(\"facematch\") && !proof.name?.endsWith(\"_evm\")) {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the facematch check\",\n )\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the facematch check\",\n },\n }\n }\n const facematchCommittedInputs = proof.committedInputs\n ?.facematch as FacematchCommittedInputs\n const paramCommittment = getParameterCommitmentFromDisclosureProof(proofData)\n const commitsRevocationRoot = commitsAttestationRevocationRoot(proof.version)\n const calculatedParamCommitment = await getFacematchParameterCommitment(\n BigInt(facematchCommittedInputs.rootKeyLeaf),\n facematchCommittedInputs.environment === \"development\" ? 0n : 1n,\n BigInt(facematchCommittedInputs.appIdHash),\n facematchCommittedInputs.mode === \"regular\" ? 1n : 2n,\n undefined,\n BigInt(facematchCommittedInputs.revocationRoot ?? 0),\n commitsRevocationRoot,\n )\n if (paramCommittment !== calculatedParamCommitment) {\n console.warn(\"The FaceMatch verification does not match the ones from the proof\")\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment.toString()}`,\n received: `Commitment: ${paramCommittment.toString()}`,\n message: \"The FaceMatch verification does not match the ones from the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"facematch\",\n scope,\n )\n const { isCorrect: isCorrectFacematch, queryResultErrors: queryResultErrorsFacematch } =\n await this.checkFacematchPublicInputs(\n originalQuery,\n queryResult,\n facematchCommittedInputs,\n devMode,\n bundleRootTimestamp,\n registryClient,\n commitsRevocationRoot,\n )\n isCorrect = isCorrect && isCorrectFacematch && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsFacematch,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"facematch\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n // Don't use the nullifier from the proof for FaceMatch as it may be 0\n // but will always come with at least one other disclosure proof with a non-zero nullifier\n // uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n // uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else {\n // No check covered this proof, e.g. a standalone `_evm` disclosure proof\n console.warn(`Unexpected proof: ${proof.name}`)\n isCorrect = false\n }\n }\n\n // As in the outer circuit, each disclosure proof carries no nullifier or the bundle's one\n const nullifierProofs = sortedProofs\n .filter((p) => p.name !== \"facematch\" && disclosureProofNames.includes(p.name!))\n .map((p) => getProofData(p.proof as string, getNumberOfPublicInputs(p.name!, p.version)))\n if (nullifierProofs.length > 0) {\n const distinct = <T>(values: T[], none: T) => [...new Set(values.filter((v) => v !== none))]\n const nullifiers = distinct(nullifierProofs.map(getNullifierFromDisclosureProof), 0n)\n const nullifierTypes = distinct(\n nullifierProofs.map(getNullifierTypeFromDisclosureProof),\n NullifierType.NONE,\n )\n const oprfPkHashes = distinct(nullifierProofs.map(getOprfPkHashFromDisclosureProof), 0n)\n if (nullifiers.length > 1 || nullifierTypes.length > 1 || oprfPkHashes.length > 1) {\n console.warn(\"The disclosure proofs do not share the same nullifier\")\n isCorrect = false\n }\n uniqueIdentifier = nullifiers[0]?.toString(10)\n uniqueIdentifierType = nullifierTypes[0] ?? NullifierType.NONE\n oprfPublicKeyHash = oprfPkHashes[0]\n }\n\n const committedInputKeys = new Set<string>()\n for (const p of sortedProofs!) {\n for (const key of Object.keys(p.committedInputs ?? {})) committedInputKeys.add(key)\n }\n const { isCorrect: isQueryComplete, queryResultErrors: completenessErrors } =\n this.checkQueryCompleteness(originalQuery, committedInputKeys)\n isCorrect = isCorrect && isQueryComplete\n queryResultErrors = { ...queryResultErrors, ...completenessErrors }\n\n // Verify OPRF public key if the proof uses a salted nullifier\n if (\n isCorrect &&\n uniqueIdentifierType &&\n (uniqueIdentifierType === NullifierType.SALTED ||\n uniqueIdentifierType === NullifierType.SALTED_MOCK)\n ) {\n try {\n const oprfPk = await getOprfPublicKey(oprfKeyId ?? OPRF_DEFAULT_KEY_ID)\n const expectedPkHash = await hashOprfPublicKey(oprfPk)\n\n const proofPkHash = oprfPublicKeyHash\n if (proofPkHash === undefined || proofPkHash !== expectedPkHash) {\n console.warn(\"OPRF public key hash mismatch: proof uses an unknown OPRF key\")\n isCorrect = false\n }\n } catch (error) {\n console.warn(\"Failed to verify OPRF public key:\", error)\n isCorrect = false\n }\n }\n\n if (uniqueIdentifierType === NullifierType.NONE) {\n if (uniqueIdentifier !== undefined && BigInt(uniqueIdentifier) !== 0n) {\n console.warn(\"Proofs with the NONE nullifier type cannot carry a unique identifier\")\n isCorrect = false\n }\n uniqueIdentifier = undefined\n } else if (uniqueIdentifier !== undefined && BigInt(uniqueIdentifier) === 0n) {\n uniqueIdentifier = undefined\n }\n\n if (\n verificationMethod === VerificationMethod.UIDAI_AADHAAR &&\n !sortedProofs.some(\n (p) =>\n p.name?.startsWith(\"facematch\") ||\n (p.name?.startsWith(\"outer\") &&\n (!!p.committedInputs?.facematch || !!p.committedInputs?.facematch_evm)),\n )\n ) {\n console.warn(\"An Aadhaar proof must come with a face match against its photo\")\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n eq: {\n expected: \"A FaceMatch proof\",\n received: \"none\",\n message: \"An Aadhaar proof must come with a face match against its photo\",\n },\n }\n }\n if (\n verificationMethod === VerificationMethod.UIDAI_AADHAAR &&\n !isAadhaarNationalityConditionAllowed(originalQuery.nationality)\n ) {\n console.warn(\n \"An Aadhaar does not prove a nationality, so it can only pass an exclusion check\",\n )\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n eq: {\n expected: \"An ID that proves a nationality\",\n received: \"Aadhaar\",\n message:\n \"An Aadhaar does not prove a nationality, so it can only pass an exclusion check\",\n },\n }\n }\n // Proofs made before the scheme existed came from a chip\n const scheme = verificationMethod ?? VerificationMethod.ICAO_CHIP\n if (!isVerificationMethodAllowed(scheme, allowedVerificationMethods)) {\n console.warn(\"The service does not accept the verification method the ID was verified with\")\n isCorrect = false\n queryResultErrors.verification_method = {\n ...queryResultErrors.verification_method,\n eq: {\n expected: `Allowed credentials: ${allowedVerificationMethods.join(\", \")}`,\n received: `Verification method: ${scheme}`,\n message: \"The service does not accept the verification method the ID was verified with\",\n },\n }\n }\n return {\n isCorrect,\n uniqueIdentifier,\n uniqueIdentifierType,\n queryResultErrors,\n verificationMethod: scheme,\n }\n }\n\n /**\n * An attested ID proof carries its attestation's date, which must be recent: the face match\n * is at most 30 days old. The app reuses the proof, so it may be older than a disclosure proof's.\n */\n public static checkAttestedIdDate(attestedAt: Date | undefined) {\n let isCorrect = true\n const queryResultErrors: Partial<QueryResultErrors> = {}\n // A proof without a date is refused as not recent\n const age = attestedAt ? Date.now() - attestedAt.getTime() : Infinity\n if (age > ATTESTED_ID_PROOF_MAX_AGE_MS || -age > CURRENT_DATE_FUTURE_TOLERANCE_MS) {\n const message = \"The attested ID proof's date is not recent\"\n console.warn(message)\n isCorrect = false\n queryResultErrors.attested_id = {\n ...queryResultErrors.attested_id,\n date: {\n expected: `Within ${ATTESTED_ID_PROOF_MAX_AGE_MS / 1000} seconds of now`,\n received: attestedAt?.toISOString() ?? \"no date\",\n message,\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n /**\n * A Tier 2 outer proof's first parameter commitment is its base proof's device attestation, which\n * the circuit cannot judge: it must match the committed attestation, and that attestation must\n * be a genuine one for the scheme's platform.\n */\n public static async checkOuterDeviceAttestation(\n verificationMethod: VerificationMethod,\n committedInputs: ProofResult[\"committedInputs\"],\n attestationParamCommitment: bigint | undefined,\n isForEVM: boolean,\n ) {\n let isCorrect = true\n const queryResultErrors: Partial<QueryResultErrors> = {}\n const fail = (expected: string, received: string, message: string) => {\n console.warn(message)\n isCorrect = false\n queryResultErrors.attested_id = {\n ...queryResultErrors.attested_id,\n commitment: { expected, received, message },\n }\n }\n const android = verificationMethod === VerificationMethod.ATTESTED_CAPTURE_ANDROID\n if (!android && verificationMethod !== VerificationMethod.ATTESTED_CAPTURE_IOS) {\n fail(\n \"A camera read scheme\",\n String(verificationMethod),\n \"No circuit proves this verification method\",\n )\n return { isCorrect, queryResultErrors }\n }\n const key = android ? \"attested_id_android\" : \"attested_id_ios\"\n const committed = committedInputs?.[key] as AttestedIdCommittedInputs | undefined\n if (!committed) {\n fail(`Committed inputs for ${key}`, \"none\", \"The proof carries no device attestation\")\n return { isCorrect, queryResultErrors }\n }\n const commit = isForEVM ? getAttestedIdEvmParameterCommitment : getAttestedIdParameterCommitment\n const expected = await commit(\n BigInt(committed.rootKeyLeaf),\n committed.environment === \"development\" ? 0n : 1n,\n BigInt(committed.appIdHash),\n committed.mode === \"regular\" ? 1n : 2n,\n )\n if (attestationParamCommitment !== expected) {\n fail(\n `First parameter commitment: ${expected.toString()}`,\n `First parameter commitment: ${attestationParamCommitment?.toString()}`,\n \"The proof's device attestation does not match its committed parameters\",\n )\n }\n const parameters = this.checkAttestedIdParameters(committed, android)\n return {\n isCorrect: isCorrect && parameters.isCorrect,\n queryResultErrors: { ...queryResultErrors, ...parameters.queryResultErrors },\n }\n }\n\n /**\n * The attestation behind a Tier 2 base proof must come from a genuine ZKPassport build on a\n * real device, in the production attestation environment, with a strict face match: that\n * face match is the only thing binding a camera-read ID to its holder.\n */\n public static checkAttestedIdParameters(committed: AttestedIdCommittedInputs, android = false) {\n let isCorrect = true\n const queryResultErrors: Partial<QueryResultErrors> = {}\n const fail = (expected: string, received: string, message: string) => {\n console.warn(message)\n isCorrect = false\n queryResultErrors.attested_id = {\n ...queryResultErrors.attested_id,\n eq: { expected, received, message },\n }\n }\n // Each value must come from the platform the circuit is for, so iOS and Android ones can't mix\n const rootKeys = android\n ? [GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH, GOOGLE_APP_ATTEST_ECDSA_P384_ROOT_KEY_HASH]\n : [APPLE_APP_ATTEST_ROOT_KEY_HASH]\n if (!rootKeys.includes(committed.rootKeyLeaf)) {\n fail(rootKeys.join(\" or \"), committed.rootKeyLeaf, \"Invalid attested ID root key hash\")\n }\n const appIdHash = android ? ZKPASSPORT_ANDROID_APP_ID_HASH : ZKPASSPORT_IOS_APP_ID_HASH\n if (committed.appIdHash !== appIdHash) {\n fail(appIdHash, committed.appIdHash, \"Invalid attested ID app id hash\")\n }\n const integrityAnchors = android ? [GOOGLE_PLAY_INTEGRITY_PUBKEY_HASH] : [0n]\n if (!integrityAnchors.includes(BigInt(committed.integrityPubkeyHash))) {\n fail(\n integrityAnchors.join(\" or \"),\n committed.integrityPubkeyHash,\n \"Invalid attested ID integrity key\",\n )\n }\n if (!android && BigInt(committed.revocationRoot ?? 0) !== 0n) {\n fail(\"0\", committed.revocationRoot!, \"An iOS attested ID has no revocation root\")\n }\n if (committed.environment !== \"production\") {\n fail(\"production\", committed.environment, \"Invalid attested ID environment\")\n }\n if (committed.mode !== \"strict\") {\n fail(\"strict\", committed.mode, \"A Tier 2 ID requires a strict face match\")\n }\n return { isCorrect, queryResultErrors }\n }\n}\n","{\n \"abi\": [\n {\n \"type\": \"constructor\",\n \"inputs\": [\n { \"name\": \"_admin\", \"type\": \"address\", \"internalType\": \"address\" },\n { \"name\": \"_guardian\", \"type\": \"address\", \"internalType\": \"address\" },\n { \"name\": \"_rootRegistry\", \"type\": \"address\", \"internalType\": \"contract RootRegistry\" },\n { \"name\": \"_defaultOPRFPubKeyHash\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"addHelper\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n { \"name\": \"newHelper\", \"type\": \"address\", \"internalType\": \"address\" }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"addSubVerifier\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n { \"name\": \"subVerifier\", \"type\": \"address\", \"internalType\": \"contract SubVerifier\" }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"admin\",\n \"inputs\": [],\n \"outputs\": [{ \"name\": \"\", \"type\": \"address\", \"internalType\": \"address\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"config\",\n \"inputs\": [{ \"name\": \"key\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [{ \"name\": \"value\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"defaultOPRFPubKeyHash\",\n \"inputs\": [],\n \"outputs\": [{ \"name\": \"\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getHelper\",\n \"inputs\": [{ \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [{ \"name\": \"\", \"type\": \"address\", \"internalType\": \"address\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getSubVerifier\",\n \"inputs\": [{ \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [{ \"name\": \"\", \"type\": \"address\", \"internalType\": \"address\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"guardian\",\n \"inputs\": [],\n \"outputs\": [{ \"name\": \"\", \"type\": \"address\", \"internalType\": \"address\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"helperCount\",\n \"inputs\": [],\n \"outputs\": [{ \"name\": \"\", \"type\": \"uint256\", \"internalType\": \"uint256\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"helpers\",\n \"inputs\": [{ \"name\": \"\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [{ \"name\": \"\", \"type\": \"address\", \"internalType\": \"contract VerifierHelper\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pause\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"paused\",\n \"inputs\": [],\n \"outputs\": [{ \"name\": \"\", \"type\": \"bool\", \"internalType\": \"bool\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"removeHelper\",\n \"inputs\": [{ \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"removeSubVerifier\",\n \"inputs\": [{ \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"rootRegistry\",\n \"inputs\": [],\n \"outputs\": [{ \"name\": \"\", \"type\": \"address\", \"internalType\": \"contract RootRegistry\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setDefaultOPRFPubKeyHash\",\n \"inputs\": [{ \"name\": \"newHash\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setGuardian\",\n \"inputs\": [{ \"name\": \"newGuardian\", \"type\": \"address\", \"internalType\": \"address\" }],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"subverifierCount\",\n \"inputs\": [],\n \"outputs\": [{ \"name\": \"\", \"type\": \"uint256\", \"internalType\": \"uint256\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"subverifiers\",\n \"inputs\": [{ \"name\": \"\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [{ \"name\": \"\", \"type\": \"address\", \"internalType\": \"contract SubVerifier\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"transferAdmin\",\n \"inputs\": [{ \"name\": \"newAdmin\", \"type\": \"address\", \"internalType\": \"address\" }],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"unpause\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"updateConfig\",\n \"inputs\": [\n { \"name\": \"key\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n { \"name\": \"value\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"updateHelper\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n { \"name\": \"newHelper\", \"type\": \"address\", \"internalType\": \"address\" }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"updateSubVerifier\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n { \"name\": \"newSubVerifier\", \"type\": \"address\", \"internalType\": \"address\" }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"verify\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple\",\n \"internalType\": \"struct ProofVerificationParams\",\n \"components\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n {\n \"name\": \"proofVerificationData\",\n \"type\": \"tuple\",\n \"internalType\": \"struct ProofVerificationData\",\n \"components\": [\n { \"name\": \"vkeyHash\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n { \"name\": \"proof\", \"type\": \"bytes\", \"internalType\": \"bytes\" },\n { \"name\": \"publicInputs\", \"type\": \"bytes32[]\", \"internalType\": \"bytes32[]\" }\n ]\n },\n { \"name\": \"committedInputs\", \"type\": \"bytes\", \"internalType\": \"bytes\" },\n {\n \"name\": \"serviceConfig\",\n \"type\": \"tuple\",\n \"internalType\": \"struct ServiceConfig\",\n \"components\": [\n { \"name\": \"validityPeriodInSeconds\", \"type\": \"uint256\", \"internalType\": \"uint256\" },\n { \"name\": \"domain\", \"type\": \"string\", \"internalType\": \"string\" },\n { \"name\": \"scope\", \"type\": \"string\", \"internalType\": \"string\" },\n { \"name\": \"devMode\", \"type\": \"bool\", \"internalType\": \"bool\" }\n ]\n }\n ]\n }\n ],\n \"outputs\": [\n { \"name\": \"valid\", \"type\": \"bool\", \"internalType\": \"bool\" },\n { \"name\": \"uniqueIdentifier\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n { \"name\": \"helper\", \"type\": \"address\", \"internalType\": \"contract VerifierHelper\" }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"event\",\n \"name\": \"AdminUpdated\",\n \"inputs\": [\n { \"name\": \"oldAdmin\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" },\n { \"name\": \"newAdmin\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ConfigUpdated\",\n \"inputs\": [\n { \"name\": \"key\", \"type\": \"bytes32\", \"indexed\": true, \"internalType\": \"bytes32\" },\n { \"name\": \"oldValue\", \"type\": \"bytes32\", \"indexed\": false, \"internalType\": \"bytes32\" },\n { \"name\": \"newValue\", \"type\": \"bytes32\", \"indexed\": false, \"internalType\": \"bytes32\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"DefaultOPRFPubKeyHashUpdated\",\n \"inputs\": [\n { \"name\": \"oldHash\", \"type\": \"bytes32\", \"indexed\": false, \"internalType\": \"bytes32\" },\n { \"name\": \"newHash\", \"type\": \"bytes32\", \"indexed\": false, \"internalType\": \"bytes32\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"GuardianUpdated\",\n \"inputs\": [\n { \"name\": \"oldGuardian\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" },\n { \"name\": \"newGuardian\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"HelperAdded\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true, \"internalType\": \"bytes32\" },\n { \"name\": \"helper\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"HelperRemoved\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true, \"internalType\": \"bytes32\" },\n { \"name\": \"helper\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"HelperUpdated\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true, \"internalType\": \"bytes32\" },\n { \"name\": \"oldHelper\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" },\n { \"name\": \"newHelper\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PausedStatusChanged\",\n \"inputs\": [{ \"name\": \"paused\", \"type\": \"bool\", \"indexed\": false, \"internalType\": \"bool\" }],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RootRegistryUpdated\",\n \"inputs\": [\n {\n \"name\": \"oldRootRegistry\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n { \"name\": \"newRootRegistry\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RootVerifierDeployed\",\n \"inputs\": [\n { \"name\": \"admin\", \"type\": \"address\", \"indexed\": false, \"internalType\": \"address\" },\n { \"name\": \"guardian\", \"type\": \"address\", \"indexed\": false, \"internalType\": \"address\" },\n { \"name\": \"rootRegistry\", \"type\": \"address\", \"indexed\": false, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SubVerifierAdded\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true, \"internalType\": \"bytes32\" },\n { \"name\": \"subVerifier\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SubVerifierRemoved\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true, \"internalType\": \"bytes32\" },\n { \"name\": \"subVerifier\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SubVerifierUpdated\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true, \"internalType\": \"bytes32\" },\n { \"name\": \"oldSubVerifier\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" },\n { \"name\": \"newSubVerifier\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n }\n ],\n \"bytecode\": {\n \"object\": \"0x608060405234801561000f575f5ffd5b506040516115cd3803806115cd83398101604081905261002e91610164565b6001600160a01b0384166100885760405162461bcd60e51b815260206004820152601c60248201527f41646d696e2063616e6e6f74206265207a65726f206164647265737300000000604482015260640160405180910390fd5b5f80546001600160a01b038681166001600160a01b03199283168117909355600180548783169084168117909155600280549287169290931682179092556008849055604080519384526020840192909252908201527f49958336430bdf59d989fb74186fd9ed78af011655d4ffe62fa2fbe5193edbda9060600160405180910390a1604080515f8152602081018390527f748956aa23d31e349f0a88960f2feb833a49a731af392d67a35563ca96249fb6910160405180910390a1505050506101b4565b6001600160a01b0381168114610161575f5ffd5b50565b5f5f5f5f60808587031215610177575f5ffd5b84516101828161014d565b60208601519094506101938161014d565b60408601519093506101a48161014d565b6060959095015193969295505050565b61140c806101c15f395ff3fe608060405234801561000f575f5ffd5b506004361061016d575f3560e01c80638988afbd116100d9578063b96b161c11610093578063cc718f761161006e578063cc718f7614610379578063da0ff2c614610398578063f2649807146103a1578063f851a440146103c9575f5ffd5b8063b96b161c1461034a578063ba5f3f9d1461035d578063c961ba7e14610370575f5ffd5b80638988afbd1461029d5780638a0dac4a146102d65780639bfefbfd146102e9578063a7ad58bf146102fc578063b3c83d9914610324578063b950506d14610337575f5ffd5b80635dd41f2f1161012a5780635dd41f2f1461021d57806366b4dfc4146102455780636f9076381461025c57806375829def1461026f5780638456cb5914610282578063889eba3b1461028a575f5ffd5b806307915439146101715780633f4ba83a14610186578063452a93201461018e578063492f34fb146101be57806352741df5146101e65780635c975abb146101f9575b5f5ffd5b61018461017f366004610f9f565b6103db565b005b6101846104e0565b6001546101a1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101a16101cc366004610fcd565b60036020525f90815260409020546001600160a01b031681565b6101846101f4366004610f9f565b61054c565b60015461020d90600160a01b900460ff1681565b60405190151581526020016101b5565b6101a161022b366004610fcd565b5f908152600560205260409020546001600160a01b031690565b61024e60085481565b6040519081526020016101b5565b61018461026a366004610fcd565b6106c8565b61018461027d366004610fe4565b6107a9565b610184610877565b610184610298366004611006565b610937565b6102b06102ab366004611026565b6109b5565b60408051931515845260208401929092526001600160a01b0316908201526060016101b5565b6101846102e4366004610fe4565b610ae2565b6101846102f7366004610fcd565b610b5c565b6101a161030a366004610fcd565b60056020525f90815260409020546001600160a01b031681565b610184610332366004610f9f565b610c6d565b610184610345366004610fcd565b610dbe565b6002546101a1906001600160a01b031681565b61018461036b366004610f9f565b610e2c565b61024e60045481565b61024e610387366004610fcd565b60076020525f908152604090205481565b61024e60065481565b6101a16103af366004610fcd565b5f908152600360205260409020546001600160a01b031690565b5f546101a1906001600160a01b031681565b5f546001600160a01b0316331461040d5760405162461bcd60e51b81526004016104049061105d565b60405180910390fd5b8161042a5760405162461bcd60e51b815260040161040490611094565b6001600160a01b0381166104505760405162461bcd60e51b8152600401610404906110c4565b5f828152600360205260409020546001600160a01b03166104835760405162461bcd60e51b815260040161040490611106565b5f8281526003602052604080822080546001600160a01b031981166001600160a01b038681169182179093559251911692839186917fa643a1aa11f9709b2990b31638a0b368d6d0c3b8f025a98a3249fea2bd5821d791a4505050565b5f546001600160a01b031633146105095760405162461bcd60e51b81526004016104049061105d565b6001805460ff60a01b191690556040515f81527f9a506b30e47f3823b09f67e4c0dfa5c3d8023b71825b7ceaa97677129128c9c5906020015b60405180910390a1565b5f546001600160a01b031633146105755760405162461bcd60e51b81526004016104049061105d565b6001600160a01b0381166105cb5760405162461bcd60e51b815260206004820152601d60248201527f48656c7065722063616e6e6f74206265207a65726f20616464726573730000006044820152606401610404565b816105e85760405162461bcd60e51b815260040161040490611094565b5f828152600560205260409020546001600160a01b0316156106565760405162461bcd60e51b815260206004820152602160248201527f48656c70657220616c72656164792065786973747320666f722076657273696f6044820152603760f91b6064820152608401610404565b5f82815260056020526040812080546001600160a01b0319166001600160a01b038416179055600680549161068a8361115b565b90915550506040516001600160a01b0382169083907fe3eccbb854b4a5c161cda43f1e76981a22f8c4a4190a1e1b44bb8c69039b85b2905f90a35050565b5f546001600160a01b031633146106f15760405162461bcd60e51b81526004016104049061105d565b8061070e5760405162461bcd60e51b815260040161040490611094565b5f818152600360205260409020546001600160a01b0316806107425760405162461bcd60e51b815260040161040490611106565b5f82815260036020526040812080546001600160a01b0319169055600480549161076b83611173565b90915550506040516001600160a01b0382169083907f2632c7adc4cecbf41bb3ee7c156aae99b0bcd9da3efa5b9315f77dcdf6ef3e66905f90a35050565b5f546001600160a01b031633146107d25760405162461bcd60e51b81526004016104049061105d565b6001600160a01b0381166108285760405162461bcd60e51b815260206004820152601c60248201527f41646d696e2063616e6e6f74206265207a65726f2061646472657373000000006044820152606401610404565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f101b8081ff3b56bbf45deb824d86a3b0fd38b7e3dd42421105cf8abe9106db0b9190a35050565b5f546001600160a01b031633148061089957506001546001600160a01b031633145b6108f45760405162461bcd60e51b815260206004820152602660248201527f4e6f7420617574686f72697a65643a2061646d696e206f7220677561726469616044820152656e206f6e6c7960d01b6064820152608401610404565b6001805460ff60a01b1916600160a01b1781556040519081527f9a506b30e47f3823b09f67e4c0dfa5c3d8023b71825b7ceaa97677129128c9c590602001610542565b5f546001600160a01b031633146109605760405162461bcd60e51b81526004016104049061105d565b5f8281526007602090815260409182902080549084905582518181529182018490529184917fbb4f63ec43349b7ec7c292d3e97704824bcdd2d758200521ad62d3e9a127f782910160405180910390a2505050565b5f5f5f600160149054906101000a900460ff1615610a155760405162461bcd60e51b815260206004820152601760248201527f526f6f74207665726966696572206973207061757365640000000000000000006044820152606401610404565b83355f908152600360205260409020546001600160a01b031680610a4b5760405162461bcd60e51b815260040161040490611106565b60025460405163bffd4b5160e01b81526001600160a01b038381169263bffd4b5192610a7f92909116908990600401611298565b6040805180830381865afa158015610a99573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610abd91906113d3565b95355f9081526005602052604090205490966001600160a01b03909116945092505050565b5f546001600160a01b03163314610b0b5760405162461bcd60e51b81526004016104049061105d565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f064d28d3d3071c5cbc271a261c10c2f0f0d9e319390397101aa0eb23c6bad909905f90a35050565b5f546001600160a01b03163314610b855760405162461bcd60e51b81526004016104049061105d565b80610ba25760405162461bcd60e51b815260040161040490611094565b5f818152600560205260409020546001600160a01b031680610c065760405162461bcd60e51b815260206004820152601c60248201527f48656c706572206e6f7420666f756e6420666f722076657273696f6e000000006044820152606401610404565b5f82815260056020526040812080546001600160a01b03191690556006805491610c2f83611173565b90915550506040516001600160a01b0382169083907f6a7d5ce7bf32942d5ee1a06318777e6921ab7173478635304ac93845d7de61e0905f90a35050565b5f546001600160a01b03163314610c965760405162461bcd60e51b81526004016104049061105d565b6001600160a01b038116610cbc5760405162461bcd60e51b8152600401610404906110c4565b81610cd95760405162461bcd60e51b815260040161040490611094565b5f828152600360205260409020546001600160a01b031615610d4c5760405162461bcd60e51b815260206004820152602660248201527f537562766572696669657220616c72656164792065786973747320666f72207660448201526532b939b4b7b760d11b6064820152608401610404565b5f82815260036020526040812080546001600160a01b0319166001600160a01b0384161790556004805491610d808361115b565b90915550506040516001600160a01b0382169083907fa65f9939af3939f730447054d525d5526c5f9e75ccea14966e1de1876631f404905f90a35050565b5f546001600160a01b03163314610de75760405162461bcd60e51b81526004016104049061105d565b600880549082905560408051828152602081018490527f748956aa23d31e349f0a88960f2feb833a49a731af392d67a35563ca96249fb6910160405180910390a15050565b5f546001600160a01b03163314610e555760405162461bcd60e51b81526004016104049061105d565b81610e725760405162461bcd60e51b815260040161040490611094565b6001600160a01b038116610ec85760405162461bcd60e51b815260206004820152601d60248201527f48656c7065722063616e6e6f74206265207a65726f20616464726573730000006044820152606401610404565b5f828152600560205260409020546001600160a01b0316610f2b5760405162461bcd60e51b815260206004820152601c60248201527f48656c706572206e6f7420666f756e6420666f722076657273696f6e000000006044820152606401610404565b5f8281526005602052604080822080546001600160a01b031981166001600160a01b038681169182179093559251911692839186917fb9393e6de8fe36cc235a7d08d2fa004db98bbb2a2be241250df83a276bc0d62e91a4505050565b6001600160a01b0381168114610f9c575f5ffd5b50565b5f5f60408385031215610fb0575f5ffd5b823591506020830135610fc281610f88565b809150509250929050565b5f60208284031215610fdd575f5ffd5b5035919050565b5f60208284031215610ff4575f5ffd5b8135610fff81610f88565b9392505050565b5f5f60408385031215611017575f5ffd5b50508035926020909101359150565b5f60208284031215611036575f5ffd5b813567ffffffffffffffff81111561104c575f5ffd5b820160808185031215610fff575f5ffd5b6020808252601a908201527f4e6f7420617574686f72697a65643a2061646d696e206f6e6c79000000000000604082015260600190565b60208082526016908201527556657273696f6e2063616e6e6f74206265207a65726f60501b604082015260600190565b60208082526022908201527f53756276657269666965722063616e6e6f74206265207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526021908201527f5375627665726966696572206e6f7420666f756e6420666f722076657273696f6040820152603760f91b606082015260800190565b634e487b7160e01b5f52601160045260245ffd5b5f6001820161116c5761116c611147565b5060010190565b5f8161118157611181611147565b505f190190565b5f5f8335601e1984360301811261119d575f5ffd5b830160208101925035905067ffffffffffffffff8111156111bc575f5ffd5b8036038213156111ca575f5ffd5b9250929050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8235609e1983360301811261120d575f5ffd5b90910192915050565b8015158114610f9c575f5ffd5b803582525f6112356020830183611188565b60a0602086015261124a60a0860182846111d1565b91505061125a6040840184611188565b858303604087015261126d8382846111d1565b92505050606083013561127f81611216565b1515606085015260809283013592909301919091525090565b6001600160a01b0383168152604060208083018290528335918301919091525f9083013536849003605e190181126112ce575f5ffd5b608060608401528301803560c08401526112eb6020820182611188565b606060e0860152611301610120860182846111d1565b9150506040820135601e1983360301811261131a575f5ffd5b60209201918201913567ffffffffffffffff811115611337575f5ffd5b8060051b803603841315611349575f5ffd5b85830360bf19016101008701528183526001600160fb1b0382111561136c575f5ffd5b8084602085013780830193505050506113886040850185611188565b601f198584030160808601526113a26020840182846111d1565b925050506113b360608501856111f9565b838203603f190160a08501526113c98282611223565b9695505050505050565b5f5f604083850312156113e4575f5ffd5b82516113ef81611216565b602093909301519294929350505056fea164736f6c634300081e000a\",\n \"sourceMap\": \"659:10373:26:-:0;;;2704:488;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;2829:20:26;;2821:61;;;;-1:-1:-1;;;2821:61:26;;960:2:36;2821:61:26;;;942:21:36;999:2;979:18;;;972:30;1038;1018:18;;;1011:58;1086:18;;2821:61:26;;;;;;;;2892:5;:14;;-1:-1:-1;;;;;2892:14:26;;;-1:-1:-1;;;;;;2892:14:26;;;;;;;;-1:-1:-1;2916:20:26;;;;;;;;;;;;;2946:12;:28;;;;;;;;;;;;;;2984:21;:46;;;3045:61;;;1317:51:36;;;1399:2;1384:18;;1377:60;;;;1453:18;;;1446:60;3045:61:26;;1305:2:36;1290:18;3045:61:26;;;;;;;3121:64;;;3158:1;1691:25:36;;1747:2;1732:18;;1725:34;;;3121:64:26;;1664:18:36;3121:64:26;;;;;;;2704:488;;;;659:10373;;14:131:36;-1:-1:-1;;;;;89:31:36;;79:42;;69:70;;135:1;132;125:12;69:70;14:131;:::o;150:603::-;269:6;277;285;293;346:3;334:9;325:7;321:23;317:33;314:53;;;363:1;360;353:12;314:53;395:9;389:16;414:31;439:5;414:31;:::i;:::-;514:2;499:18;;493:25;464:5;;-1:-1:-1;527:33:36;493:25;527:33;:::i;:::-;631:2;616:18;;610:25;579:7;;-1:-1:-1;644:33:36;610:25;644:33;:::i;:::-;743:2;728:18;;;;722:25;150:603;;;;-1:-1:-1;;;150:603:36:o;1517:248::-;659:10373:26;;;;;;\",\n \"linkReferences\": {}\n },\n \"deployedBytecode\": {\n \"object\": \"0x608060405234801561000f575f5ffd5b506004361061016d575f3560e01c80638988afbd116100d9578063b96b161c11610093578063cc718f761161006e578063cc718f7614610379578063da0ff2c614610398578063f2649807146103a1578063f851a440146103c9575f5ffd5b8063b96b161c1461034a578063ba5f3f9d1461035d578063c961ba7e14610370575f5ffd5b80638988afbd1461029d5780638a0dac4a146102d65780639bfefbfd146102e9578063a7ad58bf146102fc578063b3c83d9914610324578063b950506d14610337575f5ffd5b80635dd41f2f1161012a5780635dd41f2f1461021d57806366b4dfc4146102455780636f9076381461025c57806375829def1461026f5780638456cb5914610282578063889eba3b1461028a575f5ffd5b806307915439146101715780633f4ba83a14610186578063452a93201461018e578063492f34fb146101be57806352741df5146101e65780635c975abb146101f9575b5f5ffd5b61018461017f366004610f9f565b6103db565b005b6101846104e0565b6001546101a1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101a16101cc366004610fcd565b60036020525f90815260409020546001600160a01b031681565b6101846101f4366004610f9f565b61054c565b60015461020d90600160a01b900460ff1681565b60405190151581526020016101b5565b6101a161022b366004610fcd565b5f908152600560205260409020546001600160a01b031690565b61024e60085481565b6040519081526020016101b5565b61018461026a366004610fcd565b6106c8565b61018461027d366004610fe4565b6107a9565b610184610877565b610184610298366004611006565b610937565b6102b06102ab366004611026565b6109b5565b60408051931515845260208401929092526001600160a01b0316908201526060016101b5565b6101846102e4366004610fe4565b610ae2565b6101846102f7366004610fcd565b610b5c565b6101a161030a366004610fcd565b60056020525f90815260409020546001600160a01b031681565b610184610332366004610f9f565b610c6d565b610184610345366004610fcd565b610dbe565b6002546101a1906001600160a01b031681565b61018461036b366004610f9f565b610e2c565b61024e60045481565b61024e610387366004610fcd565b60076020525f908152604090205481565b61024e60065481565b6101a16103af366004610fcd565b5f908152600360205260409020546001600160a01b031690565b5f546101a1906001600160a01b031681565b5f546001600160a01b0316331461040d5760405162461bcd60e51b81526004016104049061105d565b60405180910390fd5b8161042a5760405162461bcd60e51b815260040161040490611094565b6001600160a01b0381166104505760405162461bcd60e51b8152600401610404906110c4565b5f828152600360205260409020546001600160a01b03166104835760405162461bcd60e51b815260040161040490611106565b5f8281526003602052604080822080546001600160a01b031981166001600160a01b038681169182179093559251911692839186917fa643a1aa11f9709b2990b31638a0b368d6d0c3b8f025a98a3249fea2bd5821d791a4505050565b5f546001600160a01b031633146105095760405162461bcd60e51b81526004016104049061105d565b6001805460ff60a01b191690556040515f81527f9a506b30e47f3823b09f67e4c0dfa5c3d8023b71825b7ceaa97677129128c9c5906020015b60405180910390a1565b5f546001600160a01b031633146105755760405162461bcd60e51b81526004016104049061105d565b6001600160a01b0381166105cb5760405162461bcd60e51b815260206004820152601d60248201527f48656c7065722063616e6e6f74206265207a65726f20616464726573730000006044820152606401610404565b816105e85760405162461bcd60e51b815260040161040490611094565b5f828152600560205260409020546001600160a01b0316156106565760405162461bcd60e51b815260206004820152602160248201527f48656c70657220616c72656164792065786973747320666f722076657273696f6044820152603760f91b6064820152608401610404565b5f82815260056020526040812080546001600160a01b0319166001600160a01b038416179055600680549161068a8361115b565b90915550506040516001600160a01b0382169083907fe3eccbb854b4a5c161cda43f1e76981a22f8c4a4190a1e1b44bb8c69039b85b2905f90a35050565b5f546001600160a01b031633146106f15760405162461bcd60e51b81526004016104049061105d565b8061070e5760405162461bcd60e51b815260040161040490611094565b5f818152600360205260409020546001600160a01b0316806107425760405162461bcd60e51b815260040161040490611106565b5f82815260036020526040812080546001600160a01b0319169055600480549161076b83611173565b90915550506040516001600160a01b0382169083907f2632c7adc4cecbf41bb3ee7c156aae99b0bcd9da3efa5b9315f77dcdf6ef3e66905f90a35050565b5f546001600160a01b031633146107d25760405162461bcd60e51b81526004016104049061105d565b6001600160a01b0381166108285760405162461bcd60e51b815260206004820152601c60248201527f41646d696e2063616e6e6f74206265207a65726f2061646472657373000000006044820152606401610404565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f101b8081ff3b56bbf45deb824d86a3b0fd38b7e3dd42421105cf8abe9106db0b9190a35050565b5f546001600160a01b031633148061089957506001546001600160a01b031633145b6108f45760405162461bcd60e51b815260206004820152602660248201527f4e6f7420617574686f72697a65643a2061646d696e206f7220677561726469616044820152656e206f6e6c7960d01b6064820152608401610404565b6001805460ff60a01b1916600160a01b1781556040519081527f9a506b30e47f3823b09f67e4c0dfa5c3d8023b71825b7ceaa97677129128c9c590602001610542565b5f546001600160a01b031633146109605760405162461bcd60e51b81526004016104049061105d565b5f8281526007602090815260409182902080549084905582518181529182018490529184917fbb4f63ec43349b7ec7c292d3e97704824bcdd2d758200521ad62d3e9a127f782910160405180910390a2505050565b5f5f5f600160149054906101000a900460ff1615610a155760405162461bcd60e51b815260206004820152601760248201527f526f6f74207665726966696572206973207061757365640000000000000000006044820152606401610404565b83355f908152600360205260409020546001600160a01b031680610a4b5760405162461bcd60e51b815260040161040490611106565b60025460405163bffd4b5160e01b81526001600160a01b038381169263bffd4b5192610a7f92909116908990600401611298565b6040805180830381865afa158015610a99573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610abd91906113d3565b95355f9081526005602052604090205490966001600160a01b03909116945092505050565b5f546001600160a01b03163314610b0b5760405162461bcd60e51b81526004016104049061105d565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f064d28d3d3071c5cbc271a261c10c2f0f0d9e319390397101aa0eb23c6bad909905f90a35050565b5f546001600160a01b03163314610b855760405162461bcd60e51b81526004016104049061105d565b80610ba25760405162461bcd60e51b815260040161040490611094565b5f818152600560205260409020546001600160a01b031680610c065760405162461bcd60e51b815260206004820152601c60248201527f48656c706572206e6f7420666f756e6420666f722076657273696f6e000000006044820152606401610404565b5f82815260056020526040812080546001600160a01b03191690556006805491610c2f83611173565b90915550506040516001600160a01b0382169083907f6a7d5ce7bf32942d5ee1a06318777e6921ab7173478635304ac93845d7de61e0905f90a35050565b5f546001600160a01b03163314610c965760405162461bcd60e51b81526004016104049061105d565b6001600160a01b038116610cbc5760405162461bcd60e51b8152600401610404906110c4565b81610cd95760405162461bcd60e51b815260040161040490611094565b5f828152600360205260409020546001600160a01b031615610d4c5760405162461bcd60e51b815260206004820152602660248201527f537562766572696669657220616c72656164792065786973747320666f72207660448201526532b939b4b7b760d11b6064820152608401610404565b5f82815260036020526040812080546001600160a01b0319166001600160a01b0384161790556004805491610d808361115b565b90915550506040516001600160a01b0382169083907fa65f9939af3939f730447054d525d5526c5f9e75ccea14966e1de1876631f404905f90a35050565b5f546001600160a01b03163314610de75760405162461bcd60e51b81526004016104049061105d565b600880549082905560408051828152602081018490527f748956aa23d31e349f0a88960f2feb833a49a731af392d67a35563ca96249fb6910160405180910390a15050565b5f546001600160a01b03163314610e555760405162461bcd60e51b81526004016104049061105d565b81610e725760405162461bcd60e51b815260040161040490611094565b6001600160a01b038116610ec85760405162461bcd60e51b815260206004820152601d60248201527f48656c7065722063616e6e6f74206265207a65726f20616464726573730000006044820152606401610404565b5f828152600560205260409020546001600160a01b0316610f2b5760405162461bcd60e51b815260206004820152601c60248201527f48656c706572206e6f7420666f756e6420666f722076657273696f6e000000006044820152606401610404565b5f8281526005602052604080822080546001600160a01b031981166001600160a01b038681169182179093559251911692839186917fb9393e6de8fe36cc235a7d08d2fa004db98bbb2a2be241250df83a276bc0d62e91a4505050565b6001600160a01b0381168114610f9c575f5ffd5b50565b5f5f60408385031215610fb0575f5ffd5b823591506020830135610fc281610f88565b809150509250929050565b5f60208284031215610fdd575f5ffd5b5035919050565b5f60208284031215610ff4575f5ffd5b8135610fff81610f88565b9392505050565b5f5f60408385031215611017575f5ffd5b50508035926020909101359150565b5f60208284031215611036575f5ffd5b813567ffffffffffffffff81111561104c575f5ffd5b820160808185031215610fff575f5ffd5b6020808252601a908201527f4e6f7420617574686f72697a65643a2061646d696e206f6e6c79000000000000604082015260600190565b60208082526016908201527556657273696f6e2063616e6e6f74206265207a65726f60501b604082015260600190565b60208082526022908201527f53756276657269666965722063616e6e6f74206265207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526021908201527f5375627665726966696572206e6f7420666f756e6420666f722076657273696f6040820152603760f91b606082015260800190565b634e487b7160e01b5f52601160045260245ffd5b5f6001820161116c5761116c611147565b5060010190565b5f8161118157611181611147565b505f190190565b5f5f8335601e1984360301811261119d575f5ffd5b830160208101925035905067ffffffffffffffff8111156111bc575f5ffd5b8036038213156111ca575f5ffd5b9250929050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8235609e1983360301811261120d575f5ffd5b90910192915050565b8015158114610f9c575f5ffd5b803582525f6112356020830183611188565b60a0602086015261124a60a0860182846111d1565b91505061125a6040840184611188565b858303604087015261126d8382846111d1565b92505050606083013561127f81611216565b1515606085015260809283013592909301919091525090565b6001600160a01b0383168152604060208083018290528335918301919091525f9083013536849003605e190181126112ce575f5ffd5b608060608401528301803560c08401526112eb6020820182611188565b606060e0860152611301610120860182846111d1565b9150506040820135601e1983360301811261131a575f5ffd5b60209201918201913567ffffffffffffffff811115611337575f5ffd5b8060051b803603841315611349575f5ffd5b85830360bf19016101008701528183526001600160fb1b0382111561136c575f5ffd5b8084602085013780830193505050506113886040850185611188565b601f198584030160808601526113a26020840182846111d1565b925050506113b360608501856111f9565b838203603f190160a08501526113c98282611223565b9695505050505050565b5f5f604083850312156113e4575f5ffd5b82516113ef81611216565b602093909301519294929350505056fea164736f6c634300081e000a\",\n \"sourceMap\": \"659:10373:26:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6648:545;;;;;;:::i;:::-;;:::i;:::-;;10920:110;;;:::i;713:23::-;;;;;-1:-1:-1;;;;;713:23:26;;;;;;-1:-1:-1;;;;;686:32:36;;;668:51;;656:2;641:18;713:23:26;;;;;;;;865:51;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;865:51:26;;;7788:440;;;;;;:::i;:::-;;:::i;742:18::-;;;;;-1:-1:-1;;;742:18:26;;;;;;;;;1355:14:36;;1348:22;1330:41;;1318:2;1303:18;742::26;1190:187:36;9648:117:26;;;;;;:::i;:::-;9707:7;9741:16;;;:7;:16;;;;;;-1:-1:-1;;;;;9741:16:26;;9648:117;1305:36;;;;;;;;;1528:25:36;;;1516:2;1501:18;1305:36:26;1382:177:36;6057:400:26;;;;;;:::i;:::-;;:::i;4689:247::-;;;;;;:::i;:::-;;:::i;10688:116::-;;;:::i;9894:195::-;;;;;;:::i;:::-;;:::i;3692:497::-;;;;;;:::i;:::-;;:::i;:::-;;;;2821:14:36;;2814:22;2796:41;;2868:2;2853:18;;2846:34;;;;-1:-1:-1;;;;;2916:32:36;2896:18;;;2889:60;2784:2;2769:18;3692:497:26;2576:379:36;5064:196:26;;;;;;:::i;:::-;;:::i;8350:355::-;;;;;;:::i;:::-;;:::i;1028:49::-;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;1028:49:26;;;5441:489;;;;;;:::i;:::-;;:::i;10225:228::-;;;;;;:::i;:::-;;:::i;799:32::-;;;;;-1:-1:-1;;;;;799:32:26;;;8881:483;;;;;;:::i;:::-;;:::i;968:31::-;;;;;;1179:51;;;;;;:::i;:::-;;;;;;;;;;;;;;1124:26;;;;;;7492:127;;;;;;:::i;:::-;7556:7;7590:21;;;:12;:21;;;;;;-1:-1:-1;;;;;7590:21:26;;7492:127;687:20;;;;;-1:-1:-1;;;;;687:20:26;;;6648:545;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;;;;;;;;;6753:7;6745:56:::1;;;;-1:-1:-1::0;;;6745:56:26::1;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;6819:28:26;::::1;6811:75;;;;-1:-1:-1::0;;;6811:75:26::1;;;;;;;:::i;:::-;6946:1;6912:21:::0;;;:12:::1;:21;::::0;;;;;-1:-1:-1;;;;;6912:21:26::1;6896:90;;;;-1:-1:-1::0;;;6896:90:26::1;;;;;;;:::i;:::-;6996:22;7029:21:::0;;;:12:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;;7061:51:26;::::1;-1:-1:-1::0;;;;;7061:51:26;;::::1;::::0;;::::1;::::0;;;7127:59;;7029:21;::::1;::::0;;;;;7127:59:::1;::::0;::::1;6735:458;6648:545:::0;;:::o;10920:110::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;10968:6:::1;:14:::0;;-1:-1:-1;;;;10968:14:26::1;::::0;;10997:26:::1;::::0;-1:-1:-1;1330:41:36;;10997:26:26::1;::::0;1318:2:36;1303:18;10997:26:26::1;;;;;;;;10920:110::o:0;7788:440::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;-1:-1:-1;;;;;7880:23:26;::::1;7872:65;;;::::0;-1:-1:-1;;;7872:65:26;;5710:2:36;7872:65:26::1;::::0;::::1;5692:21:36::0;5749:2;5729:18;;;5722:30;5788:31;5768:18;;;5761:59;5837:18;;7872:65:26::1;5508:353:36::0;7872:65:26::1;7955:7:::0;7947:56:::1;;;;-1:-1:-1::0;;;7947:56:26::1;;;;;;;:::i;:::-;8058:1;8029:16:::0;;;:7:::1;:16;::::0;;;;;-1:-1:-1;;;;;8029:16:26::1;8021:39:::0;8013:85:::1;;;::::0;-1:-1:-1;;;8013:85:26;;6068:2:36;8013:85:26::1;::::0;::::1;6050:21:36::0;6107:2;6087:18;;;6080:30;6146:34;6126:18;;;6119:62;-1:-1:-1;;;6197:18:36;;;6190:31;6238:19;;8013:85:26::1;5866:397:36::0;8013:85:26::1;8108:16;::::0;;;:7:::1;:16;::::0;;;;:44;;-1:-1:-1;;;;;;8108:44:26::1;-1:-1:-1::0;;;;;8108:44:26;::::1;;::::0;;8162:11:::1;:13:::0;;;::::1;::::0;::::1;:::i;:::-;::::0;;;-1:-1:-1;;8190:31:26::1;::::0;-1:-1:-1;;;;;8190:31:26;::::1;::::0;8202:7;;8190:31:::1;::::0;;;::::1;7788:440:::0;;:::o;6057:400::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;6138:7;6130:56:::1;;;;-1:-1:-1::0;;;6130:56:26::1;;;;;;;:::i;:::-;6196:19;6226:21:::0;;;:12:::1;:21;::::0;;;;;-1:-1:-1;;;;;6226:21:26::1;::::0;6258:71:::1;;;;-1:-1:-1::0;;;6258:71:26::1;;;;;;;:::i;:::-;6346:21;::::0;;;:12:::1;:21;::::0;;;;6339:28;;-1:-1:-1;;;;;;6339:28:26::1;::::0;;6377:16:::1;:18:::0;;;::::1;::::0;::::1;:::i;:::-;::::0;;;-1:-1:-1;;6410:40:26::1;::::0;-1:-1:-1;;;;;6410:40:26;::::1;::::0;6429:7;;6410:40:::1;::::0;;;::::1;6120:337;6057:400:::0;:::o;4689:247::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;-1:-1:-1;;;;;4767:22:26;::::1;4759:63;;;::::0;-1:-1:-1;;;4759:63:26;;6883:2:36;4759:63:26::1;::::0;::::1;6865:21:36::0;6922:2;6902:18;;;6895:30;6961;6941:18;;;6934:58;7009:18;;4759:63:26::1;6681:352:36::0;4759:63:26::1;4832:16;4851:5:::0;;-1:-1:-1;;;;;4866:16:26;;::::1;-1:-1:-1::0;;;;;;4866:16:26;::::1;::::0;::::1;::::0;;4897:32:::1;::::0;4851:5;;;::::1;::::0;;;4897:32:::1;::::0;4832:16;4897:32:::1;4749:187;4689:247:::0;:::o;10688:116::-;4371:5;;-1:-1:-1;;;;;4371:5:26;4357:10;:19;;:45;;-1:-1:-1;4394:8:26;;-1:-1:-1;;;;;4394:8:26;4380:10;:22;4357:45;4349:96;;;;-1:-1:-1;;;4349:96:26;;7240:2:36;4349:96:26;;;7222:21:36;7279:2;7259:18;;;7252:30;7318:34;7298:18;;;7291:62;-1:-1:-1;;;7369:18:36;;;7362:36;7415:19;;4349:96:26;7038:402:36;4349:96:26;10753:4:::1;10744:13:::0;;-1:-1:-1;;;;10744:13:26::1;-1:-1:-1::0;;;10744:13:26::1;::::0;;10772:25:::1;::::0;1330:41:36;;;10772:25:26::1;::::0;1318:2:36;1303:18;10772:25:26::1;1190:187:36::0;9894:195:26;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;9973:16:::1;9992:11:::0;;;:6:::1;:11;::::0;;;;;;;;;;10013:19;;;;10047:35;;7619:25:36;;;7660:18;;;7653:34;;;9992:11:26;;;10047:35:::1;::::0;7592:18:36;10047:35:26::1;;;;;;;9963:126;9894:195:::0;;:::o;3692:497::-;3818:10;3830:24;3856:21;4513:6;;;;;;;;;;;4512:7;4504:43;;;;-1:-1:-1;;;4504:43:26;;7900:2:36;4504:43:26;;;7882:21:36;7939:2;7919:18;;;7912:30;7978:25;7958:18;;;7951:53;8021:18;;4504:43:26;7698:347:36;4504:43:26;3932:14;::::1;3893:23;3919:28:::0;;;:12:::1;:28;::::0;;;;;-1:-1:-1;;;;;3919:28:26::1;::::0;3957:80:::1;;;;-1:-1:-1::0;;;3957:80:26::1;;;;;;;:::i;:::-;4094:12;::::0;4075:40:::1;::::0;-1:-1:-1;;;4075:40:26;;-1:-1:-1;;;;;4075:18:26;;::::1;::::0;::::1;::::0;:40:::1;::::0;4094:12;;::::1;::::0;4108:6;;4075:40:::1;;;:::i;:::-;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4166:14:::0;::::1;4158:23;::::0;;;:7:::1;:23;::::0;;;;;4047:68;;-1:-1:-1;;;;;4158:23:26;;::::1;::::0;-1:-1:-1;3692:497:26;-1:-1:-1;;;3692:497:26:o;5064:196::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;5157:8:::1;::::0;;-1:-1:-1;;;;;5175:22:26;;::::1;-1:-1:-1::0;;;;;;5175:22:26;::::1;::::0;::::1;::::0;;;5212:41:::1;::::0;5157:8;::::1;::::0;5175:22;5157:8;;5212:41:::1;::::0;5135:19:::1;::::0;5212:41:::1;5125:135;5064:196:::0;:::o;8350:355::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;8426:7;8418:56:::1;;;;-1:-1:-1::0;;;8418:56:26::1;;;;;;;:::i;:::-;8484:14;8509:16:::0;;;:7:::1;:16;::::0;;;;;-1:-1:-1;;;;;8509:16:26::1;::::0;8536:61:::1;;;::::0;-1:-1:-1;;;8536:61:26;;12955:2:36;8536:61:26::1;::::0;::::1;12937:21:36::0;12994:2;12974:18;;;12967:30;13033;13013:18;;;13006:58;13081:18;;8536:61:26::1;12753:352:36::0;8536:61:26::1;8614:16;::::0;;;:7:::1;:16;::::0;;;;8607:23;;-1:-1:-1;;;;;;8607:23:26::1;::::0;;8640:11:::1;:13:::0;;;::::1;::::0;::::1;:::i;:::-;::::0;;;-1:-1:-1;;8668:30:26::1;::::0;-1:-1:-1;;;;;8668:30:26;::::1;::::0;8682:7;;8668:30:::1;::::0;;;::::1;8408:297;8350:355:::0;:::o;5441:489::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;-1:-1:-1;;;;;5544:34:26;::::1;5536:81;;;;-1:-1:-1::0;;;5536:81:26::1;;;;;;;:::i;:::-;5635:7:::0;5627:56:::1;;;;-1:-1:-1::0;;;5627:56:26::1;;;;;;;:::i;:::-;5743:1;5709:21:::0;;;:12:::1;:21;::::0;;;;;-1:-1:-1;;;;;5709:21:26::1;5701:44:::0;5693:95:::1;;;::::0;-1:-1:-1;;;5693:95:26;;13312:2:36;5693:95:26::1;::::0;::::1;13294:21:36::0;13351:2;13331:18;;;13324:30;13390:34;13370:18;;;13363:62;-1:-1:-1;;;13441:18:36;;;13434:36;13487:19;;5693:95:26::1;13110:402:36::0;5693:95:26::1;5798:21;::::0;;;:12:::1;:21;::::0;;;;:35;;-1:-1:-1;;;;;;5798:35:26::1;-1:-1:-1::0;;;;;5798:35:26;::::1;;::::0;;5843:16:::1;:18:::0;;;::::1;::::0;::::1;:::i;:::-;::::0;;;-1:-1:-1;;5876:47:26::1;::::0;-1:-1:-1;;;;;5876:47:26;::::1;::::0;5893:7;;5876:47:::1;::::0;;;::::1;5441:489:::0;;:::o;10225:228::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;10323:21:::1;::::0;;10354:31;;;;10400:46:::1;::::0;;7619:25:36;;;7675:2;7660:18;;7653:34;;;10400:46:26::1;::::0;7592:18:36;10400:46:26::1;;;;;;;10295:158;10225:228:::0;:::o;8881:483::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;8976:7;8968:56:::1;;;;-1:-1:-1::0;;;8968:56:26::1;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;9042:23:26;::::1;9034:65;;;::::0;-1:-1:-1;;;9034:65:26;;5710:2:36;9034:65:26::1;::::0;::::1;5692:21:36::0;5749:2;5729:18;;;5722:30;5788:31;5768:18;;;5761:59;5837:18;;9034:65:26::1;5508:353:36::0;9034:65:26::1;9154:1;9125:16:::0;;;:7:::1;:16;::::0;;;;;-1:-1:-1;;;;;9125:16:26::1;9109:80;;;::::0;-1:-1:-1;;;9109:80:26;;12955:2:36;9109:80:26::1;::::0;::::1;12937:21:36::0;12994:2;12974:18;;;12967:30;13033;13013:18;;;13006:58;13081:18;;9109:80:26::1;12753:352:36::0;9109:80:26::1;9199:17;9227:16:::0;;;:7:::1;:16;::::0;;;;;;;-1:-1:-1;;;;;;9254:44:26;::::1;-1:-1:-1::0;;;;;9254:44:26;;::::1;::::0;;::::1;::::0;;;9313;;9227:16;::::1;::::0;;;;;9313:44:::1;::::0;::::1;8958:406;8881:483:::0;;:::o;14:131:36:-;-1:-1:-1;;;;;89:31:36;;79:42;;69:70;;135:1;132;125:12;69:70;14:131;:::o;150:367::-;218:6;226;279:2;267:9;258:7;254:23;250:32;247:52;;;295:1;292;285:12;247:52;340:23;;;-1:-1:-1;439:2:36;424:18;;411:32;452:33;411:32;452:33;:::i;:::-;504:7;494:17;;;150:367;;;;;:::o;730:226::-;789:6;842:2;830:9;821:7;817:23;813:32;810:52;;;858:1;855;848:12;810:52;-1:-1:-1;903:23:36;;730:226;-1:-1:-1;730:226:36:o;1564:247::-;1623:6;1676:2;1664:9;1655:7;1651:23;1647:32;1644:52;;;1692:1;1689;1682:12;1644:52;1731:9;1718:23;1750:31;1775:5;1750:31;:::i;:::-;1800:5;1564:247;-1:-1:-1;;;1564:247:36:o;1816:346::-;1884:6;1892;1945:2;1933:9;1924:7;1920:23;1916:32;1913:52;;;1961:1;1958;1951:12;1913:52;-1:-1:-1;;2006:23:36;;;2126:2;2111:18;;;2098:32;;-1:-1:-1;1816:346:36:o;2167:404::-;2270:6;2323:2;2311:9;2302:7;2298:23;2294:32;2291:52;;;2339:1;2336;2329:12;2291:52;2379:9;2366:23;2412:18;2404:6;2401:30;2398:50;;;2444:1;2441;2434:12;2398:50;2467:22;;2523:3;2505:16;;;2501:26;2498:46;;;2540:1;2537;2530:12;3997:350;4199:2;4181:21;;;4238:2;4218:18;;;4211:30;4277:28;4272:2;4257:18;;4250:56;4338:2;4323:18;;3997:350::o;4352:346::-;4554:2;4536:21;;;4593:2;4573:18;;;4566:30;-1:-1:-1;;;4627:2:36;4612:18;;4605:52;4689:2;4674:18;;4352:346::o;4703:398::-;4905:2;4887:21;;;4944:2;4924:18;;;4917:30;4983:34;4978:2;4963:18;;4956:62;-1:-1:-1;;;5049:2:36;5034:18;;5027:32;5091:3;5076:19;;4703:398::o;5106:397::-;5308:2;5290:21;;;5347:2;5327:18;;;5320:30;5386:34;5381:2;5366:18;;5359:62;-1:-1:-1;;;5452:2:36;5437:18;;5430:31;5493:3;5478:19;;5106:397::o;6268:127::-;6329:10;6324:3;6320:20;6317:1;6310:31;6360:4;6357:1;6350:15;6384:4;6381:1;6374:15;6400:135;6439:3;6460:17;;;6457:43;;6480:18;;:::i;:::-;-1:-1:-1;6527:1:36;6516:13;;6400:135::o;6540:136::-;6579:3;6607:5;6597:39;;6616:18;;:::i;:::-;-1:-1:-1;;;6652:18:36;;6540:136::o;8050:500::-;8108:5;8115:6;8175:3;8162:17;8261:2;8257:7;8246:8;8230:14;8226:29;8222:43;8202:18;8198:68;8188:96;;8280:1;8277;8270:12;8188:96;8308:33;;8412:4;8399:18;;;-1:-1:-1;8360:21:36;;-1:-1:-1;8440:18:36;8429:30;;8426:50;;;8472:1;8469;8462:12;8426:50;8519:6;8503:14;8499:27;8492:5;8488:39;8485:59;;;8540:1;8537;8530:12;8485:59;8050:500;;;;;:::o;8555:266::-;8643:6;8638:3;8631:19;8695:6;8688:5;8681:4;8676:3;8672:14;8659:43;-1:-1:-1;8747:1:36;8722:16;;;8740:4;8718:27;;;8711:38;;;;8803:2;8782:15;;;-1:-1:-1;;8778:29:36;8769:39;;;8765:50;;8555:266::o;8826:299::-;8899:5;8958:3;8945:17;9044:3;9040:8;9029;9013:14;9009:29;9005:44;8985:18;8981:69;8971:97;;9064:1;9061;9054:12;8971:97;9086:33;;;;8826:299;-1:-1:-1;;8826:299:36:o;9130:118::-;9216:5;9209:13;9202:21;9195:5;9192:32;9182:60;;9238:1;9235;9228:12;9253:867;9361:5;9348:19;9343:3;9336:32;9318:3;9411:55;9460:4;9453:5;9449:16;9442:5;9411:55;:::i;:::-;9498:4;9491;9486:3;9482:14;9475:28;9524:69;9587:4;9582:3;9578:14;9564:12;9550;9524:69;:::i;:::-;9512:81;;;9640:55;9689:4;9682:5;9678:16;9671:5;9640:55;:::i;:::-;9737:3;9731:4;9727:14;9720:4;9715:3;9711:14;9704:38;9765:63;9823:4;9807:14;9791;9765:63;:::i;:::-;9751:77;;;;9876:4;9869:5;9865:16;9852:30;9891;9913:7;9891:30;:::i;:::-;9960:15;9953:23;9946:4;9937:14;;9930:47;10046:4;10035:16;;;10022:30;10068:14;;;;10061:31;;;;-1:-1:-1;10108:6:36;9253:867::o;10125:2312::-;-1:-1:-1;;;;;10390:32:36;;10372:51;;10459:2;10454;10439:18;;;10432:30;;;10503:20;;10539:18;;;10532:33;;;;-1:-1:-1;;10613:15:36;;10600:29;10680:14;10676:27;;;-1:-1:-1;;10672:41:36;10648:66;;10638:94;;10728:1;10725;10718:12;10638:94;10823:4;10818:2;10803:18;;10796:32;10756:31;;10873:21;;10925:3;10910:19;;10903:36;10982:57;11035:2;11022:16;;10756:31;10982:57;:::i;:::-;11076:2;11070:3;11059:9;11055:19;11048:31;11102:74;11171:3;11160:9;11156:19;11142:12;11128;11102:74;:::i;:::-;11088:88;;;11239:2;11230:7;11226:16;11213:30;11326:2;11322:7;11312;11296:14;11292:28;11288:42;11266:20;11262:69;11252:97;;11345:1;11342;11335:12;11252:97;11488:2;11373:34;;11475:16;;;;11430:21;11514:18;11503:30;;11500:50;;;11546:1;11543;11536:12;11500:50;11576:6;11573:1;11569:14;11628:2;11612:14;11608:23;11599:7;11595:37;11592:57;;;11645:1;11642;11635:12;11592:57;11690:22;;;-1:-1:-1;;11686:37:36;11680:3;11665:19;;11658:66;11733:22;;;-1:-1:-1;;;;;11767:31:36;;11764:51;;;11811:1;11808;11801:12;11764:51;11863:2;11854:7;11849:2;11841:6;11837:15;11824:42;11897:2;11889:6;11885:15;11875:25;;;;;11947:55;11998:2;11990:6;11986:15;11978:6;11947:55;:::i;:::-;-1:-1:-1;;12048:18:36;;;12040:41;12033:4;12018:20;;12011:71;12105:70;12068:2;12163:11;;12147:14;12131;12105:70;:::i;:::-;12091:84;;;;12206:70;12272:2;12264:6;12260:15;12252:6;12206:70;:::i;:::-;12317:22;;;-1:-1:-1;;12313:36:36;12307:3;12292:19;;12285:65;12367:64;12321:6;12408:14;12367:64;:::i;:::-;12359:72;10125:2312;-1:-1:-1;;;;;;10125:2312:36:o;12442:306::-;12518:6;12526;12579:2;12567:9;12558:7;12554:23;12550:32;12547:52;;;12595:1;12592;12585:12;12547:52;12627:9;12621:16;12646:28;12668:5;12646:28;:::i;:::-;12738:2;12723:18;;;;12717:25;12693:5;;12717:25;;-1:-1:-1;;;12442:306:36:o\",\n \"linkReferences\": {}\n },\n \"methodIdentifiers\": {\n \"addHelper(bytes32,address)\": \"52741df5\",\n \"addSubVerifier(bytes32,address)\": \"b3c83d99\",\n \"admin()\": \"f851a440\",\n \"config(bytes32)\": \"cc718f76\",\n \"defaultOPRFPubKeyHash()\": \"66b4dfc4\",\n \"getHelper(bytes32)\": \"5dd41f2f\",\n \"getSubVerifier(bytes32)\": \"f2649807\",\n \"guardian()\": \"452a9320\",\n \"helperCount()\": \"da0ff2c6\",\n \"helpers(bytes32)\": \"a7ad58bf\",\n \"pause()\": \"8456cb59\",\n \"paused()\": \"5c975abb\",\n \"removeHelper(bytes32)\": \"9bfefbfd\",\n \"removeSubVerifier(bytes32)\": \"6f907638\",\n \"rootRegistry()\": \"b96b161c\",\n \"setDefaultOPRFPubKeyHash(bytes32)\": \"b950506d\",\n \"setGuardian(address)\": \"8a0dac4a\",\n \"subverifierCount()\": \"c961ba7e\",\n \"subverifiers(bytes32)\": \"492f34fb\",\n \"transferAdmin(address)\": \"75829def\",\n \"unpause()\": \"3f4ba83a\",\n \"updateConfig(bytes32,bytes32)\": \"889eba3b\",\n \"updateHelper(bytes32,address)\": \"ba5f3f9d\",\n \"updateSubVerifier(bytes32,address)\": \"07915439\",\n \"verify((bytes32,(bytes32,bytes,bytes32[]),bytes,(uint256,string,string,bool,bytes32)))\": \"8988afbd\"\n },\n \"rawMetadata\": \"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.30+commit.73712a01\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_admin\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_guardian\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"contract RootRegistry\\\",\\\"name\\\":\\\"_rootRegistry\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"_defaultOPRFPubKeyHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"oldAdmin\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newAdmin\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"AdminUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"oldValue\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"newValue\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ConfigUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"oldHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"newHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"DefaultOPRFPubKeyHashUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"oldGuardian\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newGuardian\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"GuardianUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"helper\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"HelperAdded\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"helper\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"HelperRemoved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"oldHelper\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newHelper\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"HelperUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"paused\\\",\\\"type\\\":\\\"bool\\\"}],\\\"name\\\":\\\"PausedStatusChanged\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"oldRootRegistry\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newRootRegistry\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"RootRegistryUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"admin\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"guardian\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"rootRegistry\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"RootVerifierDeployed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"subVerifier\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"SubVerifierAdded\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"subVerifier\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"SubVerifierRemoved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"oldSubVerifier\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newSubVerifier\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"SubVerifierUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newHelper\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"addHelper\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"contract SubVerifier\\\",\\\"name\\\":\\\"subVerifier\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"addSubVerifier\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"admin\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"config\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"value\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"defaultOPRFPubKeyHash\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"getHelper\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"getSubVerifier\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"guardian\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"helperCount\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"helpers\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract VerifierHelper\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"pause\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"paused\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"removeHelper\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"removeSubVerifier\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"rootRegistry\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract RootRegistry\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"newHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"setDefaultOPRFPubKeyHash\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newGuardian\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"setGuardian\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"subverifierCount\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"subverifiers\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract SubVerifier\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newAdmin\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"transferAdmin\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"unpause\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"value\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"updateConfig\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newHelper\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"updateHelper\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newSubVerifier\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"updateSubVerifier\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"vkeyHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"proof\\\",\\\"type\\\":\\\"bytes\\\"},{\\\"internalType\\\":\\\"bytes32[]\\\",\\\"name\\\":\\\"publicInputs\\\",\\\"type\\\":\\\"bytes32[]\\\"}],\\\"internalType\\\":\\\"struct ProofVerificationData\\\",\\\"name\\\":\\\"proofVerificationData\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"committedInputs\\\",\\\"type\\\":\\\"bytes\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"validityPeriodInSeconds\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"scope\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"devMode\\\",\\\"type\\\":\\\"bool\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"oprfPubKeyHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct ServiceConfig\\\",\\\"name\\\":\\\"serviceConfig\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"internalType\\\":\\\"struct ProofVerificationParams\\\",\\\"name\\\":\\\"params\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"verify\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"valid\\\",\\\"type\\\":\\\"bool\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"uniqueIdentifier\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"contract VerifierHelper\\\",\\\"name\\\":\\\"helper\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"addHelper(bytes32,address)\\\":{\\\"params\\\":{\\\"newHelper\\\":\\\"The address of the helper\\\",\\\"version\\\":\\\"The version identifier\\\"}},\\\"addSubVerifier(bytes32,address)\\\":{\\\"params\\\":{\\\"subVerifier\\\":\\\"The address of the subverifier\\\",\\\"version\\\":\\\"The version identifier\\\"}},\\\"constructor\\\":{\\\"params\\\":{\\\"_admin\\\":\\\"The admin address\\\",\\\"_defaultOPRFPubKeyHash\\\":\\\"Hash of the global default OPRF public key\\\",\\\"_guardian\\\":\\\"The guardian address\\\",\\\"_rootRegistry\\\":\\\"The root registry address\\\"}},\\\"getHelper(bytes32)\\\":{\\\"details\\\":\\\"Returns zero address if no helper exists for the given version\\\",\\\"params\\\":{\\\"version\\\":\\\"The version identifier\\\"},\\\"returns\\\":{\\\"_0\\\":\\\"The address of the helper contract, or zero address if not found\\\"}},\\\"getSubVerifier(bytes32)\\\":{\\\"details\\\":\\\"Returns zero address if no subverifier exists for the given version\\\",\\\"params\\\":{\\\"version\\\":\\\"The version identifier\\\"},\\\"returns\\\":{\\\"_0\\\":\\\"The address of the subverifier contract, or zero address if not found\\\"}},\\\"pause()\\\":{\\\"details\\\":\\\"Only admin or guardian can pause the root verifierThis is a security measure to pause all proof verification operations in the event of an emergency\\\"},\\\"removeHelper(bytes32)\\\":{\\\"params\\\":{\\\"version\\\":\\\"The version identifier\\\"}},\\\"removeSubVerifier(bytes32)\\\":{\\\"params\\\":{\\\"version\\\":\\\"The version identifier\\\"}},\\\"setDefaultOPRFPubKeyHash(bytes32)\\\":{\\\"params\\\":{\\\"newHash\\\":\\\"The new default OPRF public key hash\\\"}},\\\"setGuardian(address)\\\":{\\\"params\\\":{\\\"newGuardian\\\":\\\"The new guardian address\\\"}},\\\"transferAdmin(address)\\\":{\\\"params\\\":{\\\"newAdmin\\\":\\\"The new admin address\\\"}},\\\"unpause()\\\":{\\\"details\\\":\\\"Only admin can unpause the root verifier\\\"},\\\"updateConfig(bytes32,bytes32)\\\":{\\\"params\\\":{\\\"key\\\":\\\"The config key\\\",\\\"value\\\":\\\"The config value\\\"}},\\\"updateHelper(bytes32,address)\\\":{\\\"params\\\":{\\\"newHelper\\\":\\\"The address of the new helper\\\",\\\"version\\\":\\\"The version identifier\\\"}},\\\"updateSubVerifier(bytes32,address)\\\":{\\\"params\\\":{\\\"newSubVerifier\\\":\\\"The address of the new subverifier\\\",\\\"version\\\":\\\"The version identifier\\\"}},\\\"verify((bytes32,(bytes32,bytes,bytes32[]),bytes,(uint256,string,string,bool,bytes32)))\\\":{\\\"details\\\":\\\"This function is called by the root verifier to verify a proof for a specific version\\\",\\\"params\\\":{\\\"params\\\":\\\"The proof verification parameters\\\"},\\\"returns\\\":{\\\"helper\\\":\\\"The helper for the calling contract to use to verify the committed inputs\\\",\\\"uniqueIdentifier\\\":\\\"The unique identifier associated with the ID used to generate the proof\\\",\\\"valid\\\":\\\"True if the proof is valid or false otherwise\\\"}}},\\\"title\\\":\\\"ZKPassport Root Verifier\\\",\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"addHelper(bytes32,address)\\\":{\\\"notice\\\":\\\"Adds a helper for a specific version\\\"},\\\"addSubVerifier(bytes32,address)\\\":{\\\"notice\\\":\\\"Adds a subverifier for a specific version\\\"},\\\"constructor\\\":{\\\"notice\\\":\\\"Constructor\\\"},\\\"getHelper(bytes32)\\\":{\\\"notice\\\":\\\"Gets the helper address for a specific version\\\"},\\\"getSubVerifier(bytes32)\\\":{\\\"notice\\\":\\\"Gets the subverifier address for a specific version\\\"},\\\"pause()\\\":{\\\"notice\\\":\\\"Pause the root verifier\\\"},\\\"removeHelper(bytes32)\\\":{\\\"notice\\\":\\\"Removes a helper for a specific version\\\"},\\\"removeSubVerifier(bytes32)\\\":{\\\"notice\\\":\\\"Removes a subverifier for a specific version\\\"},\\\"setDefaultOPRFPubKeyHash(bytes32)\\\":{\\\"notice\\\":\\\"Update the default OPRF public key hash\\\"},\\\"setGuardian(address)\\\":{\\\"notice\\\":\\\"Sets the guardian role to a new address\\\"},\\\"transferAdmin(address)\\\":{\\\"notice\\\":\\\"Transfers the admin role to a new address\\\"},\\\"unpause()\\\":{\\\"notice\\\":\\\"Unpause the root verifier\\\"},\\\"updateConfig(bytes32,bytes32)\\\":{\\\"notice\\\":\\\"Update a config value\\\"},\\\"updateHelper(bytes32,address)\\\":{\\\"notice\\\":\\\"Updates a helper for a specific version\\\"},\\\"updateSubVerifier(bytes32,address)\\\":{\\\"notice\\\":\\\"Updates a subverifier for a specific version\\\"},\\\"verify((bytes32,(bytes32,bytes,bytes32[]),bytes,(uint256,string,string,bool,bytes32)))\\\":{\\\"notice\\\":\\\"Verifies a ZKPassport zero-knowledge proof\\\"}},\\\"notice\\\":\\\"Main entry point for verifying ZKPassport identity proofs\\\",\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/RootVerifier.sol\\\":\\\"RootVerifier\\\"},\\\"evmVersion\\\":\\\"prague\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"none\\\"},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":200},\\\"remappings\\\":[\\\":forge-std/=lib/forge-std/src/\\\"]},\\\"sources\\\":{\\\"src/IProofVerifier.sol\\\":{\\\"keccak256\\\":\\\"0xb71110bafe9c2f1dc6a86f4ef57baf76c27fa0efb69d17448f8fc3adf4f830ae\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://e90f9615a5a3e2bef08c43a160ec8e2c39955a3241f5de60ed9c317056843e04\\\",\\\"dweb:/ipfs/QmcjebVF4m3nAXYirGTE8PjzQuoRdxtEsS6oQHVdbySCs7\\\"]},\\\"src/IRegistryInstance.sol\\\":{\\\"keccak256\\\":\\\"0x9c322d143d45466a5148838dac57c58ac0940236bdf27d7b5e2016471315a0e1\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://cc078caebbbe12dc72ec0d7ba2754b349893fe4f9cecfe3abe177b1fd939f8cd\\\",\\\"dweb:/ipfs/QmWhREDDgzsifQJzVjQRbxbTrhNE7Kzyosu8Vf1MTRBuqY\\\"]},\\\"src/RootRegistry.sol\\\":{\\\"keccak256\\\":\\\"0x0e80060d95627de29c2751811ff0559e16e894f35a7bf68034ec34ef32e357cc\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://d18ba462a91632877b3f1cba88009ad3f62dbb232d4773de80e860e106401898\\\",\\\"dweb:/ipfs/QmTLXDFV57UpMPSKTcggKtrwuadDe1tVv9xu5mWVVMxkjC\\\"]},\\\"src/RootVerifier.sol\\\":{\\\"keccak256\\\":\\\"0xf277323b118e6c231299eea1ca676d2ed13f21290daf90c4c896c8b2e7383f0c\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://d238b1207552cebe342ccabbee1ee61d451035864f937aa8053402f7f7a64c42\\\",\\\"dweb:/ipfs/QmfG6PfgeptP9RjyYSpiKNZYbM2w5WEgsxbNXEwwA1drYq\\\"]},\\\"src/SubVerifier.sol\\\":{\\\"keccak256\\\":\\\"0xa9ddbe9a0ee43715dc4b5d65edf4d29db67358bec2daffb8c90b2c7da5ac6049\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://517c5815bf78cf2f1ec931b1f1476873a7d394b8a261796c1fbff4153d9f892b\\\",\\\"dweb:/ipfs/QmRpby7Qc2RsMsHcmQ5JV63TtsYG2ifaigBu8YsyHCTmbE\\\"]},\\\"src/VerifierHelper.sol\\\":{\\\"keccak256\\\":\\\"0x50747b26adc54bd1d0944ca67caf8028be56a20745a533bf443995e381f92be3\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://6c2482ed74b42dffef15940b93c29c13470c8587edda5a42e73bfb7e9851c455\\\",\\\"dweb:/ipfs/QmZbAWDGga91b2MyqK4sTi6F9WSNrUAfMFb477FvWDjZqU\\\"]},\\\"src/lib/Constants.sol\\\":{\\\"keccak256\\\":\\\"0x606d115f55f78b65e03bd66835cdfbdc4794cb416ef2c529906f9ca8e39ab065\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://a5280a7afdb4774b3b30c54f12681902981f0d44cc28247dca722d422a287ab1\\\",\\\"dweb:/ipfs/QmaPqeM2hsjDhszivLHmFmydiW9qgto1Pv1rqnXrNAjMGP\\\"]},\\\"src/lib/DateUtils.sol\\\":{\\\"keccak256\\\":\\\"0x7ca59267375212575d157a6dd0165b4e407eded1a4fa74a949d78495d849d8eb\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://26390ce9631c985b1ecda83d3dfae9b78ac3801d9e16d1d78929eb022f4436c1\\\",\\\"dweb:/ipfs/QmejWNCiiW4URcPCjkxEKtZq7hJF6Y4sAnpPrsW84fqZFt\\\"]},\\\"src/lib/InputsExtractor.sol\\\":{\\\"keccak256\\\":\\\"0x183e156b3455b49b2e2166efea5505dbf7b64139e03a49cf225d614490b3aedb\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://dcaf27a3fb0b34b10e063fcd3609d55f2ba85ae578ef28e665e93dd0449d1c7c\\\",\\\"dweb:/ipfs/QmXGEwaJN59PqHu1d2CMNV7MVCXG4vTd4zqDaFmLLWyuUf\\\"]},\\\"src/lib/StringUtils.sol\\\":{\\\"keccak256\\\":\\\"0xa472da3069d27669b4e4acbed140abf1ebbd52d13682fce3db3e6f7c5ea02adc\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://d3ed834526c7032c48116a225035c9fd8334e1dcd88f73fba655bdf7e6267387\\\",\\\"dweb:/ipfs/QmXDbA3rfze35C3jjAKxz7xFN1tvnBMHgiUMeswfPWE7Si\\\"]},\\\"src/lib/Types.sol\\\":{\\\"keccak256\\\":\\\"0xb6f6e2508c1c842aad7762c0917b2669daf3dc188df18b1ac1d981598ab4f7d1\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://0e8f7bdc7bbe33e3bf6ea3b5b10c82ba37cf47096e01126ad9103309f64eb7f5\\\",\\\"dweb:/ipfs/QmeePytBGkeAB34SQJxqHcohHRnDEYzm1Vq5zU133FiwWn\\\"]}},\\\"version\\\":1}\",\n \"metadata\": {\n \"compiler\": { \"version\": \"0.8.30+commit.73712a01\" },\n \"language\": \"Solidity\",\n \"output\": {\n \"abi\": [\n {\n \"inputs\": [\n { \"internalType\": \"address\", \"name\": \"_admin\", \"type\": \"address\" },\n { \"internalType\": \"address\", \"name\": \"_guardian\", \"type\": \"address\" },\n { \"internalType\": \"contract RootRegistry\", \"name\": \"_rootRegistry\", \"type\": \"address\" },\n { \"internalType\": \"bytes32\", \"name\": \"_defaultOPRFPubKeyHash\", \"type\": \"bytes32\" }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n { \"internalType\": \"address\", \"name\": \"oldAdmin\", \"type\": \"address\", \"indexed\": true },\n { \"internalType\": \"address\", \"name\": \"newAdmin\", \"type\": \"address\", \"indexed\": true }\n ],\n \"type\": \"event\",\n \"name\": \"AdminUpdated\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"key\", \"type\": \"bytes32\", \"indexed\": true },\n { \"internalType\": \"bytes32\", \"name\": \"oldValue\", \"type\": \"bytes32\", \"indexed\": false },\n { \"internalType\": \"bytes32\", \"name\": \"newValue\", \"type\": \"bytes32\", \"indexed\": false }\n ],\n \"type\": \"event\",\n \"name\": \"ConfigUpdated\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"oldHash\", \"type\": \"bytes32\", \"indexed\": false },\n { \"internalType\": \"bytes32\", \"name\": \"newHash\", \"type\": \"bytes32\", \"indexed\": false }\n ],\n \"type\": \"event\",\n \"name\": \"DefaultOPRFPubKeyHashUpdated\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"oldGuardian\",\n \"type\": \"address\",\n \"indexed\": true\n },\n { \"internalType\": \"address\", \"name\": \"newGuardian\", \"type\": \"address\", \"indexed\": true }\n ],\n \"type\": \"event\",\n \"name\": \"GuardianUpdated\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true },\n { \"internalType\": \"address\", \"name\": \"helper\", \"type\": \"address\", \"indexed\": true }\n ],\n \"type\": \"event\",\n \"name\": \"HelperAdded\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true },\n { \"internalType\": \"address\", \"name\": \"helper\", \"type\": \"address\", \"indexed\": true }\n ],\n \"type\": \"event\",\n \"name\": \"HelperRemoved\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true },\n { \"internalType\": \"address\", \"name\": \"oldHelper\", \"type\": \"address\", \"indexed\": true },\n { \"internalType\": \"address\", \"name\": \"newHelper\", \"type\": \"address\", \"indexed\": true }\n ],\n \"type\": \"event\",\n \"name\": \"HelperUpdated\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bool\", \"name\": \"paused\", \"type\": \"bool\", \"indexed\": false }\n ],\n \"type\": \"event\",\n \"name\": \"PausedStatusChanged\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"oldRootRegistry\",\n \"type\": \"address\",\n \"indexed\": true\n },\n {\n \"internalType\": \"address\",\n \"name\": \"newRootRegistry\",\n \"type\": \"address\",\n \"indexed\": true\n }\n ],\n \"type\": \"event\",\n \"name\": \"RootRegistryUpdated\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"address\", \"name\": \"admin\", \"type\": \"address\", \"indexed\": false },\n { \"internalType\": \"address\", \"name\": \"guardian\", \"type\": \"address\", \"indexed\": false },\n {\n \"internalType\": \"address\",\n \"name\": \"rootRegistry\",\n \"type\": \"address\",\n \"indexed\": false\n }\n ],\n \"type\": \"event\",\n \"name\": \"RootVerifierDeployed\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true },\n { \"internalType\": \"address\", \"name\": \"subVerifier\", \"type\": \"address\", \"indexed\": true }\n ],\n \"type\": \"event\",\n \"name\": \"SubVerifierAdded\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true },\n { \"internalType\": \"address\", \"name\": \"subVerifier\", \"type\": \"address\", \"indexed\": true }\n ],\n \"type\": \"event\",\n \"name\": \"SubVerifierRemoved\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true },\n {\n \"internalType\": \"address\",\n \"name\": \"oldSubVerifier\",\n \"type\": \"address\",\n \"indexed\": true\n },\n {\n \"internalType\": \"address\",\n \"name\": \"newSubVerifier\",\n \"type\": \"address\",\n \"indexed\": true\n }\n ],\n \"type\": \"event\",\n \"name\": \"SubVerifierUpdated\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" },\n { \"internalType\": \"address\", \"name\": \"newHelper\", \"type\": \"address\" }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"addHelper\"\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" },\n { \"internalType\": \"contract SubVerifier\", \"name\": \"subVerifier\", \"type\": \"address\" }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"addSubVerifier\"\n },\n {\n \"inputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"admin\",\n \"outputs\": [{ \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"key\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"config\",\n \"outputs\": [{ \"internalType\": \"bytes32\", \"name\": \"value\", \"type\": \"bytes32\" }]\n },\n {\n \"inputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"defaultOPRFPubKeyHash\",\n \"outputs\": [{ \"internalType\": \"bytes32\", \"name\": \"\", \"type\": \"bytes32\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"getHelper\",\n \"outputs\": [{ \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"getSubVerifier\",\n \"outputs\": [{ \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" }]\n },\n {\n \"inputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"guardian\",\n \"outputs\": [{ \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" }]\n },\n {\n \"inputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"helperCount\",\n \"outputs\": [{ \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"helpers\",\n \"outputs\": [{ \"internalType\": \"contract VerifierHelper\", \"name\": \"\", \"type\": \"address\" }]\n },\n { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\", \"name\": \"pause\" },\n {\n \"inputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"paused\",\n \"outputs\": [{ \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"removeHelper\"\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"removeSubVerifier\"\n },\n {\n \"inputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"rootRegistry\",\n \"outputs\": [{ \"internalType\": \"contract RootRegistry\", \"name\": \"\", \"type\": \"address\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"newHash\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"setDefaultOPRFPubKeyHash\"\n },\n {\n \"inputs\": [{ \"internalType\": \"address\", \"name\": \"newGuardian\", \"type\": \"address\" }],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"setGuardian\"\n },\n {\n \"inputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"subverifierCount\",\n \"outputs\": [{ \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"subverifiers\",\n \"outputs\": [{ \"internalType\": \"contract SubVerifier\", \"name\": \"\", \"type\": \"address\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"address\", \"name\": \"newAdmin\", \"type\": \"address\" }],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"transferAdmin\"\n },\n { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\", \"name\": \"unpause\" },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"key\", \"type\": \"bytes32\" },\n { \"internalType\": \"bytes32\", \"name\": \"value\", \"type\": \"bytes32\" }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"updateConfig\"\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" },\n { \"internalType\": \"address\", \"name\": \"newHelper\", \"type\": \"address\" }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"updateHelper\"\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" },\n { \"internalType\": \"address\", \"name\": \"newSubVerifier\", \"type\": \"address\" }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"updateSubVerifier\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"struct ProofVerificationParams\",\n \"name\": \"params\",\n \"type\": \"tuple\",\n \"components\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" },\n {\n \"internalType\": \"struct ProofVerificationData\",\n \"name\": \"proofVerificationData\",\n \"type\": \"tuple\",\n \"components\": [\n { \"internalType\": \"bytes32\", \"name\": \"vkeyHash\", \"type\": \"bytes32\" },\n { \"internalType\": \"bytes\", \"name\": \"proof\", \"type\": \"bytes\" },\n { \"internalType\": \"bytes32[]\", \"name\": \"publicInputs\", \"type\": \"bytes32[]\" }\n ]\n },\n { \"internalType\": \"bytes\", \"name\": \"committedInputs\", \"type\": \"bytes\" },\n {\n \"internalType\": \"struct ServiceConfig\",\n \"name\": \"serviceConfig\",\n \"type\": \"tuple\",\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validityPeriodInSeconds\",\n \"type\": \"uint256\"\n },\n { \"internalType\": \"string\", \"name\": \"domain\", \"type\": \"string\" },\n { \"internalType\": \"string\", \"name\": \"scope\", \"type\": \"string\" },\n { \"internalType\": \"bool\", \"name\": \"devMode\", \"type\": \"bool\" },\n { \"internalType\": \"bytes32\", \"name\": \"oprfPubKeyHash\", \"type\": \"bytes32\" }\n ]\n }\n ]\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"verify\",\n \"outputs\": [\n { \"internalType\": \"bool\", \"name\": \"valid\", \"type\": \"bool\" },\n { \"internalType\": \"bytes32\", \"name\": \"uniqueIdentifier\", \"type\": \"bytes32\" },\n { \"internalType\": \"contract VerifierHelper\", \"name\": \"helper\", \"type\": \"address\" }\n ]\n }\n ],\n \"devdoc\": {\n \"kind\": \"dev\",\n \"methods\": {\n \"addHelper(bytes32,address)\": {\n \"params\": {\n \"newHelper\": \"The address of the helper\",\n \"version\": \"The version identifier\"\n }\n },\n \"addSubVerifier(bytes32,address)\": {\n \"params\": {\n \"subVerifier\": \"The address of the subverifier\",\n \"version\": \"The version identifier\"\n }\n },\n \"constructor\": {\n \"params\": {\n \"_admin\": \"The admin address\",\n \"_defaultOPRFPubKeyHash\": \"Hash of the global default OPRF public key\",\n \"_guardian\": \"The guardian address\",\n \"_rootRegistry\": \"The root registry address\"\n }\n },\n \"getHelper(bytes32)\": {\n \"details\": \"Returns zero address if no helper exists for the given version\",\n \"params\": { \"version\": \"The version identifier\" },\n \"returns\": { \"_0\": \"The address of the helper contract, or zero address if not found\" }\n },\n \"getSubVerifier(bytes32)\": {\n \"details\": \"Returns zero address if no subverifier exists for the given version\",\n \"params\": { \"version\": \"The version identifier\" },\n \"returns\": {\n \"_0\": \"The address of the subverifier contract, or zero address if not found\"\n }\n },\n \"pause()\": {\n \"details\": \"Only admin or guardian can pause the root verifierThis is a security measure to pause all proof verification operations in the event of an emergency\"\n },\n \"removeHelper(bytes32)\": { \"params\": { \"version\": \"The version identifier\" } },\n \"removeSubVerifier(bytes32)\": { \"params\": { \"version\": \"The version identifier\" } },\n \"setDefaultOPRFPubKeyHash(bytes32)\": {\n \"params\": { \"newHash\": \"The new default OPRF public key hash\" }\n },\n \"setGuardian(address)\": { \"params\": { \"newGuardian\": \"The new guardian address\" } },\n \"transferAdmin(address)\": { \"params\": { \"newAdmin\": \"The new admin address\" } },\n \"unpause()\": { \"details\": \"Only admin can unpause the root verifier\" },\n \"updateConfig(bytes32,bytes32)\": {\n \"params\": { \"key\": \"The config key\", \"value\": \"The config value\" }\n },\n \"updateHelper(bytes32,address)\": {\n \"params\": {\n \"newHelper\": \"The address of the new helper\",\n \"version\": \"The version identifier\"\n }\n },\n \"updateSubVerifier(bytes32,address)\": {\n \"params\": {\n \"newSubVerifier\": \"The address of the new subverifier\",\n \"version\": \"The version identifier\"\n }\n },\n \"verify((bytes32,(bytes32,bytes,bytes32[]),bytes,(uint256,string,string,bool,bytes32)))\": {\n \"details\": \"This function is called by the root verifier to verify a proof for a specific version\",\n \"params\": { \"params\": \"The proof verification parameters\" },\n \"returns\": {\n \"helper\": \"The helper for the calling contract to use to verify the committed inputs\",\n \"uniqueIdentifier\": \"The unique identifier associated with the ID used to generate the proof\",\n \"valid\": \"True if the proof is valid or false otherwise\"\n }\n }\n },\n \"version\": 1\n },\n \"userdoc\": {\n \"kind\": \"user\",\n \"methods\": {\n \"addHelper(bytes32,address)\": { \"notice\": \"Adds a helper for a specific version\" },\n \"addSubVerifier(bytes32,address)\": {\n \"notice\": \"Adds a subverifier for a specific version\"\n },\n \"constructor\": { \"notice\": \"Constructor\" },\n \"getHelper(bytes32)\": { \"notice\": \"Gets the helper address for a specific version\" },\n \"getSubVerifier(bytes32)\": {\n \"notice\": \"Gets the subverifier address for a specific version\"\n },\n \"pause()\": { \"notice\": \"Pause the root verifier\" },\n \"removeHelper(bytes32)\": { \"notice\": \"Removes a helper for a specific version\" },\n \"removeSubVerifier(bytes32)\": {\n \"notice\": \"Removes a subverifier for a specific version\"\n },\n \"setDefaultOPRFPubKeyHash(bytes32)\": {\n \"notice\": \"Update the default OPRF public key hash\"\n },\n \"setGuardian(address)\": { \"notice\": \"Sets the guardian role to a new address\" },\n \"transferAdmin(address)\": { \"notice\": \"Transfers the admin role to a new address\" },\n \"unpause()\": { \"notice\": \"Unpause the root verifier\" },\n \"updateConfig(bytes32,bytes32)\": { \"notice\": \"Update a config value\" },\n \"updateHelper(bytes32,address)\": { \"notice\": \"Updates a helper for a specific version\" },\n \"updateSubVerifier(bytes32,address)\": {\n \"notice\": \"Updates a subverifier for a specific version\"\n },\n \"verify((bytes32,(bytes32,bytes,bytes32[]),bytes,(uint256,string,string,bool,bytes32)))\": {\n \"notice\": \"Verifies a ZKPassport zero-knowledge proof\"\n }\n },\n \"version\": 1\n }\n },\n \"settings\": {\n \"remappings\": [\"forge-std/=lib/forge-std/src/\"],\n \"optimizer\": { \"enabled\": true, \"runs\": 200 },\n \"metadata\": { \"bytecodeHash\": \"none\" },\n \"compilationTarget\": { \"src/RootVerifier.sol\": \"RootVerifier\" },\n \"evmVersion\": \"prague\",\n \"libraries\": {}\n },\n \"sources\": {\n \"src/IProofVerifier.sol\": {\n \"keccak256\": \"0xb71110bafe9c2f1dc6a86f4ef57baf76c27fa0efb69d17448f8fc3adf4f830ae\",\n \"urls\": [\n \"bzz-raw://e90f9615a5a3e2bef08c43a160ec8e2c39955a3241f5de60ed9c317056843e04\",\n \"dweb:/ipfs/QmcjebVF4m3nAXYirGTE8PjzQuoRdxtEsS6oQHVdbySCs7\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/IRegistryInstance.sol\": {\n \"keccak256\": \"0x9c322d143d45466a5148838dac57c58ac0940236bdf27d7b5e2016471315a0e1\",\n \"urls\": [\n \"bzz-raw://cc078caebbbe12dc72ec0d7ba2754b349893fe4f9cecfe3abe177b1fd939f8cd\",\n \"dweb:/ipfs/QmWhREDDgzsifQJzVjQRbxbTrhNE7Kzyosu8Vf1MTRBuqY\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/RootRegistry.sol\": {\n \"keccak256\": \"0x0e80060d95627de29c2751811ff0559e16e894f35a7bf68034ec34ef32e357cc\",\n \"urls\": [\n \"bzz-raw://d18ba462a91632877b3f1cba88009ad3f62dbb232d4773de80e860e106401898\",\n \"dweb:/ipfs/QmTLXDFV57UpMPSKTcggKtrwuadDe1tVv9xu5mWVVMxkjC\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/RootVerifier.sol\": {\n \"keccak256\": \"0xf277323b118e6c231299eea1ca676d2ed13f21290daf90c4c896c8b2e7383f0c\",\n \"urls\": [\n \"bzz-raw://d238b1207552cebe342ccabbee1ee61d451035864f937aa8053402f7f7a64c42\",\n \"dweb:/ipfs/QmfG6PfgeptP9RjyYSpiKNZYbM2w5WEgsxbNXEwwA1drYq\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/SubVerifier.sol\": {\n \"keccak256\": \"0xa9ddbe9a0ee43715dc4b5d65edf4d29db67358bec2daffb8c90b2c7da5ac6049\",\n \"urls\": [\n \"bzz-raw://517c5815bf78cf2f1ec931b1f1476873a7d394b8a261796c1fbff4153d9f892b\",\n \"dweb:/ipfs/QmRpby7Qc2RsMsHcmQ5JV63TtsYG2ifaigBu8YsyHCTmbE\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/VerifierHelper.sol\": {\n \"keccak256\": \"0x50747b26adc54bd1d0944ca67caf8028be56a20745a533bf443995e381f92be3\",\n \"urls\": [\n \"bzz-raw://6c2482ed74b42dffef15940b93c29c13470c8587edda5a42e73bfb7e9851c455\",\n \"dweb:/ipfs/QmZbAWDGga91b2MyqK4sTi6F9WSNrUAfMFb477FvWDjZqU\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/lib/Constants.sol\": {\n \"keccak256\": \"0x606d115f55f78b65e03bd66835cdfbdc4794cb416ef2c529906f9ca8e39ab065\",\n \"urls\": [\n \"bzz-raw://a5280a7afdb4774b3b30c54f12681902981f0d44cc28247dca722d422a287ab1\",\n \"dweb:/ipfs/QmaPqeM2hsjDhszivLHmFmydiW9qgto1Pv1rqnXrNAjMGP\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/lib/DateUtils.sol\": {\n \"keccak256\": \"0x7ca59267375212575d157a6dd0165b4e407eded1a4fa74a949d78495d849d8eb\",\n \"urls\": [\n \"bzz-raw://26390ce9631c985b1ecda83d3dfae9b78ac3801d9e16d1d78929eb022f4436c1\",\n \"dweb:/ipfs/QmejWNCiiW4URcPCjkxEKtZq7hJF6Y4sAnpPrsW84fqZFt\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/lib/InputsExtractor.sol\": {\n \"keccak256\": \"0x183e156b3455b49b2e2166efea5505dbf7b64139e03a49cf225d614490b3aedb\",\n \"urls\": [\n \"bzz-raw://dcaf27a3fb0b34b10e063fcd3609d55f2ba85ae578ef28e665e93dd0449d1c7c\",\n \"dweb:/ipfs/QmXGEwaJN59PqHu1d2CMNV7MVCXG4vTd4zqDaFmLLWyuUf\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/lib/StringUtils.sol\": {\n \"keccak256\": \"0xa472da3069d27669b4e4acbed140abf1ebbd52d13682fce3db3e6f7c5ea02adc\",\n \"urls\": [\n \"bzz-raw://d3ed834526c7032c48116a225035c9fd8334e1dcd88f73fba655bdf7e6267387\",\n \"dweb:/ipfs/QmXDbA3rfze35C3jjAKxz7xFN1tvnBMHgiUMeswfPWE7Si\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/lib/Types.sol\": {\n \"keccak256\": \"0xb6f6e2508c1c842aad7762c0917b2669daf3dc188df18b1ac1d981598ab4f7d1\",\n \"urls\": [\n \"bzz-raw://0e8f7bdc7bbe33e3bf6ea3b5b10c82ba37cf47096e01126ad9103309f64eb7f5\",\n \"dweb:/ipfs/QmeePytBGkeAB34SQJxqHcohHRnDEYzm1Vq5zU133FiwWn\"\n ],\n \"license\": \"Apache-2.0\"\n }\n },\n \"version\": 1\n },\n \"id\": 26\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport {\n AgeCommittedInputs,\n BindCommittedInputs,\n circuitVersionToBytes32,\n CountryCommittedInputs,\n DateCommittedInputs,\n DiscloseCommittedInputs,\n DisclosureCircuitName,\n FacematchCommittedInputs,\n formatBoundData,\n commitsAttestationRevocationRoot,\n getCommittedInputCount,\n getFacematchCommittedInputLength,\n getNumberOfPublicInputs,\n getParamCommitmentsFromOuterProof,\n getProofData,\n numberToBytesBE,\n ProofResult,\n ProofType,\n ProofTypeLength,\n rightPadArrayWithZeros,\n SanctionsCommittedInputs,\n} from \"@zkpassport/utils\"\nimport { SolidityVerifierParameters } from \"./types\"\nimport { DEFAULT_VALIDITY } from \"./constants\"\nimport { sha256 } from \"@noble/hashes/sha2.js\"\nimport { bytesToHex, hexToBytes } from \"@noble/hashes/utils.js\"\nimport ZKPassportVerifierAbi from \"./assets/abi/ZKPassportVerifier.json\"\n\nexport class SolidityVerifier {\n /**\n * Get the details for the Solidity verifier contract for a given network.\n * Rather than using the chain id directly, we restrict to the actual networks\n * supported by ZKPassport.\n * @param network The network to get the details for\n * @returns The address, function name, and ABI for the verifier contract\n */\n public static getDetails(): {\n address: `0x${string}`\n functionName: string\n abi: {\n type: \"function\" | \"event\" | \"constructor\"\n name: string\n inputs: { name: string; type: string; internalType: string }[]\n outputs: { name: string; type: string; internalType: string }[]\n }[]\n } {\n const baseConfig = {\n functionName: \"verify\",\n abi: ZKPassportVerifierAbi.abi as any,\n }\n return {\n ...baseConfig,\n // The Root Verifier has a deterministic address on all networks\n address: \"0x1D000001000EFD9a6371f4d90bB8920D5431c0D8\",\n }\n }\n\n /**\n * Format the proof for the Solidity verifier contract.\n * @param proof The proof to format\n * @param validityPeriodInSeconds The validity period in seconds\n * @param domain The domain to use for the service config\n * @param scope The scope to use for the service config\n * @param devMode Whether to use the dev mode\n * Both issuer-signed and device-attested proofs verify on chain; to accept only some credential\n * schemes, call the helper's `enforceVerificationMethod(allowedVerificationMethods, publicInputs)`\n * in your contract.\n * Note that on mainnets, the dev mode will be ignored as verification\n * will always fail for mock passports. It only applies to testnets.\n * @returns The parameters for the Solidity verifier contract\n */\n public static getParameters({\n proof,\n validityPeriodInSeconds = DEFAULT_VALIDITY,\n domain,\n scope,\n devMode = false,\n }: {\n proof: ProofResult\n validityPeriodInSeconds?: number\n domain: string\n scope?: string\n devMode?: boolean\n }) {\n if (!proof.name?.startsWith(\"outer_evm\")) {\n throw new Error(\n \"This proof cannot be verified on an EVM chain. Please make sure to use the `compressed-evm` mode.\",\n )\n }\n const proofData = getProofData(\n proof.proof as string,\n getNumberOfPublicInputs(proof.name!, proof.version),\n )\n const commitsRevocationRoot = commitsAttestationRevocationRoot(proof.version)\n const committedInputCounts: { circuitName: string; count: number }[] = []\n const committedInputs: { circuitName: string; inputs: string }[] = []\n for (const key in proof.committedInputs) {\n // A Tier 2 outer proof's first commitment is its base proof's device attestation\n if (key === \"attested_id_ios\" || key === \"attested_id_android\") {\n const inputs = facematchStyleInputs(\n ProofType.ATTESTED_ID,\n proof.committedInputs[key] as FacematchCommittedInputs,\n )\n committedInputCounts.push({ circuitName: key, count: inputs.length / 2 })\n committedInputs.push({ circuitName: key, inputs })\n continue\n }\n const committedInputCount = getCommittedInputCount(\n key as DisclosureCircuitName,\n commitsRevocationRoot,\n )\n const circuitName = key as DisclosureCircuitName\n committedInputCounts.push({ circuitName, count: committedInputCount })\n let compressedCommittedInputs = \"\"\n if (\n circuitName === \"inclusion_check_issuing_country_evm\" ||\n circuitName === \"inclusion_check_nationality_evm\" ||\n circuitName === \"exclusion_check_issuing_country_evm\" ||\n circuitName === \"exclusion_check_nationality_evm\"\n ) {\n const value = proof.committedInputs[circuitName] as CountryCommittedInputs\n const formattedCountries = value.countries\n if (\n circuitName === \"exclusion_check_issuing_country_evm\" ||\n circuitName === \"exclusion_check_nationality_evm\"\n ) {\n formattedCountries.sort((a, b) => a.localeCompare(b))\n }\n const proofType = (() => {\n switch (circuitName) {\n case \"exclusion_check_issuing_country_evm\":\n return ProofType.ISSUING_COUNTRY_EXCLUSION\n case \"exclusion_check_nationality_evm\":\n return ProofType.NATIONALITY_EXCLUSION\n case \"inclusion_check_issuing_country_evm\":\n return ProofType.ISSUING_COUNTRY_INCLUSION\n case \"inclusion_check_nationality_evm\":\n return ProofType.NATIONALITY_INCLUSION\n }\n })()\n compressedCommittedInputs =\n proofType.toString(16).padStart(2, \"0\") +\n ProofTypeLength[proofType].evm.toString(16).padStart(4, \"0\") +\n rightPadArrayWithZeros(\n formattedCountries.map((c) => Array.from(new TextEncoder().encode(c))).flat(),\n 600,\n )\n .map((x) => x.toString(16).padStart(2, \"0\"))\n .join(\"\")\n } else if (circuitName === \"compare_age_evm\") {\n const value = proof.committedInputs[circuitName] as AgeCommittedInputs\n compressedCommittedInputs =\n ProofType.AGE.toString(16).padStart(2, \"0\") +\n ProofTypeLength[ProofType.AGE].evm.toString(16).padStart(4, \"0\") +\n value.minAge.toString(16).padStart(2, \"0\") +\n value.maxAge.toString(16).padStart(2, \"0\")\n } else if (circuitName === \"compare_birthdate_evm\") {\n const value = proof.committedInputs[circuitName] as DateCommittedInputs\n const minDateBytes = Array.from(numberToBytesBE(value.minDateTimestamp, 8))\n const maxDateBytes = Array.from(numberToBytesBE(value.maxDateTimestamp, 8))\n compressedCommittedInputs =\n ProofType.BIRTHDATE.toString(16).padStart(2, \"0\") +\n ProofTypeLength[ProofType.BIRTHDATE].evm.toString(16).padStart(4, \"0\") +\n minDateBytes.map((x) => x.toString(16).padStart(2, \"0\")).join(\"\") +\n maxDateBytes.map((x) => x.toString(16).padStart(2, \"0\")).join(\"\")\n } else if (circuitName === \"compare_expiry_evm\") {\n const value = proof.committedInputs[circuitName] as DateCommittedInputs\n const minDateBytes = Array.from(numberToBytesBE(value.minDateTimestamp, 8))\n const maxDateBytes = Array.from(numberToBytesBE(value.maxDateTimestamp, 8))\n compressedCommittedInputs =\n ProofType.EXPIRY_DATE.toString(16).padStart(2, \"0\") +\n ProofTypeLength[ProofType.EXPIRY_DATE].evm.toString(16).padStart(4, \"0\") +\n minDateBytes.map((x) => x.toString(16).padStart(2, \"0\")).join(\"\") +\n maxDateBytes.map((x) => x.toString(16).padStart(2, \"0\")).join(\"\")\n } else if (circuitName === \"disclose_bytes_evm\") {\n const value = proof.committedInputs[circuitName] as DiscloseCommittedInputs\n compressedCommittedInputs =\n ProofType.DISCLOSE.toString(16).padStart(2, \"0\") +\n ProofTypeLength[ProofType.DISCLOSE].evm.toString(16).padStart(4, \"0\") +\n value.discloseMask.map((x) => x.toString(16).padStart(2, \"0\")).join(\"\") +\n value.disclosedBytes.map((x) => x.toString(16).padStart(2, \"0\")).join(\"\")\n } else if (circuitName === \"bind_evm\") {\n const value = proof.committedInputs[circuitName] as BindCommittedInputs\n compressedCommittedInputs =\n ProofType.BIND.toString(16).padStart(2, \"0\") +\n ProofTypeLength[ProofType.BIND].evm.toString(16).padStart(4, \"0\") +\n rightPadArrayWithZeros(formatBoundData(value.data), 509)\n .map((x) => x.toString(16).padStart(2, \"0\"))\n .join(\"\")\n } else if (circuitName === \"exclusion_check_sanctions_evm\") {\n const value = proof.committedInputs[circuitName] as SanctionsCommittedInputs\n compressedCommittedInputs += ProofType.SANCTIONS_EXCLUSION.toString(16).padStart(2, \"0\")\n compressedCommittedInputs += ProofTypeLength[ProofType.SANCTIONS_EXCLUSION].evm\n .toString(16)\n .padStart(4, \"0\")\n compressedCommittedInputs += Array.from(numberToBytesBE(BigInt(value.rootHash), 32))\n .map((x) => x.toString(16).padStart(2, \"0\"))\n .join(\"\")\n compressedCommittedInputs += value.isStrict ? \"01\" : \"00\"\n } else if (circuitName.startsWith(\"facematch\") && circuitName.endsWith(\"_evm\")) {\n compressedCommittedInputs += facematchStyleInputs(\n ProofType.FACEMATCH,\n proof.committedInputs[circuitName] as FacematchCommittedInputs,\n commitsRevocationRoot,\n )\n } else {\n throw new Error(`Unsupported circuit for EVM verification: ${circuitName}`)\n }\n committedInputs.push({ circuitName, inputs: compressedCommittedInputs })\n }\n const parameterCommitments = getParamCommitmentsFromOuterProof(proofData, proof.version).map(\n (x) => x.toString(16).padStart(64, \"0\"),\n )\n let compressedCommittedInputs = \"\"\n const committedInputCountsArray = []\n for (const commitment of parameterCommitments) {\n const committedInput = committedInputs.find((x) => {\n const rawHashedInputs = sha256(hexToBytes(x.inputs))\n // Shift the hash 8 bits to the right (1 byte)\n // as one byte is dropped in the circuit to fit in the 254-bit field size\n const hashedInputs = new Uint8Array(rawHashedInputs.length)\n // Move each byte 1 position to the right (shifting 8 bits)\n for (let i = 0; i < rawHashedInputs.length - 1; i++) {\n hashedInputs[i + 1] = rawHashedInputs[i]\n }\n // First byte becomes 0 (since we're shifting right)\n hashedInputs[0] = 0\n\n return bytesToHex(hashedInputs) === commitment.replace(\"0x\", \"\")\n })\n if (committedInput) {\n const count = committedInputCounts.find(\n (x) => x.circuitName === committedInput.circuitName,\n )?.count\n if (count) {\n committedInputCountsArray.push(count)\n compressedCommittedInputs += committedInput.inputs\n } else {\n throw new Error(`Unknown circuit name: ${committedInput.circuitName}`)\n }\n } else {\n throw new Error(`Invalid commitment: ${commitment}`)\n }\n }\n const params: SolidityVerifierParameters = {\n version: circuitVersionToBytes32(proof.version!),\n proofVerificationData: {\n // Make sure the vkeyHash is 32 bytes\n vkeyHash: `0x${proof.vkeyHash!.replace(\"0x\", \"\").padStart(64, \"0\")}`,\n proof: `0x${proofData.proof.join(\"\")}`,\n publicInputs: proofData.publicInputs,\n },\n committedInputs: `0x${compressedCommittedInputs}`,\n serviceConfig: {\n validityPeriodInSeconds,\n domain,\n scope: scope ?? \"\",\n devMode,\n },\n }\n return params\n }\n\n /** Verify an outer EVM proof with the RootVerifier of the chain behind `rpcUrl` */\n public static async verify({\n proof,\n rpcUrl,\n validityPeriodInSeconds,\n domain,\n scope,\n devMode,\n }: {\n proof: ProofResult\n rpcUrl: string\n validityPeriodInSeconds?: number\n domain: string\n scope?: string\n devMode?: boolean\n }): Promise<boolean> {\n try {\n const { createPublicClient, http } = await import(\"viem\")\n const { address, abi, functionName } = SolidityVerifier.getDetails()\n const client = createPublicClient({ transport: http(rpcUrl) })\n const params = SolidityVerifier.getParameters({\n proof,\n validityPeriodInSeconds,\n domain,\n scope,\n devMode,\n })\n const result = await client.readContract({ address, abi, functionName, args: [params] })\n return Array.isArray(result) ? Boolean(result[0]) : false\n } catch (error) {\n console.warn(\"Error verifying proof\", error)\n return false\n }\n }\n}\n\nconst toHex = (bytes: Uint8Array) =>\n Array.from(bytes)\n .map((x) => x.toString(16).padStart(2, \"0\"))\n .join(\"\")\n\n/** A face match's committed inputs, as the contract reads them, under the given proof type */\nfunction facematchStyleInputs(\n proofType: ProofType.FACEMATCH | ProofType.ATTESTED_ID,\n value: FacematchCommittedInputs,\n commitsRevocationRoot: boolean = true,\n): string {\n const length = commitsRevocationRoot\n ? ProofTypeLength[proofType].evm\n : getFacematchCommittedInputLength(false).evm\n return (\n proofType.toString(16).padStart(2, \"0\") +\n length.toString(16).padStart(4, \"0\") +\n toHex(numberToBytesBE(BigInt(value.rootKeyLeaf), 32)) +\n (value.environment === \"development\" ? \"00\" : \"01\") +\n toHex(numberToBytesBE(BigInt(value.appIdHash), 32)) +\n toHex(numberToBytesBE(BigInt(value.integrityPubkeyHash), 32)) +\n (value.mode === \"regular\" ? \"01\" : \"02\") +\n (commitsRevocationRoot ? toHex(numberToBytesBE(BigInt(value.revocationRoot ?? 0), 32)) : \"\")\n )\n}\n","import type { ProofResult, Query, QueryResult } from \"@zkpassport/utils\"\nimport { DASHBOARD_API_BASE_URL, VERSION } from \"./constants\"\nimport { noLogger as logger } from \"./logger\"\n\n/** Fire-and-forget: errors are logged, never thrown. */\nexport async function submitProof({\n domain,\n proofs,\n query,\n queryResult,\n scope,\n policyId,\n requestId,\n}: {\n domain: string\n proofs: Array<ProofResult>\n query: Query\n queryResult: QueryResult\n scope: string | undefined\n policyId: string | undefined\n requestId: string | undefined\n}) {\n const payload = proofs.map((p) => ({\n proof: p.proof,\n vkeyHash: p.vkeyHash,\n version: p.version,\n name: p.name,\n index: p.index,\n total: p.total,\n committedInputs: p.committedInputs,\n }))\n try {\n const response = await fetch(`${DASHBOARD_API_BASE_URL}/public/proofs`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n domain,\n proofs: payload,\n query,\n queryResult,\n scope,\n policyId,\n sdkVersion: VERSION,\n requestId,\n }),\n signal: AbortSignal.timeout(30000),\n })\n if (!response.ok) {\n logger.warn(\"API request failed with status:\", response.status)\n } else {\n logger.debug(\"API response status:\", response.status)\n }\n } catch (e) {\n logger.warn(\"API call failed:\", e)\n }\n}\n","import {\n getNumberOfPublicInputs,\n getProofData,\n type PackagedCircuit,\n type ProofResult,\n} from \"@zkpassport/utils\"\nimport { Buffer } from \"buffer/\"\n\nexport type BBVersion = \"v5\" | \"v6\"\n\nconst V6_MIN_CIRCUIT_VERSION = [0, 22, 0] as const\n\nexport function getBBVersionForCircuitVersion(circuitVersion?: string): BBVersion {\n if (!circuitVersion) return \"v6\"\n const parts = circuitVersion.split(\".\").map((x) => Number(x))\n if (parts.length !== 3 || parts.some((n) => Number.isNaN(n))) return \"v6\"\n\n return isAtLeast(parts, V6_MIN_CIRCUIT_VERSION) ? \"v6\" : \"v5\"\n}\n\nexport interface UltraHonkVerifier {\n verifyProof(proofData: {\n proof: Uint8Array\n publicInputs: string[]\n verificationKey: Uint8Array\n }): Promise<boolean>\n}\n\nexport interface LoadedVerifier {\n verifier: UltraHonkVerifier\n destroy: () => Promise<void>\n}\n\nexport async function createUltraHonkVerifier(\n bbVersion: BBVersion,\n { writingDirectory }: { writingDirectory?: string } = {},\n): Promise<LoadedVerifier> {\n await clearStaleCrsCacheOnVersionChange()\n const crsPath = writingDirectory ? writingDirectory + \"/.bb-crs\" : undefined\n\n if (bbVersion === \"v5\") {\n const { UltraHonkVerifierBackend, Barretenberg } = await import(\"@aztec/bb.js\")\n const barretenberg = await Barretenberg.new({ crsPath })\n const verifier = new UltraHonkVerifierBackend(barretenberg)\n return { verifier, destroy: () => barretenberg.destroy() }\n }\n const { UltraHonkVerifierBackend, Barretenberg } = await import(\"@aztec-foundation/bb.js\")\n const barretenberg = await Barretenberg.new({ crsPath })\n const verifier = new UltraHonkVerifierBackend(barretenberg)\n return { verifier, destroy: () => barretenberg.destroy() }\n}\n\nexport class BBVerifier {\n private readonly writingDirectory: string | undefined\n private loadedVerifier: LoadedVerifier | undefined\n\n constructor({ writingDirectory }: { writingDirectory?: string } = {}) {\n this.writingDirectory = writingDirectory\n }\n\n /** Verify a proof with bb.js, starting the bb it needs on first use */\n async verify(proof: ProofResult, circuit: PackagedCircuit): Promise<boolean> {\n const proofData = getProofData(\n proof.proof as string,\n getNumberOfPublicInputs(proof.name!, proof.version),\n )\n this.loadedVerifier ??= await createUltraHonkVerifier(\n getBBVersionForCircuitVersion(proof.version),\n { writingDirectory: this.writingDirectory },\n )\n\n try {\n return await this.loadedVerifier.verifier.verifyProof({\n proof: Buffer.from(proofData.proof.join(\"\"), \"hex\"),\n publicInputs: proofData.publicInputs,\n verificationKey: new Uint8Array(Buffer.from(circuit.vkey, \"base64\")),\n })\n } catch (error) {\n console.warn(`Error verifying proof ${proof.name}`, error)\n return false\n }\n }\n\n /** Release the bb.js instance it started */\n async destroy(): Promise<void> {\n await this.loadedVerifier?.destroy()\n }\n}\n\nconst BB_VERSION_KEY = \"__zkpassport_bb_version\"\nconst BB_CRS_DB_NAME = \"keyval-store\"\nconst BB_CRS_CACHE_VERSION = \"v5\"\n\n// Clear bb cache on v4 -> v5 due to default CRS size change. bb.js 6 reads the bb.js 5 cache.\nasync function clearStaleCrsCacheOnVersionChange(): Promise<void> {\n if (typeof indexedDB === \"undefined\") return\n try {\n const store = typeof localStorage !== \"undefined\" ? localStorage : undefined\n if ((store?.getItem(BB_VERSION_KEY) ?? \"v4\") === BB_CRS_CACHE_VERSION) return\n\n let dbExists = true\n if (typeof indexedDB.databases === \"function\") {\n try {\n dbExists = (await indexedDB.databases()).some((db) => db.name === BB_CRS_DB_NAME)\n } catch {\n dbExists = true\n }\n }\n if (dbExists) {\n await new Promise<void>((resolve) => {\n const req = indexedDB.deleteDatabase(BB_CRS_DB_NAME)\n req.onsuccess = req.onerror = req.onblocked = () => resolve()\n })\n }\n store?.setItem(BB_VERSION_KEY, BB_CRS_CACHE_VERSION)\n } catch {\n // Best-effort cache reset; if it fails, bb.js will surface its own error.\n }\n}\n\nfunction isAtLeast(version: number[], minimum: readonly number[]): boolean {\n for (const [index, minimumPart] of minimum.entries()) {\n if (version[index] !== minimumPart) {\n return version[index] > minimumPart\n }\n }\n return true\n}\n","import type { AllowedVerificationMethod, ProofResult, Query, QueryResult } from \"@zkpassport/utils\"\nimport { VERIFIER_API_BASE_URL } from \"./constants\"\nimport type { VerificationResult } from \"./types\"\n\n// Returns null when the API gave no verdict (unreachable, timed out, server error),\n// so callers can fall back to their own result instead of reporting \"not verified\".\nexport async function verifyWithVerifierApi({\n proofs,\n originalQuery,\n queryResult,\n domain,\n validity,\n scope,\n devMode,\n oprfKeyId,\n allowedVerificationMethods,\n}: {\n proofs: Array<ProofResult>\n originalQuery: Query\n queryResult: QueryResult\n domain: string\n validity?: number\n scope?: string\n devMode?: boolean\n oprfKeyId?: string\n allowedVerificationMethods?: AllowedVerificationMethod[]\n}): Promise<VerificationResult | null> {\n try {\n const response = await fetch(`${VERIFIER_API_BASE_URL}/verify`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n proofs,\n originalQuery,\n queryResult,\n serviceConfig: { domain, scope, validityPeriodInSeconds: validity, devMode },\n oprfKeyId,\n allowedVerificationMethods,\n }),\n signal: AbortSignal.timeout(60000),\n })\n if (response.status >= 500) {\n console.warn(`Verifier API error (status ${response.status})`)\n return null\n }\n const body = (await response.json().catch(() => null)) as\n (VerificationResult & { error?: string }) | null\n if (!body || typeof body.verified !== \"boolean\") {\n console.warn(`Unexpected verifier API response (status ${response.status})`)\n return null\n }\n if (!body.verified) {\n console.warn(\"Verifier API did not verify the proofs:\", body.error)\n return {\n uniqueIdentifier: undefined,\n uniqueIdentifierType: undefined,\n verified: false,\n queryResultErrors: body.queryResultErrors,\n }\n }\n return {\n uniqueIdentifier: body.uniqueIdentifier,\n uniqueIdentifierType: body.uniqueIdentifierType,\n verified: true,\n verificationMethod: body.verificationMethod,\n }\n } catch (e) {\n console.warn(\"Verifier API call failed:\", e)\n return null\n }\n}\n","import {\n type DisclosableIDCredential,\n type IDCredential,\n type IDCredentialValue,\n type NumericalIDCredential,\n type ProofResult,\n type QueryResult,\n type CountryName,\n type JsonRpcRequest,\n type Query,\n type FacematchMode,\n type SanctionsCountries,\n type SanctionsLists,\n type SupportedChain,\n type ProofMode,\n type BoundData,\n type Service,\n NullifierType,\n formatQueryResultDates,\n getChainFromQuery,\n VerificationMethod,\n VerificationTier,\n serializeAllowedVerificationMethods,\n isCircuitVersion,\n isVerificationMethodAllowed,\n type AllowedVerificationMethod,\n} from \"@zkpassport/utils\"\nimport { noLogger as logger } from \"./logger\"\nimport { Buffer } from \"buffer/\"\nimport { createRegistryClient } from \"@zkpassport/registry\"\nimport { Bridge, BridgeInterface, type KeyPair } from \"@obsidion/bridge\"\nimport {\n QueryBuilder,\n QueryBuilderResult,\n OfflineQueryBuilderResult,\n DashboardConfig,\n Policy,\n QueryResultErrors,\n RequestSuccess,\n OnSuccessVerdict,\n VerifierMode,\n VerificationResult,\n RequestedNullifierType,\n VerificationConfig,\n} from \"./types\"\nimport {\n createOfflineQuery,\n generalCompare,\n normalizeCountry,\n numericalCompare,\n rangeCompare,\n} from \"./offline-query\"\nimport { PublicInputChecker, withDocumentType } from \"./public-input-checker\"\nimport { SolidityVerifier } from \"./solidity-verifier\"\nimport { submitProof } from \"./dashboard-api\"\nimport { BBVerifier } from \"./bb-verifier\"\nimport { verifyWithVerifierApi } from \"./verifier-api\"\nimport { DASHBOARD_API_BASE_URL, DEFAULT_VALIDITY, VERSION } from \"./constants\"\n\n// If Buffer is not defined, then we use the Buffer from the buffer package\nif (typeof globalThis.Buffer === \"undefined\") {\n globalThis.Buffer = Buffer as any // eslint-disable-line\n if (typeof window !== \"undefined\") {\n window.Buffer = Buffer as any // eslint-disable-line\n }\n}\n\nconst DEFAULT_PURPOSE = \"Verify identity privately\"\n\ntype RegistryClientOptions = NonNullable<Parameters<typeof createRegistryClient>[1]>\n\n/** The registry client overrides a {@link VerificationConfig} asks for */\nexport function getRegistryClientOptions(\n config: VerificationConfig | undefined,\n): RegistryClientOptions {\n if (!config) return {}\n const { circuitsUrl, ...options } = config\n if (!circuitsUrl) return options\n const base = circuitsUrl.replace(/\\/+$/, \"\")\n return {\n ...options,\n circuitManifestUrlGenerator: (_chainId, { root, version }) =>\n root\n ? `${base}/by-root/${root}/manifest.json`\n : `${base}/by-version/${version}/manifest.json`,\n packagedCircuitUrlGenerator: (_chainId, hash) => `${base}/by-hash/${hash}.json`,\n }\n}\n\nfunction realNullifierType({\n uniqueIdentifier,\n uniqueIdentifierType,\n}: VerificationResult): NullifierType | undefined {\n if (uniqueIdentifierType === NullifierType.SALTED_MOCK) return NullifierType.SALTED\n if (uniqueIdentifierType === NullifierType.NON_SALTED_MOCK) {\n // Mock IDs keep their mock type even when the identifier is hidden\n return uniqueIdentifier === undefined ? NullifierType.NONE : NullifierType.NON_SALTED\n }\n return uniqueIdentifierType\n}\n\n/**\n * Applies the service's credential policy to a result, whichever verifier gave it: the hosted\n * verifier checks proofs under the default policy, not the service's. A result without a scheme\n * comes from a verifier that predates it, which only knew chip reads.\n */\nfunction enforceVerificationMethodPolicy(\n result: VerificationResult,\n allowedVerificationMethods: AllowedVerificationMethod[] | undefined,\n): VerificationResult {\n if (!result.verified) return result\n const scheme = result.verificationMethod ?? VerificationMethod.ICAO_CHIP\n if (isVerificationMethodAllowed(scheme, allowedVerificationMethods)) return result\n console.warn(`The verification method ${scheme} is not one the service accepts`)\n return {\n ...result,\n verified: false,\n uniqueIdentifier: undefined,\n uniqueIdentifierType: undefined,\n }\n}\n\nfunction enforceUniqueIdentifierType(\n result: VerificationResult,\n requestedType: RequestedNullifierType | undefined,\n): VerificationResult {\n if (requestedType == null || !result.verified) return result\n if (realNullifierType(result) === requestedType) return result\n const proofType = result.uniqueIdentifierType\n const proofTypeName = proofType === undefined ? \"missing\" : NullifierType[proofType]\n console.warn(\n `Unique identifier type mismatch: requested ${NullifierType[requestedType]}, got ${proofTypeName}`,\n )\n return {\n ...result,\n uniqueIdentifier: undefined,\n uniqueIdentifierType: undefined,\n verified: false,\n }\n}\n\nexport {\n getChainFromId,\n getIdFromChain,\n SANCTIONED_COUNTRIES,\n EU_COUNTRIES,\n EEA_COUNTRIES,\n SCHENGEN_COUNTRIES,\n ASEAN_COUNTRIES,\n MERCOSUR_COUNTRIES,\n ProofType,\n ProofTypeLength,\n NullifierType,\n type ProofResult,\n type DisclosableIDCredential,\n type IDCredential,\n type IDCredentialValue,\n type NumericalIDCredential,\n type QueryResult,\n type CountryName,\n type JsonRpcRequest,\n type Query,\n type FacematchMode,\n type SanctionsCountries,\n type SanctionsLists,\n type SupportedChain,\n type ProofMode,\n type BoundData,\n type Service,\n VerificationMethod,\n VerificationTier,\n DEFAULT_ALLOWED_VERIFICATION_METHODS,\n getTierForVerificationMethod,\n isVerificationMethodAllowed,\n expandAllowedVerificationMethods,\n type AllowedVerificationMethod,\n} from \"@zkpassport/utils\"\n\nexport * from \"./types\"\nexport { createOfflineQuery, normalizeCountry } from \"./offline-query\"\nexport type { KeyPair } from \"@obsidion/bridge\"\nexport { VERSION } from \"./constants\"\n\nlet onResultDeprecationWarned = false\nfunction warnOnResultDeprecated() {\n if (onResultDeprecationWarned) return\n onResultDeprecationWarned = true\n console.warn(\n \"[zkpassport] onResult is deprecated. Use onSuccess and verify the proofs on your backend with verify().\",\n )\n}\n\nexport class ZKPassport {\n private domain: string\n private domainProvided: boolean\n private topicToConfig: Record<string, Query> = {}\n private topicToLocalConfig: Record<\n string,\n {\n validity: number\n mode: ProofMode\n devMode: boolean\n uniqueIdentifierType: RequestedNullifierType | undefined\n oprfKeyId: string | null\n returnDeepLink: string | undefined\n verifierMode: VerifierMode | undefined\n config: VerificationConfig | undefined\n appClip: boolean\n allowedVerificationMethods: AllowedVerificationMethod[] | undefined\n }\n > = {}\n private topicToPublicKey: Record<string, string> = {}\n private topicToBridge: Record<string, BridgeInterface> = {}\n private topicToRequestReceived: Record<string, boolean> = {}\n private topicToService: Record<string, Service> = {}\n private topicToCallerPurpose: Record<string, string | undefined> = {}\n private topicToProofs: Record<string, Array<ProofResult>> = {}\n private topicToFailedProofCount: Record<string, number> = {}\n private topicToResults: Record<string, QueryResult> = {}\n private topicToPolicy: Record<string, { id: string; proofStorageEnabled: boolean }> = {}\n private dashboardConfig: DashboardConfig | null = null\n private dashboardConfigPromise: Promise<DashboardConfig | null> | null = null\n private dashboardConfigError: Error | null = null\n\n private onRequestReceivedCallbacks: Record<string, Array<() => void>> = {}\n private onGeneratingProofCallbacks: Record<string, Array<(topic: string) => void>> = {}\n private onBridgeConnectCallbacks: Record<string, Array<() => void>> = {}\n private onBridgeConnectionLostCallbacks: Record<string, Array<() => void>> = {}\n private onProofGeneratedCallbacks: Record<string, Array<(proof: ProofResult) => void>> = {}\n private onSuccessCallbacks: Record<\n string,\n Array<(response: RequestSuccess) => OnSuccessVerdict>\n > = {}\n private onResultCallbacks: Record<\n string,\n Array<\n (response: {\n uniqueIdentifier: string | undefined\n uniqueIdentifierType: NullifierType | undefined\n verified: boolean\n verificationMethod?: VerificationMethod\n result: QueryResult\n queryResultErrors?: Partial<QueryResultErrors>\n proofs: ProofResult[]\n sdkInstance: ZKPassport\n }) => void\n >\n > = {}\n private onRejectCallbacks: Record<string, Array<() => void>> = {}\n private onErrorCallbacks: Record<string, Array<(topic: string) => void>> = {}\n //private wasmVerifierInit: boolean = false\n\n private normalizeDomain(domain: string) {\n return (\n domain\n .trim()\n // Remove protocol\n .replace(/^https?:\\/\\//, \"\")\n // Remove trailing slash and anything after it\n .replace(/\\/[^/]*$/, \"\")\n // Remove port\n .replace(/:[0-9]+/, \"\")\n // Remove query parameters\n .replace(/\\?.*$/, \"\")\n // Remove hash\n .replace(/#.*$/, \"\")\n .toLowerCase()\n )\n }\n\n constructor(_domain?: string) {\n if (!_domain && typeof window === \"undefined\") {\n throw new Error(\"Domain argument is required in Node.js environment\")\n }\n this.domainProvided = !!_domain\n this.domain = this.normalizeDomain(_domain || window.location.hostname)\n }\n\n private async handleResult(topic: string) {\n logger.debug(\"Handling result for topic:\", topic)\n const result = this.topicToResults[topic]\n // Clear the results straight away to avoid concurrency issues\n delete this.topicToResults[topic]\n const proofs = this.topicToProofs[topic]\n const hasFailedProofs = this.topicToFailedProofCount[topic] > 0\n const requestSucceeded = !hasFailedProofs && proofs.length > 0\n\n if (requestSucceeded) {\n // A throwing callback must not block proof storage or the onResult flow below\n try {\n await Promise.all(\n this.onSuccessCallbacks[topic].map((callback) => callback({ proofs, result })),\n )\n } catch (reason) {\n logger.error(\"onSuccess callback failed:\", reason)\n }\n }\n\n // Browser-only callers (no explicit domain) can't be authenticated; devMode submits would\n // pollute real-domain stats.\n const devMode = this.topicToLocalConfig[topic]?.devMode === true\n const proofStorageEnabled = this.topicToPolicy[topic]?.proofStorageEnabled === true\n if (requestSucceeded && proofStorageEnabled && this.domainProvided && !devMode) {\n void submitProof({\n domain: this.domain,\n proofs,\n query: this.topicToConfig[topic],\n queryResult: result,\n scope: this.topicToService[topic]?.scope,\n policyId: this.topicToPolicy[topic]?.id,\n requestId: this.topicToPublicKey[topic],\n })\n }\n\n // Verification only runs for the deprecated onResult listeners\n if (this.onResultCallbacks[topic].length > 0) {\n await this.verifyAndReportResult(topic, proofs, result, hasFailedProofs)\n }\n\n delete this.topicToProofs[topic]\n delete this.topicToFailedProofCount[topic]\n }\n\n private async verifyAndReportResult(\n topic: string,\n proofs: Array<ProofResult>,\n result: QueryResult,\n hasFailedProofs: boolean,\n ) {\n let verification: VerificationResult\n try {\n verification = await this.verify({\n proofs,\n originalQuery: this.topicToConfig[topic],\n queryResult: result,\n validity: this.topicToLocalConfig[topic]?.validity,\n scope: this.topicToService[topic]?.scope,\n devMode: this.topicToLocalConfig[topic]?.devMode,\n oprfKeyId: this.topicToLocalConfig[topic]?.oprfKeyId ?? undefined,\n uniqueIdentifierType: this.topicToLocalConfig[topic]?.uniqueIdentifierType,\n verifierMode: this.topicToLocalConfig[topic]?.verifierMode,\n config: this.topicToLocalConfig[topic]?.config,\n allowedVerificationMethods: this.topicToLocalConfig[topic]?.allowedVerificationMethods,\n })\n } catch (e) {\n const message = e instanceof Error ? e.message : String(e)\n await Promise.all(this.onErrorCallbacks[topic].map((callback) => callback(message)))\n return\n }\n const {\n uniqueIdentifier,\n uniqueIdentifierType,\n verified,\n queryResultErrors,\n verificationMethod,\n } = verification\n logger.debug(\"Verification complete, verified:\", verified)\n await Promise.all(\n this.onResultCallbacks[topic].map((callback) =>\n callback({\n // If there are failed proofs, we don't return the unique identifier\n // and we set the verified result to false\n uniqueIdentifier: hasFailedProofs ? undefined : uniqueIdentifier,\n uniqueIdentifierType: hasFailedProofs ? undefined : uniqueIdentifierType,\n verified: hasFailedProofs ? false : verified,\n verificationMethod,\n result,\n queryResultErrors,\n proofs,\n sdkInstance: this,\n }),\n ),\n )\n }\n\n /**\n * @notice Handle an encrypted message.\n * @param request The request.\n * @param outerRequest The outer request.\n */\n private async handleEncryptedMessage(topic: string, request: JsonRpcRequest) {\n logger.debug(\"Received encrypted message:\", request)\n if (request.method === \"accept\") {\n logger.debug(`User accepted the request and is generating a proof`)\n await Promise.all(this.onGeneratingProofCallbacks[topic].map((callback) => callback(topic)))\n } else if (request.method === \"reject\") {\n logger.debug(`User rejected the request`)\n await Promise.all(this.onRejectCallbacks[topic].map((callback) => callback()))\n } else if (request.method === \"proof\") {\n logger.debug(`User generated proof`)\n this.topicToProofs[topic].push(request.params)\n await Promise.all(\n this.onProofGeneratedCallbacks[topic].map((callback) => callback(request.params)),\n )\n // If the results were received before all the proofs were generated,\n // we can handle the result now\n if (\n this.topicToResults[topic] &&\n request.params.total ===\n this.topicToProofs[topic].length + this.topicToFailedProofCount[topic]\n ) {\n await this.handleResult(topic)\n }\n } else if (request.method === \"done\") {\n logger.debug(`User sent the query result`)\n this.topicToResults[topic] = formatQueryResultDates(request.params)\n // Make sure all the proofs have been received, otherwise we'll handle the result later\n // once the proofs have all been received\n if (\n this.topicToProofs[topic].length > 0 &&\n this.topicToProofs[topic].length + this.topicToFailedProofCount[topic] ===\n this.topicToProofs[topic][0].total\n ) {\n await this.handleResult(topic)\n }\n } else if (request.method === \"error\") {\n const error = request.params.error\n if (error && error === \"This ID is not supported yet\") {\n // This means the user has an ID that is not supported yet\n // So we won't receive any proofs and we can handle the result now\n if (this.topicToResults[topic]) {\n await this.handleResult(topic)\n }\n } else if (error && error.startsWith(\"Cannot generate proof\")) {\n // This means one of the disclosure proofs failed to be generated\n // So we need to keep track of the failed proof count\n this.topicToFailedProofCount[topic] += 1\n // If the expected proof count is now equal to the number of proofs received\n // and the results were received, we can handle the result now\n if (\n this.topicToResults[topic] &&\n this.topicToProofs[topic].length > 0 &&\n this.topicToProofs[topic].length + this.topicToFailedProofCount[topic] ===\n this.topicToProofs[topic][0].total\n ) {\n await this.handleResult(topic)\n }\n }\n await Promise.all(this.onErrorCallbacks[topic].map((callback) => callback(error)))\n }\n }\n\n private assertNotPolicyLocked(topic: string, method: string) {\n if (this.topicToPolicy[topic]) {\n throw new Error(\n `Cannot call .${method}() on a policy-driven request. The query for policy '${this.topicToPolicy[topic].id}' is immutable.`,\n )\n }\n }\n\n private getZkPassportRequest<T extends \"online\" | \"offline\" = \"online\">(\n topic: string,\n ): QueryBuilder<T> {\n return {\n eq: <T extends IDCredential>(key: T, value: IDCredentialValue<T>) => {\n this.assertNotPolicyLocked(topic, \"eq\")\n if (key === \"issuing_country\" || key === \"nationality\") {\n value = normalizeCountry(value as CountryName) as IDCredentialValue<T>\n }\n generalCompare(\"eq\", key, value, topic, this.topicToConfig)\n return this.getZkPassportRequest(topic)\n },\n gte: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n this.assertNotPolicyLocked(topic, \"gte\")\n numericalCompare(\"gte\", key, value, topic, this.topicToConfig)\n if (key === \"age\" && ((value as number) < 1 || (value as number) >= 100)) {\n throw new Error(\"Age must be between 1 and 99 (inclusive)\")\n }\n return this.getZkPassportRequest(topic)\n },\n gt: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n this.assertNotPolicyLocked(topic, \"gt\")\n numericalCompare(\"gt\", key, value, topic, this.topicToConfig)\n return this.getZkPassportRequest(topic)\n },\n lte: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n this.assertNotPolicyLocked(topic, \"lte\")\n numericalCompare(\"lte\", key, value, topic, this.topicToConfig)\n return this.getZkPassportRequest(topic)\n },\n lt: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n this.assertNotPolicyLocked(topic, \"lt\")\n numericalCompare(\"lt\", key, value, topic, this.topicToConfig)\n return this.getZkPassportRequest(topic)\n },\n range: <T extends NumericalIDCredential>(\n key: T,\n start: IDCredentialValue<T>,\n end: IDCredentialValue<T>,\n ) => {\n this.assertNotPolicyLocked(topic, \"range\")\n rangeCompare(key, [start, end], topic, this.topicToConfig)\n return this.getZkPassportRequest(topic)\n },\n in: <T extends \"nationality\" | \"issuing_country\">(key: T, value: IDCredentialValue<T>[]) => {\n this.assertNotPolicyLocked(topic, \"in\")\n value = value.map((v) => normalizeCountry(v as CountryName)) as IDCredentialValue<T>[]\n generalCompare(\"in\", key, value, topic, this.topicToConfig)\n return this.getZkPassportRequest(topic)\n },\n out: <T extends \"nationality\" | \"issuing_country\">(key: T, value: IDCredentialValue<T>[]) => {\n this.assertNotPolicyLocked(topic, \"out\")\n value = value.map((v) => normalizeCountry(v as CountryName)) as IDCredentialValue<T>[]\n generalCompare(\"out\", key, value, topic, this.topicToConfig)\n return this.getZkPassportRequest(topic)\n },\n disclose: (key: DisclosableIDCredential) => {\n this.assertNotPolicyLocked(topic, \"disclose\")\n this.topicToConfig[topic][key] = {\n ...this.topicToConfig[topic][key],\n disclose: true,\n }\n return this.getZkPassportRequest(topic)\n },\n bind: <T extends keyof BoundData>(\n key: T,\n value: T extends \"chain\"\n ? SupportedChain\n : T extends \"user_address\"\n ? `0x${string}`\n : string | undefined,\n ) => {\n this.topicToConfig[topic].bind = {\n ...this.topicToConfig[topic].bind,\n [key]: value,\n }\n return this.getZkPassportRequest(topic)\n },\n sanctions: (\n countries: SanctionsCountries = \"all\",\n lists: SanctionsLists = \"all\",\n options: { strict?: boolean } = { strict: false },\n ) => {\n this.assertNotPolicyLocked(topic, \"sanctions\")\n this.topicToConfig[topic].sanctions = {\n ...this.topicToConfig[topic].sanctions,\n countries,\n // TODO: enable this once the circuits support custom lists\n /*countries === \"all\"\n ? \"all\"\n : Array.isArray(countries)\n ? ([\n ...(this.topicToConfig[topic].sanctions?.countries ?? []),\n ...countries,\n ] as SanctionsCountries)\n : ([\n ...(this.topicToConfig[topic].sanctions?.countries ?? []),\n countries,\n ] as SanctionsCountries),*/\n lists,\n // TODO: enable this once the circuits support custom lists\n /*lists === \"all\"\n ? \"all\"\n : Array.isArray(lists)\n ? [...(this.topicToConfig[topic].sanctions?.lists ?? []), ...lists]\n : [...(this.topicToConfig[topic].sanctions?.lists ?? []), lists],*/\n strict: options.strict ?? false,\n }\n return this.getZkPassportRequest(topic)\n },\n facematch: (mode: FacematchMode = \"strict\") => {\n this.assertNotPolicyLocked(topic, \"facematch\")\n this.topicToConfig[topic].facematch = {\n mode,\n }\n return this.getZkPassportRequest(topic)\n },\n raw: (query: Query) => {\n this.assertNotPolicyLocked(topic, \"raw\")\n const { policy, bind, ...conditions } = query\n if (policy) {\n if (Object.keys(conditions).length > 0) {\n throw new Error(\"A query with `policy` cannot also carry conditions (bind is allowed).\")\n }\n this.getZkPassportRequest(topic).policy(policy)\n if (bind) this.topicToConfig[topic].bind = bind\n } else {\n this.topicToConfig[topic] = query\n }\n return this.getZkPassportRequest(topic)\n },\n policy: (id: string) => {\n this.assertCanApplyPolicy(topic, id)\n if (!this.dashboardConfig) {\n if (this.dashboardConfigError) throw this.dashboardConfigError\n throw new Error(\n `${this.domain} is not set up for ZKPassport verification. If this is your site, ` +\n `register the domain at https://dashboard.zkpassport.id.`,\n )\n }\n const policy = this.findPolicy(this.dashboardConfig, id)\n // Copy the query: the policy object is reused across requests, and a\n // later .bind() writes into it\n const { bind: _, ...policyQuery } = policy.query\n this.topicToConfig[topic] = policyQuery\n const svc = this.topicToService[topic]\n if (svc) {\n if (!this.topicToCallerPurpose[topic]) {\n svc.purpose = policy.purpose || DEFAULT_PURPOSE\n }\n if (!svc.scope) {\n svc.scope = policy.id\n }\n svc.policyId = policy.id\n }\n this.topicToPolicy[topic] = {\n id: policy.id,\n proofStorageEnabled: policy.proofStorageEnabled === true,\n }\n return this.getZkPassportRequest(topic)\n },\n done: (() => {\n this.topicToFailedProofCount[topic] = 0\n // Expose document_type if any fields are disclosed\n this.topicToConfig[topic] = withDocumentType(this.topicToConfig[topic])\n if (topic === \"offline-query\") {\n const query = this.topicToConfig[topic]\n delete this.topicToConfig[topic]\n delete this.topicToPolicy[topic]\n return { query }\n }\n\n const localConfig = this.topicToLocalConfig[topic]\n const query = this.topicToConfig[topic]\n const hasFaceMatch = !!query.facematch\n const hasStrictFacematch = !!query.facematch && query.facematch?.mode === \"strict\"\n\n // If nullifier type wasn't explicitly set, default to SALTED only for strict facematch\n // if (localConfig.uniqueIdentifierType === undefined) {\n // if (hasStrictFacematch) {\n // localConfig.uniqueIdentifierType = NullifierType.SALTED\n // if (!localConfig.oprfKeyId) {\n // localConfig.oprfKeyId = OPRF_DEFAULT_KEY_ID\n // }\n // }\n // }\n\n // Validate: SALTED nullifier requires strict facematch\n if (localConfig.uniqueIdentifierType === NullifierType.SALTED) {\n if ((localConfig.devMode === false && !hasStrictFacematch) || !hasFaceMatch) {\n throw new Error(\n \"Salted nullifier requires strict facematch. Add .facematch('strict') to your query or remove the salted nullifier option.\",\n )\n }\n }\n\n return {\n url: this._getUrl(topic),\n query: this.topicToConfig[topic],\n requestId: topic,\n policy: this.topicToPolicy[topic]?.id,\n onRequestReceived: (callback: () => void) =>\n this.onRequestReceivedCallbacks[topic].push(callback),\n onGeneratingProof: (callback: () => void) =>\n this.onGeneratingProofCallbacks[topic].push(callback),\n onBridgeConnect: (callback: () => void) =>\n this.onBridgeConnectCallbacks[topic].push(callback),\n onBridgeConnectionLost: (callback: () => void) =>\n this.onBridgeConnectionLostCallbacks[topic].push(callback),\n onProofGenerated: (callback: (proof: ProofResult) => void) =>\n this.onProofGeneratedCallbacks[topic].push(callback),\n onSuccess: (callback: (response: RequestSuccess) => OnSuccessVerdict) =>\n this.onSuccessCallbacks[topic].push(callback),\n onResult: (\n callback: (response: {\n uniqueIdentifier: string | undefined\n uniqueIdentifierType: NullifierType | undefined\n verified: boolean\n verificationMethod?: VerificationMethod\n result: QueryResult\n queryResultErrors?: Partial<QueryResultErrors>\n proofs: ProofResult[]\n sdkInstance: ZKPassport\n }) => void,\n ) => {\n warnOnResultDeprecated()\n this.onResultCallbacks[topic].push(callback)\n },\n onReject: (callback: () => void) => this.onRejectCallbacks[topic].push(callback),\n onError: (callback: (error: string) => void) =>\n this.onErrorCallbacks[topic].push(callback),\n isBridgeConnected: () => this.topicToBridge[topic].isBridgeConnected(),\n requestReceived: () => this.topicToRequestReceived[topic] === true,\n }\n }) as () => T extends \"online\" ? QueryBuilderResult : OfflineQueryBuilderResult,\n }\n }\n\n private async getDashboardConfig(): Promise<DashboardConfig | null> {\n if (this.dashboardConfig) return this.dashboardConfig\n if (!this.dashboardConfigPromise) {\n this.dashboardConfigPromise = this.fetchDashboardConfig()\n .then((c) => {\n this.dashboardConfig = c\n return c\n })\n .catch((e) => {\n this.dashboardConfigPromise = null\n throw e\n })\n }\n return this.dashboardConfigPromise\n }\n\n // Returns null when the domain is not registered with the dashboard.\n // That answer gets cached like a normal config; only failed requests are retried.\n private async fetchDashboardConfig(): Promise<DashboardConfig | null> {\n const url = `${DASHBOARD_API_BASE_URL}/public/project?domain=${encodeURIComponent(this.domain)}`\n let response: Response\n try {\n response = await fetch(url, { signal: AbortSignal.timeout(10000) })\n } catch (e) {\n throw new Error(\n `Failed to fetch dashboard config for domain '${this.domain}': ${(e as Error).message}`,\n )\n }\n if (!response.ok) {\n throw new Error(\n `Failed to fetch dashboard config for domain '${this.domain}': ${response.status} ${response.statusText}`,\n )\n }\n const config = (await response.json()) as DashboardConfig\n if (config && config.project === null) {\n return null\n }\n if (!config || !config.project || !Array.isArray(config.policies)) {\n throw new Error(`Invalid dashboard config response for domain '${this.domain}'`)\n }\n return config\n }\n\n private findPolicy(config: DashboardConfig, policyId: string): Policy {\n const policy = config.policies.find((p) => p.id === policyId)\n if (!policy) {\n throw new Error(\n `Policy '${policyId}' not found for domain '${this.domain}'. The dashboard returned ${config.policies.length} policies for this domain.`,\n )\n }\n if (!policy.query || typeof policy.query !== \"object\") {\n throw new Error(\n `Invalid policy '${policyId}' for domain '${this.domain}': missing query object.`,\n )\n }\n return policy\n }\n\n private assertCanApplyPolicy(topic: string, id: string): void {\n if (typeof id !== \"string\" || id.length === 0) {\n throw new Error(\".policy() requires a non-empty string id.\")\n }\n if (this.topicToPolicy[topic]) {\n throw new Error(\n `Cannot call .policy() more than once on a request (already set to '${this.topicToPolicy[topic].id}').`,\n )\n }\n if (Object.keys(this.topicToConfig[topic]).length > 0) {\n throw new Error(\n \"Cannot combine .policy() with builder methods like .gte()/.disclose()/etc. Call .policy() first; only .bind() may follow it.\",\n )\n }\n }\n\n /**\n * @notice Create a new request. To apply a policy, chain `.policy('<id>')` on\n * the returned builder; a policy locks the query.\n * @param name Your service name. Defaults to the dashboard branding, then the domain.\n * @param logo Your service logo. Defaults to the dashboard branding.\n * @param purpose Explanation shown to the user. Defaults to the policy's purpose (if any), then a generic message.\n * @param scope Use-case scope (drives the nullifier). Defaults to the policy id (if any), then the domain.\n * @param projectID The project ID of your service\n * @param validity How many seconds ago the proof checking the expiry date of the ID should have been generated\n * @param mode The proof mode (e.g. \"fast\" / \"compressed\").\n * @param devMode Whether to enable dev mode. This will allow you to verify mock proofs (i.e. from ZKR)\n * @param verifierMode How the received proofs are verified: \"local\", \"api\" or \"auto\" (default).\n * @param keyPairOverride A keypair from {@link getRequestKeyPair}, which keeps the request ID and bridge topic.\n * @param replayMissedMessages Redelivers what was already sent on this topic, for a request resumed on a new page.\n * @param config Settings for verifying the received proofs, see {@link VerificationConfig}.\n * @param allowedVerificationMethods The credentials your service accepts: tiers and/or exact schemes,\n * see {@link AllowedVerificationMethod}. Defaults to signed credentials only (tier 1); an ID verified\n * another way is refused by the app before proving and by `verify()` after.\n * @returns The query builder object.\n */\n public async request({\n name,\n logo,\n purpose,\n scope,\n projectID,\n mode,\n validity,\n devMode,\n uniqueIdentifierType,\n oprfKeyId,\n topicOverride,\n keyPairOverride,\n replayMissedMessages,\n cloudProverUrl,\n bridgeUrl,\n returnDeepLink,\n verifierMode,\n config,\n overrides,\n allowedVerificationMethods,\n }: {\n name?: string\n logo?: string\n purpose?: string\n scope?: string\n mode?: ProofMode\n projectID?: string\n validity?: number\n devMode?: boolean\n uniqueIdentifierType?: RequestedNullifierType\n oprfKeyId?: string\n topicOverride?: string\n keyPairOverride?: KeyPair\n replayMissedMessages?: boolean\n cloudProverUrl?: string\n bridgeUrl?: string\n returnDeepLink?: string\n verifierMode?: VerifierMode\n config?: VerificationConfig\n /** `appClip` allows the popup to send a chip-only request to the no-install App Clip lane */\n overrides?: { appClip?: boolean }\n allowedVerificationMethods?: AllowedVerificationMethod[]\n }): Promise<QueryBuilder> {\n if (topicOverride === \"offline-query\") {\n throw new Error(\"You cannot override the topic with 'offline-query'\")\n }\n // Rejects unknown entries now rather than in the app\n if (allowedVerificationMethods) serializeAllowedVerificationMethods(allowedVerificationMethods)\n\n if (oprfKeyId && uniqueIdentifierType === NullifierType.NONE) {\n throw new Error(\n \"An OPRF key cannot be used with the NONE unique identifier type. Remove the oprfKeyId option or use the SALTED type.\",\n )\n }\n\n let dashboardConfig: DashboardConfig | null = null\n try {\n dashboardConfig = await this.getDashboardConfig()\n this.dashboardConfigError = null\n } catch (e) {\n this.dashboardConfigError = e as Error\n }\n\n const bridge = await Bridge.create({\n keyPair: keyPairOverride,\n bridgeId: topicOverride,\n bridgeUrl,\n replayFrom: replayMissedMessages ? 1 : undefined,\n })\n\n const topic = bridge.connection.getBridgeId()\n\n this.topicToConfig[topic] = {}\n this.topicToCallerPurpose[topic] = purpose\n this.topicToService[topic] = {\n name: name || dashboardConfig?.project?.name || this.domain,\n logo: logo || dashboardConfig?.project?.logoUrl || \"\",\n purpose: purpose || DEFAULT_PURPOSE,\n scope,\n projectID,\n cloudProverUrl,\n bridgeUrl,\n }\n this.topicToProofs[topic] = []\n this.topicToLocalConfig[topic] = {\n validity: validity || DEFAULT_VALIDITY,\n mode: mode || \"fast\",\n devMode: devMode ?? false,\n uniqueIdentifierType: oprfKeyId ? NullifierType.SALTED : uniqueIdentifierType,\n oprfKeyId: oprfKeyId ?? null,\n returnDeepLink,\n verifierMode,\n config,\n appClip: overrides?.appClip ?? false,\n allowedVerificationMethods,\n }\n\n this.onRequestReceivedCallbacks[topic] = []\n this.onGeneratingProofCallbacks[topic] = []\n this.onBridgeConnectCallbacks[topic] = []\n this.onBridgeConnectionLostCallbacks[topic] = []\n this.onProofGeneratedCallbacks[topic] = []\n this.onSuccessCallbacks[topic] = []\n this.onResultCallbacks[topic] = []\n this.onRejectCallbacks[topic] = []\n this.onErrorCallbacks[topic] = []\n\n this.topicToPublicKey[topic] = bridge.getPublicKey()\n\n this.topicToBridge[topic] = bridge\n\n bridge.onConnect(async (reconnection: boolean) => {\n logger.debug(\"Bridge connected\")\n logger.debug(\"Is reconnection:\", reconnection)\n await Promise.all(this.onBridgeConnectCallbacks[topic].map((callback) => callback()))\n })\n bridge.onDisconnect(async (event) => {\n if (event.wasIntentionalClose || event.willReconnect) return\n logger.debug(\"Bridge connection lost\")\n await Promise.all(this.onBridgeConnectionLostCallbacks[topic].map((callback) => callback()))\n })\n bridge.onSecureChannelEstablished(async () => {\n logger.debug(\"Secure channel established\")\n await Promise.all(this.onRequestReceivedCallbacks[topic].map((callback) => callback()))\n })\n // eslint-disable-next-line\n bridge.onSecureMessage(async (message: any) => {\n logger.debug(\"Received message:\", message)\n try {\n await this.handleEncryptedMessage(topic, message)\n } catch (reason) {\n logger.error(\"Failed to handle a bridge message:\", reason)\n }\n })\n return this.getZkPassportRequest(topic)\n }\n\n /**\n * @notice Create a new offline query\n * Unlike request(), this function does not connect to the bridge.\n * It returns only the query object and no callbacks and no URL.\n * This can be useful to recreate the same query server-side when calling `verify()`\n * to ensure the original query wasn't tampered with.\n * @returns The query builder object.\n */\n public createQuery(): QueryBuilder<\"offline\"> {\n return createOfflineQuery()\n }\n\n /**\n * @notice Verify the proofs received from the mobile app.\n * @param proofs The proofs to verify.\n * @param originalQuery The original query that was sent to the mobile app.\n * @param queryResult The query result to verify against\n * @param validity How many seconds ago the proof checking the expiry date of the ID should have been generated\n * @param scope The scope used in the original request, if any. Proofs generated for a different scope fail verification.\n * @param devMode Whether to enable dev mode. This will allow you to verify mock proofs (i.e. from ZKR)\n * @param writingDirectory The directory (e.g. `./tmp`) where the necessary temporary artifacts for verification are written to.\n * It should only be needed when running the `verify` function on a server with restricted write access (e.g. Vercel)\n * @param oprfKeyId The OPRF key id used in the original request, if any.\n * @param uniqueIdentifierType The unique identifier type requested in the original request, if any.\n * Proofs using a different type fail verification.\n * @param verifierMode \"local\" verifies with the verifier bundled in this SDK, \"api\" with the\n * ZKPassport verifier API, and \"auto\" (default) verifies locally but defers to the API when\n * the local result is not verified — e.g. proofs from a newer bb version than this SDK supports.\n * @param config Verification settings such as the RPC URL, see {@link VerificationConfig}.\n * @param allowedVerificationMethods The credentials your service accepts, see {@link AllowedVerificationMethod}.\n * Defaults to signed credentials only (tier 1).\n * @returns An object containing the unique identifier associated to the user\n * and a boolean indicating whether the proofs were successfully verified.\n */\n public async verify({\n proofs,\n originalQuery,\n queryResult,\n validity,\n scope,\n devMode = false,\n writingDirectory,\n oprfKeyId,\n uniqueIdentifierType,\n verifierMode = \"auto\",\n config,\n allowedVerificationMethods,\n }: {\n proofs: Array<ProofResult>\n originalQuery: Query\n queryResult: QueryResult\n validity?: number\n scope?: string\n devMode?: boolean\n writingDirectory?: string\n oprfKeyId?: string\n uniqueIdentifierType?: RequestedNullifierType\n verifierMode?: VerifierMode\n config?: VerificationConfig\n allowedVerificationMethods?: AllowedVerificationMethod[]\n }): Promise<VerificationResult> {\n if (!originalQuery || !queryResult) {\n throw new Error(\"verify() requires `originalQuery` and `queryResult`\")\n }\n // Expose document_type if any fields are disclosed\n originalQuery = withDocumentType(originalQuery)\n const notVerified: VerificationResult = {\n uniqueIdentifier: undefined,\n uniqueIdentifierType: undefined,\n verified: false,\n }\n // If no proofs were generated, the results can't be trusted.\n // We still return it but verified will be false\n if (!proofs || proofs.length === 0) {\n return notVerified\n }\n const params = {\n proofs,\n originalQuery,\n queryResult,\n validity,\n scope,\n devMode,\n oprfKeyId,\n allowedVerificationMethods,\n }\n const localParams = { ...params, writingDirectory, config }\n const apiParams = { ...params, domain: this.domain }\n const requestedType = oprfKeyId ? NullifierType.SALTED : uniqueIdentifierType\n\n let result: VerificationResult\n // The hosted verifier only knows the published circuits, so proofs made with circuits\n // served from elsewhere can only be verified locally, and its errors would be misleading\n if (verifierMode === \"local\" || (verifierMode === \"auto\" && config?.circuitsUrl)) {\n result = await this.verifyLocally(localParams)\n } else if (verifierMode === \"api\") {\n result = (await verifyWithVerifierApi(apiParams)) ?? notVerified\n } else {\n let localResult: VerificationResult | undefined\n try {\n localResult = await this.verifyLocally(localParams)\n } catch (e) {\n console.warn(\"Local proof verification failed:\", e)\n }\n result = localResult?.verified\n ? localResult\n : ((await verifyWithVerifierApi(apiParams)) ?? localResult ?? notVerified)\n }\n return enforceUniqueIdentifierType(\n enforceVerificationMethodPolicy(result, allowedVerificationMethods),\n requestedType,\n )\n }\n\n private async verifyLocally({\n proofs,\n originalQuery,\n queryResult,\n validity,\n scope,\n devMode = false,\n writingDirectory,\n oprfKeyId,\n config,\n allowedVerificationMethods,\n }: {\n proofs: Array<ProofResult>\n originalQuery: Query\n queryResult: QueryResult\n validity?: number\n scope?: string\n devMode?: boolean\n writingDirectory?: string\n oprfKeyId?: string\n config?: VerificationConfig\n allowedVerificationMethods?: AllowedVerificationMethod[]\n }): Promise<VerificationResult> {\n const formattedResult: QueryResult = formatQueryResultDates(queryResult)\n\n // The version picks the public-input layout and the circuit manifest, so every proof must\n // state the same well-formed one: a proof without it would be read with the layout of\n // circuits made before the verification method existed, as a chip read\n const version = proofs[0]?.version\n if (!isCircuitVersion(version) || proofs.some((proof) => proof.version !== version)) {\n console.warn(\"The proofs must all state the same circuit version\")\n return { uniqueIdentifier: undefined, uniqueIdentifierType: undefined, verified: false }\n }\n\n // Automatically set the writing directory to `/tmp` if it is not provided\n // and the code is not running in the browser\n if (typeof window === \"undefined\" && !writingDirectory) {\n writingDirectory = \"/tmp\"\n }\n // Starts bb only once the public inputs check out and a proof needs it, so rejected proofs and\n // outer EVM proofs, which are verified on chain, never spawn bb\n const bbVerifier = new BBVerifier({ writingDirectory })\n let verified = true\n let uniqueIdentifier: string | undefined\n let uniqueIdentifierType: NullifierType | undefined\n let queryResultErrors: Partial<QueryResultErrors> | undefined = undefined\n let verificationMethod: VerificationMethod | undefined\n try {\n const registryClient = createRegistryClient(\n getChainFromQuery(originalQuery, devMode),\n getRegistryClientOptions(config),\n )\n const {\n isCorrect,\n uniqueIdentifier: uniqueIdentifierFromPublicInputs,\n uniqueIdentifierType: uniqueIdentifierTypeFromPublicInputs,\n queryResultErrors: queryResultErrorsFromPublicInputs,\n verificationMethod: verificationMethodFromPublicInputs,\n } = await PublicInputChecker.checkPublicInputs(\n this.domain,\n proofs,\n originalQuery,\n formattedResult,\n validity,\n scope,\n oprfKeyId,\n devMode,\n registryClient,\n allowedVerificationMethods,\n )\n verificationMethod = verificationMethodFromPublicInputs\n uniqueIdentifier = uniqueIdentifierFromPublicInputs\n uniqueIdentifierType = uniqueIdentifierTypeFromPublicInputs\n verified = isCorrect\n queryResultErrors = isCorrect ? undefined : queryResultErrorsFromPublicInputs\n if (\n (uniqueIdentifierType === NullifierType.SALTED_MOCK ||\n uniqueIdentifierType === NullifierType.NON_SALTED_MOCK) &&\n !devMode\n ) {\n // If the unique identifier type is a mock nullifier and it is not in dev mode,\n // the proofs are considered invalid as these are mock proofs only meant\n // for testing purposes\n verified = false\n console.warn(\n \"You are trying to verify a mock proof. This is only allowed in dev mode. To enable dev mode, set the `devMode` parameter to `true` in the request function parameters.\",\n )\n }\n // Only proceed with the proof verification if the public inputs are correct\n if (verified) {\n const circuitManifest = await registryClient.getCircuitManifest(undefined, {\n // We assume all proofs have the same version\n version: proofs[0].version,\n })\n for (const proof of proofs) {\n const isOuterEVM = proof.name?.startsWith(\"outer_evm_\")\n const proofName = proof.name!\n const hostedPackagedCircuit = await registryClient.getPackagedCircuit(\n proofName,\n circuitManifest,\n // TODO: set to always validate when the issue is vkey hash calculation is fixed\n { validate: !isOuterEVM },\n )\n if (isOuterEVM) {\n verified = await SolidityVerifier.verify({\n proof,\n rpcUrl: registryClient.getRpcUrl(),\n validityPeriodInSeconds: validity,\n domain: this.domain,\n scope,\n devMode,\n })\n } else {\n verified = await bbVerifier.verify(proof, hostedPackagedCircuit)\n }\n if (!verified) {\n // Break the loop if the proof is not valid\n // and don't bother checking the other proofs\n break\n }\n }\n }\n } finally {\n // Always release the bb.js instance, or its worker threads keep the process alive\n await bbVerifier.destroy()\n }\n\n // If the proofs are not verified, we don't return the unique identifier\n uniqueIdentifier = verified ? uniqueIdentifier : undefined\n uniqueIdentifierType = verified ? uniqueIdentifierType : undefined\n return {\n uniqueIdentifier,\n uniqueIdentifierType,\n verified,\n queryResultErrors,\n verificationMethod,\n }\n }\n\n public getSolidityVerifierDetails(): {\n address: `0x${string}`\n functionName: string\n abi: {\n type: \"function\" | \"event\" | \"constructor\"\n name: string\n inputs: { name: string; type: string; internalType: string }[]\n outputs: { name: string; type: string; internalType: string }[]\n }[]\n } {\n return SolidityVerifier.getDetails()\n }\n\n public getSolidityVerifierParameters({\n proof,\n validityPeriodInSeconds = DEFAULT_VALIDITY,\n domain,\n scope,\n devMode = false,\n }: {\n proof: ProofResult\n validityPeriodInSeconds?: number\n domain?: string\n scope?: string\n devMode?: boolean\n }) {\n return SolidityVerifier.getParameters({\n proof,\n validityPeriodInSeconds,\n domain: domain ?? this.domain,\n scope,\n devMode,\n })\n }\n\n private _getUrl(requestId: string) {\n const base64Config = Buffer.from(JSON.stringify(this.topicToConfig[requestId])).toString(\n \"base64\",\n )\n const base64Service = Buffer.from(JSON.stringify(this.topicToService[requestId])).toString(\n \"base64\",\n )\n const pubkey = this.topicToPublicKey[requestId]\n // The timestamp is the current time minus the validity period\n // essentially, the data integrity check proof needs to have been generated after the timestamp\n const timestamp = Math.floor(Date.now() / 1000) - this.topicToLocalConfig[requestId].validity\n const nullifierType = this.topicToLocalConfig[requestId].uniqueIdentifierType\n const oprfKeyId = this.topicToLocalConfig[requestId].oprfKeyId\n const returnDeepLink = this.topicToLocalConfig[requestId].returnDeepLink\n // The popup moves a request to the App Clip lane (`/c`) when its policy accepts chip reads\n // only and `overrides.appClip` allows it; the SDK's own URL stays on `/r`\n let url = `https://zkpassport.id/r?d=${this.domain}&t=${requestId}&c=${encodeURIComponent(base64Config)}&s=${encodeURIComponent(base64Service)}&p=${pubkey}&m=${this.topicToLocalConfig[requestId].mode}&v=${VERSION}&dt=${timestamp}&dev=${this.topicToLocalConfig[requestId].devMode ? \"1\" : \"0\"}`\n if (nullifierType != null) {\n url += `&nt=${nullifierType}`\n }\n if (oprfKeyId) {\n url += `&oprf_k=${oprfKeyId}`\n }\n if (returnDeepLink) {\n url += `&r=${encodeURIComponent(returnDeepLink)}`\n }\n const allowedVerificationMethods = this.topicToLocalConfig[requestId].allowedVerificationMethods\n if (allowedVerificationMethods) {\n url += `&ac=${serializeAllowedVerificationMethods(allowedVerificationMethods)}`\n }\n return url\n }\n\n /**\n * @notice Returns the URL of the request.\n * @param requestId The request ID.\n * @returns The URL of the request.\n */\n public getUrl(requestId: string) {\n return this._getUrl(requestId)\n }\n\n /**\n * @notice Returns the resolved service details (name, logo, purpose) shown to the\n * user for a pending request, including branding resolved from the dashboard config.\n * @param requestId The request ID.\n */\n public getServiceDetails(requestId: string): Service | undefined {\n return this.topicToService[requestId]\n }\n\n /**\n * @notice Returns the bridge keypair of a request. A request ID is its public key, so passing the\n * keypair back as `keyPairOverride` rebuilds the same request on the same bridge topic.\n * @param requestId The request ID.\n * @returns The keypair, or undefined once the request has been cancelled.\n */\n public getRequestKeyPair(requestId: string): KeyPair | undefined {\n return this.topicToBridge[requestId]?.getKeyPair()\n }\n\n /**\n * @notice Cancels a request by closing the WebSocket connection and deleting the associated data.\n * @param requestId The request ID.\n */\n public cancelRequest(requestId: string) {\n if (this.topicToBridge[requestId]) {\n this.topicToBridge[requestId].close()\n delete this.topicToBridge[requestId]\n }\n delete this.topicToPublicKey[requestId]\n delete this.topicToConfig[requestId]\n delete this.topicToLocalConfig[requestId]\n delete this.topicToProofs[requestId]\n delete this.topicToFailedProofCount[requestId]\n delete this.topicToResults[requestId]\n delete this.topicToPolicy[requestId]\n this.onRequestReceivedCallbacks[requestId] = []\n this.onGeneratingProofCallbacks[requestId] = []\n this.onBridgeConnectCallbacks[requestId] = []\n this.onBridgeConnectionLostCallbacks[requestId] = []\n this.onProofGeneratedCallbacks[requestId] = []\n this.onSuccessCallbacks[requestId] = []\n this.onResultCallbacks[requestId] = []\n this.onRejectCallbacks[requestId] = []\n this.onErrorCallbacks[requestId] = []\n }\n\n /**\n * @notice Clears all requests.\n */\n public clearAllRequests() {\n for (const requestId in this.topicToBridge) {\n this.cancelRequest(requestId)\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/logger.ts","../../src/offline-query.ts","../../package.json","../../src/constants.ts","../../src/public-input-checker.ts","../../src/assets/abi/ZKPassportVerifier.json","../../src/solidity-verifier.ts","../../src/dashboard-api.ts","../../src/bb-verifier.ts","../../src/verifier-api.ts","../../src/index.ts"],"names":["noLogger","_","registerLocale","i18en","normalizeCountry","country","normalizedCountry","getAlpha3Code","numericalCompare","fnName","key","value","requestId","requestIdToConfig","rangeCompare","generalCompare","createOfflineQuery","config","topic","hasConditions","assertNotPolicyLocked","method","builder","start","end","v","countries","lists","options","mode","query","id","version","VERSION","DEFAULT_VALIDITY","DEFAULT_DATE_VALUE","DASHBOARD_API_BASE_URL","VERIFIER_API_BASE_URL","ZKPASSPORT_IOS_APP_ID_HASH","ZKPASSPORT_IOS_APP_CLIP_APP_ID_HASH","ZKPASSPORT_ANDROID_APP_ID_HASH","APPLE_APP_ATTEST_ROOT_KEY_HASH","GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH","GOOGLE_APP_ATTEST_ECDSA_P384_ROOT_KEY_HASH","CURRENT_DATE_FUTURE_TOLERANCE_MS","ATTESTED_ID_PROOF_MAX_AGE_MS","withDocumentType","PublicInputChecker","proof","originalQuery","queryResult","queryResultErrors","isCorrect","disclosedBytes","layout","disclosedDataPassport","DisclosedData","disclosedDataIDCard","birthdatePassport","birthdateIDCard","areDatesEqual","expiryDatePassport","expiryDateIDCard","nationalityPassport","nationalityIDCard","documentNumberPassport","documentNumberIDCard","genderPassport","genderIDCard","issuingCountryPassport","issuingCountryIDCard","fullnamePassport","fullnameIDCard","formatName","firstnamePassport","firstnameIDCard","lastnamePassport","lastnameIDCard","currentTime","minAge","getMinAgeFromCommittedInputs","maxAge","getMaxAgeFromCommittedInputs","minDate","getBirthdateMinDateTimestamp","SECONDS_BETWEEN_1900_AND_1970","maxDate","getBirthdateMaxDateTimestamp","expectedPlusOneDay","expectedMinusOneDay","getMinDateFromCommittedInputs","getMaxDateFromCommittedInputs","countryList","i","domain","proofData","scope","getServiceScopeHash","getServiceScopeFromDisclosureProof","getScopeHash","getServiceSubScopeFromDisclosureProof","scopeErrorMessage","check","devMode","invalid","registryClient","createRegistryClient","getChainFromQuery","error","section","field","root","outer","timestamp","registry","isEmptyRoot","EMPTY_ATTESTATION_REVOCATION_ROOT","boundData","bindMismatches","sanctionsCommittedInputs","isCorrectRoot","facematchCommittedInputs","commitsRevocationRoot","EXPECTED_ENVIRONMENT","requestedMode","revocationRoot","isCorrectRevocationRoot","circuitName","validity","today","currentDate","getCurrentDateFromDisclosureProof","todayToCurrentDate","expectedDifference","committedInputKeys","has","keys","k","flag","message","hasDisclose","isComparison","c","isDisclosure","age","nationality","issuingCountry","discloseOnlyFields","proofs","oprfKeyId","allowedVerificationMethods","DEFAULT_ALLOWED_VERIFICATION_METHODS","commitmentIn","commitmentOut","uniqueIdentifier","uniqueIdentifierType","oprfPublicKeyHash","p","proofOrder","AADHAAR_CIRCUIT_NAME","sortedProofs","a","b","getIndex","name","disclosureProofNames","verificationMethod","firstDisclosureProof","bundleDate","getProofData","getNumberOfPublicInputs","bundleRootTimestamp","isForEVM","getCurrentDateFromOuterProof","rootTimestamp","certificateRegistryRoot","getCertificateRegistryRootFromOuterProof","isCorrectCertificateRegistryRoot","queryResultErrorsCertificateRegistryRoot","circuitRegistryRoot","getCircuitRegistryRootFromOuterProof","isCorrectCircuitRegistryRoot","queryResultErrorsCircuitRegistryRoot","paramCommitments","getParamCommitmentsFromOuterProof","isAttestedOuter","isAadhaarOuter","hasVerificationMethod","getVerificationMethodFromOuterProof","VerificationMethod","getTierForVerificationMethod","VerificationTier","committedInputs","keysInCommittedInputs","isCorrectAttestation","attestationErrors","getScopeFromOuterProof","getSubscopeFromOuterProof","ageCommittedInputs","ageParameterCommitment","getAgeEVMParameterCommitment","getAgeParameterCommitment","isCorrectAge","queryResultErrorsAge","birthdateCommittedInputs","birthdateParameterCommitment","getDateEVMParameterCommitment","ProofType","getDateParameterCommitment","isCorrectBirthdate","queryResultErrorsBirthdate","expiryCommittedInputs","expiryParameterCommitment","isCorrectExpiryDate","queryResultErrorsExpiryDate","discloseCommittedInputs","discloseParameterCommitment","getDiscloseEVMParameterCommitment","getDiscloseParameterCommitment","isCorrectDisclose","queryResultErrorsDisclose","inclusionCheckNationalityCommittedInputs","inclusionCheckNationalityParameterCommitment","getCountryEVMParameterCommitment","getCountryParameterCommitment","isCorrectNationalityInclusion","queryResultErrorsNationalityInclusion","inclusionCheckIssuingCountryCommittedInputs","inclusionCheckIssuingCountryParameterCommitment","isCorrectIssuingCountryInclusion","queryResultErrorsIssuingCountryInclusion","exclusionCheckNationalityCommittedInputs","exclusionCheckNationalityParameterCommitment","isCorrectNationalityExclusion","queryResultErrorsNationalityExclusion","exclusionCheckIssuingCountryCommittedInputs","exclusionCheckIssuingCountryParameterCommitment","isCorrectIssuingCountryExclusion","queryResultErrorsIssuingCountryExclusion","bindCommittedInputs","bindParameterCommitment","getBindEVMParameterCommitment","formatBoundData","getBindParameterCommitment","isCorrectBind","queryResultErrorsBind","exclusionCheckSanctionsCommittedInputs","exclusionCheckSanctionsParameterCommitment","getSanctionsEvmParameterCommitment","getSanctionsParameterCommitment","isCorrectSanctionsExclusion","queryResultErrorsSanctionsExclusion","commitsAttestationRevocationRoot","facematchParameterCommitment","getFacematchEvmParameterCommitment","getFacematchParameterCommitment","isCorrectFacematch","queryResultErrorsFacematch","getNullifierFromOuterProof","getNullifierTypeFromOuterProof","getOprfPkHashFromOuterProof","getCommitmentOutFromAttestedIdProof","getVerificationMethodFromAttestedIdProof","committedKey","isAndroidAttestedIdCircuit","committed","attestedAt","getCurrentDateFromAttestedIdProof","isCorrectDate","dateErrors","expectedParamCommitment","getAttestedIdParameterCommitment","paramCommitment","getParameterCommitmentFromAttestedIdProof","getCommitmentOutFromAadhaarProof","getCertificateRegistryRootFromAadhaarProof","getCommitmentFromDSCProof","merkleRoot","getMerkleRootFromDSCProof","getCommitmentInFromIDDataProof","getCommitmentOutFromIDDataProof","getCommitmentInFromIntegrityProof","getCommitmentOutFromIntegrityProof","getVerificationMethodFromIntegrityProof","getCommitmentInFromDisclosureProof","getParameterCommitmentFromDisclosureProof","calculatedParamCommitment","isCorrectScope","queryResultErrorsScope","isCorrectCurrentDate","queryResultErrorsCurrentDate","getNullifierFromDisclosureProof","getNullifierTypeFromDisclosureProof","paramCommittment","nullifierProofs","distinct","values","none","nullifiers","nullifierTypes","NullifierType","oprfPkHashes","getOprfPkHashFromDisclosureProof","isQueryComplete","completenessErrors","oprfPk","getOprfPublicKey","OPRF_DEFAULT_KEY_ID","expectedPkHash","hashOprfPublicKey","proofPkHash","isAadhaarNationalityConditionAllowed","scheme","isVerificationMethodAllowed","attestationParamCommitment","fail","expected","received","android","getAttestedIdEvmParameterCommitment","parameters","rootKeys","appIdHash","integrityAnchors","GOOGLE_PLAY_INTEGRITY_PUBKEY_HASH","ZKPassportVerifier_default","SolidityVerifier","_SolidityVerifier","validityPeriodInSeconds","committedInputCounts","inputs","facematchStyleInputs","committedInputCount","getCommittedInputCount","compressedCommittedInputs","formattedCountries","proofType","ProofTypeLength","rightPadArrayWithZeros","x","minDateBytes","numberToBytesBE","maxDateBytes","parameterCommitments","commitment","committedInput","rawHashedInputs","sha256","hexToBytes","hashedInputs","bytesToHex","count","circuitVersionToBytes32","rpcUrl","createPublicClient","http","address","abi","functionName","client","params","result","toHex","bytes","length","getFacematchCommittedInputLength","submitProof","policyId","payload","response","e","V6_MIN_CIRCUIT_VERSION","getBBVersionForCircuitVersion","circuitVersion","parts","isAtLeast","createUltraHonkVerifier","bbVersion","writingDirectory","clearStaleCrsCacheOnVersionChange","crsPath","UltraHonkVerifierBackend","Barretenberg","barretenberg","BBVerifier","circuit","Buffer","BB_VERSION_KEY","BB_CRS_DB_NAME","BB_CRS_CACHE_VERSION","store","dbExists","db","resolve","req","minimum","index","minimumPart","verifyWithVerifierApi","body","DEFAULT_PURPOSE","getRegistryClientOptions","circuitsUrl","base","_chainId","hash","realNullifierType","enforceVerificationMethodPolicy","enforceUniqueIdentifierType","requestedType","proofTypeName","onResultDeprecationWarned","warnOnResultDeprecated","ZKPassport","_domain","hasFailedProofs","requestSucceeded","callback","reason","proofStorageEnabled","verification","verified","request","formatQueryResultDates","policy","bind","conditions","policyQuery","svc","localConfig","hasFaceMatch","hasStrictFacematch","url","logo","purpose","projectID","topicOverride","keyPairOverride","replayMissedMessages","cloudProverUrl","bridgeUrl","returnDeepLink","verifierMode","overrides","serializeAllowedVerificationMethods","dashboardConfig","bridge","Bridge","reconnection","event","notVerified","localParams","apiParams","localResult","formattedResult","isCircuitVersion","bbVerifier","uniqueIdentifierFromPublicInputs","uniqueIdentifierTypeFromPublicInputs","queryResultErrorsFromPublicInputs","verificationMethodFromPublicInputs","circuitManifest","isOuterEVM","proofName","hostedPackagedCircuit","base64Config","base64Service","pubkey","nullifierType"],"mappings":"6rGASO,IAAMA,CAAAA,CAAW,CACtB,KAAA,CAAO,CAAA,GAAIC,CAAAA,GAAa,CAAC,EACzB,IAAA,CAAM,CAAA,GAAIA,CAAAA,GAAa,CAAC,EACxB,IAAA,CAAM,CAAA,GAAIA,CAAAA,GAAa,CAAC,EACxB,KAAA,CAAO,CAAA,GAAIA,CAAAA,GAAa,CAAC,CAC3B,CAAA,CCIAC,cAAAA,CAAeC,EAAK,CAAA,CAEb,SAASC,GAAiBC,CAAAA,CAAmC,CAClE,GAAIA,CAAAA,GAAY,0BACd,OAAO,KAAA,CAET,IAAIC,CAAAA,CAE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B,IAAA,IAAWA,CAAAA,IAAa,KAAK,aAAA,CAC3B,IAAA,CAAK,aAAA,CAAcA,CAAS,EAEhC,CACF","file":"index.js","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nexport const customLogger = {\n debug: (message: string, ...args: any[]) => console.debug(message, ...args),\n info: (message: string, ...args: any[]) => console.info(message, ...args),\n warn: (message: string, ...args: any[]) => console.warn(message, ...args),\n error: (message: string, ...args: any[]) => console.error(message, ...args),\n}\n\nexport const noLogger = {\n debug: (..._: any[]) => {},\n info: (..._: any[]) => {},\n warn: (..._: any[]) => {},\n error: (..._: any[]) => {},\n}\n","import { Alpha3Code, getAlpha3Code, registerLocale } from \"i18n-iso-countries\"\nimport i18en from \"i18n-iso-countries/langs/en.json\"\nimport type {\n BoundData,\n CountryName,\n DisclosableIDCredential,\n FacematchMode,\n IDCredential,\n IDCredentialValue,\n NumericalIDCredential,\n Query,\n SanctionsCountries,\n SanctionsLists,\n SupportedChain,\n} from \"@zkpassport/utils\"\nimport type { OfflineQueryBuilderResult, QueryBuilder } from \"./types\"\n\n// Country-name normalization needs the English locale registered (idempotent)\nregisterLocale(i18en)\n\nexport function normalizeCountry(country: CountryName | Alpha3Code) {\n if (country === \"Zero Knowledge Republic\") {\n return \"ZKR\"\n }\n let normalizedCountry: Alpha3Code | \"ZKR\" | undefined = undefined\n const alpha3 = getAlpha3Code(country as CountryName, \"en\") as Alpha3Code | \"ZKR\" | undefined\n normalizedCountry = alpha3 || (country as Alpha3Code) || \"ZKR\"\n return normalizedCountry as Alpha3Code | \"ZKR\"\n}\n\nexport function numericalCompare(\n fnName: \"gte\" | \"gt\" | \"lte\" | \"lt\",\n key: NumericalIDCredential,\n value: number | Date,\n requestId: string,\n requestIdToConfig: Record<string, Query>,\n) {\n requestIdToConfig[requestId][key] = {\n ...requestIdToConfig[requestId][key],\n [fnName]: value,\n }\n}\n\nexport function rangeCompare(\n key: NumericalIDCredential,\n value: [number | Date, number | Date],\n requestId: string,\n requestIdToConfig: Record<string, Query>,\n) {\n requestIdToConfig[requestId][key] = {\n ...requestIdToConfig[requestId][key],\n range: value,\n }\n}\n\nexport function generalCompare(\n fnName: \"in\" | \"out\" | \"eq\",\n key: IDCredential,\n value: any, // eslint-disable-line\n requestId: string,\n requestIdToConfig: Record<string, Query>,\n) {\n requestIdToConfig[requestId][key] = {\n ...requestIdToConfig[requestId][key],\n [fnName]: value,\n }\n}\n\n// Same Query output as request()'s builder, with no bridge/network/class deps\nexport function createOfflineQuery(): QueryBuilder<\"offline\"> {\n const config: Record<string, Query> = { query: {} }\n const topic = \"query\"\n let hasConditions = false\n\n const assertNotPolicyLocked = (method: string) => {\n if (config[topic].policy) {\n throw new Error(\n `Cannot call .${method}() on a policy-driven query. The query for policy '${config[topic].policy}' is immutable.`,\n )\n }\n hasConditions = true\n }\n\n const builder: QueryBuilder<\"offline\"> = {\n eq: <T extends IDCredential>(key: T, value: IDCredentialValue<T>) => {\n assertNotPolicyLocked(\"eq\")\n if (key === \"issuing_country\" || key === \"nationality\") {\n value = normalizeCountry(value as CountryName) as IDCredentialValue<T>\n }\n generalCompare(\"eq\", key, value, topic, config)\n return builder as unknown as QueryBuilder\n },\n gte: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n assertNotPolicyLocked(\"gte\")\n numericalCompare(\"gte\", key, value, topic, config)\n if (key === \"age\" && ((value as number) < 1 || (value as number) >= 100)) {\n throw new Error(\"Age must be between 1 and 99 (inclusive)\")\n }\n return builder as unknown as QueryBuilder\n },\n gt: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n assertNotPolicyLocked(\"gt\")\n numericalCompare(\"gt\", key, value, topic, config)\n return builder as unknown as QueryBuilder\n },\n lte: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n assertNotPolicyLocked(\"lte\")\n numericalCompare(\"lte\", key, value, topic, config)\n return builder as unknown as QueryBuilder\n },\n lt: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n assertNotPolicyLocked(\"lt\")\n numericalCompare(\"lt\", key, value, topic, config)\n return builder as unknown as QueryBuilder\n },\n range: <T extends NumericalIDCredential>(\n key: T,\n start: IDCredentialValue<T>,\n end: IDCredentialValue<T>,\n ) => {\n assertNotPolicyLocked(\"range\")\n rangeCompare(key, [start, end], topic, config)\n return builder as unknown as QueryBuilder\n },\n in: <T extends \"nationality\" | \"issuing_country\">(key: T, value: IDCredentialValue<T>[]) => {\n assertNotPolicyLocked(\"in\")\n value = value.map((v) => normalizeCountry(v as CountryName)) as IDCredentialValue<T>[]\n generalCompare(\"in\", key, value, topic, config)\n return builder as unknown as QueryBuilder\n },\n out: <T extends \"nationality\" | \"issuing_country\">(key: T, value: IDCredentialValue<T>[]) => {\n assertNotPolicyLocked(\"out\")\n value = value.map((v) => normalizeCountry(v as CountryName)) as IDCredentialValue<T>[]\n generalCompare(\"out\", key, value, topic, config)\n return builder as unknown as QueryBuilder\n },\n disclose: (key: DisclosableIDCredential) => {\n assertNotPolicyLocked(\"disclose\")\n config[topic][key] = {\n ...config[topic][key],\n disclose: true,\n }\n return builder as unknown as QueryBuilder\n },\n bind: <T extends keyof BoundData>(\n key: T,\n value: T extends \"chain\"\n ? SupportedChain\n : T extends \"user_address\"\n ? `0x${string}`\n : string | undefined,\n ) => {\n // Runtime payload: composes with policies (it only adds committed data)\n config[topic].bind = {\n ...config[topic].bind,\n [key]: value,\n }\n return builder as unknown as QueryBuilder\n },\n sanctions: (\n countries: SanctionsCountries = \"all\",\n lists: SanctionsLists = \"all\",\n options: { strict?: boolean } = { strict: false },\n ) => {\n assertNotPolicyLocked(\"sanctions\")\n config[topic].sanctions = {\n ...config[topic].sanctions,\n countries,\n lists,\n strict: options.strict ?? false,\n }\n return builder as unknown as QueryBuilder\n },\n facematch: (mode: FacematchMode = \"strict\") => {\n assertNotPolicyLocked(\"facematch\")\n config[topic].facematch = { mode }\n return builder as unknown as QueryBuilder\n },\n raw: (query: Query) => {\n assertNotPolicyLocked(\"raw\")\n config[topic] = query\n return builder\n },\n policy: (id: string) => {\n if (typeof id !== \"string\" || id.length === 0) {\n throw new Error(\".policy() requires a non-empty string id.\")\n }\n if (config[topic].policy) {\n throw new Error(\n `Cannot call .policy() more than once on a request (already set to '${config[topic].policy}').`,\n )\n }\n if (hasConditions) {\n throw new Error(\n \"Cannot combine .policy() with builder methods like .gte()/.disclose()/etc.\",\n )\n }\n config[topic].policy = id\n return builder\n },\n done: (() => {\n return { query: config[topic] } satisfies OfflineQueryBuilderResult\n }) as QueryBuilder<\"offline\">[\"done\"],\n }\n return builder\n}\n","{\n \"name\": \"@zkpassport/sdk\",\n \"version\": \"0.21.0\",\n \"description\": \"Privacy-preserving identity verification using passports and ID cards\",\n \"author\": \"ZKPassport\",\n \"license\": \"Apache-2.0\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/zkpassport/zkpassport-packages\",\n \"directory\": \"packages/zkpassport-sdk\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/esm/index.js\",\n \"types\": \"./dist/esm/index.d.ts\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/esm/index.d.ts\",\n \"default\": \"./dist/esm/index.js\"\n },\n \"require\": {\n \"types\": \"./dist/cjs/index.d.cts\",\n \"default\": \"./dist/cjs/index.cjs\"\n }\n },\n \"./popup\": {\n \"import\": {\n \"types\": \"./dist/esm/popup.d.ts\",\n \"default\": \"./dist/esm/popup.js\"\n },\n \"require\": {\n \"types\": \"./dist/cjs/popup.d.cts\",\n \"default\": \"./dist/cjs/popup.cjs\"\n }\n },\n \"./query\": {\n \"import\": {\n \"types\": \"./dist/esm/query.d.ts\",\n \"default\": \"./dist/esm/query.js\"\n },\n \"require\": {\n \"types\": \"./dist/cjs/query.d.cts\",\n \"default\": \"./dist/cjs/query.cjs\"\n }\n }\n },\n \"scripts\": {\n \"build\": \"tsup --config tsup.config.ts\",\n \"dev:build\": \"DEV_BUILD=true bun run build\",\n \"clean\": \"rimraf dist tsconfig.tsbuildinfo\",\n \"test\": \"bun test\",\n \"coverage\": \"bun test --coverage\",\n \"check\": \"prettier -c src tests && eslint src tests --ext .ts\",\n \"format\": \"prettier -c -w src tests\",\n \"validate-package\": \"../../scripts/validate-package.sh\",\n \"prepublishOnly\": \"../../scripts/prepublish.sh\"\n },\n \"files\": [\n \"dist/esm\",\n \"dist/cjs\",\n \"dist/types\"\n ],\n \"keywords\": [\n \"zkpassport\",\n \"zkpassport-sdk\",\n \"sdk\"\n ],\n \"dependencies\": {\n \"@aztec-foundation/bb.js\": \"6.0.0\",\n \"@aztec/bb.js\": \"5.0.0\",\n \"@noble/ciphers\": \"^1.2.1\",\n \"@noble/hashes\": \"^2.0.1\",\n \"@noble/secp256k1\": \"^2.2.3\",\n \"@noir-lang/noir_js\": \"1.0.0-beta.22\",\n \"@obsidion/bridge\": \"^0.12.3\",\n \"@zkpassport/registry\": \"workspace:*\",\n \"@zkpassport/utils\": \"workspace:*\",\n \"buffer\": \"^6.0.3\",\n \"i18n-iso-countries\": \"^7.12.0\",\n \"pako\": \"^2.1.0\",\n \"tslib\": \"^2.8.1\",\n \"viem\": \"^2.27.2\",\n \"ws\": \"^8.18.0\"\n },\n \"devDependencies\": {\n \"@types/pako\": \"^2.0.3\",\n \"@types/ws\": \"^8.5.12\"\n },\n \"packageManager\": \"bun@1.3.1\"\n}\n","import { version } from \"../package.json\"\n\nexport const VERSION = version\nexport const DEFAULT_VALIDITY = 7 * 24 * 60 * 60 // 7 days\nexport const DEFAULT_DATE_VALUE = new Date(0)\n\n// Base URL for the ZKPassport dashboard API (per-domain config, proof submission).\nexport const DASHBOARD_API_BASE_URL = \"https://dashboard-api.zkpassport.id\"\n\n// Base URL for the ZKPassport verifier API, which can verify proofs this SDK cannot.\nexport const VERIFIER_API_BASE_URL = \"https://verifier.zkpassport.id\"\n\n// 32-byte zero value, formatted as a 0x-prefixed hex string.\nexport const ZERO_BYTES32 = \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n\n// This is the app id hash for the ZKPassport app\n// i.e. hash of `YL5MS3Z639.app.zkpassport.zkpassport`\nexport const ZKPASSPORT_IOS_APP_ID_HASH =\n \"0x1fa73686cf510f8f85757b0602de0dd72a13e68ae2092462be8b72662e7f179b\"\n\n// This is the app id hash for the ZKPassport App Clip on iOS\n// i.e. hash of `YL5MS3Z639.app.zkpassport.zkpassport.clip`\nexport const ZKPASSPORT_IOS_APP_CLIP_APP_ID_HASH =\n \"0x1409355f7733451c37093c8aac68611b102c0f270c9961d74ef6cfa6f888d3f0\"\n\n// This is the app id hash for the ZKPassport app on Android\n// i.e. hash of `app.zkpassport.zkpassport`\nexport const ZKPASSPORT_ANDROID_APP_ID_HASH =\n \"0x24d9929b248be7eeecaa98e105c034a50539610f3fdd4cb9c8983ef4100d615d\"\n\n// This is the hash of the root key of Apple's App Attest\n// c.f. https://www.apple.com/certificateauthority/Apple_App_Attestation_Root_CA.pem\nexport const APPLE_APP_ATTEST_ROOT_KEY_HASH =\n \"0x2532418a107c5306fa8308c22255792cf77e4a290cbce8a840a642a3e591340b\"\n\n// This is the hash of the RSA root key of Google's App Attest\n// c.f. https://developer.android.com/privacy-and-security/security-key-attestation#root_certificate\nexport const GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH =\n \"0x16700a2d9168a194fc85f237af5829b5a2be05b8ae8ac4879ada34cf54a9c211\"\n\n// This is the hash of the ECDSA P384 root key of Google's App Attest\n// c.f. https://developer.android.com/privacy-and-security/security-key-attestation#root_certificate\nexport const GOOGLE_APP_ATTEST_ECDSA_P384_ROOT_KEY_HASH =\n \"0x0e1889bec6c1d686abcf08360ff404f803ab345881ea8cba6aad33b7f7f7ffe0\"\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport {\n type ProofResult,\n type QueryResult,\n AADHAAR_CIRCUIT_NAME,\n getCertificateRegistryRootFromAadhaarProof,\n isAadhaarNationalityConditionAllowed,\n getCommitmentOutFromAadhaarProof,\n getChainFromQuery,\n getProofData,\n getCommitmentFromDSCProof,\n getCommitmentInFromIDDataProof,\n getCommitmentOutFromIDDataProof,\n getNullifierFromDisclosureProof,\n getCommitmentInFromIntegrityProof,\n getCommitmentOutFromIntegrityProof,\n EMPTY_ATTESTATION_REVOCATION_ROOT,\n getCommitmentOutFromAttestedIdProof,\n getParameterCommitmentFromAttestedIdProof,\n getVerificationMethodFromAttestedIdProof,\n getCurrentDateFromAttestedIdProof,\n isAndroidAttestedIdCircuit,\n GOOGLE_PLAY_INTEGRITY_PUBKEY_HASH,\n getVerificationMethodFromIntegrityProof,\n getVerificationMethodFromOuterProof,\n commitsAttestationRevocationRoot,\n hasVerificationMethod,\n isVerificationMethodAllowed,\n DEFAULT_ALLOWED_VERIFICATION_METHODS,\n VerificationMethod,\n type AllowedVerificationMethod,\n getCommitmentInFromDisclosureProof,\n getMerkleRootFromDSCProof,\n getCurrentDateFromDisclosureProof,\n DisclosedData,\n formatName,\n getNumberOfPublicInputs,\n getParameterCommitmentFromDisclosureProof,\n getCountryParameterCommitment,\n getDiscloseParameterCommitment,\n getDateParameterCommitment,\n getCertificateRegistryRootFromOuterProof,\n getParamCommitmentsFromOuterProof,\n AgeCommittedInputs,\n DiscloseCommittedInputs,\n getMinAgeFromCommittedInputs,\n getMaxAgeFromCommittedInputs,\n getAgeParameterCommitment,\n DateCommittedInputs,\n CountryCommittedInputs,\n getMinDateFromCommittedInputs,\n getMaxDateFromCommittedInputs,\n getCurrentDateFromOuterProof,\n getNullifierFromOuterProof,\n getAgeEVMParameterCommitment,\n getDateEVMParameterCommitment,\n getDiscloseEVMParameterCommitment,\n getCountryEVMParameterCommitment,\n ProofType,\n getScopeHash,\n ProofData,\n getScopeFromOuterProof,\n getSubscopeFromOuterProof,\n getServiceScopeHash,\n BoundData,\n BindCommittedInputs,\n getBindEVMParameterCommitment,\n getBindParameterCommitment,\n formatBoundData,\n getCircuitRegistryRootFromOuterProof,\n areDatesEqual,\n getBirthdateMinDateTimestamp,\n getBirthdateMaxDateTimestamp,\n SanctionsCommittedInputs,\n getSanctionsEvmParameterCommitment,\n getSanctionsParameterCommitment,\n SECONDS_BETWEEN_1900_AND_1970,\n FacematchCommittedInputs,\n AttestedIdCommittedInputs,\n getFacematchEvmParameterCommitment,\n getFacematchParameterCommitment,\n getAttestedIdEvmParameterCommitment,\n getAttestedIdParameterCommitment,\n getTierForVerificationMethod,\n VerificationTier,\n NullifierType,\n getNullifierTypeFromOuterProof,\n getNullifierTypeFromDisclosureProof,\n getServiceScopeFromDisclosureProof,\n getServiceSubScopeFromDisclosureProof,\n getOprfPkHashFromDisclosureProof,\n getOprfPkHashFromOuterProof,\n OPRF_DEFAULT_KEY_ID,\n getOprfPublicKey,\n hashOprfPublicKey,\n Query,\n} from \"@zkpassport/utils\"\nimport { QueryResultErrors } from \"./types\"\nimport { createRegistryClient, type RegistryClient } from \"@zkpassport/registry\"\nimport {\n APPLE_APP_ATTEST_ROOT_KEY_HASH,\n DEFAULT_DATE_VALUE,\n DEFAULT_VALIDITY,\n GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH,\n GOOGLE_APP_ATTEST_ECDSA_P384_ROOT_KEY_HASH,\n ZKPASSPORT_ANDROID_APP_ID_HASH,\n ZKPASSPORT_IOS_APP_CLIP_APP_ID_HASH,\n ZKPASSPORT_IOS_APP_ID_HASH,\n} from \"./constants\"\n\n// Allowance for clock/timezone skew between the proving device and the verifier\nconst CURRENT_DATE_FUTURE_TOLERANCE_MS = 24 * 60 * 60 * 1000\n// How old an attested ID proof's date may be; the app renews its proofs after 28 days\nconst ATTESTED_ID_PROOF_MAX_AGE_MS = 30 * 24 * 60 * 60 * 1000\n\nexport function withDocumentType(query: Query): Query {\n const needed = (\n [\n \"firstname\",\n \"lastname\",\n \"fullname\",\n \"birthdate\",\n \"expiry_date\",\n \"nationality\",\n \"gender\",\n \"document_number\",\n ] as const\n ).some((key) => query[key]?.disclose || query[key]?.eq !== undefined)\n if (!needed || query.document_type?.disclose || query.document_type?.eq !== undefined) {\n return query\n }\n return { ...query, document_type: { ...query.document_type, disclose: true } }\n}\n\nexport class PublicInputChecker {\n public static checkDiscloseBytesPublicInputs(\n proof: ProofResult,\n originalQuery: Query,\n queryResult: QueryResult,\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n // Expose document_type if any fields are disclosed\n originalQuery = withDocumentType(originalQuery)\n // We can't be certain that the disclosed data is for a passport or an ID card\n // so we need to check both (unless the document type is revealed)\n const disclosedBytes =\n (proof.committedInputs?.disclose_bytes as DiscloseCommittedInputs)?.disclosedBytes ??\n (proof.committedInputs?.disclose_bytes_evm as DiscloseCommittedInputs)?.disclosedBytes\n const layout = disclosedBytes?.[0]\n ? String.fromCharCode(disclosedBytes[0]) === \"P\"\n ? \"passport\"\n : \"id_card\"\n : undefined\n const disclosedDataPassport = DisclosedData.fromDisclosedBytes(\n disclosedBytes,\n layout ?? \"passport\",\n )\n const disclosedDataIDCard = DisclosedData.fromDisclosedBytes(\n disclosedBytes,\n layout ?? \"id_card\",\n )\n if (queryResult.document_type) {\n // Document type is always at the same index in the disclosed data\n if (\n queryResult.document_type.eq &&\n queryResult.document_type.eq.result &&\n queryResult.document_type.eq.expected !== disclosedDataPassport.documentType\n ) {\n console.warn(\"Document type does not match the expected document type\")\n isCorrect = false\n queryResultErrors.document_type = {\n ...queryResultErrors.document_type,\n eq: {\n expected: `${queryResult.document_type.eq.expected}`,\n received: `${disclosedDataPassport.documentType ?? disclosedDataIDCard.documentType}`,\n message: \"Document type does not match the expected document type\",\n },\n }\n }\n if (\n queryResult.document_type.disclose &&\n queryResult.document_type.disclose.result !== disclosedDataIDCard.documentType\n ) {\n console.warn(\"Document type does not match the disclosed document type in query result\")\n isCorrect = false\n queryResultErrors.document_type = {\n ...queryResultErrors.document_type,\n disclose: {\n expected: `${queryResult.document_type.disclose?.result}`,\n received: `${disclosedDataIDCard.documentType ?? disclosedDataPassport.documentType}`,\n message: \"Document type does not match the disclosed document type in query result\",\n },\n }\n }\n if (\n queryResult.document_type.eq &&\n (originalQuery.document_type?.eq === undefined ||\n queryResult.document_type.eq.expected !== originalQuery.document_type.eq)\n ) {\n console.warn(\"Document type eq does not match the original query\")\n isCorrect = false\n queryResultErrors.document_type = {\n ...queryResultErrors.document_type,\n eq: {\n expected: `${originalQuery.document_type?.eq}`,\n received: `${queryResult.document_type.eq.expected}`,\n message: \"Document type eq does not match the original query\",\n },\n }\n }\n if (queryResult.document_type.disclose && !originalQuery.document_type?.disclose) {\n console.warn(\"Document type disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.document_type = {\n ...queryResultErrors.document_type,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.document_type.disclose.result}`,\n message: \"Document type disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.birthdate) {\n const birthdatePassport = disclosedDataPassport.dateOfBirth\n const birthdateIDCard = disclosedDataIDCard.dateOfBirth\n if (\n queryResult.birthdate.eq &&\n queryResult.birthdate.eq.result &&\n !areDatesEqual(queryResult.birthdate.eq.expected, birthdatePassport) &&\n !areDatesEqual(queryResult.birthdate.eq.expected, birthdateIDCard)\n ) {\n console.warn(\"Birthdate does not match the expected birthdate\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n eq: {\n expected: `${queryResult.birthdate.eq.expected.toISOString()}`,\n received: `${birthdatePassport?.toISOString() ?? birthdateIDCard?.toISOString()}`,\n message: \"Birthdate does not match the expected birthdate\",\n },\n }\n }\n if (\n queryResult.birthdate.disclose &&\n !areDatesEqual(queryResult.birthdate.disclose.result, birthdatePassport) &&\n !areDatesEqual(queryResult.birthdate.disclose.result, birthdateIDCard)\n ) {\n console.warn(\"Birthdate does not match the disclosed birthdate in query result\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n disclose: {\n expected: `${queryResult.birthdate.disclose.result.toISOString()}`,\n received: `${birthdatePassport?.toISOString() ?? birthdateIDCard?.toISOString()}`,\n message: \"Birthdate does not match the disclosed birthdate in query result\",\n },\n }\n }\n if (\n queryResult.birthdate.eq &&\n (originalQuery.birthdate?.eq === undefined ||\n !areDatesEqual(queryResult.birthdate.eq.expected, originalQuery.birthdate.eq as Date))\n ) {\n console.warn(\"Birthdate eq does not match the original query\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n eq: {\n expected: `${(originalQuery.birthdate?.eq as Date)?.toISOString?.() ?? \"undefined\"}`,\n received: `${queryResult.birthdate.eq.expected.toISOString()}`,\n message: \"Birthdate eq does not match the original query\",\n },\n }\n }\n if (queryResult.birthdate.disclose && !originalQuery.birthdate?.disclose) {\n console.warn(\"Birthdate disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.birthdate.disclose.result}`,\n message: \"Birthdate disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.expiry_date) {\n const expiryDatePassport = disclosedDataPassport.dateOfExpiry\n const expiryDateIDCard = disclosedDataIDCard.dateOfExpiry\n if (\n queryResult.expiry_date.eq &&\n queryResult.expiry_date.eq.result &&\n !areDatesEqual(queryResult.expiry_date.eq.expected, expiryDatePassport) &&\n !areDatesEqual(queryResult.expiry_date.eq.expected, expiryDateIDCard)\n ) {\n console.warn(\"Expiry date does not match the expected expiry date\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n eq: {\n expected: `${queryResult.expiry_date.eq.expected.toISOString()}`,\n received: `${expiryDatePassport?.toISOString() ?? expiryDateIDCard?.toISOString()}`,\n message: \"Expiry date does not match the expected expiry date\",\n },\n }\n }\n if (\n queryResult.expiry_date.disclose &&\n !areDatesEqual(queryResult.expiry_date.disclose.result, expiryDatePassport) &&\n !areDatesEqual(queryResult.expiry_date.disclose.result, expiryDateIDCard)\n ) {\n console.warn(\"Expiry date does not match the disclosed expiry date in query result\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n disclose: {\n expected: `${queryResult.expiry_date.disclose.result.toISOString()}`,\n received: `${expiryDatePassport?.toISOString() ?? expiryDateIDCard?.toISOString()}`,\n message: \"Expiry date does not match the disclosed expiry date in query result\",\n },\n }\n }\n if (\n queryResult.expiry_date.eq &&\n (originalQuery.expiry_date?.eq === undefined ||\n !areDatesEqual(queryResult.expiry_date.eq.expected, originalQuery.expiry_date.eq as Date))\n ) {\n console.warn(\"Expiry date eq does not match the original query\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n eq: {\n expected: `${(originalQuery.expiry_date?.eq as Date)?.toISOString?.() ?? \"undefined\"}`,\n received: `${queryResult.expiry_date.eq.expected.toISOString()}`,\n message: \"Expiry date eq does not match the original query\",\n },\n }\n }\n if (queryResult.expiry_date.disclose && !originalQuery.expiry_date?.disclose) {\n console.warn(\"Expiry date disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.expiry_date.disclose.result}`,\n message: \"Expiry date disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.nationality) {\n const nationalityPassport = disclosedDataPassport.nationality\n const nationalityIDCard = disclosedDataIDCard.nationality\n if (\n queryResult.nationality.eq &&\n queryResult.nationality.eq.result &&\n queryResult.nationality.eq.expected !== nationalityPassport &&\n queryResult.nationality.eq.expected !== nationalityIDCard\n ) {\n console.warn(\"Nationality does not match the expected nationality\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n eq: {\n expected: `${queryResult.nationality.eq.expected}`,\n received: `${nationalityPassport ?? nationalityIDCard}`,\n message: \"Nationality does not match the expected nationality\",\n },\n }\n }\n if (\n queryResult.nationality.disclose &&\n queryResult.nationality.disclose.result !== nationalityPassport &&\n queryResult.nationality.disclose.result !== nationalityIDCard\n ) {\n console.warn(\"Nationality does not match the disclosed nationality in query result\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n disclose: {\n expected: `${queryResult.nationality.disclose.result}`,\n received: `${nationalityPassport ?? nationalityIDCard}`,\n message: \"Nationality does not match the disclosed nationality in query result\",\n },\n }\n }\n if (\n queryResult.nationality.eq &&\n (originalQuery.nationality?.eq === undefined ||\n queryResult.nationality.eq.expected !== originalQuery.nationality.eq)\n ) {\n console.warn(\"Nationality eq does not match the original query\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n eq: {\n expected: `${originalQuery.nationality?.eq}`,\n received: `${queryResult.nationality.eq.expected}`,\n message: \"Nationality eq does not match the original query\",\n },\n }\n }\n if (queryResult.nationality.disclose && !originalQuery.nationality?.disclose) {\n console.warn(\"Nationality disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.nationality.disclose.result}`,\n message: \"Nationality disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.document_number) {\n const documentNumberPassport = disclosedDataPassport.documentNumber\n const documentNumberIDCard = disclosedDataIDCard.documentNumber\n if (\n queryResult.document_number.eq &&\n queryResult.document_number.eq.result &&\n queryResult.document_number.eq.expected !== documentNumberPassport &&\n queryResult.document_number.eq.expected !== documentNumberIDCard\n ) {\n console.warn(\"Document number does not match the expected document number\")\n isCorrect = false\n queryResultErrors.document_number = {\n ...queryResultErrors.document_number,\n eq: {\n expected: `${queryResult.document_number.eq.expected}`,\n received: `${documentNumberPassport ?? documentNumberIDCard}`,\n message: \"Document number does not match the expected document number\",\n },\n }\n }\n if (\n queryResult.document_number.disclose &&\n queryResult.document_number.disclose.result !== documentNumberPassport &&\n queryResult.document_number.disclose.result !== documentNumberIDCard\n ) {\n console.warn(\"Document number does not match the disclosed document number in query result\")\n isCorrect = false\n queryResultErrors.document_number = {\n ...queryResultErrors.document_number,\n disclose: {\n expected: `${queryResult.document_number.disclose.result}`,\n received: `${documentNumberPassport ?? documentNumberIDCard}`,\n message: \"Document number does not match the disclosed document number in query result\",\n },\n }\n }\n if (\n queryResult.document_number.eq &&\n (originalQuery.document_number?.eq === undefined ||\n queryResult.document_number.eq.expected !== originalQuery.document_number.eq)\n ) {\n console.warn(\"Document number eq does not match the original query\")\n isCorrect = false\n queryResultErrors.document_number = {\n ...queryResultErrors.document_number,\n eq: {\n expected: `${originalQuery.document_number?.eq}`,\n received: `${queryResult.document_number.eq.expected}`,\n message: \"Document number eq does not match the original query\",\n },\n }\n }\n if (queryResult.document_number.disclose && !originalQuery.document_number?.disclose) {\n console.warn(\"Document number disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.document_number = {\n ...queryResultErrors.document_number,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.document_number.disclose.result}`,\n message: \"Document number disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.gender) {\n const genderPassport = disclosedDataPassport.gender\n const genderIDCard = disclosedDataIDCard.gender\n if (\n queryResult.gender.eq &&\n queryResult.gender.eq.result &&\n queryResult.gender.eq.expected !== genderPassport &&\n queryResult.gender.eq.expected !== genderIDCard\n ) {\n console.warn(\"Gender does not match the expected gender\")\n isCorrect = false\n queryResultErrors.gender = {\n ...queryResultErrors.gender,\n eq: {\n expected: `${queryResult.gender.eq.expected}`,\n received: `${genderPassport ?? genderIDCard}`,\n message: \"Gender does not match the expected gender\",\n },\n }\n }\n if (\n queryResult.gender.disclose &&\n queryResult.gender.disclose.result !== genderPassport &&\n queryResult.gender.disclose.result !== genderIDCard\n ) {\n console.warn(\"Gender does not match the disclosed gender in query result\")\n isCorrect = false\n queryResultErrors.gender = {\n ...queryResultErrors.gender,\n disclose: {\n expected: `${queryResult.gender.disclose.result}`,\n received: `${genderPassport ?? genderIDCard}`,\n message: \"Gender does not match the disclosed gender in query result\",\n },\n }\n }\n if (\n queryResult.gender.eq &&\n (originalQuery.gender?.eq === undefined ||\n queryResult.gender.eq.expected !== originalQuery.gender.eq)\n ) {\n console.warn(\"Gender eq does not match the original query\")\n isCorrect = false\n queryResultErrors.gender = {\n ...queryResultErrors.gender,\n eq: {\n expected: `${originalQuery.gender?.eq}`,\n received: `${queryResult.gender.eq.expected}`,\n message: \"Gender eq does not match the original query\",\n },\n }\n }\n if (queryResult.gender.disclose && !originalQuery.gender?.disclose) {\n console.warn(\"Gender disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.gender = {\n ...queryResultErrors.gender,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.gender.disclose.result}`,\n message: \"Gender disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.issuing_country) {\n const issuingCountryPassport = disclosedDataPassport.issuingCountry\n const issuingCountryIDCard = disclosedDataIDCard.issuingCountry\n if (\n queryResult.issuing_country.eq &&\n queryResult.issuing_country.eq.result &&\n queryResult.issuing_country.eq.expected !== issuingCountryPassport &&\n queryResult.issuing_country.eq.expected !== issuingCountryIDCard\n ) {\n console.warn(\"Issuing country does not match the expected issuing country\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n eq: {\n expected: `${queryResult.issuing_country.eq.expected}`,\n received: `${issuingCountryPassport ?? issuingCountryIDCard}`,\n message: \"Issuing country does not match the expected issuing country\",\n },\n }\n }\n if (\n queryResult.issuing_country.disclose &&\n queryResult.issuing_country.disclose.result !== issuingCountryPassport &&\n queryResult.issuing_country.disclose.result !== issuingCountryIDCard\n ) {\n console.warn(\"Issuing country does not match the disclosed issuing country in query result\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n disclose: {\n expected: `${queryResult.issuing_country.disclose.result}`,\n received: `${issuingCountryPassport ?? issuingCountryIDCard}`,\n message: \"Issuing country does not match the disclosed issuing country in query result\",\n },\n }\n }\n if (\n queryResult.issuing_country.eq &&\n (originalQuery.issuing_country?.eq === undefined ||\n queryResult.issuing_country.eq.expected !== originalQuery.issuing_country.eq)\n ) {\n console.warn(\"Issuing country eq does not match the original query\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n eq: {\n expected: `${originalQuery.issuing_country?.eq}`,\n received: `${queryResult.issuing_country.eq.expected}`,\n message: \"Issuing country eq does not match the original query\",\n },\n }\n }\n if (queryResult.issuing_country.disclose && !originalQuery.issuing_country?.disclose) {\n console.warn(\"Issuing country disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.issuing_country.disclose.result}`,\n message: \"Issuing country disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.fullname) {\n const fullnamePassport = disclosedDataPassport.name\n const fullnameIDCard = disclosedDataIDCard.name\n if (\n queryResult.fullname.eq &&\n queryResult.fullname.eq.result &&\n formatName(queryResult.fullname.eq.expected).toLowerCase() !==\n fullnamePassport.toLowerCase() &&\n formatName(queryResult.fullname.eq.expected).toLowerCase() !== fullnameIDCard.toLowerCase()\n ) {\n console.warn(\"Fullname does not match the expected fullname\")\n isCorrect = false\n queryResultErrors.fullname = {\n ...queryResultErrors.fullname,\n eq: {\n expected: `${queryResult.fullname.eq.expected}`,\n received: `${fullnamePassport ?? fullnameIDCard}`,\n message: \"Fullname does not match the expected fullname\",\n },\n }\n }\n if (\n queryResult.fullname.disclose &&\n formatName(queryResult.fullname.disclose.result).toLowerCase() !==\n fullnamePassport.toLowerCase() &&\n formatName(queryResult.fullname.disclose.result).toLowerCase() !==\n fullnameIDCard.toLowerCase()\n ) {\n console.warn(\"Fullname does not match the disclosed fullname in query result\")\n isCorrect = false\n queryResultErrors.fullname = {\n ...queryResultErrors.fullname,\n disclose: {\n expected: `${queryResult.fullname.disclose.result}`,\n received: `${fullnamePassport ?? fullnameIDCard}`,\n message: \"Fullname does not match the disclosed fullname in query result\",\n },\n }\n }\n if (\n queryResult.fullname.eq &&\n (originalQuery.fullname?.eq === undefined ||\n formatName(queryResult.fullname.eq.expected).toLowerCase() !==\n formatName(originalQuery.fullname.eq as string).toLowerCase())\n ) {\n console.warn(\"Fullname eq does not match the original query\")\n isCorrect = false\n queryResultErrors.fullname = {\n ...queryResultErrors.fullname,\n eq: {\n expected: `${originalQuery.fullname?.eq}`,\n received: `${queryResult.fullname.eq.expected}`,\n message: \"Fullname eq does not match the original query\",\n },\n }\n }\n if (queryResult.fullname.disclose && !originalQuery.fullname?.disclose) {\n console.warn(\"Fullname disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.fullname = {\n ...queryResultErrors.fullname,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.fullname.disclose.result}`,\n message: \"Fullname disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.firstname) {\n // If fullname was not revealed, then the name could be either the first name or last name\n const firstnamePassport =\n disclosedDataPassport.firstName && disclosedDataPassport.firstName.length > 0\n ? disclosedDataPassport.firstName\n : disclosedDataPassport.name\n const firstnameIDCard =\n disclosedDataIDCard.firstName && disclosedDataIDCard.firstName.length > 0\n ? disclosedDataIDCard.firstName\n : disclosedDataIDCard.name\n if (\n queryResult.firstname.eq &&\n queryResult.firstname.eq.result &&\n formatName(queryResult.firstname.eq.expected).toLowerCase() !==\n firstnamePassport.toLowerCase() &&\n formatName(queryResult.firstname.eq.expected).toLowerCase() !==\n firstnameIDCard.toLowerCase()\n ) {\n console.warn(\"Firstname does not match the expected firstname\")\n isCorrect = false\n queryResultErrors.firstname = {\n ...queryResultErrors.firstname,\n eq: {\n expected: `${queryResult.firstname.eq.expected}`,\n received: `${firstnamePassport ?? firstnameIDCard}`,\n message: \"Firstname does not match the expected firstname\",\n },\n }\n }\n if (\n queryResult.firstname.disclose &&\n formatName(queryResult.firstname.disclose.result).toLowerCase() !==\n firstnamePassport.toLowerCase() &&\n formatName(queryResult.firstname.disclose.result).toLowerCase() !==\n firstnameIDCard.toLowerCase()\n ) {\n console.warn(\"Firstname does not match the disclosed firstname in query result\")\n isCorrect = false\n queryResultErrors.firstname = {\n ...queryResultErrors.firstname,\n disclose: {\n expected: `${queryResult.firstname.disclose.result}`,\n received: `${firstnamePassport ?? firstnameIDCard}`,\n message: \"Firstname does not match the disclosed firstname in query result\",\n },\n }\n }\n if (\n queryResult.firstname.eq &&\n (originalQuery.firstname?.eq === undefined ||\n formatName(queryResult.firstname.eq.expected).toLowerCase() !==\n formatName(originalQuery.firstname.eq as string).toLowerCase())\n ) {\n console.warn(\"Firstname eq does not match the original query\")\n isCorrect = false\n queryResultErrors.firstname = {\n ...queryResultErrors.firstname,\n eq: {\n expected: `${originalQuery.firstname?.eq}`,\n received: `${queryResult.firstname.eq.expected}`,\n message: \"Firstname eq does not match the original query\",\n },\n }\n }\n if (queryResult.firstname.disclose && !originalQuery.firstname?.disclose) {\n console.warn(\"Firstname disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.firstname = {\n ...queryResultErrors.firstname,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.firstname.disclose.result}`,\n message: \"Firstname disclose is not in the original query\",\n },\n }\n }\n }\n if (queryResult.lastname) {\n // If fullname was not revealed, then the name could be either the first name or last name\n const lastnamePassport =\n disclosedDataPassport.lastName && disclosedDataPassport.lastName.length > 0\n ? disclosedDataPassport.lastName\n : disclosedDataPassport.name\n const lastnameIDCard =\n disclosedDataIDCard.lastName && disclosedDataIDCard.lastName.length > 0\n ? disclosedDataIDCard.lastName\n : disclosedDataIDCard.name\n if (\n queryResult.lastname.eq &&\n queryResult.lastname.eq.result &&\n formatName(queryResult.lastname.eq.expected).toLowerCase() !==\n lastnamePassport.toLowerCase() &&\n formatName(queryResult.lastname.eq.expected).toLowerCase() !== lastnameIDCard.toLowerCase()\n ) {\n console.warn(\"Lastname does not match the expected lastname\")\n isCorrect = false\n queryResultErrors.lastname = {\n ...queryResultErrors.lastname,\n eq: {\n expected: `${queryResult.lastname.eq.expected}`,\n received: `${lastnamePassport ?? lastnameIDCard}`,\n message: \"Lastname does not match the expected lastname\",\n },\n }\n }\n if (\n queryResult.lastname.disclose &&\n formatName(queryResult.lastname.disclose.result).toLowerCase() !==\n lastnamePassport.toLowerCase() &&\n formatName(queryResult.lastname.disclose.result).toLowerCase() !==\n lastnameIDCard.toLowerCase()\n ) {\n console.warn(\"Lastname does not match the disclosed lastname in query result\")\n isCorrect = false\n queryResultErrors.lastname = {\n ...queryResultErrors.lastname,\n disclose: {\n expected: `${queryResult.lastname.disclose.result}`,\n received: `${lastnamePassport ?? lastnameIDCard}`,\n message: \"Lastname does not match the disclosed lastname in query result\",\n },\n }\n }\n if (\n queryResult.lastname.eq &&\n (originalQuery.lastname?.eq === undefined ||\n formatName(queryResult.lastname.eq.expected).toLowerCase() !==\n formatName(originalQuery.lastname.eq as string).toLowerCase())\n ) {\n console.warn(\"Lastname eq does not match the original query\")\n isCorrect = false\n queryResultErrors.lastname = {\n ...queryResultErrors.lastname,\n eq: {\n expected: `${originalQuery.lastname?.eq}`,\n received: `${queryResult.lastname.eq.expected}`,\n message: \"Lastname eq does not match the original query\",\n },\n }\n }\n if (queryResult.lastname.disclose && !originalQuery.lastname?.disclose) {\n console.warn(\"Lastname disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.lastname = {\n ...queryResultErrors.lastname,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.lastname.disclose.result}`,\n message: \"Lastname disclose is not in the original query\",\n },\n }\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkAgePublicInputs(\n proof: ProofResult,\n originalQuery: Query,\n queryResult: QueryResult,\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n const currentTime = new Date()\n // TODO: Fix unused variable\n const _today = new Date(\n currentTime.getFullYear(),\n currentTime.getMonth(),\n currentTime.getDate(),\n 0,\n 0,\n 0,\n 0,\n )\n const minAge = getMinAgeFromCommittedInputs(\n (proof.committedInputs?.compare_age as AgeCommittedInputs) ??\n (proof.committedInputs?.compare_age_evm as AgeCommittedInputs),\n )\n const maxAge = getMaxAgeFromCommittedInputs(\n (proof.committedInputs?.compare_age as AgeCommittedInputs) ??\n (proof.committedInputs?.compare_age_evm as AgeCommittedInputs),\n )\n if (queryResult.age) {\n if (\n queryResult.age.gte &&\n queryResult.age.gte.result &&\n minAge !== (queryResult.age.gte.expected as number)\n ) {\n console.warn(\"Age is not greater than or equal to the expected age\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n gte: {\n expected: queryResult.age.gte.expected,\n received: minAge,\n message: \"Age is not greater than or equal to the expected age\",\n },\n }\n }\n if (\n queryResult.age.gt &&\n queryResult.age.gt.result &&\n minAge !== (queryResult.age.gt.expected as number) + 1\n ) {\n console.warn(\"Age is not greater than the expected age\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n gt: {\n expected: queryResult.age.gt.expected,\n received: minAge,\n message: \"Age is not greater than the expected age\",\n },\n }\n }\n if (\n queryResult.age.lt &&\n queryResult.age.lt.result &&\n maxAge !== (queryResult.age.lt.expected as number) - 1\n ) {\n console.warn(\"Age is not less than the expected age\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n lt: {\n expected: queryResult.age.lt.expected,\n received: maxAge,\n message: \"Age is not less than the expected age\",\n },\n }\n }\n if (\n queryResult.age.lte &&\n queryResult.age.lte.result &&\n maxAge !== (queryResult.age.lte.expected as number)\n ) {\n console.warn(\"Age is not less than or equal to the expected age\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n lte: {\n expected: queryResult.age.lte.expected,\n received: maxAge,\n message: \"Age is not less than or equal to the expected age\",\n },\n }\n }\n if (\n queryResult.age.eq &&\n queryResult.age.eq.result &&\n (minAge !== (queryResult.age.eq.expected as number) ||\n maxAge !== (queryResult.age.eq.expected as number))\n ) {\n console.warn(\"Age does not match the expected age\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n eq: {\n expected: queryResult.age.eq.expected,\n received: minAge !== (queryResult.age.eq.expected as number) ? minAge : maxAge,\n message: \"Age does not match the expected age\",\n },\n }\n }\n if (queryResult.age.range) {\n if (\n queryResult.age.range.result &&\n (minAge !== (queryResult.age.range.expected[0] as number) ||\n maxAge !== (queryResult.age.range.expected[1] as number))\n ) {\n console.warn(\"Age is not in the expected range\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n range: {\n expected: queryResult.age.range.expected,\n received: [minAge, maxAge],\n message: \"Age is not in the expected range\",\n },\n }\n }\n }\n if (\n !queryResult.age.lt &&\n !queryResult.age.lte &&\n !queryResult.age.eq &&\n !queryResult.age.range &&\n maxAge != 0\n ) {\n console.warn(\"Maximum age should be equal to 0\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n disclose: {\n expected: 0,\n received: maxAge,\n message: \"Maximum age should be equal to 0\",\n },\n }\n }\n if (\n !queryResult.age.gte &&\n !queryResult.age.gt &&\n !queryResult.age.eq &&\n !queryResult.age.range &&\n minAge != 0\n ) {\n console.warn(\"Minimum age should be equal to 0\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n disclose: {\n expected: 0,\n received: minAge,\n message: \"Minimum age should be equal to 0\",\n },\n }\n }\n if (\n queryResult.age.disclose &&\n (queryResult.age.disclose.result !== minAge || queryResult.age.disclose.result !== maxAge)\n ) {\n console.warn(\"Age does not match the disclosed age in query result\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n disclose: {\n expected: `${minAge}`,\n received: `${queryResult.age.disclose.result}`,\n message: \"Age does not match the disclosed age in query result\",\n },\n }\n }\n } else {\n console.warn(\"Age is not set in the query result\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n disclose: {\n message: \"Age is not set in the query result\",\n },\n }\n }\n if (\n queryResult.age?.gte &&\n (originalQuery.age?.gte === undefined ||\n queryResult.age.gte.expected !== originalQuery.age.gte)\n ) {\n console.warn(\"Age gte does not match the original query\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n gte: {\n expected: originalQuery.age?.gte,\n received: queryResult.age.gte.expected,\n message: \"Age gte does not match the original query\",\n },\n }\n }\n if (\n queryResult.age?.gt &&\n (originalQuery.age?.gt === undefined || queryResult.age.gt.expected !== originalQuery.age.gt)\n ) {\n console.warn(\"Age gt does not match the original query\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n gt: {\n expected: originalQuery.age?.gt,\n received: queryResult.age.gt.expected,\n message: \"Age gt does not match the original query\",\n },\n }\n }\n if (\n queryResult.age?.lt &&\n (originalQuery.age?.lt === undefined || queryResult.age.lt.expected !== originalQuery.age.lt)\n ) {\n console.warn(\"Age lt does not match the original query\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n lt: {\n expected: originalQuery.age?.lt,\n received: queryResult.age.lt.expected,\n message: \"Age lt does not match the original query\",\n },\n }\n }\n if (\n queryResult.age?.lte &&\n (originalQuery.age?.lte === undefined ||\n queryResult.age.lte.expected !== originalQuery.age.lte)\n ) {\n console.warn(\"Age lte does not match the original query\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n lte: {\n expected: originalQuery.age?.lte,\n received: queryResult.age.lte.expected,\n message: \"Age lte does not match the original query\",\n },\n }\n }\n if (\n queryResult.age?.eq &&\n (originalQuery.age?.eq === undefined || queryResult.age.eq.expected !== originalQuery.age.eq)\n ) {\n console.warn(\"Age eq does not match the original query\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n eq: {\n expected: originalQuery.age?.eq,\n received: queryResult.age.eq.expected,\n message: \"Age eq does not match the original query\",\n },\n }\n }\n if (\n queryResult.age?.range &&\n (originalQuery.age?.range === undefined ||\n queryResult.age.range.expected[0] !== originalQuery.age.range[0] ||\n queryResult.age.range.expected[1] !== originalQuery.age.range[1])\n ) {\n console.warn(\"Age range does not match the original query\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n range: {\n expected: originalQuery.age?.range,\n received: queryResult.age.range.expected,\n message: \"Age range does not match the original query\",\n },\n }\n }\n if (queryResult.age?.disclose && !originalQuery.age?.disclose) {\n console.warn(\"Age disclose is not in the original query\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n disclose: {\n expected: \"Not requested in original query\",\n received: `${queryResult.age.disclose.result}`,\n message: \"Age disclose is not in the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkBirthdatePublicInputs(\n proof: ProofResult,\n originalQuery: Query,\n queryResult: QueryResult,\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n const currentTime = new Date()\n // TODO: Fix unused variable\n const _today = new Date(\n currentTime.getFullYear(),\n currentTime.getMonth(),\n currentTime.getDate(),\n 0,\n 0,\n 0,\n )\n const minDate = getBirthdateMinDateTimestamp(\n (proof.committedInputs?.compare_birthdate as DateCommittedInputs) ??\n (proof.committedInputs?.compare_birthdate_evm as DateCommittedInputs),\n -1 * SECONDS_BETWEEN_1900_AND_1970,\n )\n const maxDate = getBirthdateMaxDateTimestamp(\n (proof.committedInputs?.compare_birthdate as DateCommittedInputs) ??\n (proof.committedInputs?.compare_birthdate_evm as DateCommittedInputs),\n -1 * SECONDS_BETWEEN_1900_AND_1970,\n )\n if (queryResult.birthdate) {\n if (\n queryResult.birthdate.gte &&\n queryResult.birthdate.gte.result &&\n !areDatesEqual(minDate, queryResult.birthdate.gte.expected)\n ) {\n console.warn(\"Birthdate is not greater than or equal to the expected birthdate\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n gte: {\n expected: queryResult.birthdate.gte.expected,\n received: minDate,\n message: \"Birthdate is not greater than or equal to the expected birthdate\",\n },\n }\n }\n if (queryResult.birthdate.gt && queryResult.birthdate.gt.result) {\n const expectedPlusOneDay = new Date(queryResult.birthdate.gt.expected as Date)\n expectedPlusOneDay.setDate(expectedPlusOneDay.getDate() + 1)\n if (!areDatesEqual(minDate, expectedPlusOneDay)) {\n console.warn(\"Birthdate is not greater than the expected birthdate\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n gt: {\n expected: queryResult.birthdate.gt.expected,\n received: minDate,\n message: \"Birthdate is not greater than the expected birthdate\",\n },\n }\n }\n }\n if (\n queryResult.birthdate.lte &&\n queryResult.birthdate.lte.result &&\n !areDatesEqual(maxDate, queryResult.birthdate.lte.expected)\n ) {\n console.warn(\"Birthdate is not less than the expected birthdate\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n lte: {\n expected: queryResult.birthdate.lte.expected,\n received: maxDate,\n message: \"Birthdate is not less than the expected birthdate\",\n },\n }\n }\n if (queryResult.birthdate.lt && queryResult.birthdate.lt.result) {\n const expectedMinusOneDay = new Date(queryResult.birthdate.lt.expected as Date)\n expectedMinusOneDay.setDate(expectedMinusOneDay.getDate() - 1)\n if (!areDatesEqual(maxDate, expectedMinusOneDay)) {\n console.warn(\"Birthdate is not less than the expected birthdate\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n lt: {\n expected: queryResult.birthdate.lt.expected,\n received: maxDate,\n message: \"Birthdate is not less than the expected birthdate\",\n },\n }\n }\n }\n if (queryResult.birthdate.range) {\n if (\n queryResult.birthdate.range.result &&\n (!areDatesEqual(minDate, queryResult.birthdate.range.expected[0]) ||\n !areDatesEqual(maxDate, queryResult.birthdate.range.expected[1]))\n ) {\n console.warn(\"Birthdate is not in the expected range\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n range: {\n expected: queryResult.birthdate.range.expected,\n received: [minDate, maxDate],\n message: \"Birthdate is not in the expected range\",\n },\n }\n }\n }\n if (\n !queryResult.birthdate.lte &&\n !queryResult.birthdate.lt &&\n !queryResult.birthdate.eq &&\n !queryResult.birthdate.range &&\n !areDatesEqual(maxDate, DEFAULT_DATE_VALUE)\n ) {\n console.warn(\"Maximum birthdate should be equal to default date value\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n disclose: {\n expected: `${DEFAULT_DATE_VALUE.toISOString()}`,\n received: `${maxDate.toISOString()}`,\n message: \"Maximum birthdate should be equal to default date value\",\n },\n }\n }\n if (\n !queryResult.birthdate.gte &&\n !queryResult.birthdate.gt &&\n !queryResult.birthdate.eq &&\n !queryResult.birthdate.range &&\n !areDatesEqual(minDate, DEFAULT_DATE_VALUE)\n ) {\n console.warn(\"Minimum birthdate should be equal to default date value\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n disclose: {\n expected: `${DEFAULT_DATE_VALUE.toISOString()}`,\n received: `${minDate.toISOString()}`,\n message: \"Minimum birthdate should be equal to default date value\",\n },\n }\n }\n } else {\n console.warn(\"Birthdate is not set in the query result\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n disclose: {\n message: \"Birthdate is not set in the query result\",\n },\n }\n }\n if (\n queryResult.birthdate?.gte &&\n (originalQuery.birthdate?.gte === undefined ||\n !areDatesEqual(queryResult.birthdate.gte.expected, originalQuery.birthdate.gte as Date))\n ) {\n console.warn(\"Birthdate gte does not match the original query\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n gte: {\n expected: originalQuery.birthdate?.gte,\n received: queryResult.birthdate.gte.expected,\n message: \"Birthdate gte does not match the original query\",\n },\n }\n }\n if (\n queryResult.birthdate?.gt &&\n (originalQuery.birthdate?.gt === undefined ||\n !areDatesEqual(queryResult.birthdate.gt.expected, originalQuery.birthdate.gt as Date))\n ) {\n console.warn(\"Birthdate gt does not match the original query\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n gt: {\n expected: originalQuery.birthdate?.gt,\n received: queryResult.birthdate.gt.expected,\n message: \"Birthdate gt does not match the original query\",\n },\n }\n }\n if (\n queryResult.birthdate?.lte &&\n (originalQuery.birthdate?.lte === undefined ||\n !areDatesEqual(queryResult.birthdate.lte.expected, originalQuery.birthdate.lte as Date))\n ) {\n console.warn(\"Birthdate lte does not match the original query\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n lte: {\n expected: originalQuery.birthdate?.lte,\n received: queryResult.birthdate.lte.expected,\n message: \"Birthdate lte does not match the original query\",\n },\n }\n }\n if (\n queryResult.birthdate?.lt &&\n (originalQuery.birthdate?.lt === undefined ||\n !areDatesEqual(queryResult.birthdate.lt.expected, originalQuery.birthdate.lt as Date))\n ) {\n console.warn(\"Birthdate lt does not match the original query\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n lt: {\n expected: originalQuery.birthdate?.lt,\n received: queryResult.birthdate.lt.expected,\n message: \"Birthdate lt does not match the original query\",\n },\n }\n }\n if (\n queryResult.birthdate?.range &&\n (originalQuery.birthdate?.range === undefined ||\n !areDatesEqual(\n queryResult.birthdate.range.expected[0],\n originalQuery.birthdate.range[0] as Date,\n ) ||\n !areDatesEqual(\n queryResult.birthdate.range.expected[1],\n originalQuery.birthdate.range[1] as Date,\n ))\n ) {\n console.warn(\"Birthdate range does not match the original query\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n range: {\n expected: originalQuery.birthdate?.range,\n received: queryResult.birthdate.range.expected,\n message: \"Birthdate range does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkExpiryDatePublicInputs(\n proof: ProofResult,\n originalQuery: Query,\n queryResult: QueryResult,\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n const currentTime = new Date()\n // TODO: Fix unused variable\n const _today = new Date(\n currentTime.getFullYear(),\n currentTime.getMonth(),\n currentTime.getDate(),\n 0,\n 0,\n 0,\n )\n const minDate = getMinDateFromCommittedInputs(\n (proof.committedInputs?.compare_expiry as DateCommittedInputs) ??\n (proof.committedInputs?.compare_expiry_evm as DateCommittedInputs),\n )\n const maxDate = getMaxDateFromCommittedInputs(\n (proof.committedInputs?.compare_expiry as DateCommittedInputs) ??\n (proof.committedInputs?.compare_expiry_evm as DateCommittedInputs),\n )\n if (queryResult.expiry_date) {\n if (\n queryResult.expiry_date.gte &&\n queryResult.expiry_date.gte.result &&\n !areDatesEqual(minDate, queryResult.expiry_date.gte.expected)\n ) {\n console.warn(\"Expiry date is not greater than or equal to the expected expiry date\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n gte: {\n expected: queryResult.expiry_date.gte.expected,\n received: minDate,\n message: \"Expiry date is not greater than or equal to the expected expiry date\",\n },\n }\n }\n if (\n queryResult.expiry_date.lte &&\n queryResult.expiry_date.lte.result &&\n !areDatesEqual(maxDate, queryResult.expiry_date.lte.expected)\n ) {\n console.warn(\"Expiry date is not less than the expected expiry date\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n lte: {\n expected: queryResult.expiry_date.lte.expected,\n received: maxDate,\n message: \"Expiry date is not less than the expected expiry date\",\n },\n }\n }\n if (queryResult.expiry_date.range) {\n if (\n queryResult.expiry_date.range.result &&\n (!areDatesEqual(minDate, queryResult.expiry_date.range.expected[0]) ||\n !areDatesEqual(maxDate, queryResult.expiry_date.range.expected[1]))\n ) {\n console.warn(\"Expiry date is not in the expected range\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n range: {\n expected: queryResult.expiry_date.range.expected,\n received: [minDate, maxDate],\n message: \"Expiry date is not in the expected range\",\n },\n }\n }\n }\n if (\n !queryResult.expiry_date.lte &&\n !queryResult.expiry_date.lt &&\n !queryResult.expiry_date.eq &&\n !queryResult.expiry_date.range &&\n !areDatesEqual(maxDate, DEFAULT_DATE_VALUE)\n ) {\n console.warn(\"Maximum expiry date should be equal to default date value\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n disclose: {\n expected: `${DEFAULT_DATE_VALUE.toISOString()}`,\n received: `${maxDate.toISOString()}`,\n message: \"Maximum expiry date should be equal to default date value\",\n },\n }\n }\n if (\n !queryResult.expiry_date.gte &&\n !queryResult.expiry_date.gt &&\n !queryResult.expiry_date.eq &&\n !queryResult.expiry_date.range &&\n !areDatesEqual(minDate, DEFAULT_DATE_VALUE)\n ) {\n console.warn(\"Minimum expiry date should be equal to default date value\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n disclose: {\n expected: `${DEFAULT_DATE_VALUE.toISOString()}`,\n received: `${minDate.toISOString()}`,\n message: \"Minimum expiry date should be equal to default date value\",\n },\n }\n }\n } else {\n console.warn(\"Expiry date is not set in the query result\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n disclose: {\n message: \"Expiry date is not set in the query result\",\n },\n }\n }\n if (\n queryResult.expiry_date?.gte &&\n (originalQuery.expiry_date?.gte === undefined ||\n !areDatesEqual(queryResult.expiry_date.gte.expected, originalQuery.expiry_date.gte as Date))\n ) {\n console.warn(\"Expiry date gte does not match the original query\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n gte: {\n expected: originalQuery.expiry_date?.gte,\n received: queryResult.expiry_date.gte.expected,\n message: \"Expiry date gte does not match the original query\",\n },\n }\n }\n if (\n queryResult.expiry_date?.gt &&\n (originalQuery.expiry_date?.gt === undefined ||\n !areDatesEqual(queryResult.expiry_date.gt.expected, originalQuery.expiry_date.gt as Date))\n ) {\n console.warn(\"Expiry date gt does not match the original query\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n gt: {\n expected: originalQuery.expiry_date?.gt,\n received: queryResult.expiry_date.gt.expected,\n message: \"Expiry date gt does not match the original query\",\n },\n }\n }\n if (\n queryResult.expiry_date?.lte &&\n (originalQuery.expiry_date?.lte === undefined ||\n !areDatesEqual(queryResult.expiry_date.lte.expected, originalQuery.expiry_date.lte as Date))\n ) {\n console.warn(\"Expiry date lte does not match the original query\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n lte: {\n expected: originalQuery.expiry_date?.lte,\n received: queryResult.expiry_date.lte.expected,\n message: \"Expiry date lte does not match the original query\",\n },\n }\n }\n if (\n queryResult.expiry_date?.lt &&\n (originalQuery.expiry_date?.lt === undefined ||\n !areDatesEqual(queryResult.expiry_date.lt.expected, originalQuery.expiry_date.lt as Date))\n ) {\n console.warn(\"Expiry date lt does not match the original query\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n lt: {\n expected: originalQuery.expiry_date?.lt,\n received: queryResult.expiry_date.lt.expected,\n message: \"Expiry date lt does not match the original query\",\n },\n }\n }\n if (\n queryResult.expiry_date?.range &&\n (originalQuery.expiry_date?.range === undefined ||\n !areDatesEqual(\n queryResult.expiry_date.range.expected[0],\n originalQuery.expiry_date.range[0] as Date,\n ) ||\n !areDatesEqual(\n queryResult.expiry_date.range.expected[1],\n originalQuery.expiry_date.range[1] as Date,\n ))\n ) {\n console.warn(\"Expiry date range does not match the original query\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n range: {\n expected: originalQuery.expiry_date?.range,\n received: queryResult.expiry_date.range.expected,\n message: \"Expiry date range does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkNationalityExclusionPublicInputs(\n originalQuery: Query,\n queryResult: QueryResult,\n countryList: string[],\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n if (\n queryResult.nationality &&\n queryResult.nationality.out &&\n queryResult.nationality.out.result\n ) {\n if (\n !queryResult.nationality.out.expected?.every((country) => countryList.includes(country))\n ) {\n console.warn(\"Nationality exclusion list does not match the one from the query results\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n out: {\n expected: queryResult.nationality.out.expected,\n received: countryList,\n message: \"Nationality exclusion list does not match the one from the query results\",\n },\n }\n }\n } else if (!queryResult.nationality || !queryResult.nationality.out) {\n console.warn(\"Nationality exclusion is not set in the query result\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n out: {\n message: \"Nationality exclusion is not set in the query result\",\n },\n }\n }\n // Check the countryList is in ascending order\n // If the prover doesn't use a sorted list then the proof cannot be trusted\n // as it is requirement in the circuit for the exclusion check to work\n for (let i = 1; i < countryList.length; i++) {\n if (countryList[i] < countryList[i - 1]) {\n console.warn(\n \"The nationality exclusion list has not been sorted, and thus the proof cannot be trusted\",\n )\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n out: {\n message:\n \"The nationality exclusion list has not been sorted, and thus the proof cannot be trusted\",\n },\n }\n }\n }\n if (\n queryResult.nationality?.out &&\n (originalQuery.nationality?.out === undefined ||\n queryResult.nationality.out.expected?.length !==\n (originalQuery.nationality.out as string[]).length ||\n !queryResult.nationality.out.expected?.every((country) =>\n (originalQuery.nationality!.out as string[]).includes(country),\n ))\n ) {\n console.warn(\"Nationality exclusion list does not match the original query\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n out: {\n expected: originalQuery.nationality?.out as string[],\n received: queryResult.nationality.out.expected,\n message: \"Nationality exclusion list does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkIssuingCountryExclusionPublicInputs(\n originalQuery: Query,\n queryResult: QueryResult,\n countryList: string[],\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n\n if (\n queryResult.issuing_country &&\n queryResult.issuing_country.out &&\n queryResult.issuing_country.out.result\n ) {\n if (\n !queryResult.issuing_country.out.expected?.every((country) => countryList.includes(country))\n ) {\n console.warn(\"Issuing country exclusion list does not match the one from the query results\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n out: {\n expected: queryResult.issuing_country.out.expected,\n received: countryList,\n message: \"Issuing country exclusion list does not match the one from the query results\",\n },\n }\n }\n } else if (!queryResult.issuing_country || !queryResult.issuing_country.out) {\n console.warn(\"Issuing country exclusion is not set in the query result\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n out: {\n message: \"Issuing country exclusion is not set in the query result\",\n },\n }\n }\n // Check the countryList is in ascending order\n // If the prover doesn't use a sorted list then the proof cannot be trusted\n // as it is requirement in the circuit for the exclusion check to work\n for (let i = 1; i < countryList.length; i++) {\n if (countryList[i] < countryList[i - 1]) {\n console.warn(\n \"The issuing country exclusion list has not been sorted, and thus the proof cannot be trusted\",\n )\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n out: {\n message:\n \"The issuing country exclusion list has not been sorted, and thus the proof cannot be trusted\",\n },\n }\n }\n }\n if (\n queryResult.issuing_country?.out &&\n (originalQuery.issuing_country?.out === undefined ||\n queryResult.issuing_country.out.expected?.length !==\n (originalQuery.issuing_country.out as string[]).length ||\n !queryResult.issuing_country.out.expected?.every((country) =>\n (originalQuery.issuing_country!.out as string[]).includes(country),\n ))\n ) {\n console.warn(\"Issuing country exclusion list does not match the original query\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n out: {\n expected: originalQuery.issuing_country?.out as string[],\n received: queryResult.issuing_country.out.expected,\n message: \"Issuing country exclusion list does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkNationalityInclusionPublicInputs(\n originalQuery: Query,\n queryResult: QueryResult,\n countryList: string[],\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n if (\n queryResult.nationality &&\n queryResult.nationality.in &&\n queryResult.nationality.in.result\n ) {\n if (!queryResult.nationality.in.expected?.every((country) => countryList.includes(country))) {\n console.warn(\"Nationality inclusion list does not match the one from the query results\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n in: {\n expected: queryResult.nationality.in.expected,\n received: countryList,\n message: \"Nationality inclusion list does not match the one from the query results\",\n },\n }\n }\n } else if (!queryResult.nationality || !queryResult.nationality.in) {\n console.warn(\"Nationality inclusion is not set in the query result\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n in: {\n message: \"Nationality inclusion is not set in the query result\",\n },\n }\n }\n if (\n queryResult.nationality?.in &&\n (originalQuery.nationality?.in === undefined ||\n queryResult.nationality.in.expected?.length !==\n (originalQuery.nationality.in as string[]).length ||\n !queryResult.nationality.in.expected?.every((country) =>\n (originalQuery.nationality!.in as string[]).includes(country),\n ))\n ) {\n console.warn(\"Nationality inclusion list does not match the original query\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n in: {\n expected: originalQuery.nationality?.in as string[],\n received: queryResult.nationality.in.expected,\n message: \"Nationality inclusion list does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkIssuingCountryInclusionPublicInputs(\n originalQuery: Query,\n queryResult: QueryResult,\n countryList: string[],\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n\n if (\n queryResult.issuing_country &&\n queryResult.issuing_country.in &&\n queryResult.issuing_country.in.result\n ) {\n if (\n !queryResult.issuing_country.in.expected?.every((country) => countryList.includes(country))\n ) {\n console.warn(\"Issuing country inclusion list does not match the one from the query results\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n in: {\n expected: queryResult.issuing_country.in.expected,\n received: countryList,\n message: \"Issuing country inclusion list does not match the one from the query results\",\n },\n }\n }\n } else if (!queryResult.issuing_country || !queryResult.issuing_country.in) {\n console.warn(\"Issuing country inclusion is not set in the query result\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n in: {\n message: \"Issuing country inclusion is not set in the query result\",\n },\n }\n }\n if (\n queryResult.issuing_country?.in &&\n (originalQuery.issuing_country?.in === undefined ||\n queryResult.issuing_country.in.expected?.length !==\n (originalQuery.issuing_country.in as string[]).length ||\n !queryResult.issuing_country.in.expected?.every((country) =>\n (originalQuery.issuing_country!.in as string[]).includes(country),\n ))\n ) {\n console.warn(\"Issuing country inclusion list does not match the original query\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n in: {\n expected: originalQuery.issuing_country?.in as string[],\n received: queryResult.issuing_country.in.expected,\n message: \"Issuing country inclusion list does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static checkScopeFromDisclosureProof(\n domain: string,\n proofData: ProofData,\n queryResultErrors: Partial<QueryResultErrors>,\n key: string,\n scope?: string,\n ) {\n // The OPRF nodes cannot know which domain or scope a proof was made for\n if (domain === \"*\") {\n return { isCorrect: true, queryResultErrors }\n }\n let isCorrect = true\n if (getServiceScopeHash(domain) !== getServiceScopeFromDisclosureProof(proofData)) {\n console.warn(\"The proof comes from a different domain than the one expected\")\n isCorrect = false\n if (!queryResultErrors[key as keyof QueryResultErrors]) {\n queryResultErrors[key as keyof QueryResultErrors] = {}\n }\n queryResultErrors[key as keyof QueryResultErrors]!.scope = {\n expected: `Scope: ${getServiceScopeHash(domain).toString()}`,\n received: `Scope: ${getServiceScopeFromDisclosureProof(proofData).toString()}`,\n message: \"The proof comes from a different domain than the one expected\",\n }\n }\n if (getScopeHash(scope) !== getServiceSubScopeFromDisclosureProof(proofData)) {\n const scopeErrorMessage = scope\n ? \"The proof uses a different scope than the one expected\"\n : \"The proof uses a scope but none was passed to verify()\"\n console.warn(scopeErrorMessage)\n isCorrect = false\n if (!queryResultErrors[key as keyof QueryResultErrors]) {\n queryResultErrors[key as keyof QueryResultErrors] = {}\n }\n queryResultErrors[key as keyof QueryResultErrors]!.scope = {\n expected: `Scope: ${getScopeHash(scope).toString()}`,\n received: `Scope: ${getServiceSubScopeFromDisclosureProof(proofData).toString()}`,\n message: scopeErrorMessage,\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n private static async checkRegistryRoot(\n check: (registry: RegistryClient) => Promise<boolean>,\n devMode: boolean | undefined,\n originalQuery: Query,\n queryResultErrors: any,\n invalid: {\n section: string\n field: string\n expected: string\n received: string\n message: string\n },\n registryClient?: RegistryClient,\n ) {\n let isCorrect: boolean\n try {\n isCorrect = await check(\n registryClient ?? createRegistryClient(getChainFromQuery(originalQuery, Boolean(devMode))),\n )\n } catch (error) {\n console.warn(error)\n isCorrect = false\n }\n if (!isCorrect) {\n console.warn(invalid.message)\n const { section, field, ...error } = invalid\n queryResultErrors[section] = { ...queryResultErrors[section], [field]: error }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static async checkCertificateRegistryRoot(\n root: string,\n queryResultErrors: any,\n outer?: boolean,\n devMode?: boolean,\n // Point in time to check validity at, in seconds; defaults to now\n timestamp?: number,\n originalQuery: Query = {},\n registryClient?: RegistryClient,\n ) {\n return this.checkRegistryRoot(\n (registry) => registry.isCertificateRootValid(root, timestamp),\n devMode,\n originalQuery,\n queryResultErrors,\n {\n section: outer ? \"outer\" : \"sig_check_dsc\",\n field: \"certificate\",\n expected: \"A valid root from ZKPassport Registry\",\n received: `Got invalid certificate registry root: ${root}`,\n message: \"The ID was signed by an unrecognized root certificate\",\n },\n registryClient,\n )\n }\n\n public static async checkCircuitRegistryRoot(\n root: string,\n queryResultErrors: any,\n devMode?: boolean,\n // Same as above, see checkCertificateRegistryRoot\n timestamp?: number,\n originalQuery: Query = {},\n registryClient?: RegistryClient,\n ) {\n return this.checkRegistryRoot(\n (registry) => registry.isCircuitRootValid(root, timestamp),\n devMode,\n originalQuery,\n queryResultErrors,\n {\n section: \"outer\",\n field: \"circuit\",\n expected: \"A valid circuit from ZKPassport Registry\",\n received: `Got invalid circuit registry root: ${root}`,\n message: \"The proof uses an unrecognized circuit\",\n },\n registryClient,\n )\n }\n\n public static async checkSanctionsRegistryRoot(\n root: string,\n queryResultErrors: any,\n devMode?: boolean,\n // Same as above, see checkCertificateRegistryRoot\n timestamp?: number,\n originalQuery: Query = {},\n registryClient?: RegistryClient,\n ) {\n return this.checkRegistryRoot(\n (registry) => registry.isSanctionsRootValid(root, timestamp),\n devMode,\n originalQuery,\n queryResultErrors,\n {\n section: \"sanctions\",\n field: \"eq\",\n expected: \"A valid root from ZKPassport Registry\",\n received: `Got invalid sanctions registry root: ${root}`,\n message: \"Invalid sanctions registry root\",\n },\n registryClient,\n )\n }\n\n /**\n * An Android attestation chain must have been checked against a revocation tree root the\n * registry holds, or against the empty tree's root while the registry has no root yet\n */\n public static async checkAttestationRevocationRoot(\n root: string,\n queryResultErrors: any,\n section: \"facematch\" | \"attested_id\",\n devMode?: boolean,\n // Same as above, see checkCertificateRegistryRoot\n timestamp?: number,\n originalQuery: Query = {},\n registryClient?: RegistryClient,\n ) {\n const isEmptyRoot = BigInt(root) === BigInt(EMPTY_ATTESTATION_REVOCATION_ROOT)\n return this.checkRegistryRoot(\n async (registry) =>\n isEmptyRoot\n ? BigInt(await registry.getLatestAttestationRevocationRoot()) === 0n\n : registry.isAttestationRevocationRootValid(root, timestamp),\n devMode,\n originalQuery,\n queryResultErrors,\n {\n section,\n field: \"revocation\",\n expected: \"A valid root from ZKPassport Registry\",\n received: `Got invalid attestation revocation root: ${root}`,\n message: \"The device attestation was checked against an unrecognized revocation list\",\n },\n registryClient,\n )\n }\n\n public static checkBindPublicInputs(\n originalQuery: Query,\n queryResult: QueryResult,\n boundData: BoundData,\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n\n if (queryResult.bind) {\n const bindMismatches: string[] = []\n if (\n queryResult.bind.user_address?.toLowerCase().replace(\"0x\", \"\") !==\n boundData.user_address?.toLowerCase().replace(\"0x\", \"\")\n ) {\n console.warn(\"Bound user address does not match the one from the query results\")\n isCorrect = false\n bindMismatches.push(\n `user_address: expected ${queryResult.bind.user_address}, received ${boundData.user_address}`,\n )\n }\n if (queryResult.bind.chain !== boundData.chain) {\n console.warn(\"Bound chain id does not match the one from the query results\")\n isCorrect = false\n bindMismatches.push(\n `chain: expected ${queryResult.bind.chain}, received ${boundData.chain}`,\n )\n }\n if (\n queryResult.bind.custom_data?.trim().toLowerCase() !==\n boundData.custom_data?.trim().toLowerCase()\n ) {\n console.warn(\"Bound custom data does not match the one from the query results\")\n isCorrect = false\n bindMismatches.push(\n `custom_data: expected ${queryResult.bind.custom_data}, received ${boundData.custom_data}`,\n )\n }\n if (bindMismatches.length > 0) {\n queryResultErrors.bind = {\n ...queryResultErrors.bind,\n eq: {\n expected: `${queryResult.bind.user_address}, ${queryResult.bind.chain}, ${queryResult.bind.custom_data}`,\n received: `${boundData.user_address}, ${boundData.chain}, ${boundData.custom_data}`,\n message: `Bound data does not match: ${bindMismatches.join(\"; \")}`,\n },\n }\n }\n }\n if (\n originalQuery.bind === undefined ||\n boundData.user_address?.toLowerCase().replace(\"0x\", \"\") !==\n originalQuery.bind.user_address?.toLowerCase().replace(\"0x\", \"\") ||\n boundData.chain !== originalQuery.bind.chain ||\n boundData.custom_data?.trim().toLowerCase() !==\n originalQuery.bind.custom_data?.trim().toLowerCase()\n ) {\n console.warn(\"Bound data does not match the original query\")\n isCorrect = false\n queryResultErrors.bind = {\n ...queryResultErrors.bind,\n eq: {\n expected: `${originalQuery.bind?.user_address}, ${originalQuery.bind?.chain}, ${originalQuery.bind?.custom_data}`,\n received: `${boundData.user_address}, ${boundData.chain}, ${boundData.custom_data}`,\n message: \"Bound data does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static async checkSanctionsExclusionPublicInputs(\n originalQuery: Query,\n queryResult: QueryResult,\n sanctionsCommittedInputs: SanctionsCommittedInputs,\n devMode?: boolean,\n // Same as above, see checkCertificateRegistryRoot\n timestamp?: number,\n registryClient?: RegistryClient,\n ) {\n const queryResultErrors: Partial<QueryResultErrors> = {}\n let isCorrect = true\n // Validate the committed strict mode directly against the request\n if (sanctionsCommittedInputs.isStrict !== (originalQuery.sanctions?.strict ?? false)) {\n console.warn(\"Sanctions strict mode does not match the original query\")\n isCorrect = false\n queryResultErrors.sanctions = {\n ...queryResultErrors.sanctions,\n eq: {\n expected: `strict: ${originalQuery.sanctions?.strict ?? false}`,\n received: `strict: ${sanctionsCommittedInputs.isStrict}`,\n message: \"Sanctions strict mode does not match the original query\",\n },\n }\n }\n const { isCorrect: isCorrectRoot } = await this.checkSanctionsRegistryRoot(\n sanctionsCommittedInputs.rootHash,\n queryResultErrors,\n devMode,\n timestamp,\n originalQuery,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectRoot\n if (queryResult.sanctions && queryResult.sanctions.passed) {\n if (queryResult.sanctions.isStrict !== sanctionsCommittedInputs.isStrict) {\n console.warn(\"Invalid sanctions strict mode\")\n isCorrect = false\n queryResultErrors.sanctions = {\n ...queryResultErrors.sanctions,\n eq: {\n expected: queryResult.sanctions.isStrict.toString(),\n received: sanctionsCommittedInputs.isStrict.toString(),\n message: \"Invalid sanctions strict mode\",\n },\n }\n }\n }\n if (\n queryResult.sanctions &&\n (originalQuery.sanctions === undefined ||\n queryResult.sanctions.isStrict !== (originalQuery.sanctions.strict ?? false))\n ) {\n console.warn(\"Sanctions config does not match the original query\")\n isCorrect = false\n queryResultErrors.sanctions = {\n ...queryResultErrors.sanctions,\n eq: {\n expected: `strict: ${originalQuery.sanctions?.strict ?? false}`,\n received: `strict: ${queryResult.sanctions.isStrict}`,\n message: \"Sanctions config does not match the original query\",\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static async checkFacematchPublicInputs(\n originalQuery: Query,\n queryResult: QueryResult,\n facematchCommittedInputs: FacematchCommittedInputs,\n devMode?: boolean,\n // Same as above, see checkCertificateRegistryRoot\n timestamp?: number,\n registryClient?: RegistryClient,\n // False for a proof of circuits before 0.23.0, which has no revocation root to check\n commitsRevocationRoot: boolean = true,\n ) {\n let isCorrect = true\n const queryResultErrors: Partial<QueryResultErrors> = {}\n // Validate the committed facematch parameters against the request\n // Check if the root key is either from Apple (iOS) or Google (Android)\n if (\n facematchCommittedInputs.rootKeyLeaf !== APPLE_APP_ATTEST_ROOT_KEY_HASH &&\n facematchCommittedInputs.rootKeyLeaf !== GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH &&\n facematchCommittedInputs.rootKeyLeaf !== GOOGLE_APP_ATTEST_ECDSA_P384_ROOT_KEY_HASH\n ) {\n console.warn(\"Invalid facematch root key hash\")\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n eq: {\n expected: `${APPLE_APP_ATTEST_ROOT_KEY_HASH} (iOS) or ${GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH} (Android) or ${GOOGLE_APP_ATTEST_ECDSA_P384_ROOT_KEY_HASH} (Android)`,\n received: facematchCommittedInputs.rootKeyLeaf,\n message: \"Invalid facematch root key hash\",\n },\n }\n }\n const EXPECTED_ENVIRONMENT = \"production\"\n if (facematchCommittedInputs.environment !== EXPECTED_ENVIRONMENT) {\n console.warn(\"Invalid facematch environment, it should be production\")\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n eq: {\n expected: EXPECTED_ENVIRONMENT,\n received: facematchCommittedInputs.environment,\n message: \"Invalid facematch environment, it should be production\",\n },\n }\n }\n if (\n facematchCommittedInputs.appIdHash !== ZKPASSPORT_IOS_APP_ID_HASH &&\n facematchCommittedInputs.appIdHash !== ZKPASSPORT_IOS_APP_CLIP_APP_ID_HASH &&\n facematchCommittedInputs.appIdHash !== ZKPASSPORT_ANDROID_APP_ID_HASH\n ) {\n console.warn(\n \"Invalid facematch app id hash, the attestation should be coming from the ZKPassport app\",\n )\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n eq: {\n expected: `${ZKPASSPORT_IOS_APP_ID_HASH} (iOS) or ${ZKPASSPORT_IOS_APP_CLIP_APP_ID_HASH} (iOS App Clip) or ${ZKPASSPORT_ANDROID_APP_ID_HASH} (Android)`,\n received: facematchCommittedInputs.appIdHash,\n message:\n \"Invalid facematch app id hash, the attestation should be coming from the ZKPassport app\",\n },\n }\n }\n const requestedMode = originalQuery.facematch?.mode\n if (\n (queryResult.facematch && facematchCommittedInputs.mode !== queryResult.facematch.mode) ||\n (requestedMode !== undefined && facematchCommittedInputs.mode !== requestedMode)\n ) {\n console.warn(\"Invalid facematch mode\")\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n eq: {\n expected: originalQuery.facematch?.mode,\n received: facematchCommittedInputs.mode,\n message: \"Invalid facematch mode\",\n },\n }\n }\n if (!commitsRevocationRoot) return { isCorrect, queryResultErrors }\n const revocationRoot = facematchCommittedInputs.revocationRoot ?? \"0x0\"\n if (facematchCommittedInputs.rootKeyLeaf === APPLE_APP_ATTEST_ROOT_KEY_HASH) {\n if (BigInt(revocationRoot) !== 0n) {\n console.warn(\"An iOS face match has no revocation root\")\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n revocation: {\n expected: \"0\",\n received: revocationRoot,\n message: \"An iOS face match has no revocation root\",\n },\n }\n }\n } else {\n const { isCorrect: isCorrectRevocationRoot } = await this.checkAttestationRevocationRoot(\n revocationRoot,\n queryResultErrors,\n \"facematch\",\n devMode,\n timestamp,\n originalQuery,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectRevocationRoot\n }\n return { isCorrect, queryResultErrors }\n }\n\n private static async checkCurrentDate(\n circuitName: keyof QueryResultErrors,\n proofData: ProofData,\n validity: number,\n queryResultErrors: Partial<QueryResultErrors>,\n ) {\n const currentTime = new Date()\n const today = new Date(\n currentTime.getFullYear(),\n currentTime.getMonth(),\n currentTime.getDate(),\n 0,\n 0,\n 0,\n 0,\n )\n const currentDate = getCurrentDateFromDisclosureProof(proofData)\n const todayToCurrentDate = today.getTime() - currentDate.getTime()\n const expectedDifference = validity ? validity * 1000 : DEFAULT_VALIDITY * 1000\n let isCorrect = true\n if (todayToCurrentDate >= expectedDifference) {\n console.warn(\"The date used to check the validity of the ID falls out of the validity period\")\n isCorrect = false\n if (!queryResultErrors[circuitName as keyof QueryResultErrors]) {\n queryResultErrors[circuitName as keyof QueryResultErrors] = {}\n }\n queryResultErrors[circuitName as keyof QueryResultErrors]!.date = {\n expected: `Difference: ${validity} seconds`,\n received: `Difference: ${Math.round(todayToCurrentDate / 1000)} seconds`,\n message: \"The date used to check the validity of the ID falls out of the validity period\",\n }\n }\n // Reject a current_date set in the future\n if (currentDate.getTime() - today.getTime() > CURRENT_DATE_FUTURE_TOLERANCE_MS) {\n console.warn(\"The date used to check the validity of the ID is in the future\")\n isCorrect = false\n if (!queryResultErrors[circuitName as keyof QueryResultErrors]) {\n queryResultErrors[circuitName as keyof QueryResultErrors] = {}\n }\n queryResultErrors[circuitName as keyof QueryResultErrors]!.date = {\n expected: `Difference: ${validity} seconds`,\n received: `Difference: ${Math.round(todayToCurrentDate / 1000)} seconds`,\n message: \"The date used to check the validity of the ID is in the future\",\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n // Enforce that every condition in `originalQuery` is actually backed by a proof\n private static checkQueryCompleteness(\n originalQuery: Query,\n committedInputKeys: Set<string>,\n ): { isCorrect: boolean; queryResultErrors: Partial<QueryResultErrors> } {\n let isCorrect = true\n const queryResultErrors: Partial<QueryResultErrors> = {}\n const has = (...keys: string[]) => keys.some((k) => committedInputKeys.has(k))\n const flag = (field: keyof QueryResultErrors, message: string) => {\n isCorrect = false\n queryResultErrors[field] = {\n ...queryResultErrors[field],\n commitment: {\n expected: \"A proof covering the requested condition\",\n received: \"No matching proof was provided\",\n message,\n },\n }\n }\n const hasDisclose = has(\"disclose_bytes\", \"disclose_bytes_evm\")\n const isComparison = (c?: {\n gte?: unknown\n gt?: unknown\n lte?: unknown\n lt?: unknown\n range?: unknown\n }) =>\n !!c &&\n (c.gte !== undefined ||\n c.gt !== undefined ||\n c.lte !== undefined ||\n c.lt !== undefined ||\n c.range !== undefined)\n const isDisclosure = (c?: { eq?: unknown; disclose?: unknown }) =>\n !!c && (c.eq !== undefined || c.disclose === true)\n\n const age = originalQuery.age\n if ((isComparison(age) || age?.eq !== undefined) && !has(\"compare_age\", \"compare_age_evm\")) {\n flag(\"age\", \"The proof does not verify the requested age condition\")\n }\n\n if (\n isComparison(originalQuery.birthdate) &&\n !has(\"compare_birthdate\", \"compare_birthdate_evm\")\n ) {\n flag(\"birthdate\", \"The proof does not verify the requested birthdate condition\")\n }\n if (isDisclosure(originalQuery.birthdate) && !hasDisclose) {\n flag(\"birthdate\", \"The proof does not disclose the requested birthdate\")\n }\n if (isComparison(originalQuery.expiry_date) && !has(\"compare_expiry\", \"compare_expiry_evm\")) {\n flag(\"expiry_date\", \"The proof does not verify the requested expiry date condition\")\n }\n if (isDisclosure(originalQuery.expiry_date) && !hasDisclose) {\n flag(\"expiry_date\", \"The proof does not disclose the requested expiry date\")\n }\n\n const nationality = originalQuery.nationality\n if (\n nationality?.in !== undefined &&\n !has(\"inclusion_check_nationality\", \"inclusion_check_nationality_evm\")\n ) {\n flag(\"nationality\", \"The proof does not verify the requested nationality inclusion\")\n }\n if (\n nationality?.out !== undefined &&\n !has(\"exclusion_check_nationality\", \"exclusion_check_nationality_evm\")\n ) {\n flag(\"nationality\", \"The proof does not verify the requested nationality exclusion\")\n }\n if (isDisclosure(nationality) && !hasDisclose) {\n flag(\"nationality\", \"The proof does not disclose the requested nationality\")\n }\n\n const issuingCountry = originalQuery.issuing_country\n if (\n issuingCountry?.in !== undefined &&\n !has(\"inclusion_check_issuing_country\", \"inclusion_check_issuing_country_evm\")\n ) {\n flag(\"issuing_country\", \"The proof does not verify the requested issuing country inclusion\")\n }\n if (\n issuingCountry?.out !== undefined &&\n !has(\"exclusion_check_issuing_country\", \"exclusion_check_issuing_country_evm\")\n ) {\n flag(\"issuing_country\", \"The proof does not verify the requested issuing country exclusion\")\n }\n if (isDisclosure(issuingCountry) && !hasDisclose) {\n flag(\"issuing_country\", \"The proof does not disclose the requested issuing country\")\n }\n\n const discloseOnlyFields: Array<keyof QueryResultErrors> = [\n \"firstname\",\n \"lastname\",\n \"fullname\",\n \"document_number\",\n \"document_type\",\n \"gender\",\n ]\n for (const field of discloseOnlyFields) {\n if (\n isDisclosure((originalQuery as Record<string, unknown>)[field] as never) &&\n !hasDisclose\n ) {\n flag(field, `The proof does not disclose the requested ${field}`)\n }\n }\n\n if (originalQuery.bind && !has(\"bind\", \"bind_evm\")) {\n flag(\"bind\", \"The proof does not verify the requested bound data\")\n }\n\n if (\n originalQuery.sanctions &&\n !has(\"exclusion_check_sanctions\", \"exclusion_check_sanctions_evm\")\n ) {\n flag(\"sanctions\", \"The proof does not verify the requested sanctions exclusion\")\n }\n\n if (originalQuery.facematch && !has(\"facematch\", \"facematch_evm\")) {\n flag(\"facematch\", \"The proof does not verify the requested FaceMatch\")\n }\n\n if (!isCorrect) {\n console.warn(\"The proof does not verify all the requested conditions and information\")\n }\n return { isCorrect, queryResultErrors }\n }\n\n public static async checkPublicInputs(\n domain: string,\n proofs: Array<ProofResult>,\n originalQuery: Query,\n queryResult: QueryResult,\n validity?: number,\n scope?: string,\n oprfKeyId?: string,\n devMode?: boolean,\n registryClient?: RegistryClient,\n allowedVerificationMethods: readonly AllowedVerificationMethod[] = DEFAULT_ALLOWED_VERIFICATION_METHODS,\n ) {\n let commitmentIn: bigint | undefined\n let commitmentOut: bigint | undefined\n let isCorrect = true\n let uniqueIdentifier: string | undefined\n let uniqueIdentifierType: NullifierType | undefined\n let oprfPublicKeyHash: bigint | undefined\n const currentTime = new Date()\n const today = new Date(\n currentTime.getFullYear(),\n currentTime.getMonth(),\n currentTime.getDate(),\n 0,\n 0,\n 0,\n 0,\n )\n let queryResultErrors: Partial<QueryResultErrors> = {}\n\n // An outer proof has no commitment other proofs could link to, so it must come alone\n if (proofs.length > 1 && proofs.some((p) => p.name?.startsWith(\"outer\"))) {\n console.warn(\"An outer proof must be the only proof provided\")\n queryResultErrors.outer = {\n commitment: {\n expected: \"Number of proofs: 1\",\n received: `Number of proofs: ${proofs.length}`,\n message: \"An outer proof must be the only proof provided\",\n },\n }\n return {\n isCorrect: false,\n uniqueIdentifier: undefined,\n uniqueIdentifierType: undefined,\n queryResultErrors,\n }\n }\n\n const proofOrder = [\n // Tier 2 base: the device attested the camera-read ID, in place of the three chip proofs\n \"attested_id\",\n AADHAAR_CIRCUIT_NAME,\n \"sig_check_dsc\",\n \"sig_check_id_data\",\n \"data_check_integrity\",\n \"disclose_bytes\",\n \"compare_age\",\n \"compare_birthdate\",\n \"compare_expiry\",\n \"exclusion_check_nationality\",\n \"inclusion_check_nationality\",\n \"exclusion_check_issuing_country\",\n \"inclusion_check_issuing_country\",\n \"bind\",\n \"exclusion_check_sanctions\",\n \"facematch\",\n ]\n // Since the order is important for the commitments, we need to sort the proofs\n // by their expected order: root signature check -> ID signature check -> integrity check -> disclosure\n const sortedProofs = proofs.sort((a, b) => {\n const getIndex = (proof: ProofResult) => {\n const name = proof.name || \"\"\n return proofOrder.findIndex((p) => name.startsWith(p))\n }\n return getIndex(a) - getIndex(b)\n })\n\n // Registry roots are checked as of the proofs' own date, so older proofs still verify\n const disclosureProofNames = proofOrder.slice(5)\n // What verified the ID, read from the base proof (or the outer)\n let verificationMethod: VerificationMethod | undefined\n const firstDisclosureProof = sortedProofs.find((p) =>\n disclosureProofNames.some((name) => p.name?.startsWith(name)),\n )\n const bundleDate = firstDisclosureProof\n ? getCurrentDateFromDisclosureProof(\n getProofData(\n firstDisclosureProof.proof as string,\n getNumberOfPublicInputs(firstDisclosureProof.name!, firstDisclosureProof.version),\n ),\n )\n : undefined\n const bundleRootTimestamp = bundleDate ? Math.floor(bundleDate.getTime() / 1000) : undefined\n\n for (const proof of sortedProofs!) {\n const proofData = getProofData(\n proof.proof as string,\n getNumberOfPublicInputs(proof.name!, proof.version),\n )\n if (proof.name?.startsWith(\"outer\")) {\n const isForEVM = proof.name?.startsWith(\"outer_evm\")\n const currentDate = getCurrentDateFromOuterProof(proofData)\n const rootTimestamp = Math.floor(currentDate.getTime() / 1000)\n const certificateRegistryRoot = getCertificateRegistryRootFromOuterProof(proofData)\n const {\n isCorrect: isCorrectCertificateRegistryRoot,\n queryResultErrors: queryResultErrorsCertificateRegistryRoot,\n } = await this.checkCertificateRegistryRoot(\n certificateRegistryRoot.toString(16),\n queryResultErrors,\n true,\n devMode,\n rootTimestamp,\n originalQuery,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectCertificateRegistryRoot\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCertificateRegistryRoot,\n }\n\n const circuitRegistryRoot = getCircuitRegistryRootFromOuterProof(proofData)\n const {\n isCorrect: isCorrectCircuitRegistryRoot,\n queryResultErrors: queryResultErrorsCircuitRegistryRoot,\n } = await this.checkCircuitRegistryRoot(\n circuitRegistryRoot.toString(16),\n queryResultErrors,\n devMode,\n rootTimestamp,\n originalQuery,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectCircuitRegistryRoot\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCircuitRegistryRoot,\n }\n\n const todayToCurrentDate = today.getTime() - currentDate.getTime()\n const expectedDifference = validity ? validity * 1000 : DEFAULT_VALIDITY * 1000\n if (todayToCurrentDate >= expectedDifference) {\n console.warn(\n `The date used to check the validity of the ID is older than the validity period`,\n )\n isCorrect = false\n queryResultErrors.outer = {\n ...queryResultErrors.outer,\n date: {\n expected: `Difference: ${validity} seconds`,\n received: `Difference: ${Math.round(todayToCurrentDate / 1000)} seconds`,\n message:\n \"The date used to check the validity of the ID is older than the validity period\",\n },\n }\n }\n // Reject a current_date set in the future\n if (currentDate.getTime() - today.getTime() > CURRENT_DATE_FUTURE_TOLERANCE_MS) {\n console.warn(\"The date used to check the validity of the ID is in the future\")\n isCorrect = false\n queryResultErrors.outer = {\n ...queryResultErrors.outer,\n date: {\n expected: `Difference: ${validity} seconds`,\n received: `Difference: ${Math.round(todayToCurrentDate / 1000)} seconds`,\n message: \"The date used to check the validity of the ID is in the future\",\n },\n }\n }\n const paramCommitments = getParamCommitmentsFromOuterProof(proofData, proof.version)\n // A Tier 2 outer proof always carries its scheme, whatever version it states, so a proof\n // can't pass as a chip read by leaving out its version\n const isAttestedOuter = proof.name!.includes(\"_attested_\")\n const isAadhaarOuter = proof.name!.includes(\"_aadhaar_\")\n verificationMethod =\n isAttestedOuter || isAadhaarOuter || hasVerificationMethod(proof.version)\n ? getVerificationMethodFromOuterProof(proofData)\n : VerificationMethod.ICAO_CHIP\n if (isAadhaarOuter && verificationMethod !== VerificationMethod.UIDAI_AADHAAR) {\n console.warn(\"An Aadhaar outer proof states another verification method\")\n isCorrect = false\n queryResultErrors.outer = {\n ...queryResultErrors.outer,\n certificate: {\n expected: `Verification method ${VerificationMethod.UIDAI_AADHAAR}`,\n received: `Verification method ${verificationMethod}`,\n message: \"An Aadhaar outer proof states another verification method\",\n },\n }\n }\n if (\n isAttestedOuter &&\n getTierForVerificationMethod(verificationMethod) !== VerificationTier.DEVICE_ATTESTED\n ) {\n console.warn(\"A Tier 2 outer proof states a scheme of another tier\")\n isCorrect = false\n queryResultErrors.outer = {\n ...queryResultErrors.outer,\n certificate: {\n expected: \"A device-attested verification method\",\n received: `Verification method ${verificationMethod}`,\n message: \"A Tier 2 outer proof states a scheme of another tier\",\n },\n }\n }\n const committedInputs = proof.committedInputs\n const keysInCommittedInputs = Object.keys(committedInputs || {})\n if (keysInCommittedInputs.length !== paramCommitments.length) {\n console.warn(\"The proof does not verify all the requested conditions and information\")\n isCorrect = false\n queryResultErrors.outer = {\n ...queryResultErrors.outer,\n commitment: {\n expected: `Number of parameter commitments: ${paramCommitments.length}`,\n received: `Number of disclosure proofs provided: ${keysInCommittedInputs.length}`,\n message: \"The proof does not verify all the requested conditions and information\",\n },\n }\n }\n if (getTierForVerificationMethod(verificationMethod) === VerificationTier.DEVICE_ATTESTED) {\n const { isCorrect: isCorrectAttestation, queryResultErrors: attestationErrors } =\n await this.checkOuterDeviceAttestation(\n verificationMethod,\n committedInputs,\n paramCommitments[0],\n isForEVM,\n )\n isCorrect = isCorrect && isCorrectAttestation\n queryResultErrors = { ...queryResultErrors, ...attestationErrors }\n }\n if (getServiceScopeHash(domain) !== getScopeFromOuterProof(proofData)) {\n console.warn(\"The proof comes from a different domain than the one expected\")\n isCorrect = false\n queryResultErrors.outer = {\n ...queryResultErrors.outer,\n scope: {\n expected: `Scope: ${getServiceScopeHash(domain).toString()}`,\n received: `Scope: ${getScopeFromOuterProof(proofData).toString()}`,\n message: \"The proof comes from a different domain than the one expected\",\n },\n }\n }\n if (getScopeHash(scope) !== getSubscopeFromOuterProof(proofData)) {\n const scopeErrorMessage = scope\n ? \"The proof uses a different scope than the one expected\"\n : \"The proof uses a scope but none was passed to verify()\"\n console.warn(scopeErrorMessage)\n isCorrect = false\n queryResultErrors.outer = {\n ...queryResultErrors.outer,\n scope: {\n expected: `Scope: ${getScopeHash(scope).toString()}`,\n received: `Scope: ${getSubscopeFromOuterProof(proofData).toString()}`,\n message: scopeErrorMessage,\n },\n }\n }\n if (!!committedInputs?.compare_age || !!committedInputs?.compare_age_evm) {\n const ageCommittedInputs =\n (committedInputs?.compare_age as AgeCommittedInputs) ??\n (committedInputs?.compare_age_evm as AgeCommittedInputs)\n const ageParameterCommitment = isForEVM\n ? await getAgeEVMParameterCommitment(\n ageCommittedInputs.minAge,\n ageCommittedInputs.maxAge,\n )\n : await getAgeParameterCommitment(ageCommittedInputs.minAge, ageCommittedInputs.maxAge)\n if (!paramCommitments.includes(ageParameterCommitment)) {\n console.warn(\"This proof does not verify the age\")\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n commitment: {\n expected: `Age parameter commitment: ${ageParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the age\",\n },\n }\n }\n const { isCorrect: isCorrectAge, queryResultErrors: queryResultErrorsAge } =\n this.checkAgePublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectAge\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsAge,\n }\n }\n if (!!committedInputs?.compare_birthdate || !!committedInputs?.compare_birthdate_evm) {\n const birthdateCommittedInputs =\n (committedInputs?.compare_birthdate as DateCommittedInputs) ??\n (committedInputs?.compare_birthdate_evm as DateCommittedInputs)\n const birthdateParameterCommitment = isForEVM\n ? await getDateEVMParameterCommitment(\n ProofType.BIRTHDATE,\n birthdateCommittedInputs.minDateTimestamp,\n birthdateCommittedInputs.maxDateTimestamp,\n 0,\n )\n : await getDateParameterCommitment(\n ProofType.BIRTHDATE,\n birthdateCommittedInputs.minDateTimestamp,\n birthdateCommittedInputs.maxDateTimestamp,\n 0,\n )\n if (!paramCommitments.includes(birthdateParameterCommitment)) {\n console.warn(\"This proof does not verify the birthdate\")\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n commitment: {\n expected: `Birthdate parameter commitment: ${birthdateParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the birthdate\",\n },\n }\n }\n const { isCorrect: isCorrectBirthdate, queryResultErrors: queryResultErrorsBirthdate } =\n this.checkBirthdatePublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectBirthdate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsBirthdate,\n }\n }\n if (!!committedInputs?.compare_expiry || !!committedInputs?.compare_expiry_evm) {\n const expiryCommittedInputs =\n (committedInputs?.compare_expiry as DateCommittedInputs) ??\n (committedInputs?.compare_expiry_evm as DateCommittedInputs)\n const expiryParameterCommitment = isForEVM\n ? await getDateEVMParameterCommitment(\n ProofType.EXPIRY_DATE,\n expiryCommittedInputs.minDateTimestamp,\n expiryCommittedInputs.maxDateTimestamp,\n )\n : await getDateParameterCommitment(\n ProofType.EXPIRY_DATE,\n expiryCommittedInputs.minDateTimestamp,\n expiryCommittedInputs.maxDateTimestamp,\n )\n if (!paramCommitments.includes(expiryParameterCommitment)) {\n console.warn(\"This proof does not verify the expiry date\")\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n commitment: {\n expected: `Expiry date parameter commitment: ${expiryParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the expiry date\",\n },\n }\n }\n const { isCorrect: isCorrectExpiryDate, queryResultErrors: queryResultErrorsExpiryDate } =\n this.checkExpiryDatePublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectExpiryDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsExpiryDate,\n }\n }\n if (!!committedInputs?.disclose_bytes || !!committedInputs?.disclose_bytes_evm) {\n const discloseCommittedInputs =\n (committedInputs?.disclose_bytes as DiscloseCommittedInputs) ??\n (committedInputs?.disclose_bytes_evm as DiscloseCommittedInputs)\n const discloseParameterCommitment = isForEVM\n ? await getDiscloseEVMParameterCommitment(\n discloseCommittedInputs.discloseMask,\n discloseCommittedInputs.disclosedBytes,\n )\n : await getDiscloseParameterCommitment(\n discloseCommittedInputs.discloseMask,\n discloseCommittedInputs.disclosedBytes,\n )\n if (!paramCommitments.includes(discloseParameterCommitment)) {\n console.warn(\"This proof does not verify any of the data disclosed\")\n isCorrect = false\n queryResultErrors.disclose = {\n ...queryResultErrors.disclose,\n commitment: {\n expected: `Disclosure parameter commitment: ${discloseParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify any of the data disclosed\",\n },\n }\n }\n const { isCorrect: isCorrectDisclose, queryResultErrors: queryResultErrorsDisclose } =\n this.checkDiscloseBytesPublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectDisclose\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsDisclose,\n }\n }\n if (\n !!committedInputs?.inclusion_check_nationality ||\n !!committedInputs?.inclusion_check_nationality_evm\n ) {\n const inclusionCheckNationalityCommittedInputs =\n (committedInputs?.inclusion_check_nationality as CountryCommittedInputs) ??\n (committedInputs?.inclusion_check_nationality_evm as CountryCommittedInputs)\n const inclusionCheckNationalityParameterCommitment = isForEVM\n ? await getCountryEVMParameterCommitment(\n ProofType.NATIONALITY_INCLUSION,\n inclusionCheckNationalityCommittedInputs.countries,\n )\n : await getCountryParameterCommitment(\n ProofType.NATIONALITY_INCLUSION,\n inclusionCheckNationalityCommittedInputs.countries,\n )\n if (!paramCommitments.includes(inclusionCheckNationalityParameterCommitment)) {\n console.warn(\"This proof does not verify the inclusion of the nationality\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n commitment: {\n expected: `Nationality parameter commitment: ${inclusionCheckNationalityParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the inclusion of the nationality\",\n },\n }\n }\n const countryList = inclusionCheckNationalityCommittedInputs.countries\n const {\n isCorrect: isCorrectNationalityInclusion,\n queryResultErrors: queryResultErrorsNationalityInclusion,\n } = this.checkNationalityInclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectNationalityInclusion\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsNationalityInclusion,\n }\n }\n if (\n !!committedInputs?.inclusion_check_issuing_country ||\n !!committedInputs?.inclusion_check_issuing_country_evm\n ) {\n const inclusionCheckIssuingCountryCommittedInputs =\n (committedInputs?.inclusion_check_issuing_country as CountryCommittedInputs) ??\n (committedInputs?.inclusion_check_issuing_country_evm as CountryCommittedInputs)\n const inclusionCheckIssuingCountryParameterCommitment = isForEVM\n ? await getCountryEVMParameterCommitment(\n ProofType.ISSUING_COUNTRY_INCLUSION,\n inclusionCheckIssuingCountryCommittedInputs.countries,\n )\n : await getCountryParameterCommitment(\n ProofType.ISSUING_COUNTRY_INCLUSION,\n inclusionCheckIssuingCountryCommittedInputs.countries,\n )\n if (!paramCommitments.includes(inclusionCheckIssuingCountryParameterCommitment)) {\n console.warn(\"This proof does not verify the inclusion of the issuing country\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n commitment: {\n expected: `Issuing country parameter commitment: ${inclusionCheckIssuingCountryParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the inclusion of the issuing country\",\n },\n }\n }\n const countryList = inclusionCheckIssuingCountryCommittedInputs.countries\n const {\n isCorrect: isCorrectIssuingCountryInclusion,\n queryResultErrors: queryResultErrorsIssuingCountryInclusion,\n } = this.checkIssuingCountryInclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectIssuingCountryInclusion\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsIssuingCountryInclusion,\n }\n }\n if (\n !!committedInputs?.exclusion_check_nationality ||\n !!committedInputs?.exclusion_check_nationality_evm\n ) {\n const exclusionCheckNationalityCommittedInputs =\n (committedInputs?.exclusion_check_nationality as CountryCommittedInputs) ??\n (committedInputs?.exclusion_check_nationality_evm as CountryCommittedInputs)\n const exclusionCheckNationalityParameterCommitment = isForEVM\n ? await getCountryEVMParameterCommitment(\n ProofType.NATIONALITY_EXCLUSION,\n exclusionCheckNationalityCommittedInputs.countries,\n )\n : await getCountryParameterCommitment(\n ProofType.NATIONALITY_EXCLUSION,\n exclusionCheckNationalityCommittedInputs.countries,\n )\n if (!paramCommitments.includes(exclusionCheckNationalityParameterCommitment)) {\n console.warn(\"This proof does not verify the exclusion of the nationality\")\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n commitment: {\n expected: `Nationality parameter commitment: ${exclusionCheckNationalityParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the exclusion of the nationality\",\n },\n }\n }\n const countryList = exclusionCheckNationalityCommittedInputs.countries\n const {\n isCorrect: isCorrectNationalityExclusion,\n queryResultErrors: queryResultErrorsNationalityExclusion,\n } = this.checkNationalityExclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectNationalityExclusion\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsNationalityExclusion,\n }\n }\n if (\n !!committedInputs?.exclusion_check_issuing_country ||\n !!committedInputs?.exclusion_check_issuing_country_evm\n ) {\n const exclusionCheckIssuingCountryCommittedInputs =\n (committedInputs?.exclusion_check_issuing_country as CountryCommittedInputs) ??\n (committedInputs?.exclusion_check_issuing_country_evm as CountryCommittedInputs)\n const exclusionCheckIssuingCountryParameterCommitment = isForEVM\n ? await getCountryEVMParameterCommitment(\n ProofType.ISSUING_COUNTRY_EXCLUSION,\n exclusionCheckIssuingCountryCommittedInputs.countries,\n )\n : await getCountryParameterCommitment(\n ProofType.ISSUING_COUNTRY_EXCLUSION,\n exclusionCheckIssuingCountryCommittedInputs.countries,\n )\n if (!paramCommitments.includes(exclusionCheckIssuingCountryParameterCommitment)) {\n console.warn(\"This proof does not verify the exclusion of the issuing country\")\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n commitment: {\n expected: `Issuing country parameter commitment: ${exclusionCheckIssuingCountryParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the exclusion of the issuing country\",\n },\n }\n }\n const countryList = exclusionCheckIssuingCountryCommittedInputs.countries\n const {\n isCorrect: isCorrectIssuingCountryExclusion,\n queryResultErrors: queryResultErrorsIssuingCountryExclusion,\n } = this.checkIssuingCountryExclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectIssuingCountryExclusion\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsIssuingCountryExclusion,\n }\n }\n if (!!committedInputs?.bind || !!committedInputs?.bind_evm) {\n const bindCommittedInputs =\n (committedInputs?.bind as BindCommittedInputs) ??\n (committedInputs?.bind_evm as BindCommittedInputs)\n const bindParameterCommitment = isForEVM\n ? await getBindEVMParameterCommitment(formatBoundData(bindCommittedInputs.data))\n : await getBindParameterCommitment(formatBoundData(bindCommittedInputs.data))\n if (!paramCommitments.includes(bindParameterCommitment)) {\n console.warn(\"This proof does not verify the bound data\")\n isCorrect = false\n queryResultErrors.bind = {\n ...queryResultErrors.bind,\n commitment: {\n expected: `Bind parameter commitment: ${bindParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the bound data\",\n },\n }\n }\n const { isCorrect: isCorrectBind, queryResultErrors: queryResultErrorsBind } =\n this.checkBindPublicInputs(originalQuery, queryResult, bindCommittedInputs.data)\n isCorrect = isCorrect && isCorrectBind\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsBind,\n }\n }\n if (\n !!committedInputs?.exclusion_check_sanctions ||\n !!committedInputs?.exclusion_check_sanctions_evm\n ) {\n const exclusionCheckSanctionsCommittedInputs =\n (committedInputs?.exclusion_check_sanctions as SanctionsCommittedInputs) ??\n (committedInputs?.exclusion_check_sanctions_evm as SanctionsCommittedInputs)\n const exclusionCheckSanctionsParameterCommitment = isForEVM\n ? await getSanctionsEvmParameterCommitment(\n exclusionCheckSanctionsCommittedInputs.rootHash,\n exclusionCheckSanctionsCommittedInputs.isStrict,\n )\n : await getSanctionsParameterCommitment(\n exclusionCheckSanctionsCommittedInputs.rootHash,\n exclusionCheckSanctionsCommittedInputs.isStrict,\n )\n if (!paramCommitments.includes(exclusionCheckSanctionsParameterCommitment)) {\n console.warn(\"This proof does not verify the exclusion from the sanction lists\")\n isCorrect = false\n queryResultErrors.sanctions = {\n ...queryResultErrors.sanctions,\n commitment: {\n expected: `Sanctions parameter commitment: ${exclusionCheckSanctionsParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify the exclusion from the sanction lists\",\n },\n }\n }\n const {\n isCorrect: isCorrectSanctionsExclusion,\n queryResultErrors: queryResultErrorsSanctionsExclusion,\n } = await this.checkSanctionsExclusionPublicInputs(\n originalQuery,\n queryResult,\n exclusionCheckSanctionsCommittedInputs,\n devMode,\n rootTimestamp,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectSanctionsExclusion\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsSanctionsExclusion,\n }\n }\n if (!!committedInputs?.facematch || !!committedInputs?.facematch_evm) {\n const facematchCommittedInputs =\n (committedInputs?.facematch as FacematchCommittedInputs) ??\n (committedInputs?.facematch_evm as FacematchCommittedInputs)\n const commitsRevocationRoot = commitsAttestationRevocationRoot(proof.version)\n const facematchParameterCommitment = isForEVM\n ? await getFacematchEvmParameterCommitment(\n BigInt(facematchCommittedInputs.rootKeyLeaf),\n facematchCommittedInputs.environment === \"development\" ? 0n : 1n,\n BigInt(facematchCommittedInputs.appIdHash),\n facematchCommittedInputs.mode === \"regular\" ? 1n : 2n,\n undefined,\n BigInt(facematchCommittedInputs.revocationRoot ?? 0),\n commitsRevocationRoot,\n )\n : await getFacematchParameterCommitment(\n BigInt(facematchCommittedInputs.rootKeyLeaf),\n facematchCommittedInputs.environment === \"development\" ? 0n : 1n,\n BigInt(facematchCommittedInputs.appIdHash),\n facematchCommittedInputs.mode === \"regular\" ? 1n : 2n,\n undefined,\n BigInt(facematchCommittedInputs.revocationRoot ?? 0),\n commitsRevocationRoot,\n )\n if (!paramCommitments.includes(facematchParameterCommitment)) {\n console.warn(\"This proof does not verify FaceMatch\")\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n commitment: {\n expected: `Facematch parameter commitment: ${facematchParameterCommitment.toString()}`,\n received: `Parameter commitments included: ${paramCommitments.join(\", \")}`,\n message: \"This proof does not verify FaceMatch\",\n },\n }\n }\n const { isCorrect: isCorrectFacematch, queryResultErrors: queryResultErrorsFacematch } =\n await this.checkFacematchPublicInputs(\n originalQuery,\n queryResult,\n facematchCommittedInputs,\n devMode,\n bundleRootTimestamp,\n registryClient,\n commitsRevocationRoot,\n )\n isCorrect = isCorrect && isCorrectFacematch\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsFacematch,\n }\n }\n uniqueIdentifier = getNullifierFromOuterProof(proofData, proof.version).toString(10)\n uniqueIdentifierType = getNullifierTypeFromOuterProof(proofData, proof.version)\n oprfPublicKeyHash = getOprfPkHashFromOuterProof(proofData, proof.version)\n } else if (proof.name?.startsWith(\"attested_id\")) {\n commitmentOut = getCommitmentOutFromAttestedIdProof(proofData)\n verificationMethod = getVerificationMethodFromAttestedIdProof(proofData)\n const committedKey = isAndroidAttestedIdCircuit(proof.name)\n ? \"attested_id_android\"\n : \"attested_id_ios\"\n const committed = proof.committedInputs?.[committedKey] as\n AttestedIdCommittedInputs | undefined\n const attestedAt = getCurrentDateFromAttestedIdProof(proofData)\n const { isCorrect: isCorrectDate, queryResultErrors: dateErrors } =\n this.checkAttestedIdDate(attestedAt)\n isCorrect = isCorrect && isCorrectDate\n queryResultErrors = { ...queryResultErrors, ...dateErrors }\n if (!committed) {\n console.warn(\"The attested ID proof carries no committed attestation parameters\")\n isCorrect = false\n queryResultErrors.attested_id = {\n ...queryResultErrors.attested_id,\n commitment: {\n expected: `Committed inputs for ${committedKey}`,\n received: \"none\",\n message: \"The attested ID proof carries no committed attestation parameters\",\n },\n }\n } else {\n const expectedParamCommitment = await getAttestedIdParameterCommitment(\n BigInt(committed.rootKeyLeaf),\n committed.environment === \"development\" ? 0n : 1n,\n BigInt(committed.appIdHash),\n committed.mode === \"regular\" ? 1n : 2n,\n BigInt(committed.integrityPubkeyHash),\n BigInt(committed.revocationRoot ?? 0),\n )\n const paramCommitment = getParameterCommitmentFromAttestedIdProof(proofData)\n if (paramCommitment !== expectedParamCommitment) {\n console.warn(\"The attested ID proof does not match its committed parameters\")\n isCorrect = false\n queryResultErrors.attested_id = {\n ...queryResultErrors.attested_id,\n commitment: {\n expected: `Parameter commitment: ${expectedParamCommitment.toString()}`,\n received: `Parameter commitment: ${paramCommitment.toString()}`,\n message: \"The attested ID proof does not match its committed parameters\",\n },\n }\n }\n const { isCorrect: isCorrectAttestation, queryResultErrors: attestationErrors } =\n this.checkAttestedIdParameters(committed, committedKey === \"attested_id_android\")\n isCorrect = isCorrect && isCorrectAttestation\n queryResultErrors = { ...queryResultErrors, ...attestationErrors }\n if (committedKey === \"attested_id_android\") {\n const { isCorrect: isCorrectRevocationRoot } =\n await this.checkAttestationRevocationRoot(\n committed.revocationRoot ?? \"0x0\",\n queryResultErrors,\n \"attested_id\",\n devMode,\n attestedAt ? Math.floor(attestedAt.getTime() / 1000) : bundleRootTimestamp,\n originalQuery,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectRevocationRoot\n }\n }\n } else if (proof.name === AADHAAR_CIRCUIT_NAME) {\n commitmentOut = getCommitmentOutFromAadhaarProof(proofData)\n verificationMethod = getVerificationMethodFromAttestedIdProof(proofData)\n const {\n isCorrect: isCorrectCertificateRegistryRoot,\n queryResultErrors: queryResultErrorsCertificateRegistryRoot,\n } = await this.checkCertificateRegistryRoot(\n getCertificateRegistryRootFromAadhaarProof(proofData).toString(16),\n queryResultErrors,\n false,\n devMode,\n bundleRootTimestamp,\n originalQuery,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectCertificateRegistryRoot\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCertificateRegistryRoot,\n }\n } else if (proof.name?.startsWith(\"sig_check_dsc\")) {\n commitmentOut = getCommitmentFromDSCProof(proofData)\n const merkleRoot = getMerkleRootFromDSCProof(proofData)\n const {\n isCorrect: isCorrectCertificateRegistryRoot,\n queryResultErrors: queryResultErrorsCertificateRegistryRoot,\n } = await this.checkCertificateRegistryRoot(\n merkleRoot.toString(16),\n queryResultErrors,\n false,\n devMode,\n bundleRootTimestamp,\n originalQuery,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectCertificateRegistryRoot\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCertificateRegistryRoot,\n }\n } else if (proof.name?.startsWith(\"sig_check_id_data\")) {\n commitmentIn = getCommitmentInFromIDDataProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the certificate signature and ID signature\",\n )\n isCorrect = false\n queryResultErrors.sig_check_id_data = {\n ...queryResultErrors.sig_check_id_data,\n commitment: {\n expected: `Commitment: ${commitmentOut?.toString() || \"undefined\"}`,\n received: `Commitment: ${commitmentIn?.toString() || \"undefined\"}`,\n message:\n \"Failed to check the link between the certificate signature and ID signature\",\n },\n }\n }\n commitmentOut = getCommitmentOutFromIDDataProof(proofData)\n } else if (proof.name?.startsWith(\"data_check_integrity\")) {\n commitmentIn = getCommitmentInFromIntegrityProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\"Failed to check the link between the ID signature and the data signed\")\n isCorrect = false\n queryResultErrors.data_check_integrity = {\n ...queryResultErrors.data_check_integrity,\n commitment: {\n expected: `Commitment: ${commitmentOut?.toString() || \"undefined\"}`,\n received: `Commitment: ${commitmentIn?.toString() || \"undefined\"}`,\n message: \"Failed to check the link between the ID signature and the data signed\",\n },\n }\n }\n commitmentOut = getCommitmentOutFromIntegrityProof(proofData)\n // Integrity proofs made before circuit version 0.23.0 carry no scheme: they are ICAO\n verificationMethod =\n getVerificationMethodFromIntegrityProof(proofData) ?? VerificationMethod.ICAO_CHIP\n } else if (proof.name === \"disclose_bytes\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the data to disclose\",\n )\n isCorrect = false\n queryResultErrors.disclose = {\n ...queryResultErrors.disclose,\n commitment: {\n expected: `Commitment: ${commitmentOut?.toString() || \"undefined\"}`,\n received: `Commitment: ${commitmentIn?.toString() || \"undefined\"}`,\n message:\n \"Failed to check the link between the validity of the ID and the data to disclose\",\n },\n }\n }\n const paramCommitment = getParameterCommitmentFromDisclosureProof(proofData)\n const calculatedParamCommitment = await getDiscloseParameterCommitment(\n (proof.committedInputs?.disclose_bytes as DiscloseCommittedInputs).discloseMask!,\n (proof.committedInputs?.disclose_bytes as DiscloseCommittedInputs).disclosedBytes!,\n )\n if (paramCommitment !== calculatedParamCommitment) {\n console.warn(\"The disclosed data does not match the data committed by the proof\")\n isCorrect = false\n queryResultErrors.disclose = {\n ...queryResultErrors.disclose,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommitment}`,\n message: \"The disclosed data does not match the data committed by the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"disclose\",\n scope,\n )\n isCorrect = isCorrect && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectDisclose, queryResultErrors: queryResultErrorsDisclose } =\n this.checkDiscloseBytesPublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectDisclose && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsDisclose,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"disclose\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"compare_age\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the age derived from it\",\n )\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the age derived from it\",\n },\n }\n }\n const paramCommitment = getParameterCommitmentFromDisclosureProof(proofData)\n const committedInputs = proof.committedInputs?.compare_age as AgeCommittedInputs\n const calculatedParamCommitment = await getAgeParameterCommitment(\n committedInputs.minAge,\n committedInputs.maxAge,\n )\n if (paramCommitment !== calculatedParamCommitment) {\n console.warn(\n \"The conditions for the age check do not match the conditions checked by the proof\",\n )\n isCorrect = false\n queryResultErrors.age = {\n ...queryResultErrors.age,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommitment}`,\n message:\n \"The conditions for the age check do not match the conditions checked by the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(domain, proofData, queryResultErrors, \"age\", scope)\n const { isCorrect: isCorrectAge, queryResultErrors: queryResultErrorsAge } =\n this.checkAgePublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectAge && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsAge,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"age\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"compare_birthdate\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the birthdate derived from it\",\n )\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the birthdate derived from it\",\n },\n }\n }\n const paramCommitment = getParameterCommitmentFromDisclosureProof(proofData)\n const committedInputs = proof.committedInputs?.compare_birthdate as DateCommittedInputs\n const calculatedParamCommitment = await getDateParameterCommitment(\n ProofType.BIRTHDATE,\n committedInputs.minDateTimestamp,\n committedInputs.maxDateTimestamp,\n 0,\n )\n if (paramCommitment !== calculatedParamCommitment) {\n console.warn(\n \"The conditions for the birthdate check do not match the conditions checked by the proof\",\n )\n isCorrect = false\n queryResultErrors.birthdate = {\n ...queryResultErrors.birthdate,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommitment}`,\n message:\n \"The conditions for the birthdate check do not match the conditions checked by the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"birthdate\",\n scope,\n )\n const { isCorrect: isCorrectBirthdate, queryResultErrors: queryResultErrorsBirthdate } =\n this.checkBirthdatePublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectBirthdate && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsBirthdate,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"birthdate\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"compare_expiry\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and its expiry date\",\n )\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and its expiry date\",\n },\n }\n }\n const paramCommitment = getParameterCommitmentFromDisclosureProof(proofData)\n const committedInputs = proof.committedInputs?.compare_expiry as DateCommittedInputs\n const calculatedParamCommitment = await getDateParameterCommitment(\n ProofType.EXPIRY_DATE,\n committedInputs.minDateTimestamp,\n committedInputs.maxDateTimestamp,\n )\n if (paramCommitment !== calculatedParamCommitment) {\n console.warn(\n \"The conditions for the expiry date check do not match the conditions checked by the proof\",\n )\n isCorrect = false\n queryResultErrors.expiry_date = {\n ...queryResultErrors.expiry_date,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommitment}`,\n message:\n \"The conditions for the expiry date check do not match the conditions checked by the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"expiry_date\",\n scope,\n )\n const { isCorrect: isCorrectExpiryDate, queryResultErrors: queryResultErrorsExpiryDate } =\n this.checkExpiryDatePublicInputs(proof, originalQuery, queryResult)\n isCorrect = isCorrect && isCorrectExpiryDate && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsExpiryDate,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"expiry_date\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"exclusion_check_nationality\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the nationality exclusion check\",\n )\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the nationality exclusion check\",\n },\n }\n }\n const countryList = (\n proof.committedInputs?.exclusion_check_nationality as CountryCommittedInputs\n ).countries\n const paramCommittment = getParameterCommitmentFromDisclosureProof(proofData)\n const calculatedParamCommitment = await getCountryParameterCommitment(\n ProofType.NATIONALITY_EXCLUSION,\n countryList,\n true,\n )\n if (paramCommittment !== calculatedParamCommitment) {\n console.warn(\n \"The committed country list for the exclusion check does not match the one from the proof\",\n )\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommittment}`,\n message:\n \"The committed country list for the exclusion check does not match the one from the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"nationality\",\n scope,\n )\n const {\n isCorrect: isCorrectNationalityExclusion,\n queryResultErrors: queryResultErrorsNationalityExclusion,\n } = this.checkNationalityExclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectNationalityExclusion && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsNationalityExclusion,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"nationality\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"exclusion_check_issuing_country\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the issuing country exclusion check\",\n )\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the issuing country exclusion check\",\n },\n }\n }\n const countryList = (\n proof.committedInputs?.exclusion_check_issuing_country as CountryCommittedInputs\n ).countries\n const paramCommittment = getParameterCommitmentFromDisclosureProof(proofData)\n const calculatedParamCommitment = await getCountryParameterCommitment(\n ProofType.ISSUING_COUNTRY_EXCLUSION,\n countryList,\n true,\n )\n if (paramCommittment !== calculatedParamCommitment) {\n console.warn(\n \"The committed country list for the issuing country exclusion check does not match the one from the proof\",\n )\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommittment}`,\n message:\n \"The committed country list for the issuing country exclusion check does not match the one from the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"issuing_country\",\n scope,\n )\n const {\n isCorrect: isCorrectIssuingCountryExclusion,\n queryResultErrors: queryResultErrorsIssuingCountryExclusion,\n } = this.checkIssuingCountryExclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectIssuingCountryExclusion && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsIssuingCountryExclusion,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"issuing_country\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"inclusion_check_nationality\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the nationality inclusion check\",\n )\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the nationality inclusion check\",\n },\n }\n }\n const countryList = (\n proof.committedInputs?.inclusion_check_nationality as CountryCommittedInputs\n ).countries\n const paramCommittment = getParameterCommitmentFromDisclosureProof(proofData)\n const calculatedParamCommitment = await getCountryParameterCommitment(\n ProofType.NATIONALITY_INCLUSION,\n countryList,\n false,\n )\n if (paramCommittment !== calculatedParamCommitment) {\n console.warn(\n \"The committed country list for the nationality inclusion check does not match the one from the proof\",\n )\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommittment}`,\n message:\n \"The committed country list for the nationality inclusion check does not match the one from the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"nationality\",\n scope,\n )\n const {\n isCorrect: isCorrectNationalityInclusion,\n queryResultErrors: queryResultErrorsNationalityInclusion,\n } = this.checkNationalityInclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectNationalityInclusion && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsNationalityInclusion,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"nationality\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"inclusion_check_issuing_country\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the issuing country inclusion check\",\n )\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the issuing country inclusion check\",\n },\n }\n }\n const countryList = (\n proof.committedInputs?.inclusion_check_issuing_country as CountryCommittedInputs\n ).countries\n const paramCommittment = getParameterCommitmentFromDisclosureProof(proofData)\n const calculatedParamCommitment = await getCountryParameterCommitment(\n ProofType.ISSUING_COUNTRY_INCLUSION,\n countryList,\n false,\n )\n if (paramCommittment !== calculatedParamCommitment) {\n console.warn(\n \"The committed country list for the issuing country inclusion check does not match the one from the proof\",\n )\n isCorrect = false\n queryResultErrors.issuing_country = {\n ...queryResultErrors.issuing_country,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommittment}`,\n message:\n \"The committed country list for the issuing country inclusion check does not match the one from the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"issuing_country\",\n scope,\n )\n const {\n isCorrect: isCorrectIssuingCountryInclusion,\n queryResultErrors: queryResultErrorsIssuingCountryInclusion,\n } = this.checkIssuingCountryInclusionPublicInputs(originalQuery, queryResult, countryList)\n isCorrect = isCorrect && isCorrectIssuingCountryInclusion && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsIssuingCountryInclusion,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"issuing_country\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"bind\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\"Failed to check the link between the validity of the ID and the bound data\")\n isCorrect = false\n queryResultErrors.bind = {\n ...queryResultErrors.bind,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message: \"Failed to check the link between the validity of the ID and the bound data\",\n },\n }\n }\n const bindCommittedInputs = proof.committedInputs?.bind as BindCommittedInputs\n const paramCommittment = getParameterCommitmentFromDisclosureProof(proofData)\n const calculatedParamCommitment = await getBindParameterCommitment(\n formatBoundData(bindCommittedInputs.data),\n )\n if (paramCommittment !== calculatedParamCommitment) {\n console.warn(\"The bound data does not match the one from the proof\")\n isCorrect = false\n queryResultErrors.bind = {\n ...queryResultErrors.bind,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment}`,\n received: `Commitment: ${paramCommittment}`,\n message: \"The bound data does not match the one from the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(domain, proofData, queryResultErrors, \"bind\", scope)\n const { isCorrect: isCorrectBind, queryResultErrors: queryResultErrorsBind } =\n this.checkBindPublicInputs(originalQuery, queryResult, bindCommittedInputs.data)\n isCorrect = isCorrect && isCorrectBind && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsBind,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"bind\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name === \"exclusion_check_sanctions\") {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the sanctions exclusion check\",\n )\n isCorrect = false\n queryResultErrors.sanctions = {\n ...queryResultErrors.sanctions,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the sanctions exclusion check\",\n },\n }\n }\n const exclusionCheckSanctionsCommittedInputs = proof.committedInputs\n ?.exclusion_check_sanctions as SanctionsCommittedInputs\n const calculatedParamCommitment = await getSanctionsParameterCommitment(\n exclusionCheckSanctionsCommittedInputs.rootHash,\n exclusionCheckSanctionsCommittedInputs.isStrict,\n )\n const paramCommittment = getParameterCommitmentFromDisclosureProof(proofData)\n if (paramCommittment !== calculatedParamCommitment) {\n console.warn(\n \"The sanction lists check against do not match the sanction lists from the proof\",\n )\n isCorrect = false\n queryResultErrors.sanctions = {\n ...queryResultErrors.sanctions,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment.toString()}`,\n received: `Commitment: ${paramCommittment.toString()}`,\n message:\n \"The sanction lists check against do not match the sanction lists from the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"sanctions\",\n scope,\n )\n const {\n isCorrect: isCorrectSanctionsExclusion,\n queryResultErrors: queryResultErrorsSanctionsExclusion,\n } = await this.checkSanctionsExclusionPublicInputs(\n originalQuery,\n queryResult,\n exclusionCheckSanctionsCommittedInputs,\n devMode,\n bundleRootTimestamp,\n registryClient,\n )\n isCorrect = isCorrect && isCorrectSanctionsExclusion && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsSanctionsExclusion,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"sanctions\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else if (proof.name?.startsWith(\"facematch\") && !proof.name?.endsWith(\"_evm\")) {\n commitmentIn = getCommitmentInFromDisclosureProof(proofData)\n if (commitmentIn !== commitmentOut) {\n console.warn(\n \"Failed to check the link between the validity of the ID and the facematch check\",\n )\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n commitment: {\n expected: `Commitment: ${commitmentOut}`,\n received: `Commitment: ${commitmentIn}`,\n message:\n \"Failed to check the link between the validity of the ID and the facematch check\",\n },\n }\n }\n const facematchCommittedInputs = proof.committedInputs\n ?.facematch as FacematchCommittedInputs\n const paramCommittment = getParameterCommitmentFromDisclosureProof(proofData)\n const commitsRevocationRoot = commitsAttestationRevocationRoot(proof.version)\n const calculatedParamCommitment = await getFacematchParameterCommitment(\n BigInt(facematchCommittedInputs.rootKeyLeaf),\n facematchCommittedInputs.environment === \"development\" ? 0n : 1n,\n BigInt(facematchCommittedInputs.appIdHash),\n facematchCommittedInputs.mode === \"regular\" ? 1n : 2n,\n undefined,\n BigInt(facematchCommittedInputs.revocationRoot ?? 0),\n commitsRevocationRoot,\n )\n if (paramCommittment !== calculatedParamCommitment) {\n console.warn(\"The FaceMatch verification does not match the ones from the proof\")\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n commitment: {\n expected: `Commitment: ${calculatedParamCommitment.toString()}`,\n received: `Commitment: ${paramCommittment.toString()}`,\n message: \"The FaceMatch verification does not match the ones from the proof\",\n },\n }\n }\n const { isCorrect: isCorrectScope, queryResultErrors: queryResultErrorsScope } =\n this.checkScopeFromDisclosureProof(\n domain,\n proofData,\n queryResultErrors,\n \"facematch\",\n scope,\n )\n const { isCorrect: isCorrectFacematch, queryResultErrors: queryResultErrorsFacematch } =\n await this.checkFacematchPublicInputs(\n originalQuery,\n queryResult,\n facematchCommittedInputs,\n devMode,\n bundleRootTimestamp,\n registryClient,\n commitsRevocationRoot,\n )\n isCorrect = isCorrect && isCorrectFacematch && isCorrectScope\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsFacematch,\n ...queryResultErrorsScope,\n }\n const { isCorrect: isCorrectCurrentDate, queryResultErrors: queryResultErrorsCurrentDate } =\n await this.checkCurrentDate(\n \"facematch\",\n proofData,\n validity ?? DEFAULT_VALIDITY,\n queryResultErrors,\n )\n isCorrect = isCorrect && isCorrectCurrentDate\n queryResultErrors = {\n ...queryResultErrors,\n ...queryResultErrorsCurrentDate,\n }\n // Don't use the nullifier from the proof for FaceMatch as it may be 0\n // but will always come with at least one other disclosure proof with a non-zero nullifier\n // uniqueIdentifier = getNullifierFromDisclosureProof(proofData).toString(10)\n // uniqueIdentifierType = getNullifierTypeFromDisclosureProof(proofData)\n } else {\n // No check covered this proof, e.g. a standalone `_evm` disclosure proof\n console.warn(`Unexpected proof: ${proof.name}`)\n isCorrect = false\n }\n }\n\n // As in the outer circuit, each disclosure proof carries no nullifier or the bundle's one\n const nullifierProofs = sortedProofs\n .filter((p) => p.name !== \"facematch\" && disclosureProofNames.includes(p.name!))\n .map((p) => getProofData(p.proof as string, getNumberOfPublicInputs(p.name!, p.version)))\n if (nullifierProofs.length > 0) {\n const distinct = <T>(values: T[], none: T) => [...new Set(values.filter((v) => v !== none))]\n const nullifiers = distinct(nullifierProofs.map(getNullifierFromDisclosureProof), 0n)\n const nullifierTypes = distinct(\n nullifierProofs.map(getNullifierTypeFromDisclosureProof),\n NullifierType.NONE,\n )\n const oprfPkHashes = distinct(nullifierProofs.map(getOprfPkHashFromDisclosureProof), 0n)\n if (nullifiers.length > 1 || nullifierTypes.length > 1 || oprfPkHashes.length > 1) {\n console.warn(\"The disclosure proofs do not share the same nullifier\")\n isCorrect = false\n }\n uniqueIdentifier = nullifiers[0]?.toString(10)\n uniqueIdentifierType = nullifierTypes[0] ?? NullifierType.NONE\n oprfPublicKeyHash = oprfPkHashes[0]\n }\n\n const committedInputKeys = new Set<string>()\n for (const p of sortedProofs!) {\n for (const key of Object.keys(p.committedInputs ?? {})) committedInputKeys.add(key)\n }\n const { isCorrect: isQueryComplete, queryResultErrors: completenessErrors } =\n this.checkQueryCompleteness(originalQuery, committedInputKeys)\n isCorrect = isCorrect && isQueryComplete\n queryResultErrors = { ...queryResultErrors, ...completenessErrors }\n\n // Verify OPRF public key if the proof uses a salted nullifier\n if (\n isCorrect &&\n uniqueIdentifierType &&\n (uniqueIdentifierType === NullifierType.SALTED ||\n uniqueIdentifierType === NullifierType.SALTED_MOCK)\n ) {\n try {\n const oprfPk = await getOprfPublicKey(oprfKeyId ?? OPRF_DEFAULT_KEY_ID)\n const expectedPkHash = await hashOprfPublicKey(oprfPk)\n\n const proofPkHash = oprfPublicKeyHash\n if (proofPkHash === undefined || proofPkHash !== expectedPkHash) {\n console.warn(\"OPRF public key hash mismatch: proof uses an unknown OPRF key\")\n isCorrect = false\n }\n } catch (error) {\n console.warn(\"Failed to verify OPRF public key:\", error)\n isCorrect = false\n }\n }\n\n if (uniqueIdentifierType === NullifierType.NONE) {\n if (uniqueIdentifier !== undefined && BigInt(uniqueIdentifier) !== 0n) {\n console.warn(\"Proofs with the NONE nullifier type cannot carry a unique identifier\")\n isCorrect = false\n }\n uniqueIdentifier = undefined\n } else if (uniqueIdentifier !== undefined && BigInt(uniqueIdentifier) === 0n) {\n uniqueIdentifier = undefined\n }\n\n if (\n verificationMethod === VerificationMethod.UIDAI_AADHAAR &&\n !sortedProofs.some(\n (p) =>\n p.name?.startsWith(\"facematch\") ||\n (p.name?.startsWith(\"outer\") &&\n (!!p.committedInputs?.facematch || !!p.committedInputs?.facematch_evm)),\n )\n ) {\n console.warn(\"An Aadhaar proof must come with a face match against its photo\")\n isCorrect = false\n queryResultErrors.facematch = {\n ...queryResultErrors.facematch,\n eq: {\n expected: \"A FaceMatch proof\",\n received: \"none\",\n message: \"An Aadhaar proof must come with a face match against its photo\",\n },\n }\n }\n if (\n verificationMethod === VerificationMethod.UIDAI_AADHAAR &&\n !isAadhaarNationalityConditionAllowed(originalQuery.nationality)\n ) {\n console.warn(\n \"An Aadhaar does not prove a nationality, so it can only pass an exclusion check\",\n )\n isCorrect = false\n queryResultErrors.nationality = {\n ...queryResultErrors.nationality,\n eq: {\n expected: \"An ID that proves a nationality\",\n received: \"Aadhaar\",\n message:\n \"An Aadhaar does not prove a nationality, so it can only pass an exclusion check\",\n },\n }\n }\n // Proofs made before the scheme existed came from a chip\n const scheme = verificationMethod ?? VerificationMethod.ICAO_CHIP\n if (!isVerificationMethodAllowed(scheme, allowedVerificationMethods)) {\n console.warn(\"The service does not accept the verification method the ID was verified with\")\n isCorrect = false\n queryResultErrors.verification_method = {\n ...queryResultErrors.verification_method,\n eq: {\n expected: `Allowed credentials: ${allowedVerificationMethods.join(\", \")}`,\n received: `Verification method: ${scheme}`,\n message: \"The service does not accept the verification method the ID was verified with\",\n },\n }\n }\n return {\n isCorrect,\n uniqueIdentifier,\n uniqueIdentifierType,\n queryResultErrors,\n verificationMethod: scheme,\n }\n }\n\n /**\n * An attested ID proof carries its attestation's date, which must be recent: the face match\n * is at most 30 days old. The app reuses the proof, so it may be older than a disclosure proof's.\n */\n public static checkAttestedIdDate(attestedAt: Date | undefined) {\n let isCorrect = true\n const queryResultErrors: Partial<QueryResultErrors> = {}\n // A proof without a date is refused as not recent\n const age = attestedAt ? Date.now() - attestedAt.getTime() : Infinity\n if (age > ATTESTED_ID_PROOF_MAX_AGE_MS || -age > CURRENT_DATE_FUTURE_TOLERANCE_MS) {\n const message = \"The attested ID proof's date is not recent\"\n console.warn(message)\n isCorrect = false\n queryResultErrors.attested_id = {\n ...queryResultErrors.attested_id,\n date: {\n expected: `Within ${ATTESTED_ID_PROOF_MAX_AGE_MS / 1000} seconds of now`,\n received: attestedAt?.toISOString() ?? \"no date\",\n message,\n },\n }\n }\n return { isCorrect, queryResultErrors }\n }\n\n /**\n * A Tier 2 outer proof's first parameter commitment is its base proof's device attestation, which\n * the circuit cannot judge: it must match the committed attestation, and that attestation must\n * be a genuine one for the scheme's platform.\n */\n public static async checkOuterDeviceAttestation(\n verificationMethod: VerificationMethod,\n committedInputs: ProofResult[\"committedInputs\"],\n attestationParamCommitment: bigint | undefined,\n isForEVM: boolean,\n ) {\n let isCorrect = true\n const queryResultErrors: Partial<QueryResultErrors> = {}\n const fail = (expected: string, received: string, message: string) => {\n console.warn(message)\n isCorrect = false\n queryResultErrors.attested_id = {\n ...queryResultErrors.attested_id,\n commitment: { expected, received, message },\n }\n }\n const android = verificationMethod === VerificationMethod.ATTESTED_CAPTURE_ANDROID\n if (!android && verificationMethod !== VerificationMethod.ATTESTED_CAPTURE_IOS) {\n fail(\n \"A camera read scheme\",\n String(verificationMethod),\n \"No circuit proves this verification method\",\n )\n return { isCorrect, queryResultErrors }\n }\n const key = android ? \"attested_id_android\" : \"attested_id_ios\"\n const committed = committedInputs?.[key] as AttestedIdCommittedInputs | undefined\n if (!committed) {\n fail(`Committed inputs for ${key}`, \"none\", \"The proof carries no device attestation\")\n return { isCorrect, queryResultErrors }\n }\n const commit = isForEVM ? getAttestedIdEvmParameterCommitment : getAttestedIdParameterCommitment\n const expected = await commit(\n BigInt(committed.rootKeyLeaf),\n committed.environment === \"development\" ? 0n : 1n,\n BigInt(committed.appIdHash),\n committed.mode === \"regular\" ? 1n : 2n,\n )\n if (attestationParamCommitment !== expected) {\n fail(\n `First parameter commitment: ${expected.toString()}`,\n `First parameter commitment: ${attestationParamCommitment?.toString()}`,\n \"The proof's device attestation does not match its committed parameters\",\n )\n }\n const parameters = this.checkAttestedIdParameters(committed, android)\n return {\n isCorrect: isCorrect && parameters.isCorrect,\n queryResultErrors: { ...queryResultErrors, ...parameters.queryResultErrors },\n }\n }\n\n /**\n * The attestation behind a Tier 2 base proof must come from a genuine ZKPassport build on a\n * real device, in the production attestation environment, with a strict face match: that\n * face match is the only thing binding a camera-read ID to its holder.\n */\n public static checkAttestedIdParameters(committed: AttestedIdCommittedInputs, android = false) {\n let isCorrect = true\n const queryResultErrors: Partial<QueryResultErrors> = {}\n const fail = (expected: string, received: string, message: string) => {\n console.warn(message)\n isCorrect = false\n queryResultErrors.attested_id = {\n ...queryResultErrors.attested_id,\n eq: { expected, received, message },\n }\n }\n // Each value must come from the platform the circuit is for, so iOS and Android ones can't mix\n const rootKeys = android\n ? [GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH, GOOGLE_APP_ATTEST_ECDSA_P384_ROOT_KEY_HASH]\n : [APPLE_APP_ATTEST_ROOT_KEY_HASH]\n if (!rootKeys.includes(committed.rootKeyLeaf)) {\n fail(rootKeys.join(\" or \"), committed.rootKeyLeaf, \"Invalid attested ID root key hash\")\n }\n const appIdHash = android ? ZKPASSPORT_ANDROID_APP_ID_HASH : ZKPASSPORT_IOS_APP_ID_HASH\n if (committed.appIdHash !== appIdHash) {\n fail(appIdHash, committed.appIdHash, \"Invalid attested ID app id hash\")\n }\n const integrityAnchors = android ? [GOOGLE_PLAY_INTEGRITY_PUBKEY_HASH] : [0n]\n if (!integrityAnchors.includes(BigInt(committed.integrityPubkeyHash))) {\n fail(\n integrityAnchors.join(\" or \"),\n committed.integrityPubkeyHash,\n \"Invalid attested ID integrity key\",\n )\n }\n if (!android && BigInt(committed.revocationRoot ?? 0) !== 0n) {\n fail(\"0\", committed.revocationRoot!, \"An iOS attested ID has no revocation root\")\n }\n if (committed.environment !== \"production\") {\n fail(\"production\", committed.environment, \"Invalid attested ID environment\")\n }\n if (committed.mode !== \"strict\") {\n fail(\"strict\", committed.mode, \"A Tier 2 ID requires a strict face match\")\n }\n return { isCorrect, queryResultErrors }\n }\n}\n","{\n \"abi\": [\n {\n \"type\": \"constructor\",\n \"inputs\": [\n { \"name\": \"_admin\", \"type\": \"address\", \"internalType\": \"address\" },\n { \"name\": \"_guardian\", \"type\": \"address\", \"internalType\": \"address\" },\n { \"name\": \"_rootRegistry\", \"type\": \"address\", \"internalType\": \"contract RootRegistry\" },\n { \"name\": \"_defaultOPRFPubKeyHash\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }\n ],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"addHelper\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n { \"name\": \"newHelper\", \"type\": \"address\", \"internalType\": \"address\" }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"addSubVerifier\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n { \"name\": \"subVerifier\", \"type\": \"address\", \"internalType\": \"contract SubVerifier\" }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"admin\",\n \"inputs\": [],\n \"outputs\": [{ \"name\": \"\", \"type\": \"address\", \"internalType\": \"address\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"config\",\n \"inputs\": [{ \"name\": \"key\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [{ \"name\": \"value\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"defaultOPRFPubKeyHash\",\n \"inputs\": [],\n \"outputs\": [{ \"name\": \"\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getHelper\",\n \"inputs\": [{ \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [{ \"name\": \"\", \"type\": \"address\", \"internalType\": \"address\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"getSubVerifier\",\n \"inputs\": [{ \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [{ \"name\": \"\", \"type\": \"address\", \"internalType\": \"address\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"guardian\",\n \"inputs\": [],\n \"outputs\": [{ \"name\": \"\", \"type\": \"address\", \"internalType\": \"address\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"helperCount\",\n \"inputs\": [],\n \"outputs\": [{ \"name\": \"\", \"type\": \"uint256\", \"internalType\": \"uint256\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"helpers\",\n \"inputs\": [{ \"name\": \"\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [{ \"name\": \"\", \"type\": \"address\", \"internalType\": \"contract VerifierHelper\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"pause\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"paused\",\n \"inputs\": [],\n \"outputs\": [{ \"name\": \"\", \"type\": \"bool\", \"internalType\": \"bool\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"removeHelper\",\n \"inputs\": [{ \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"removeSubVerifier\",\n \"inputs\": [{ \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"rootRegistry\",\n \"inputs\": [],\n \"outputs\": [{ \"name\": \"\", \"type\": \"address\", \"internalType\": \"contract RootRegistry\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setDefaultOPRFPubKeyHash\",\n \"inputs\": [{ \"name\": \"newHash\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"setGuardian\",\n \"inputs\": [{ \"name\": \"newGuardian\", \"type\": \"address\", \"internalType\": \"address\" }],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"subverifierCount\",\n \"inputs\": [],\n \"outputs\": [{ \"name\": \"\", \"type\": \"uint256\", \"internalType\": \"uint256\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"subverifiers\",\n \"inputs\": [{ \"name\": \"\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }],\n \"outputs\": [{ \"name\": \"\", \"type\": \"address\", \"internalType\": \"contract SubVerifier\" }],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"function\",\n \"name\": \"transferAdmin\",\n \"inputs\": [{ \"name\": \"newAdmin\", \"type\": \"address\", \"internalType\": \"address\" }],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"unpause\",\n \"inputs\": [],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"updateConfig\",\n \"inputs\": [\n { \"name\": \"key\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n { \"name\": \"value\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"updateHelper\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n { \"name\": \"newHelper\", \"type\": \"address\", \"internalType\": \"address\" }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"updateSubVerifier\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n { \"name\": \"newSubVerifier\", \"type\": \"address\", \"internalType\": \"address\" }\n ],\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\"\n },\n {\n \"type\": \"function\",\n \"name\": \"verify\",\n \"inputs\": [\n {\n \"name\": \"params\",\n \"type\": \"tuple\",\n \"internalType\": \"struct ProofVerificationParams\",\n \"components\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n {\n \"name\": \"proofVerificationData\",\n \"type\": \"tuple\",\n \"internalType\": \"struct ProofVerificationData\",\n \"components\": [\n { \"name\": \"vkeyHash\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n { \"name\": \"proof\", \"type\": \"bytes\", \"internalType\": \"bytes\" },\n { \"name\": \"publicInputs\", \"type\": \"bytes32[]\", \"internalType\": \"bytes32[]\" }\n ]\n },\n { \"name\": \"committedInputs\", \"type\": \"bytes\", \"internalType\": \"bytes\" },\n {\n \"name\": \"serviceConfig\",\n \"type\": \"tuple\",\n \"internalType\": \"struct ServiceConfig\",\n \"components\": [\n { \"name\": \"validityPeriodInSeconds\", \"type\": \"uint256\", \"internalType\": \"uint256\" },\n { \"name\": \"domain\", \"type\": \"string\", \"internalType\": \"string\" },\n { \"name\": \"scope\", \"type\": \"string\", \"internalType\": \"string\" },\n { \"name\": \"devMode\", \"type\": \"bool\", \"internalType\": \"bool\" }\n ]\n }\n ]\n }\n ],\n \"outputs\": [\n { \"name\": \"valid\", \"type\": \"bool\", \"internalType\": \"bool\" },\n { \"name\": \"uniqueIdentifier\", \"type\": \"bytes32\", \"internalType\": \"bytes32\" },\n { \"name\": \"helper\", \"type\": \"address\", \"internalType\": \"contract VerifierHelper\" }\n ],\n \"stateMutability\": \"view\"\n },\n {\n \"type\": \"event\",\n \"name\": \"AdminUpdated\",\n \"inputs\": [\n { \"name\": \"oldAdmin\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" },\n { \"name\": \"newAdmin\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"ConfigUpdated\",\n \"inputs\": [\n { \"name\": \"key\", \"type\": \"bytes32\", \"indexed\": true, \"internalType\": \"bytes32\" },\n { \"name\": \"oldValue\", \"type\": \"bytes32\", \"indexed\": false, \"internalType\": \"bytes32\" },\n { \"name\": \"newValue\", \"type\": \"bytes32\", \"indexed\": false, \"internalType\": \"bytes32\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"DefaultOPRFPubKeyHashUpdated\",\n \"inputs\": [\n { \"name\": \"oldHash\", \"type\": \"bytes32\", \"indexed\": false, \"internalType\": \"bytes32\" },\n { \"name\": \"newHash\", \"type\": \"bytes32\", \"indexed\": false, \"internalType\": \"bytes32\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"GuardianUpdated\",\n \"inputs\": [\n { \"name\": \"oldGuardian\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" },\n { \"name\": \"newGuardian\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"HelperAdded\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true, \"internalType\": \"bytes32\" },\n { \"name\": \"helper\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"HelperRemoved\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true, \"internalType\": \"bytes32\" },\n { \"name\": \"helper\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"HelperUpdated\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true, \"internalType\": \"bytes32\" },\n { \"name\": \"oldHelper\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" },\n { \"name\": \"newHelper\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"PausedStatusChanged\",\n \"inputs\": [{ \"name\": \"paused\", \"type\": \"bool\", \"indexed\": false, \"internalType\": \"bool\" }],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RootRegistryUpdated\",\n \"inputs\": [\n {\n \"name\": \"oldRootRegistry\",\n \"type\": \"address\",\n \"indexed\": true,\n \"internalType\": \"address\"\n },\n { \"name\": \"newRootRegistry\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"RootVerifierDeployed\",\n \"inputs\": [\n { \"name\": \"admin\", \"type\": \"address\", \"indexed\": false, \"internalType\": \"address\" },\n { \"name\": \"guardian\", \"type\": \"address\", \"indexed\": false, \"internalType\": \"address\" },\n { \"name\": \"rootRegistry\", \"type\": \"address\", \"indexed\": false, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SubVerifierAdded\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true, \"internalType\": \"bytes32\" },\n { \"name\": \"subVerifier\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SubVerifierRemoved\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true, \"internalType\": \"bytes32\" },\n { \"name\": \"subVerifier\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n },\n {\n \"type\": \"event\",\n \"name\": \"SubVerifierUpdated\",\n \"inputs\": [\n { \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true, \"internalType\": \"bytes32\" },\n { \"name\": \"oldSubVerifier\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" },\n { \"name\": \"newSubVerifier\", \"type\": \"address\", \"indexed\": true, \"internalType\": \"address\" }\n ],\n \"anonymous\": false\n }\n ],\n \"bytecode\": {\n \"object\": \"0x608060405234801561000f575f5ffd5b506040516115cd3803806115cd83398101604081905261002e91610164565b6001600160a01b0384166100885760405162461bcd60e51b815260206004820152601c60248201527f41646d696e2063616e6e6f74206265207a65726f206164647265737300000000604482015260640160405180910390fd5b5f80546001600160a01b038681166001600160a01b03199283168117909355600180548783169084168117909155600280549287169290931682179092556008849055604080519384526020840192909252908201527f49958336430bdf59d989fb74186fd9ed78af011655d4ffe62fa2fbe5193edbda9060600160405180910390a1604080515f8152602081018390527f748956aa23d31e349f0a88960f2feb833a49a731af392d67a35563ca96249fb6910160405180910390a1505050506101b4565b6001600160a01b0381168114610161575f5ffd5b50565b5f5f5f5f60808587031215610177575f5ffd5b84516101828161014d565b60208601519094506101938161014d565b60408601519093506101a48161014d565b6060959095015193969295505050565b61140c806101c15f395ff3fe608060405234801561000f575f5ffd5b506004361061016d575f3560e01c80638988afbd116100d9578063b96b161c11610093578063cc718f761161006e578063cc718f7614610379578063da0ff2c614610398578063f2649807146103a1578063f851a440146103c9575f5ffd5b8063b96b161c1461034a578063ba5f3f9d1461035d578063c961ba7e14610370575f5ffd5b80638988afbd1461029d5780638a0dac4a146102d65780639bfefbfd146102e9578063a7ad58bf146102fc578063b3c83d9914610324578063b950506d14610337575f5ffd5b80635dd41f2f1161012a5780635dd41f2f1461021d57806366b4dfc4146102455780636f9076381461025c57806375829def1461026f5780638456cb5914610282578063889eba3b1461028a575f5ffd5b806307915439146101715780633f4ba83a14610186578063452a93201461018e578063492f34fb146101be57806352741df5146101e65780635c975abb146101f9575b5f5ffd5b61018461017f366004610f9f565b6103db565b005b6101846104e0565b6001546101a1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101a16101cc366004610fcd565b60036020525f90815260409020546001600160a01b031681565b6101846101f4366004610f9f565b61054c565b60015461020d90600160a01b900460ff1681565b60405190151581526020016101b5565b6101a161022b366004610fcd565b5f908152600560205260409020546001600160a01b031690565b61024e60085481565b6040519081526020016101b5565b61018461026a366004610fcd565b6106c8565b61018461027d366004610fe4565b6107a9565b610184610877565b610184610298366004611006565b610937565b6102b06102ab366004611026565b6109b5565b60408051931515845260208401929092526001600160a01b0316908201526060016101b5565b6101846102e4366004610fe4565b610ae2565b6101846102f7366004610fcd565b610b5c565b6101a161030a366004610fcd565b60056020525f90815260409020546001600160a01b031681565b610184610332366004610f9f565b610c6d565b610184610345366004610fcd565b610dbe565b6002546101a1906001600160a01b031681565b61018461036b366004610f9f565b610e2c565b61024e60045481565b61024e610387366004610fcd565b60076020525f908152604090205481565b61024e60065481565b6101a16103af366004610fcd565b5f908152600360205260409020546001600160a01b031690565b5f546101a1906001600160a01b031681565b5f546001600160a01b0316331461040d5760405162461bcd60e51b81526004016104049061105d565b60405180910390fd5b8161042a5760405162461bcd60e51b815260040161040490611094565b6001600160a01b0381166104505760405162461bcd60e51b8152600401610404906110c4565b5f828152600360205260409020546001600160a01b03166104835760405162461bcd60e51b815260040161040490611106565b5f8281526003602052604080822080546001600160a01b031981166001600160a01b038681169182179093559251911692839186917fa643a1aa11f9709b2990b31638a0b368d6d0c3b8f025a98a3249fea2bd5821d791a4505050565b5f546001600160a01b031633146105095760405162461bcd60e51b81526004016104049061105d565b6001805460ff60a01b191690556040515f81527f9a506b30e47f3823b09f67e4c0dfa5c3d8023b71825b7ceaa97677129128c9c5906020015b60405180910390a1565b5f546001600160a01b031633146105755760405162461bcd60e51b81526004016104049061105d565b6001600160a01b0381166105cb5760405162461bcd60e51b815260206004820152601d60248201527f48656c7065722063616e6e6f74206265207a65726f20616464726573730000006044820152606401610404565b816105e85760405162461bcd60e51b815260040161040490611094565b5f828152600560205260409020546001600160a01b0316156106565760405162461bcd60e51b815260206004820152602160248201527f48656c70657220616c72656164792065786973747320666f722076657273696f6044820152603760f91b6064820152608401610404565b5f82815260056020526040812080546001600160a01b0319166001600160a01b038416179055600680549161068a8361115b565b90915550506040516001600160a01b0382169083907fe3eccbb854b4a5c161cda43f1e76981a22f8c4a4190a1e1b44bb8c69039b85b2905f90a35050565b5f546001600160a01b031633146106f15760405162461bcd60e51b81526004016104049061105d565b8061070e5760405162461bcd60e51b815260040161040490611094565b5f818152600360205260409020546001600160a01b0316806107425760405162461bcd60e51b815260040161040490611106565b5f82815260036020526040812080546001600160a01b0319169055600480549161076b83611173565b90915550506040516001600160a01b0382169083907f2632c7adc4cecbf41bb3ee7c156aae99b0bcd9da3efa5b9315f77dcdf6ef3e66905f90a35050565b5f546001600160a01b031633146107d25760405162461bcd60e51b81526004016104049061105d565b6001600160a01b0381166108285760405162461bcd60e51b815260206004820152601c60248201527f41646d696e2063616e6e6f74206265207a65726f2061646472657373000000006044820152606401610404565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f101b8081ff3b56bbf45deb824d86a3b0fd38b7e3dd42421105cf8abe9106db0b9190a35050565b5f546001600160a01b031633148061089957506001546001600160a01b031633145b6108f45760405162461bcd60e51b815260206004820152602660248201527f4e6f7420617574686f72697a65643a2061646d696e206f7220677561726469616044820152656e206f6e6c7960d01b6064820152608401610404565b6001805460ff60a01b1916600160a01b1781556040519081527f9a506b30e47f3823b09f67e4c0dfa5c3d8023b71825b7ceaa97677129128c9c590602001610542565b5f546001600160a01b031633146109605760405162461bcd60e51b81526004016104049061105d565b5f8281526007602090815260409182902080549084905582518181529182018490529184917fbb4f63ec43349b7ec7c292d3e97704824bcdd2d758200521ad62d3e9a127f782910160405180910390a2505050565b5f5f5f600160149054906101000a900460ff1615610a155760405162461bcd60e51b815260206004820152601760248201527f526f6f74207665726966696572206973207061757365640000000000000000006044820152606401610404565b83355f908152600360205260409020546001600160a01b031680610a4b5760405162461bcd60e51b815260040161040490611106565b60025460405163bffd4b5160e01b81526001600160a01b038381169263bffd4b5192610a7f92909116908990600401611298565b6040805180830381865afa158015610a99573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610abd91906113d3565b95355f9081526005602052604090205490966001600160a01b03909116945092505050565b5f546001600160a01b03163314610b0b5760405162461bcd60e51b81526004016104049061105d565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f064d28d3d3071c5cbc271a261c10c2f0f0d9e319390397101aa0eb23c6bad909905f90a35050565b5f546001600160a01b03163314610b855760405162461bcd60e51b81526004016104049061105d565b80610ba25760405162461bcd60e51b815260040161040490611094565b5f818152600560205260409020546001600160a01b031680610c065760405162461bcd60e51b815260206004820152601c60248201527f48656c706572206e6f7420666f756e6420666f722076657273696f6e000000006044820152606401610404565b5f82815260056020526040812080546001600160a01b03191690556006805491610c2f83611173565b90915550506040516001600160a01b0382169083907f6a7d5ce7bf32942d5ee1a06318777e6921ab7173478635304ac93845d7de61e0905f90a35050565b5f546001600160a01b03163314610c965760405162461bcd60e51b81526004016104049061105d565b6001600160a01b038116610cbc5760405162461bcd60e51b8152600401610404906110c4565b81610cd95760405162461bcd60e51b815260040161040490611094565b5f828152600360205260409020546001600160a01b031615610d4c5760405162461bcd60e51b815260206004820152602660248201527f537562766572696669657220616c72656164792065786973747320666f72207660448201526532b939b4b7b760d11b6064820152608401610404565b5f82815260036020526040812080546001600160a01b0319166001600160a01b0384161790556004805491610d808361115b565b90915550506040516001600160a01b0382169083907fa65f9939af3939f730447054d525d5526c5f9e75ccea14966e1de1876631f404905f90a35050565b5f546001600160a01b03163314610de75760405162461bcd60e51b81526004016104049061105d565b600880549082905560408051828152602081018490527f748956aa23d31e349f0a88960f2feb833a49a731af392d67a35563ca96249fb6910160405180910390a15050565b5f546001600160a01b03163314610e555760405162461bcd60e51b81526004016104049061105d565b81610e725760405162461bcd60e51b815260040161040490611094565b6001600160a01b038116610ec85760405162461bcd60e51b815260206004820152601d60248201527f48656c7065722063616e6e6f74206265207a65726f20616464726573730000006044820152606401610404565b5f828152600560205260409020546001600160a01b0316610f2b5760405162461bcd60e51b815260206004820152601c60248201527f48656c706572206e6f7420666f756e6420666f722076657273696f6e000000006044820152606401610404565b5f8281526005602052604080822080546001600160a01b031981166001600160a01b038681169182179093559251911692839186917fb9393e6de8fe36cc235a7d08d2fa004db98bbb2a2be241250df83a276bc0d62e91a4505050565b6001600160a01b0381168114610f9c575f5ffd5b50565b5f5f60408385031215610fb0575f5ffd5b823591506020830135610fc281610f88565b809150509250929050565b5f60208284031215610fdd575f5ffd5b5035919050565b5f60208284031215610ff4575f5ffd5b8135610fff81610f88565b9392505050565b5f5f60408385031215611017575f5ffd5b50508035926020909101359150565b5f60208284031215611036575f5ffd5b813567ffffffffffffffff81111561104c575f5ffd5b820160808185031215610fff575f5ffd5b6020808252601a908201527f4e6f7420617574686f72697a65643a2061646d696e206f6e6c79000000000000604082015260600190565b60208082526016908201527556657273696f6e2063616e6e6f74206265207a65726f60501b604082015260600190565b60208082526022908201527f53756276657269666965722063616e6e6f74206265207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526021908201527f5375627665726966696572206e6f7420666f756e6420666f722076657273696f6040820152603760f91b606082015260800190565b634e487b7160e01b5f52601160045260245ffd5b5f6001820161116c5761116c611147565b5060010190565b5f8161118157611181611147565b505f190190565b5f5f8335601e1984360301811261119d575f5ffd5b830160208101925035905067ffffffffffffffff8111156111bc575f5ffd5b8036038213156111ca575f5ffd5b9250929050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8235609e1983360301811261120d575f5ffd5b90910192915050565b8015158114610f9c575f5ffd5b803582525f6112356020830183611188565b60a0602086015261124a60a0860182846111d1565b91505061125a6040840184611188565b858303604087015261126d8382846111d1565b92505050606083013561127f81611216565b1515606085015260809283013592909301919091525090565b6001600160a01b0383168152604060208083018290528335918301919091525f9083013536849003605e190181126112ce575f5ffd5b608060608401528301803560c08401526112eb6020820182611188565b606060e0860152611301610120860182846111d1565b9150506040820135601e1983360301811261131a575f5ffd5b60209201918201913567ffffffffffffffff811115611337575f5ffd5b8060051b803603841315611349575f5ffd5b85830360bf19016101008701528183526001600160fb1b0382111561136c575f5ffd5b8084602085013780830193505050506113886040850185611188565b601f198584030160808601526113a26020840182846111d1565b925050506113b360608501856111f9565b838203603f190160a08501526113c98282611223565b9695505050505050565b5f5f604083850312156113e4575f5ffd5b82516113ef81611216565b602093909301519294929350505056fea164736f6c634300081e000a\",\n \"sourceMap\": \"659:10373:26:-:0;;;2704:488;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;2829:20:26;;2821:61;;;;-1:-1:-1;;;2821:61:26;;960:2:36;2821:61:26;;;942:21:36;999:2;979:18;;;972:30;1038;1018:18;;;1011:58;1086:18;;2821:61:26;;;;;;;;2892:5;:14;;-1:-1:-1;;;;;2892:14:26;;;-1:-1:-1;;;;;;2892:14:26;;;;;;;;-1:-1:-1;2916:20:26;;;;;;;;;;;;;2946:12;:28;;;;;;;;;;;;;;2984:21;:46;;;3045:61;;;1317:51:36;;;1399:2;1384:18;;1377:60;;;;1453:18;;;1446:60;3045:61:26;;1305:2:36;1290:18;3045:61:26;;;;;;;3121:64;;;3158:1;1691:25:36;;1747:2;1732:18;;1725:34;;;3121:64:26;;1664:18:36;3121:64:26;;;;;;;2704:488;;;;659:10373;;14:131:36;-1:-1:-1;;;;;89:31:36;;79:42;;69:70;;135:1;132;125:12;69:70;14:131;:::o;150:603::-;269:6;277;285;293;346:3;334:9;325:7;321:23;317:33;314:53;;;363:1;360;353:12;314:53;395:9;389:16;414:31;439:5;414:31;:::i;:::-;514:2;499:18;;493:25;464:5;;-1:-1:-1;527:33:36;493:25;527:33;:::i;:::-;631:2;616:18;;610:25;579:7;;-1:-1:-1;644:33:36;610:25;644:33;:::i;:::-;743:2;728:18;;;;722:25;150:603;;;;-1:-1:-1;;;150:603:36:o;1517:248::-;659:10373:26;;;;;;\",\n \"linkReferences\": {}\n },\n \"deployedBytecode\": {\n \"object\": \"0x608060405234801561000f575f5ffd5b506004361061016d575f3560e01c80638988afbd116100d9578063b96b161c11610093578063cc718f761161006e578063cc718f7614610379578063da0ff2c614610398578063f2649807146103a1578063f851a440146103c9575f5ffd5b8063b96b161c1461034a578063ba5f3f9d1461035d578063c961ba7e14610370575f5ffd5b80638988afbd1461029d5780638a0dac4a146102d65780639bfefbfd146102e9578063a7ad58bf146102fc578063b3c83d9914610324578063b950506d14610337575f5ffd5b80635dd41f2f1161012a5780635dd41f2f1461021d57806366b4dfc4146102455780636f9076381461025c57806375829def1461026f5780638456cb5914610282578063889eba3b1461028a575f5ffd5b806307915439146101715780633f4ba83a14610186578063452a93201461018e578063492f34fb146101be57806352741df5146101e65780635c975abb146101f9575b5f5ffd5b61018461017f366004610f9f565b6103db565b005b6101846104e0565b6001546101a1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101a16101cc366004610fcd565b60036020525f90815260409020546001600160a01b031681565b6101846101f4366004610f9f565b61054c565b60015461020d90600160a01b900460ff1681565b60405190151581526020016101b5565b6101a161022b366004610fcd565b5f908152600560205260409020546001600160a01b031690565b61024e60085481565b6040519081526020016101b5565b61018461026a366004610fcd565b6106c8565b61018461027d366004610fe4565b6107a9565b610184610877565b610184610298366004611006565b610937565b6102b06102ab366004611026565b6109b5565b60408051931515845260208401929092526001600160a01b0316908201526060016101b5565b6101846102e4366004610fe4565b610ae2565b6101846102f7366004610fcd565b610b5c565b6101a161030a366004610fcd565b60056020525f90815260409020546001600160a01b031681565b610184610332366004610f9f565b610c6d565b610184610345366004610fcd565b610dbe565b6002546101a1906001600160a01b031681565b61018461036b366004610f9f565b610e2c565b61024e60045481565b61024e610387366004610fcd565b60076020525f908152604090205481565b61024e60065481565b6101a16103af366004610fcd565b5f908152600360205260409020546001600160a01b031690565b5f546101a1906001600160a01b031681565b5f546001600160a01b0316331461040d5760405162461bcd60e51b81526004016104049061105d565b60405180910390fd5b8161042a5760405162461bcd60e51b815260040161040490611094565b6001600160a01b0381166104505760405162461bcd60e51b8152600401610404906110c4565b5f828152600360205260409020546001600160a01b03166104835760405162461bcd60e51b815260040161040490611106565b5f8281526003602052604080822080546001600160a01b031981166001600160a01b038681169182179093559251911692839186917fa643a1aa11f9709b2990b31638a0b368d6d0c3b8f025a98a3249fea2bd5821d791a4505050565b5f546001600160a01b031633146105095760405162461bcd60e51b81526004016104049061105d565b6001805460ff60a01b191690556040515f81527f9a506b30e47f3823b09f67e4c0dfa5c3d8023b71825b7ceaa97677129128c9c5906020015b60405180910390a1565b5f546001600160a01b031633146105755760405162461bcd60e51b81526004016104049061105d565b6001600160a01b0381166105cb5760405162461bcd60e51b815260206004820152601d60248201527f48656c7065722063616e6e6f74206265207a65726f20616464726573730000006044820152606401610404565b816105e85760405162461bcd60e51b815260040161040490611094565b5f828152600560205260409020546001600160a01b0316156106565760405162461bcd60e51b815260206004820152602160248201527f48656c70657220616c72656164792065786973747320666f722076657273696f6044820152603760f91b6064820152608401610404565b5f82815260056020526040812080546001600160a01b0319166001600160a01b038416179055600680549161068a8361115b565b90915550506040516001600160a01b0382169083907fe3eccbb854b4a5c161cda43f1e76981a22f8c4a4190a1e1b44bb8c69039b85b2905f90a35050565b5f546001600160a01b031633146106f15760405162461bcd60e51b81526004016104049061105d565b8061070e5760405162461bcd60e51b815260040161040490611094565b5f818152600360205260409020546001600160a01b0316806107425760405162461bcd60e51b815260040161040490611106565b5f82815260036020526040812080546001600160a01b0319169055600480549161076b83611173565b90915550506040516001600160a01b0382169083907f2632c7adc4cecbf41bb3ee7c156aae99b0bcd9da3efa5b9315f77dcdf6ef3e66905f90a35050565b5f546001600160a01b031633146107d25760405162461bcd60e51b81526004016104049061105d565b6001600160a01b0381166108285760405162461bcd60e51b815260206004820152601c60248201527f41646d696e2063616e6e6f74206265207a65726f2061646472657373000000006044820152606401610404565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f101b8081ff3b56bbf45deb824d86a3b0fd38b7e3dd42421105cf8abe9106db0b9190a35050565b5f546001600160a01b031633148061089957506001546001600160a01b031633145b6108f45760405162461bcd60e51b815260206004820152602660248201527f4e6f7420617574686f72697a65643a2061646d696e206f7220677561726469616044820152656e206f6e6c7960d01b6064820152608401610404565b6001805460ff60a01b1916600160a01b1781556040519081527f9a506b30e47f3823b09f67e4c0dfa5c3d8023b71825b7ceaa97677129128c9c590602001610542565b5f546001600160a01b031633146109605760405162461bcd60e51b81526004016104049061105d565b5f8281526007602090815260409182902080549084905582518181529182018490529184917fbb4f63ec43349b7ec7c292d3e97704824bcdd2d758200521ad62d3e9a127f782910160405180910390a2505050565b5f5f5f600160149054906101000a900460ff1615610a155760405162461bcd60e51b815260206004820152601760248201527f526f6f74207665726966696572206973207061757365640000000000000000006044820152606401610404565b83355f908152600360205260409020546001600160a01b031680610a4b5760405162461bcd60e51b815260040161040490611106565b60025460405163bffd4b5160e01b81526001600160a01b038381169263bffd4b5192610a7f92909116908990600401611298565b6040805180830381865afa158015610a99573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610abd91906113d3565b95355f9081526005602052604090205490966001600160a01b03909116945092505050565b5f546001600160a01b03163314610b0b5760405162461bcd60e51b81526004016104049061105d565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f064d28d3d3071c5cbc271a261c10c2f0f0d9e319390397101aa0eb23c6bad909905f90a35050565b5f546001600160a01b03163314610b855760405162461bcd60e51b81526004016104049061105d565b80610ba25760405162461bcd60e51b815260040161040490611094565b5f818152600560205260409020546001600160a01b031680610c065760405162461bcd60e51b815260206004820152601c60248201527f48656c706572206e6f7420666f756e6420666f722076657273696f6e000000006044820152606401610404565b5f82815260056020526040812080546001600160a01b03191690556006805491610c2f83611173565b90915550506040516001600160a01b0382169083907f6a7d5ce7bf32942d5ee1a06318777e6921ab7173478635304ac93845d7de61e0905f90a35050565b5f546001600160a01b03163314610c965760405162461bcd60e51b81526004016104049061105d565b6001600160a01b038116610cbc5760405162461bcd60e51b8152600401610404906110c4565b81610cd95760405162461bcd60e51b815260040161040490611094565b5f828152600360205260409020546001600160a01b031615610d4c5760405162461bcd60e51b815260206004820152602660248201527f537562766572696669657220616c72656164792065786973747320666f72207660448201526532b939b4b7b760d11b6064820152608401610404565b5f82815260036020526040812080546001600160a01b0319166001600160a01b0384161790556004805491610d808361115b565b90915550506040516001600160a01b0382169083907fa65f9939af3939f730447054d525d5526c5f9e75ccea14966e1de1876631f404905f90a35050565b5f546001600160a01b03163314610de75760405162461bcd60e51b81526004016104049061105d565b600880549082905560408051828152602081018490527f748956aa23d31e349f0a88960f2feb833a49a731af392d67a35563ca96249fb6910160405180910390a15050565b5f546001600160a01b03163314610e555760405162461bcd60e51b81526004016104049061105d565b81610e725760405162461bcd60e51b815260040161040490611094565b6001600160a01b038116610ec85760405162461bcd60e51b815260206004820152601d60248201527f48656c7065722063616e6e6f74206265207a65726f20616464726573730000006044820152606401610404565b5f828152600560205260409020546001600160a01b0316610f2b5760405162461bcd60e51b815260206004820152601c60248201527f48656c706572206e6f7420666f756e6420666f722076657273696f6e000000006044820152606401610404565b5f8281526005602052604080822080546001600160a01b031981166001600160a01b038681169182179093559251911692839186917fb9393e6de8fe36cc235a7d08d2fa004db98bbb2a2be241250df83a276bc0d62e91a4505050565b6001600160a01b0381168114610f9c575f5ffd5b50565b5f5f60408385031215610fb0575f5ffd5b823591506020830135610fc281610f88565b809150509250929050565b5f60208284031215610fdd575f5ffd5b5035919050565b5f60208284031215610ff4575f5ffd5b8135610fff81610f88565b9392505050565b5f5f60408385031215611017575f5ffd5b50508035926020909101359150565b5f60208284031215611036575f5ffd5b813567ffffffffffffffff81111561104c575f5ffd5b820160808185031215610fff575f5ffd5b6020808252601a908201527f4e6f7420617574686f72697a65643a2061646d696e206f6e6c79000000000000604082015260600190565b60208082526016908201527556657273696f6e2063616e6e6f74206265207a65726f60501b604082015260600190565b60208082526022908201527f53756276657269666965722063616e6e6f74206265207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526021908201527f5375627665726966696572206e6f7420666f756e6420666f722076657273696f6040820152603760f91b606082015260800190565b634e487b7160e01b5f52601160045260245ffd5b5f6001820161116c5761116c611147565b5060010190565b5f8161118157611181611147565b505f190190565b5f5f8335601e1984360301811261119d575f5ffd5b830160208101925035905067ffffffffffffffff8111156111bc575f5ffd5b8036038213156111ca575f5ffd5b9250929050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f8235609e1983360301811261120d575f5ffd5b90910192915050565b8015158114610f9c575f5ffd5b803582525f6112356020830183611188565b60a0602086015261124a60a0860182846111d1565b91505061125a6040840184611188565b858303604087015261126d8382846111d1565b92505050606083013561127f81611216565b1515606085015260809283013592909301919091525090565b6001600160a01b0383168152604060208083018290528335918301919091525f9083013536849003605e190181126112ce575f5ffd5b608060608401528301803560c08401526112eb6020820182611188565b606060e0860152611301610120860182846111d1565b9150506040820135601e1983360301811261131a575f5ffd5b60209201918201913567ffffffffffffffff811115611337575f5ffd5b8060051b803603841315611349575f5ffd5b85830360bf19016101008701528183526001600160fb1b0382111561136c575f5ffd5b8084602085013780830193505050506113886040850185611188565b601f198584030160808601526113a26020840182846111d1565b925050506113b360608501856111f9565b838203603f190160a08501526113c98282611223565b9695505050505050565b5f5f604083850312156113e4575f5ffd5b82516113ef81611216565b602093909301519294929350505056fea164736f6c634300081e000a\",\n \"sourceMap\": \"659:10373:26:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6648:545;;;;;;:::i;:::-;;:::i;:::-;;10920:110;;;:::i;713:23::-;;;;;-1:-1:-1;;;;;713:23:26;;;;;;-1:-1:-1;;;;;686:32:36;;;668:51;;656:2;641:18;713:23:26;;;;;;;;865:51;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;865:51:26;;;7788:440;;;;;;:::i;:::-;;:::i;742:18::-;;;;;-1:-1:-1;;;742:18:26;;;;;;;;;1355:14:36;;1348:22;1330:41;;1318:2;1303:18;742::26;1190:187:36;9648:117:26;;;;;;:::i;:::-;9707:7;9741:16;;;:7;:16;;;;;;-1:-1:-1;;;;;9741:16:26;;9648:117;1305:36;;;;;;;;;1528:25:36;;;1516:2;1501:18;1305:36:26;1382:177:36;6057:400:26;;;;;;:::i;:::-;;:::i;4689:247::-;;;;;;:::i;:::-;;:::i;10688:116::-;;;:::i;9894:195::-;;;;;;:::i;:::-;;:::i;3692:497::-;;;;;;:::i;:::-;;:::i;:::-;;;;2821:14:36;;2814:22;2796:41;;2868:2;2853:18;;2846:34;;;;-1:-1:-1;;;;;2916:32:36;2896:18;;;2889:60;2784:2;2769:18;3692:497:26;2576:379:36;5064:196:26;;;;;;:::i;:::-;;:::i;8350:355::-;;;;;;:::i;:::-;;:::i;1028:49::-;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;1028:49:26;;;5441:489;;;;;;:::i;:::-;;:::i;10225:228::-;;;;;;:::i;:::-;;:::i;799:32::-;;;;;-1:-1:-1;;;;;799:32:26;;;8881:483;;;;;;:::i;:::-;;:::i;968:31::-;;;;;;1179:51;;;;;;:::i;:::-;;;;;;;;;;;;;;1124:26;;;;;;7492:127;;;;;;:::i;:::-;7556:7;7590:21;;;:12;:21;;;;;;-1:-1:-1;;;;;7590:21:26;;7492:127;687:20;;;;;-1:-1:-1;;;;;687:20:26;;;6648:545;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;;;;;;;;;6753:7;6745:56:::1;;;;-1:-1:-1::0;;;6745:56:26::1;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;6819:28:26;::::1;6811:75;;;;-1:-1:-1::0;;;6811:75:26::1;;;;;;;:::i;:::-;6946:1;6912:21:::0;;;:12:::1;:21;::::0;;;;;-1:-1:-1;;;;;6912:21:26::1;6896:90;;;;-1:-1:-1::0;;;6896:90:26::1;;;;;;;:::i;:::-;6996:22;7029:21:::0;;;:12:::1;:21;::::0;;;;;;;-1:-1:-1;;;;;;7061:51:26;::::1;-1:-1:-1::0;;;;;7061:51:26;;::::1;::::0;;::::1;::::0;;;7127:59;;7029:21;::::1;::::0;;;;;7127:59:::1;::::0;::::1;6735:458;6648:545:::0;;:::o;10920:110::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;10968:6:::1;:14:::0;;-1:-1:-1;;;;10968:14:26::1;::::0;;10997:26:::1;::::0;-1:-1:-1;1330:41:36;;10997:26:26::1;::::0;1318:2:36;1303:18;10997:26:26::1;;;;;;;;10920:110::o:0;7788:440::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;-1:-1:-1;;;;;7880:23:26;::::1;7872:65;;;::::0;-1:-1:-1;;;7872:65:26;;5710:2:36;7872:65:26::1;::::0;::::1;5692:21:36::0;5749:2;5729:18;;;5722:30;5788:31;5768:18;;;5761:59;5837:18;;7872:65:26::1;5508:353:36::0;7872:65:26::1;7955:7:::0;7947:56:::1;;;;-1:-1:-1::0;;;7947:56:26::1;;;;;;;:::i;:::-;8058:1;8029:16:::0;;;:7:::1;:16;::::0;;;;;-1:-1:-1;;;;;8029:16:26::1;8021:39:::0;8013:85:::1;;;::::0;-1:-1:-1;;;8013:85:26;;6068:2:36;8013:85:26::1;::::0;::::1;6050:21:36::0;6107:2;6087:18;;;6080:30;6146:34;6126:18;;;6119:62;-1:-1:-1;;;6197:18:36;;;6190:31;6238:19;;8013:85:26::1;5866:397:36::0;8013:85:26::1;8108:16;::::0;;;:7:::1;:16;::::0;;;;:44;;-1:-1:-1;;;;;;8108:44:26::1;-1:-1:-1::0;;;;;8108:44:26;::::1;;::::0;;8162:11:::1;:13:::0;;;::::1;::::0;::::1;:::i;:::-;::::0;;;-1:-1:-1;;8190:31:26::1;::::0;-1:-1:-1;;;;;8190:31:26;::::1;::::0;8202:7;;8190:31:::1;::::0;;;::::1;7788:440:::0;;:::o;6057:400::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;6138:7;6130:56:::1;;;;-1:-1:-1::0;;;6130:56:26::1;;;;;;;:::i;:::-;6196:19;6226:21:::0;;;:12:::1;:21;::::0;;;;;-1:-1:-1;;;;;6226:21:26::1;::::0;6258:71:::1;;;;-1:-1:-1::0;;;6258:71:26::1;;;;;;;:::i;:::-;6346:21;::::0;;;:12:::1;:21;::::0;;;;6339:28;;-1:-1:-1;;;;;;6339:28:26::1;::::0;;6377:16:::1;:18:::0;;;::::1;::::0;::::1;:::i;:::-;::::0;;;-1:-1:-1;;6410:40:26::1;::::0;-1:-1:-1;;;;;6410:40:26;::::1;::::0;6429:7;;6410:40:::1;::::0;;;::::1;6120:337;6057:400:::0;:::o;4689:247::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;-1:-1:-1;;;;;4767:22:26;::::1;4759:63;;;::::0;-1:-1:-1;;;4759:63:26;;6883:2:36;4759:63:26::1;::::0;::::1;6865:21:36::0;6922:2;6902:18;;;6895:30;6961;6941:18;;;6934:58;7009:18;;4759:63:26::1;6681:352:36::0;4759:63:26::1;4832:16;4851:5:::0;;-1:-1:-1;;;;;4866:16:26;;::::1;-1:-1:-1::0;;;;;;4866:16:26;::::1;::::0;::::1;::::0;;4897:32:::1;::::0;4851:5;;;::::1;::::0;;;4897:32:::1;::::0;4832:16;4897:32:::1;4749:187;4689:247:::0;:::o;10688:116::-;4371:5;;-1:-1:-1;;;;;4371:5:26;4357:10;:19;;:45;;-1:-1:-1;4394:8:26;;-1:-1:-1;;;;;4394:8:26;4380:10;:22;4357:45;4349:96;;;;-1:-1:-1;;;4349:96:26;;7240:2:36;4349:96:26;;;7222:21:36;7279:2;7259:18;;;7252:30;7318:34;7298:18;;;7291:62;-1:-1:-1;;;7369:18:36;;;7362:36;7415:19;;4349:96:26;7038:402:36;4349:96:26;10753:4:::1;10744:13:::0;;-1:-1:-1;;;;10744:13:26::1;-1:-1:-1::0;;;10744:13:26::1;::::0;;10772:25:::1;::::0;1330:41:36;;;10772:25:26::1;::::0;1318:2:36;1303:18;10772:25:26::1;1190:187:36::0;9894:195:26;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;9973:16:::1;9992:11:::0;;;:6:::1;:11;::::0;;;;;;;;;;10013:19;;;;10047:35;;7619:25:36;;;7660:18;;;7653:34;;;9992:11:26;;;10047:35:::1;::::0;7592:18:36;10047:35:26::1;;;;;;;9963:126;9894:195:::0;;:::o;3692:497::-;3818:10;3830:24;3856:21;4513:6;;;;;;;;;;;4512:7;4504:43;;;;-1:-1:-1;;;4504:43:26;;7900:2:36;4504:43:26;;;7882:21:36;7939:2;7919:18;;;7912:30;7978:25;7958:18;;;7951:53;8021:18;;4504:43:26;7698:347:36;4504:43:26;3932:14;::::1;3893:23;3919:28:::0;;;:12:::1;:28;::::0;;;;;-1:-1:-1;;;;;3919:28:26::1;::::0;3957:80:::1;;;;-1:-1:-1::0;;;3957:80:26::1;;;;;;;:::i;:::-;4094:12;::::0;4075:40:::1;::::0;-1:-1:-1;;;4075:40:26;;-1:-1:-1;;;;;4075:18:26;;::::1;::::0;::::1;::::0;:40:::1;::::0;4094:12;;::::1;::::0;4108:6;;4075:40:::1;;;:::i;:::-;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4166:14:::0;::::1;4158:23;::::0;;;:7:::1;:23;::::0;;;;;4047:68;;-1:-1:-1;;;;;4158:23:26;;::::1;::::0;-1:-1:-1;3692:497:26;-1:-1:-1;;;3692:497:26:o;5064:196::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;5157:8:::1;::::0;;-1:-1:-1;;;;;5175:22:26;;::::1;-1:-1:-1::0;;;;;;5175:22:26;::::1;::::0;::::1;::::0;;;5212:41:::1;::::0;5157:8;::::1;::::0;5175:22;5157:8;;5212:41:::1;::::0;5135:19:::1;::::0;5212:41:::1;5125:135;5064:196:::0;:::o;8350:355::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;8426:7;8418:56:::1;;;;-1:-1:-1::0;;;8418:56:26::1;;;;;;;:::i;:::-;8484:14;8509:16:::0;;;:7:::1;:16;::::0;;;;;-1:-1:-1;;;;;8509:16:26::1;::::0;8536:61:::1;;;::::0;-1:-1:-1;;;8536:61:26;;12955:2:36;8536:61:26::1;::::0;::::1;12937:21:36::0;12994:2;12974:18;;;12967:30;13033;13013:18;;;13006:58;13081:18;;8536:61:26::1;12753:352:36::0;8536:61:26::1;8614:16;::::0;;;:7:::1;:16;::::0;;;;8607:23;;-1:-1:-1;;;;;;8607:23:26::1;::::0;;8640:11:::1;:13:::0;;;::::1;::::0;::::1;:::i;:::-;::::0;;;-1:-1:-1;;8668:30:26::1;::::0;-1:-1:-1;;;;;8668:30:26;::::1;::::0;8682:7;;8668:30:::1;::::0;;;::::1;8408:297;8350:355:::0;:::o;5441:489::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;-1:-1:-1;;;;;5544:34:26;::::1;5536:81;;;;-1:-1:-1::0;;;5536:81:26::1;;;;;;;:::i;:::-;5635:7:::0;5627:56:::1;;;;-1:-1:-1::0;;;5627:56:26::1;;;;;;;:::i;:::-;5743:1;5709:21:::0;;;:12:::1;:21;::::0;;;;;-1:-1:-1;;;;;5709:21:26::1;5701:44:::0;5693:95:::1;;;::::0;-1:-1:-1;;;5693:95:26;;13312:2:36;5693:95:26::1;::::0;::::1;13294:21:36::0;13351:2;13331:18;;;13324:30;13390:34;13370:18;;;13363:62;-1:-1:-1;;;13441:18:36;;;13434:36;13487:19;;5693:95:26::1;13110:402:36::0;5693:95:26::1;5798:21;::::0;;;:12:::1;:21;::::0;;;;:35;;-1:-1:-1;;;;;;5798:35:26::1;-1:-1:-1::0;;;;;5798:35:26;::::1;;::::0;;5843:16:::1;:18:::0;;;::::1;::::0;::::1;:::i;:::-;::::0;;;-1:-1:-1;;5876:47:26::1;::::0;-1:-1:-1;;;;;5876:47:26;::::1;::::0;5893:7;;5876:47:::1;::::0;;;::::1;5441:489:::0;;:::o;10225:228::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;10323:21:::1;::::0;;10354:31;;;;10400:46:::1;::::0;;7619:25:36;;;7675:2;7660:18;;7653:34;;;10400:46:26::1;::::0;7592:18:36;10400:46:26::1;;;;;;;10295:158;10225:228:::0;:::o;8881:483::-;4248:5;;-1:-1:-1;;;;;4248:5:26;4234:10;:19;4226:58;;;;-1:-1:-1;;;4226:58:26;;;;;;;:::i;:::-;8976:7;8968:56:::1;;;;-1:-1:-1::0;;;8968:56:26::1;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;9042:23:26;::::1;9034:65;;;::::0;-1:-1:-1;;;9034:65:26;;5710:2:36;9034:65:26::1;::::0;::::1;5692:21:36::0;5749:2;5729:18;;;5722:30;5788:31;5768:18;;;5761:59;5837:18;;9034:65:26::1;5508:353:36::0;9034:65:26::1;9154:1;9125:16:::0;;;:7:::1;:16;::::0;;;;;-1:-1:-1;;;;;9125:16:26::1;9109:80;;;::::0;-1:-1:-1;;;9109:80:26;;12955:2:36;9109:80:26::1;::::0;::::1;12937:21:36::0;12994:2;12974:18;;;12967:30;13033;13013:18;;;13006:58;13081:18;;9109:80:26::1;12753:352:36::0;9109:80:26::1;9199:17;9227:16:::0;;;:7:::1;:16;::::0;;;;;;;-1:-1:-1;;;;;;9254:44:26;::::1;-1:-1:-1::0;;;;;9254:44:26;;::::1;::::0;;::::1;::::0;;;9313;;9227:16;::::1;::::0;;;;;9313:44:::1;::::0;::::1;8958:406;8881:483:::0;;:::o;14:131:36:-;-1:-1:-1;;;;;89:31:36;;79:42;;69:70;;135:1;132;125:12;69:70;14:131;:::o;150:367::-;218:6;226;279:2;267:9;258:7;254:23;250:32;247:52;;;295:1;292;285:12;247:52;340:23;;;-1:-1:-1;439:2:36;424:18;;411:32;452:33;411:32;452:33;:::i;:::-;504:7;494:17;;;150:367;;;;;:::o;730:226::-;789:6;842:2;830:9;821:7;817:23;813:32;810:52;;;858:1;855;848:12;810:52;-1:-1:-1;903:23:36;;730:226;-1:-1:-1;730:226:36:o;1564:247::-;1623:6;1676:2;1664:9;1655:7;1651:23;1647:32;1644:52;;;1692:1;1689;1682:12;1644:52;1731:9;1718:23;1750:31;1775:5;1750:31;:::i;:::-;1800:5;1564:247;-1:-1:-1;;;1564:247:36:o;1816:346::-;1884:6;1892;1945:2;1933:9;1924:7;1920:23;1916:32;1913:52;;;1961:1;1958;1951:12;1913:52;-1:-1:-1;;2006:23:36;;;2126:2;2111:18;;;2098:32;;-1:-1:-1;1816:346:36:o;2167:404::-;2270:6;2323:2;2311:9;2302:7;2298:23;2294:32;2291:52;;;2339:1;2336;2329:12;2291:52;2379:9;2366:23;2412:18;2404:6;2401:30;2398:50;;;2444:1;2441;2434:12;2398:50;2467:22;;2523:3;2505:16;;;2501:26;2498:46;;;2540:1;2537;2530:12;3997:350;4199:2;4181:21;;;4238:2;4218:18;;;4211:30;4277:28;4272:2;4257:18;;4250:56;4338:2;4323:18;;3997:350::o;4352:346::-;4554:2;4536:21;;;4593:2;4573:18;;;4566:30;-1:-1:-1;;;4627:2:36;4612:18;;4605:52;4689:2;4674:18;;4352:346::o;4703:398::-;4905:2;4887:21;;;4944:2;4924:18;;;4917:30;4983:34;4978:2;4963:18;;4956:62;-1:-1:-1;;;5049:2:36;5034:18;;5027:32;5091:3;5076:19;;4703:398::o;5106:397::-;5308:2;5290:21;;;5347:2;5327:18;;;5320:30;5386:34;5381:2;5366:18;;5359:62;-1:-1:-1;;;5452:2:36;5437:18;;5430:31;5493:3;5478:19;;5106:397::o;6268:127::-;6329:10;6324:3;6320:20;6317:1;6310:31;6360:4;6357:1;6350:15;6384:4;6381:1;6374:15;6400:135;6439:3;6460:17;;;6457:43;;6480:18;;:::i;:::-;-1:-1:-1;6527:1:36;6516:13;;6400:135::o;6540:136::-;6579:3;6607:5;6597:39;;6616:18;;:::i;:::-;-1:-1:-1;;;6652:18:36;;6540:136::o;8050:500::-;8108:5;8115:6;8175:3;8162:17;8261:2;8257:7;8246:8;8230:14;8226:29;8222:43;8202:18;8198:68;8188:96;;8280:1;8277;8270:12;8188:96;8308:33;;8412:4;8399:18;;;-1:-1:-1;8360:21:36;;-1:-1:-1;8440:18:36;8429:30;;8426:50;;;8472:1;8469;8462:12;8426:50;8519:6;8503:14;8499:27;8492:5;8488:39;8485:59;;;8540:1;8537;8530:12;8485:59;8050:500;;;;;:::o;8555:266::-;8643:6;8638:3;8631:19;8695:6;8688:5;8681:4;8676:3;8672:14;8659:43;-1:-1:-1;8747:1:36;8722:16;;;8740:4;8718:27;;;8711:38;;;;8803:2;8782:15;;;-1:-1:-1;;8778:29:36;8769:39;;;8765:50;;8555:266::o;8826:299::-;8899:5;8958:3;8945:17;9044:3;9040:8;9029;9013:14;9009:29;9005:44;8985:18;8981:69;8971:97;;9064:1;9061;9054:12;8971:97;9086:33;;;;8826:299;-1:-1:-1;;8826:299:36:o;9130:118::-;9216:5;9209:13;9202:21;9195:5;9192:32;9182:60;;9238:1;9235;9228:12;9253:867;9361:5;9348:19;9343:3;9336:32;9318:3;9411:55;9460:4;9453:5;9449:16;9442:5;9411:55;:::i;:::-;9498:4;9491;9486:3;9482:14;9475:28;9524:69;9587:4;9582:3;9578:14;9564:12;9550;9524:69;:::i;:::-;9512:81;;;9640:55;9689:4;9682:5;9678:16;9671:5;9640:55;:::i;:::-;9737:3;9731:4;9727:14;9720:4;9715:3;9711:14;9704:38;9765:63;9823:4;9807:14;9791;9765:63;:::i;:::-;9751:77;;;;9876:4;9869:5;9865:16;9852:30;9891;9913:7;9891:30;:::i;:::-;9960:15;9953:23;9946:4;9937:14;;9930:47;10046:4;10035:16;;;10022:30;10068:14;;;;10061:31;;;;-1:-1:-1;10108:6:36;9253:867::o;10125:2312::-;-1:-1:-1;;;;;10390:32:36;;10372:51;;10459:2;10454;10439:18;;;10432:30;;;10503:20;;10539:18;;;10532:33;;;;-1:-1:-1;;10613:15:36;;10600:29;10680:14;10676:27;;;-1:-1:-1;;10672:41:36;10648:66;;10638:94;;10728:1;10725;10718:12;10638:94;10823:4;10818:2;10803:18;;10796:32;10756:31;;10873:21;;10925:3;10910:19;;10903:36;10982:57;11035:2;11022:16;;10756:31;10982:57;:::i;:::-;11076:2;11070:3;11059:9;11055:19;11048:31;11102:74;11171:3;11160:9;11156:19;11142:12;11128;11102:74;:::i;:::-;11088:88;;;11239:2;11230:7;11226:16;11213:30;11326:2;11322:7;11312;11296:14;11292:28;11288:42;11266:20;11262:69;11252:97;;11345:1;11342;11335:12;11252:97;11488:2;11373:34;;11475:16;;;;11430:21;11514:18;11503:30;;11500:50;;;11546:1;11543;11536:12;11500:50;11576:6;11573:1;11569:14;11628:2;11612:14;11608:23;11599:7;11595:37;11592:57;;;11645:1;11642;11635:12;11592:57;11690:22;;;-1:-1:-1;;11686:37:36;11680:3;11665:19;;11658:66;11733:22;;;-1:-1:-1;;;;;11767:31:36;;11764:51;;;11811:1;11808;11801:12;11764:51;11863:2;11854:7;11849:2;11841:6;11837:15;11824:42;11897:2;11889:6;11885:15;11875:25;;;;;11947:55;11998:2;11990:6;11986:15;11978:6;11947:55;:::i;:::-;-1:-1:-1;;12048:18:36;;;12040:41;12033:4;12018:20;;12011:71;12105:70;12068:2;12163:11;;12147:14;12131;12105:70;:::i;:::-;12091:84;;;;12206:70;12272:2;12264:6;12260:15;12252:6;12206:70;:::i;:::-;12317:22;;;-1:-1:-1;;12313:36:36;12307:3;12292:19;;12285:65;12367:64;12321:6;12408:14;12367:64;:::i;:::-;12359:72;10125:2312;-1:-1:-1;;;;;;10125:2312:36:o;12442:306::-;12518:6;12526;12579:2;12567:9;12558:7;12554:23;12550:32;12547:52;;;12595:1;12592;12585:12;12547:52;12627:9;12621:16;12646:28;12668:5;12646:28;:::i;:::-;12738:2;12723:18;;;;12717:25;12693:5;;12717:25;;-1:-1:-1;;;12442:306:36:o\",\n \"linkReferences\": {}\n },\n \"methodIdentifiers\": {\n \"addHelper(bytes32,address)\": \"52741df5\",\n \"addSubVerifier(bytes32,address)\": \"b3c83d99\",\n \"admin()\": \"f851a440\",\n \"config(bytes32)\": \"cc718f76\",\n \"defaultOPRFPubKeyHash()\": \"66b4dfc4\",\n \"getHelper(bytes32)\": \"5dd41f2f\",\n \"getSubVerifier(bytes32)\": \"f2649807\",\n \"guardian()\": \"452a9320\",\n \"helperCount()\": \"da0ff2c6\",\n \"helpers(bytes32)\": \"a7ad58bf\",\n \"pause()\": \"8456cb59\",\n \"paused()\": \"5c975abb\",\n \"removeHelper(bytes32)\": \"9bfefbfd\",\n \"removeSubVerifier(bytes32)\": \"6f907638\",\n \"rootRegistry()\": \"b96b161c\",\n \"setDefaultOPRFPubKeyHash(bytes32)\": \"b950506d\",\n \"setGuardian(address)\": \"8a0dac4a\",\n \"subverifierCount()\": \"c961ba7e\",\n \"subverifiers(bytes32)\": \"492f34fb\",\n \"transferAdmin(address)\": \"75829def\",\n \"unpause()\": \"3f4ba83a\",\n \"updateConfig(bytes32,bytes32)\": \"889eba3b\",\n \"updateHelper(bytes32,address)\": \"ba5f3f9d\",\n \"updateSubVerifier(bytes32,address)\": \"07915439\",\n \"verify((bytes32,(bytes32,bytes,bytes32[]),bytes,(uint256,string,string,bool,bytes32)))\": \"8988afbd\"\n },\n \"rawMetadata\": \"{\\\"compiler\\\":{\\\"version\\\":\\\"0.8.30+commit.73712a01\\\"},\\\"language\\\":\\\"Solidity\\\",\\\"output\\\":{\\\"abi\\\":[{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_admin\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"_guardian\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"contract RootRegistry\\\",\\\"name\\\":\\\"_rootRegistry\\\",\\\"type\\\":\\\"address\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"_defaultOPRFPubKeyHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"constructor\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"oldAdmin\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newAdmin\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"AdminUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"oldValue\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"newValue\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"ConfigUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"oldHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"newHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"DefaultOPRFPubKeyHashUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"oldGuardian\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newGuardian\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"GuardianUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"helper\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"HelperAdded\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"helper\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"HelperRemoved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"oldHelper\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newHelper\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"HelperUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"paused\\\",\\\"type\\\":\\\"bool\\\"}],\\\"name\\\":\\\"PausedStatusChanged\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"oldRootRegistry\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newRootRegistry\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"RootRegistryUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"admin\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"guardian\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":false,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"rootRegistry\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"RootVerifierDeployed\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"subVerifier\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"SubVerifierAdded\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"subVerifier\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"SubVerifierRemoved\\\",\\\"type\\\":\\\"event\\\"},{\\\"anonymous\\\":false,\\\"inputs\\\":[{\\\"indexed\\\":true,\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"oldSubVerifier\\\",\\\"type\\\":\\\"address\\\"},{\\\"indexed\\\":true,\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newSubVerifier\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"SubVerifierUpdated\\\",\\\"type\\\":\\\"event\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newHelper\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"addHelper\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"contract SubVerifier\\\",\\\"name\\\":\\\"subVerifier\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"addSubVerifier\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"admin\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"config\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"value\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"defaultOPRFPubKeyHash\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"getHelper\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"getSubVerifier\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"guardian\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"helperCount\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"helpers\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract VerifierHelper\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"pause\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"paused\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bool\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"removeHelper\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"removeSubVerifier\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"rootRegistry\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract RootRegistry\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"newHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"setDefaultOPRFPubKeyHash\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newGuardian\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"setGuardian\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"subverifierCount\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"uint256\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"subverifiers\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"contract SubVerifier\\\",\\\"name\\\":\\\"\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newAdmin\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"transferAdmin\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[],\\\"name\\\":\\\"unpause\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"key\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"value\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"name\\\":\\\"updateConfig\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newHelper\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"updateHelper\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"address\\\",\\\"name\\\":\\\"newSubVerifier\\\",\\\"type\\\":\\\"address\\\"}],\\\"name\\\":\\\"updateSubVerifier\\\",\\\"outputs\\\":[],\\\"stateMutability\\\":\\\"nonpayable\\\",\\\"type\\\":\\\"function\\\"},{\\\"inputs\\\":[{\\\"components\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"vkeyHash\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"proof\\\",\\\"type\\\":\\\"bytes\\\"},{\\\"internalType\\\":\\\"bytes32[]\\\",\\\"name\\\":\\\"publicInputs\\\",\\\"type\\\":\\\"bytes32[]\\\"}],\\\"internalType\\\":\\\"struct ProofVerificationData\\\",\\\"name\\\":\\\"proofVerificationData\\\",\\\"type\\\":\\\"tuple\\\"},{\\\"internalType\\\":\\\"bytes\\\",\\\"name\\\":\\\"committedInputs\\\",\\\"type\\\":\\\"bytes\\\"},{\\\"components\\\":[{\\\"internalType\\\":\\\"uint256\\\",\\\"name\\\":\\\"validityPeriodInSeconds\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"domain\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"string\\\",\\\"name\\\":\\\"scope\\\",\\\"type\\\":\\\"string\\\"},{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"devMode\\\",\\\"type\\\":\\\"bool\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"oprfPubKeyHash\\\",\\\"type\\\":\\\"bytes32\\\"}],\\\"internalType\\\":\\\"struct ServiceConfig\\\",\\\"name\\\":\\\"serviceConfig\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"internalType\\\":\\\"struct ProofVerificationParams\\\",\\\"name\\\":\\\"params\\\",\\\"type\\\":\\\"tuple\\\"}],\\\"name\\\":\\\"verify\\\",\\\"outputs\\\":[{\\\"internalType\\\":\\\"bool\\\",\\\"name\\\":\\\"valid\\\",\\\"type\\\":\\\"bool\\\"},{\\\"internalType\\\":\\\"bytes32\\\",\\\"name\\\":\\\"uniqueIdentifier\\\",\\\"type\\\":\\\"bytes32\\\"},{\\\"internalType\\\":\\\"contract VerifierHelper\\\",\\\"name\\\":\\\"helper\\\",\\\"type\\\":\\\"address\\\"}],\\\"stateMutability\\\":\\\"view\\\",\\\"type\\\":\\\"function\\\"}],\\\"devdoc\\\":{\\\"kind\\\":\\\"dev\\\",\\\"methods\\\":{\\\"addHelper(bytes32,address)\\\":{\\\"params\\\":{\\\"newHelper\\\":\\\"The address of the helper\\\",\\\"version\\\":\\\"The version identifier\\\"}},\\\"addSubVerifier(bytes32,address)\\\":{\\\"params\\\":{\\\"subVerifier\\\":\\\"The address of the subverifier\\\",\\\"version\\\":\\\"The version identifier\\\"}},\\\"constructor\\\":{\\\"params\\\":{\\\"_admin\\\":\\\"The admin address\\\",\\\"_defaultOPRFPubKeyHash\\\":\\\"Hash of the global default OPRF public key\\\",\\\"_guardian\\\":\\\"The guardian address\\\",\\\"_rootRegistry\\\":\\\"The root registry address\\\"}},\\\"getHelper(bytes32)\\\":{\\\"details\\\":\\\"Returns zero address if no helper exists for the given version\\\",\\\"params\\\":{\\\"version\\\":\\\"The version identifier\\\"},\\\"returns\\\":{\\\"_0\\\":\\\"The address of the helper contract, or zero address if not found\\\"}},\\\"getSubVerifier(bytes32)\\\":{\\\"details\\\":\\\"Returns zero address if no subverifier exists for the given version\\\",\\\"params\\\":{\\\"version\\\":\\\"The version identifier\\\"},\\\"returns\\\":{\\\"_0\\\":\\\"The address of the subverifier contract, or zero address if not found\\\"}},\\\"pause()\\\":{\\\"details\\\":\\\"Only admin or guardian can pause the root verifierThis is a security measure to pause all proof verification operations in the event of an emergency\\\"},\\\"removeHelper(bytes32)\\\":{\\\"params\\\":{\\\"version\\\":\\\"The version identifier\\\"}},\\\"removeSubVerifier(bytes32)\\\":{\\\"params\\\":{\\\"version\\\":\\\"The version identifier\\\"}},\\\"setDefaultOPRFPubKeyHash(bytes32)\\\":{\\\"params\\\":{\\\"newHash\\\":\\\"The new default OPRF public key hash\\\"}},\\\"setGuardian(address)\\\":{\\\"params\\\":{\\\"newGuardian\\\":\\\"The new guardian address\\\"}},\\\"transferAdmin(address)\\\":{\\\"params\\\":{\\\"newAdmin\\\":\\\"The new admin address\\\"}},\\\"unpause()\\\":{\\\"details\\\":\\\"Only admin can unpause the root verifier\\\"},\\\"updateConfig(bytes32,bytes32)\\\":{\\\"params\\\":{\\\"key\\\":\\\"The config key\\\",\\\"value\\\":\\\"The config value\\\"}},\\\"updateHelper(bytes32,address)\\\":{\\\"params\\\":{\\\"newHelper\\\":\\\"The address of the new helper\\\",\\\"version\\\":\\\"The version identifier\\\"}},\\\"updateSubVerifier(bytes32,address)\\\":{\\\"params\\\":{\\\"newSubVerifier\\\":\\\"The address of the new subverifier\\\",\\\"version\\\":\\\"The version identifier\\\"}},\\\"verify((bytes32,(bytes32,bytes,bytes32[]),bytes,(uint256,string,string,bool,bytes32)))\\\":{\\\"details\\\":\\\"This function is called by the root verifier to verify a proof for a specific version\\\",\\\"params\\\":{\\\"params\\\":\\\"The proof verification parameters\\\"},\\\"returns\\\":{\\\"helper\\\":\\\"The helper for the calling contract to use to verify the committed inputs\\\",\\\"uniqueIdentifier\\\":\\\"The unique identifier associated with the ID used to generate the proof\\\",\\\"valid\\\":\\\"True if the proof is valid or false otherwise\\\"}}},\\\"title\\\":\\\"ZKPassport Root Verifier\\\",\\\"version\\\":1},\\\"userdoc\\\":{\\\"kind\\\":\\\"user\\\",\\\"methods\\\":{\\\"addHelper(bytes32,address)\\\":{\\\"notice\\\":\\\"Adds a helper for a specific version\\\"},\\\"addSubVerifier(bytes32,address)\\\":{\\\"notice\\\":\\\"Adds a subverifier for a specific version\\\"},\\\"constructor\\\":{\\\"notice\\\":\\\"Constructor\\\"},\\\"getHelper(bytes32)\\\":{\\\"notice\\\":\\\"Gets the helper address for a specific version\\\"},\\\"getSubVerifier(bytes32)\\\":{\\\"notice\\\":\\\"Gets the subverifier address for a specific version\\\"},\\\"pause()\\\":{\\\"notice\\\":\\\"Pause the root verifier\\\"},\\\"removeHelper(bytes32)\\\":{\\\"notice\\\":\\\"Removes a helper for a specific version\\\"},\\\"removeSubVerifier(bytes32)\\\":{\\\"notice\\\":\\\"Removes a subverifier for a specific version\\\"},\\\"setDefaultOPRFPubKeyHash(bytes32)\\\":{\\\"notice\\\":\\\"Update the default OPRF public key hash\\\"},\\\"setGuardian(address)\\\":{\\\"notice\\\":\\\"Sets the guardian role to a new address\\\"},\\\"transferAdmin(address)\\\":{\\\"notice\\\":\\\"Transfers the admin role to a new address\\\"},\\\"unpause()\\\":{\\\"notice\\\":\\\"Unpause the root verifier\\\"},\\\"updateConfig(bytes32,bytes32)\\\":{\\\"notice\\\":\\\"Update a config value\\\"},\\\"updateHelper(bytes32,address)\\\":{\\\"notice\\\":\\\"Updates a helper for a specific version\\\"},\\\"updateSubVerifier(bytes32,address)\\\":{\\\"notice\\\":\\\"Updates a subverifier for a specific version\\\"},\\\"verify((bytes32,(bytes32,bytes,bytes32[]),bytes,(uint256,string,string,bool,bytes32)))\\\":{\\\"notice\\\":\\\"Verifies a ZKPassport zero-knowledge proof\\\"}},\\\"notice\\\":\\\"Main entry point for verifying ZKPassport identity proofs\\\",\\\"version\\\":1}},\\\"settings\\\":{\\\"compilationTarget\\\":{\\\"src/RootVerifier.sol\\\":\\\"RootVerifier\\\"},\\\"evmVersion\\\":\\\"prague\\\",\\\"libraries\\\":{},\\\"metadata\\\":{\\\"bytecodeHash\\\":\\\"none\\\"},\\\"optimizer\\\":{\\\"enabled\\\":true,\\\"runs\\\":200},\\\"remappings\\\":[\\\":forge-std/=lib/forge-std/src/\\\"]},\\\"sources\\\":{\\\"src/IProofVerifier.sol\\\":{\\\"keccak256\\\":\\\"0xb71110bafe9c2f1dc6a86f4ef57baf76c27fa0efb69d17448f8fc3adf4f830ae\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://e90f9615a5a3e2bef08c43a160ec8e2c39955a3241f5de60ed9c317056843e04\\\",\\\"dweb:/ipfs/QmcjebVF4m3nAXYirGTE8PjzQuoRdxtEsS6oQHVdbySCs7\\\"]},\\\"src/IRegistryInstance.sol\\\":{\\\"keccak256\\\":\\\"0x9c322d143d45466a5148838dac57c58ac0940236bdf27d7b5e2016471315a0e1\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://cc078caebbbe12dc72ec0d7ba2754b349893fe4f9cecfe3abe177b1fd939f8cd\\\",\\\"dweb:/ipfs/QmWhREDDgzsifQJzVjQRbxbTrhNE7Kzyosu8Vf1MTRBuqY\\\"]},\\\"src/RootRegistry.sol\\\":{\\\"keccak256\\\":\\\"0x0e80060d95627de29c2751811ff0559e16e894f35a7bf68034ec34ef32e357cc\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://d18ba462a91632877b3f1cba88009ad3f62dbb232d4773de80e860e106401898\\\",\\\"dweb:/ipfs/QmTLXDFV57UpMPSKTcggKtrwuadDe1tVv9xu5mWVVMxkjC\\\"]},\\\"src/RootVerifier.sol\\\":{\\\"keccak256\\\":\\\"0xf277323b118e6c231299eea1ca676d2ed13f21290daf90c4c896c8b2e7383f0c\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://d238b1207552cebe342ccabbee1ee61d451035864f937aa8053402f7f7a64c42\\\",\\\"dweb:/ipfs/QmfG6PfgeptP9RjyYSpiKNZYbM2w5WEgsxbNXEwwA1drYq\\\"]},\\\"src/SubVerifier.sol\\\":{\\\"keccak256\\\":\\\"0xa9ddbe9a0ee43715dc4b5d65edf4d29db67358bec2daffb8c90b2c7da5ac6049\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://517c5815bf78cf2f1ec931b1f1476873a7d394b8a261796c1fbff4153d9f892b\\\",\\\"dweb:/ipfs/QmRpby7Qc2RsMsHcmQ5JV63TtsYG2ifaigBu8YsyHCTmbE\\\"]},\\\"src/VerifierHelper.sol\\\":{\\\"keccak256\\\":\\\"0x50747b26adc54bd1d0944ca67caf8028be56a20745a533bf443995e381f92be3\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://6c2482ed74b42dffef15940b93c29c13470c8587edda5a42e73bfb7e9851c455\\\",\\\"dweb:/ipfs/QmZbAWDGga91b2MyqK4sTi6F9WSNrUAfMFb477FvWDjZqU\\\"]},\\\"src/lib/Constants.sol\\\":{\\\"keccak256\\\":\\\"0x606d115f55f78b65e03bd66835cdfbdc4794cb416ef2c529906f9ca8e39ab065\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://a5280a7afdb4774b3b30c54f12681902981f0d44cc28247dca722d422a287ab1\\\",\\\"dweb:/ipfs/QmaPqeM2hsjDhszivLHmFmydiW9qgto1Pv1rqnXrNAjMGP\\\"]},\\\"src/lib/DateUtils.sol\\\":{\\\"keccak256\\\":\\\"0x7ca59267375212575d157a6dd0165b4e407eded1a4fa74a949d78495d849d8eb\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://26390ce9631c985b1ecda83d3dfae9b78ac3801d9e16d1d78929eb022f4436c1\\\",\\\"dweb:/ipfs/QmejWNCiiW4URcPCjkxEKtZq7hJF6Y4sAnpPrsW84fqZFt\\\"]},\\\"src/lib/InputsExtractor.sol\\\":{\\\"keccak256\\\":\\\"0x183e156b3455b49b2e2166efea5505dbf7b64139e03a49cf225d614490b3aedb\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://dcaf27a3fb0b34b10e063fcd3609d55f2ba85ae578ef28e665e93dd0449d1c7c\\\",\\\"dweb:/ipfs/QmXGEwaJN59PqHu1d2CMNV7MVCXG4vTd4zqDaFmLLWyuUf\\\"]},\\\"src/lib/StringUtils.sol\\\":{\\\"keccak256\\\":\\\"0xa472da3069d27669b4e4acbed140abf1ebbd52d13682fce3db3e6f7c5ea02adc\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://d3ed834526c7032c48116a225035c9fd8334e1dcd88f73fba655bdf7e6267387\\\",\\\"dweb:/ipfs/QmXDbA3rfze35C3jjAKxz7xFN1tvnBMHgiUMeswfPWE7Si\\\"]},\\\"src/lib/Types.sol\\\":{\\\"keccak256\\\":\\\"0xb6f6e2508c1c842aad7762c0917b2669daf3dc188df18b1ac1d981598ab4f7d1\\\",\\\"license\\\":\\\"Apache-2.0\\\",\\\"urls\\\":[\\\"bzz-raw://0e8f7bdc7bbe33e3bf6ea3b5b10c82ba37cf47096e01126ad9103309f64eb7f5\\\",\\\"dweb:/ipfs/QmeePytBGkeAB34SQJxqHcohHRnDEYzm1Vq5zU133FiwWn\\\"]}},\\\"version\\\":1}\",\n \"metadata\": {\n \"compiler\": { \"version\": \"0.8.30+commit.73712a01\" },\n \"language\": \"Solidity\",\n \"output\": {\n \"abi\": [\n {\n \"inputs\": [\n { \"internalType\": \"address\", \"name\": \"_admin\", \"type\": \"address\" },\n { \"internalType\": \"address\", \"name\": \"_guardian\", \"type\": \"address\" },\n { \"internalType\": \"contract RootRegistry\", \"name\": \"_rootRegistry\", \"type\": \"address\" },\n { \"internalType\": \"bytes32\", \"name\": \"_defaultOPRFPubKeyHash\", \"type\": \"bytes32\" }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n { \"internalType\": \"address\", \"name\": \"oldAdmin\", \"type\": \"address\", \"indexed\": true },\n { \"internalType\": \"address\", \"name\": \"newAdmin\", \"type\": \"address\", \"indexed\": true }\n ],\n \"type\": \"event\",\n \"name\": \"AdminUpdated\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"key\", \"type\": \"bytes32\", \"indexed\": true },\n { \"internalType\": \"bytes32\", \"name\": \"oldValue\", \"type\": \"bytes32\", \"indexed\": false },\n { \"internalType\": \"bytes32\", \"name\": \"newValue\", \"type\": \"bytes32\", \"indexed\": false }\n ],\n \"type\": \"event\",\n \"name\": \"ConfigUpdated\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"oldHash\", \"type\": \"bytes32\", \"indexed\": false },\n { \"internalType\": \"bytes32\", \"name\": \"newHash\", \"type\": \"bytes32\", \"indexed\": false }\n ],\n \"type\": \"event\",\n \"name\": \"DefaultOPRFPubKeyHashUpdated\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"oldGuardian\",\n \"type\": \"address\",\n \"indexed\": true\n },\n { \"internalType\": \"address\", \"name\": \"newGuardian\", \"type\": \"address\", \"indexed\": true }\n ],\n \"type\": \"event\",\n \"name\": \"GuardianUpdated\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true },\n { \"internalType\": \"address\", \"name\": \"helper\", \"type\": \"address\", \"indexed\": true }\n ],\n \"type\": \"event\",\n \"name\": \"HelperAdded\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true },\n { \"internalType\": \"address\", \"name\": \"helper\", \"type\": \"address\", \"indexed\": true }\n ],\n \"type\": \"event\",\n \"name\": \"HelperRemoved\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true },\n { \"internalType\": \"address\", \"name\": \"oldHelper\", \"type\": \"address\", \"indexed\": true },\n { \"internalType\": \"address\", \"name\": \"newHelper\", \"type\": \"address\", \"indexed\": true }\n ],\n \"type\": \"event\",\n \"name\": \"HelperUpdated\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bool\", \"name\": \"paused\", \"type\": \"bool\", \"indexed\": false }\n ],\n \"type\": \"event\",\n \"name\": \"PausedStatusChanged\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"oldRootRegistry\",\n \"type\": \"address\",\n \"indexed\": true\n },\n {\n \"internalType\": \"address\",\n \"name\": \"newRootRegistry\",\n \"type\": \"address\",\n \"indexed\": true\n }\n ],\n \"type\": \"event\",\n \"name\": \"RootRegistryUpdated\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"address\", \"name\": \"admin\", \"type\": \"address\", \"indexed\": false },\n { \"internalType\": \"address\", \"name\": \"guardian\", \"type\": \"address\", \"indexed\": false },\n {\n \"internalType\": \"address\",\n \"name\": \"rootRegistry\",\n \"type\": \"address\",\n \"indexed\": false\n }\n ],\n \"type\": \"event\",\n \"name\": \"RootVerifierDeployed\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true },\n { \"internalType\": \"address\", \"name\": \"subVerifier\", \"type\": \"address\", \"indexed\": true }\n ],\n \"type\": \"event\",\n \"name\": \"SubVerifierAdded\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true },\n { \"internalType\": \"address\", \"name\": \"subVerifier\", \"type\": \"address\", \"indexed\": true }\n ],\n \"type\": \"event\",\n \"name\": \"SubVerifierRemoved\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\", \"indexed\": true },\n {\n \"internalType\": \"address\",\n \"name\": \"oldSubVerifier\",\n \"type\": \"address\",\n \"indexed\": true\n },\n {\n \"internalType\": \"address\",\n \"name\": \"newSubVerifier\",\n \"type\": \"address\",\n \"indexed\": true\n }\n ],\n \"type\": \"event\",\n \"name\": \"SubVerifierUpdated\",\n \"anonymous\": false\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" },\n { \"internalType\": \"address\", \"name\": \"newHelper\", \"type\": \"address\" }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"addHelper\"\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" },\n { \"internalType\": \"contract SubVerifier\", \"name\": \"subVerifier\", \"type\": \"address\" }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"addSubVerifier\"\n },\n {\n \"inputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"admin\",\n \"outputs\": [{ \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"key\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"config\",\n \"outputs\": [{ \"internalType\": \"bytes32\", \"name\": \"value\", \"type\": \"bytes32\" }]\n },\n {\n \"inputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"defaultOPRFPubKeyHash\",\n \"outputs\": [{ \"internalType\": \"bytes32\", \"name\": \"\", \"type\": \"bytes32\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"getHelper\",\n \"outputs\": [{ \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"getSubVerifier\",\n \"outputs\": [{ \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" }]\n },\n {\n \"inputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"guardian\",\n \"outputs\": [{ \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" }]\n },\n {\n \"inputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"helperCount\",\n \"outputs\": [{ \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"helpers\",\n \"outputs\": [{ \"internalType\": \"contract VerifierHelper\", \"name\": \"\", \"type\": \"address\" }]\n },\n { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\", \"name\": \"pause\" },\n {\n \"inputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"paused\",\n \"outputs\": [{ \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"removeHelper\"\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"removeSubVerifier\"\n },\n {\n \"inputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"rootRegistry\",\n \"outputs\": [{ \"internalType\": \"contract RootRegistry\", \"name\": \"\", \"type\": \"address\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"newHash\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"setDefaultOPRFPubKeyHash\"\n },\n {\n \"inputs\": [{ \"internalType\": \"address\", \"name\": \"newGuardian\", \"type\": \"address\" }],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"setGuardian\"\n },\n {\n \"inputs\": [],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"subverifierCount\",\n \"outputs\": [{ \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"bytes32\", \"name\": \"\", \"type\": \"bytes32\" }],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"subverifiers\",\n \"outputs\": [{ \"internalType\": \"contract SubVerifier\", \"name\": \"\", \"type\": \"address\" }]\n },\n {\n \"inputs\": [{ \"internalType\": \"address\", \"name\": \"newAdmin\", \"type\": \"address\" }],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"transferAdmin\"\n },\n { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\", \"name\": \"unpause\" },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"key\", \"type\": \"bytes32\" },\n { \"internalType\": \"bytes32\", \"name\": \"value\", \"type\": \"bytes32\" }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"updateConfig\"\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" },\n { \"internalType\": \"address\", \"name\": \"newHelper\", \"type\": \"address\" }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"updateHelper\"\n },\n {\n \"inputs\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" },\n { \"internalType\": \"address\", \"name\": \"newSubVerifier\", \"type\": \"address\" }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\",\n \"name\": \"updateSubVerifier\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"struct ProofVerificationParams\",\n \"name\": \"params\",\n \"type\": \"tuple\",\n \"components\": [\n { \"internalType\": \"bytes32\", \"name\": \"version\", \"type\": \"bytes32\" },\n {\n \"internalType\": \"struct ProofVerificationData\",\n \"name\": \"proofVerificationData\",\n \"type\": \"tuple\",\n \"components\": [\n { \"internalType\": \"bytes32\", \"name\": \"vkeyHash\", \"type\": \"bytes32\" },\n { \"internalType\": \"bytes\", \"name\": \"proof\", \"type\": \"bytes\" },\n { \"internalType\": \"bytes32[]\", \"name\": \"publicInputs\", \"type\": \"bytes32[]\" }\n ]\n },\n { \"internalType\": \"bytes\", \"name\": \"committedInputs\", \"type\": \"bytes\" },\n {\n \"internalType\": \"struct ServiceConfig\",\n \"name\": \"serviceConfig\",\n \"type\": \"tuple\",\n \"components\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"validityPeriodInSeconds\",\n \"type\": \"uint256\"\n },\n { \"internalType\": \"string\", \"name\": \"domain\", \"type\": \"string\" },\n { \"internalType\": \"string\", \"name\": \"scope\", \"type\": \"string\" },\n { \"internalType\": \"bool\", \"name\": \"devMode\", \"type\": \"bool\" },\n { \"internalType\": \"bytes32\", \"name\": \"oprfPubKeyHash\", \"type\": \"bytes32\" }\n ]\n }\n ]\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\",\n \"name\": \"verify\",\n \"outputs\": [\n { \"internalType\": \"bool\", \"name\": \"valid\", \"type\": \"bool\" },\n { \"internalType\": \"bytes32\", \"name\": \"uniqueIdentifier\", \"type\": \"bytes32\" },\n { \"internalType\": \"contract VerifierHelper\", \"name\": \"helper\", \"type\": \"address\" }\n ]\n }\n ],\n \"devdoc\": {\n \"kind\": \"dev\",\n \"methods\": {\n \"addHelper(bytes32,address)\": {\n \"params\": {\n \"newHelper\": \"The address of the helper\",\n \"version\": \"The version identifier\"\n }\n },\n \"addSubVerifier(bytes32,address)\": {\n \"params\": {\n \"subVerifier\": \"The address of the subverifier\",\n \"version\": \"The version identifier\"\n }\n },\n \"constructor\": {\n \"params\": {\n \"_admin\": \"The admin address\",\n \"_defaultOPRFPubKeyHash\": \"Hash of the global default OPRF public key\",\n \"_guardian\": \"The guardian address\",\n \"_rootRegistry\": \"The root registry address\"\n }\n },\n \"getHelper(bytes32)\": {\n \"details\": \"Returns zero address if no helper exists for the given version\",\n \"params\": { \"version\": \"The version identifier\" },\n \"returns\": { \"_0\": \"The address of the helper contract, or zero address if not found\" }\n },\n \"getSubVerifier(bytes32)\": {\n \"details\": \"Returns zero address if no subverifier exists for the given version\",\n \"params\": { \"version\": \"The version identifier\" },\n \"returns\": {\n \"_0\": \"The address of the subverifier contract, or zero address if not found\"\n }\n },\n \"pause()\": {\n \"details\": \"Only admin or guardian can pause the root verifierThis is a security measure to pause all proof verification operations in the event of an emergency\"\n },\n \"removeHelper(bytes32)\": { \"params\": { \"version\": \"The version identifier\" } },\n \"removeSubVerifier(bytes32)\": { \"params\": { \"version\": \"The version identifier\" } },\n \"setDefaultOPRFPubKeyHash(bytes32)\": {\n \"params\": { \"newHash\": \"The new default OPRF public key hash\" }\n },\n \"setGuardian(address)\": { \"params\": { \"newGuardian\": \"The new guardian address\" } },\n \"transferAdmin(address)\": { \"params\": { \"newAdmin\": \"The new admin address\" } },\n \"unpause()\": { \"details\": \"Only admin can unpause the root verifier\" },\n \"updateConfig(bytes32,bytes32)\": {\n \"params\": { \"key\": \"The config key\", \"value\": \"The config value\" }\n },\n \"updateHelper(bytes32,address)\": {\n \"params\": {\n \"newHelper\": \"The address of the new helper\",\n \"version\": \"The version identifier\"\n }\n },\n \"updateSubVerifier(bytes32,address)\": {\n \"params\": {\n \"newSubVerifier\": \"The address of the new subverifier\",\n \"version\": \"The version identifier\"\n }\n },\n \"verify((bytes32,(bytes32,bytes,bytes32[]),bytes,(uint256,string,string,bool,bytes32)))\": {\n \"details\": \"This function is called by the root verifier to verify a proof for a specific version\",\n \"params\": { \"params\": \"The proof verification parameters\" },\n \"returns\": {\n \"helper\": \"The helper for the calling contract to use to verify the committed inputs\",\n \"uniqueIdentifier\": \"The unique identifier associated with the ID used to generate the proof\",\n \"valid\": \"True if the proof is valid or false otherwise\"\n }\n }\n },\n \"version\": 1\n },\n \"userdoc\": {\n \"kind\": \"user\",\n \"methods\": {\n \"addHelper(bytes32,address)\": { \"notice\": \"Adds a helper for a specific version\" },\n \"addSubVerifier(bytes32,address)\": {\n \"notice\": \"Adds a subverifier for a specific version\"\n },\n \"constructor\": { \"notice\": \"Constructor\" },\n \"getHelper(bytes32)\": { \"notice\": \"Gets the helper address for a specific version\" },\n \"getSubVerifier(bytes32)\": {\n \"notice\": \"Gets the subverifier address for a specific version\"\n },\n \"pause()\": { \"notice\": \"Pause the root verifier\" },\n \"removeHelper(bytes32)\": { \"notice\": \"Removes a helper for a specific version\" },\n \"removeSubVerifier(bytes32)\": {\n \"notice\": \"Removes a subverifier for a specific version\"\n },\n \"setDefaultOPRFPubKeyHash(bytes32)\": {\n \"notice\": \"Update the default OPRF public key hash\"\n },\n \"setGuardian(address)\": { \"notice\": \"Sets the guardian role to a new address\" },\n \"transferAdmin(address)\": { \"notice\": \"Transfers the admin role to a new address\" },\n \"unpause()\": { \"notice\": \"Unpause the root verifier\" },\n \"updateConfig(bytes32,bytes32)\": { \"notice\": \"Update a config value\" },\n \"updateHelper(bytes32,address)\": { \"notice\": \"Updates a helper for a specific version\" },\n \"updateSubVerifier(bytes32,address)\": {\n \"notice\": \"Updates a subverifier for a specific version\"\n },\n \"verify((bytes32,(bytes32,bytes,bytes32[]),bytes,(uint256,string,string,bool,bytes32)))\": {\n \"notice\": \"Verifies a ZKPassport zero-knowledge proof\"\n }\n },\n \"version\": 1\n }\n },\n \"settings\": {\n \"remappings\": [\"forge-std/=lib/forge-std/src/\"],\n \"optimizer\": { \"enabled\": true, \"runs\": 200 },\n \"metadata\": { \"bytecodeHash\": \"none\" },\n \"compilationTarget\": { \"src/RootVerifier.sol\": \"RootVerifier\" },\n \"evmVersion\": \"prague\",\n \"libraries\": {}\n },\n \"sources\": {\n \"src/IProofVerifier.sol\": {\n \"keccak256\": \"0xb71110bafe9c2f1dc6a86f4ef57baf76c27fa0efb69d17448f8fc3adf4f830ae\",\n \"urls\": [\n \"bzz-raw://e90f9615a5a3e2bef08c43a160ec8e2c39955a3241f5de60ed9c317056843e04\",\n \"dweb:/ipfs/QmcjebVF4m3nAXYirGTE8PjzQuoRdxtEsS6oQHVdbySCs7\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/IRegistryInstance.sol\": {\n \"keccak256\": \"0x9c322d143d45466a5148838dac57c58ac0940236bdf27d7b5e2016471315a0e1\",\n \"urls\": [\n \"bzz-raw://cc078caebbbe12dc72ec0d7ba2754b349893fe4f9cecfe3abe177b1fd939f8cd\",\n \"dweb:/ipfs/QmWhREDDgzsifQJzVjQRbxbTrhNE7Kzyosu8Vf1MTRBuqY\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/RootRegistry.sol\": {\n \"keccak256\": \"0x0e80060d95627de29c2751811ff0559e16e894f35a7bf68034ec34ef32e357cc\",\n \"urls\": [\n \"bzz-raw://d18ba462a91632877b3f1cba88009ad3f62dbb232d4773de80e860e106401898\",\n \"dweb:/ipfs/QmTLXDFV57UpMPSKTcggKtrwuadDe1tVv9xu5mWVVMxkjC\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/RootVerifier.sol\": {\n \"keccak256\": \"0xf277323b118e6c231299eea1ca676d2ed13f21290daf90c4c896c8b2e7383f0c\",\n \"urls\": [\n \"bzz-raw://d238b1207552cebe342ccabbee1ee61d451035864f937aa8053402f7f7a64c42\",\n \"dweb:/ipfs/QmfG6PfgeptP9RjyYSpiKNZYbM2w5WEgsxbNXEwwA1drYq\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/SubVerifier.sol\": {\n \"keccak256\": \"0xa9ddbe9a0ee43715dc4b5d65edf4d29db67358bec2daffb8c90b2c7da5ac6049\",\n \"urls\": [\n \"bzz-raw://517c5815bf78cf2f1ec931b1f1476873a7d394b8a261796c1fbff4153d9f892b\",\n \"dweb:/ipfs/QmRpby7Qc2RsMsHcmQ5JV63TtsYG2ifaigBu8YsyHCTmbE\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/VerifierHelper.sol\": {\n \"keccak256\": \"0x50747b26adc54bd1d0944ca67caf8028be56a20745a533bf443995e381f92be3\",\n \"urls\": [\n \"bzz-raw://6c2482ed74b42dffef15940b93c29c13470c8587edda5a42e73bfb7e9851c455\",\n \"dweb:/ipfs/QmZbAWDGga91b2MyqK4sTi6F9WSNrUAfMFb477FvWDjZqU\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/lib/Constants.sol\": {\n \"keccak256\": \"0x606d115f55f78b65e03bd66835cdfbdc4794cb416ef2c529906f9ca8e39ab065\",\n \"urls\": [\n \"bzz-raw://a5280a7afdb4774b3b30c54f12681902981f0d44cc28247dca722d422a287ab1\",\n \"dweb:/ipfs/QmaPqeM2hsjDhszivLHmFmydiW9qgto1Pv1rqnXrNAjMGP\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/lib/DateUtils.sol\": {\n \"keccak256\": \"0x7ca59267375212575d157a6dd0165b4e407eded1a4fa74a949d78495d849d8eb\",\n \"urls\": [\n \"bzz-raw://26390ce9631c985b1ecda83d3dfae9b78ac3801d9e16d1d78929eb022f4436c1\",\n \"dweb:/ipfs/QmejWNCiiW4URcPCjkxEKtZq7hJF6Y4sAnpPrsW84fqZFt\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/lib/InputsExtractor.sol\": {\n \"keccak256\": \"0x183e156b3455b49b2e2166efea5505dbf7b64139e03a49cf225d614490b3aedb\",\n \"urls\": [\n \"bzz-raw://dcaf27a3fb0b34b10e063fcd3609d55f2ba85ae578ef28e665e93dd0449d1c7c\",\n \"dweb:/ipfs/QmXGEwaJN59PqHu1d2CMNV7MVCXG4vTd4zqDaFmLLWyuUf\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/lib/StringUtils.sol\": {\n \"keccak256\": \"0xa472da3069d27669b4e4acbed140abf1ebbd52d13682fce3db3e6f7c5ea02adc\",\n \"urls\": [\n \"bzz-raw://d3ed834526c7032c48116a225035c9fd8334e1dcd88f73fba655bdf7e6267387\",\n \"dweb:/ipfs/QmXDbA3rfze35C3jjAKxz7xFN1tvnBMHgiUMeswfPWE7Si\"\n ],\n \"license\": \"Apache-2.0\"\n },\n \"src/lib/Types.sol\": {\n \"keccak256\": \"0xb6f6e2508c1c842aad7762c0917b2669daf3dc188df18b1ac1d981598ab4f7d1\",\n \"urls\": [\n \"bzz-raw://0e8f7bdc7bbe33e3bf6ea3b5b10c82ba37cf47096e01126ad9103309f64eb7f5\",\n \"dweb:/ipfs/QmeePytBGkeAB34SQJxqHcohHRnDEYzm1Vq5zU133FiwWn\"\n ],\n \"license\": \"Apache-2.0\"\n }\n },\n \"version\": 1\n },\n \"id\": 26\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport {\n AgeCommittedInputs,\n BindCommittedInputs,\n circuitVersionToBytes32,\n CountryCommittedInputs,\n DateCommittedInputs,\n DiscloseCommittedInputs,\n DisclosureCircuitName,\n FacematchCommittedInputs,\n formatBoundData,\n commitsAttestationRevocationRoot,\n getCommittedInputCount,\n getFacematchCommittedInputLength,\n getNumberOfPublicInputs,\n getParamCommitmentsFromOuterProof,\n getProofData,\n numberToBytesBE,\n ProofResult,\n ProofType,\n ProofTypeLength,\n rightPadArrayWithZeros,\n SanctionsCommittedInputs,\n} from \"@zkpassport/utils\"\nimport { SolidityVerifierParameters } from \"./types\"\nimport { DEFAULT_VALIDITY } from \"./constants\"\nimport { sha256 } from \"@noble/hashes/sha2.js\"\nimport { bytesToHex, hexToBytes } from \"@noble/hashes/utils.js\"\nimport ZKPassportVerifierAbi from \"./assets/abi/ZKPassportVerifier.json\"\n\nexport class SolidityVerifier {\n /**\n * Get the details for the Solidity verifier contract for a given network.\n * Rather than using the chain id directly, we restrict to the actual networks\n * supported by ZKPassport.\n * @param network The network to get the details for\n * @returns The address, function name, and ABI for the verifier contract\n */\n public static getDetails(): {\n address: `0x${string}`\n functionName: string\n abi: {\n type: \"function\" | \"event\" | \"constructor\"\n name: string\n inputs: { name: string; type: string; internalType: string }[]\n outputs: { name: string; type: string; internalType: string }[]\n }[]\n } {\n const baseConfig = {\n functionName: \"verify\",\n abi: ZKPassportVerifierAbi.abi as any,\n }\n return {\n ...baseConfig,\n // The Root Verifier has a deterministic address on all networks\n address: \"0x1D000001000EFD9a6371f4d90bB8920D5431c0D8\",\n }\n }\n\n /**\n * Format the proof for the Solidity verifier contract.\n * @param proof The proof to format\n * @param validityPeriodInSeconds The validity period in seconds\n * @param domain The domain to use for the service config\n * @param scope The scope to use for the service config\n * @param devMode Whether to use the dev mode\n * Both issuer-signed and device-attested proofs verify on chain; to accept only some credential\n * schemes, call the helper's `enforceVerificationMethod(allowedVerificationMethods, publicInputs)`\n * in your contract.\n * Note that on mainnets, the dev mode will be ignored as verification\n * will always fail for mock passports. It only applies to testnets.\n * @returns The parameters for the Solidity verifier contract\n */\n public static getParameters({\n proof,\n validityPeriodInSeconds = DEFAULT_VALIDITY,\n domain,\n scope,\n devMode = false,\n }: {\n proof: ProofResult\n validityPeriodInSeconds?: number\n domain: string\n scope?: string\n devMode?: boolean\n }) {\n if (!proof.name?.startsWith(\"outer_evm\")) {\n throw new Error(\n \"This proof cannot be verified on an EVM chain. Please make sure to use the `compressed-evm` mode.\",\n )\n }\n const proofData = getProofData(\n proof.proof as string,\n getNumberOfPublicInputs(proof.name!, proof.version),\n )\n const commitsRevocationRoot = commitsAttestationRevocationRoot(proof.version)\n const committedInputCounts: { circuitName: string; count: number }[] = []\n const committedInputs: { circuitName: string; inputs: string }[] = []\n for (const key in proof.committedInputs) {\n // A Tier 2 outer proof's first commitment is its base proof's device attestation\n if (key === \"attested_id_ios\" || key === \"attested_id_android\") {\n const inputs = facematchStyleInputs(\n ProofType.ATTESTED_ID,\n proof.committedInputs[key] as FacematchCommittedInputs,\n )\n committedInputCounts.push({ circuitName: key, count: inputs.length / 2 })\n committedInputs.push({ circuitName: key, inputs })\n continue\n }\n const committedInputCount = getCommittedInputCount(\n key as DisclosureCircuitName,\n commitsRevocationRoot,\n )\n const circuitName = key as DisclosureCircuitName\n committedInputCounts.push({ circuitName, count: committedInputCount })\n let compressedCommittedInputs = \"\"\n if (\n circuitName === \"inclusion_check_issuing_country_evm\" ||\n circuitName === \"inclusion_check_nationality_evm\" ||\n circuitName === \"exclusion_check_issuing_country_evm\" ||\n circuitName === \"exclusion_check_nationality_evm\"\n ) {\n const value = proof.committedInputs[circuitName] as CountryCommittedInputs\n const formattedCountries = value.countries\n if (\n circuitName === \"exclusion_check_issuing_country_evm\" ||\n circuitName === \"exclusion_check_nationality_evm\"\n ) {\n formattedCountries.sort((a, b) => a.localeCompare(b))\n }\n const proofType = (() => {\n switch (circuitName) {\n case \"exclusion_check_issuing_country_evm\":\n return ProofType.ISSUING_COUNTRY_EXCLUSION\n case \"exclusion_check_nationality_evm\":\n return ProofType.NATIONALITY_EXCLUSION\n case \"inclusion_check_issuing_country_evm\":\n return ProofType.ISSUING_COUNTRY_INCLUSION\n case \"inclusion_check_nationality_evm\":\n return ProofType.NATIONALITY_INCLUSION\n }\n })()\n compressedCommittedInputs =\n proofType.toString(16).padStart(2, \"0\") +\n ProofTypeLength[proofType].evm.toString(16).padStart(4, \"0\") +\n rightPadArrayWithZeros(\n formattedCountries.map((c) => Array.from(new TextEncoder().encode(c))).flat(),\n 600,\n )\n .map((x) => x.toString(16).padStart(2, \"0\"))\n .join(\"\")\n } else if (circuitName === \"compare_age_evm\") {\n const value = proof.committedInputs[circuitName] as AgeCommittedInputs\n compressedCommittedInputs =\n ProofType.AGE.toString(16).padStart(2, \"0\") +\n ProofTypeLength[ProofType.AGE].evm.toString(16).padStart(4, \"0\") +\n value.minAge.toString(16).padStart(2, \"0\") +\n value.maxAge.toString(16).padStart(2, \"0\")\n } else if (circuitName === \"compare_birthdate_evm\") {\n const value = proof.committedInputs[circuitName] as DateCommittedInputs\n const minDateBytes = Array.from(numberToBytesBE(value.minDateTimestamp, 8))\n const maxDateBytes = Array.from(numberToBytesBE(value.maxDateTimestamp, 8))\n compressedCommittedInputs =\n ProofType.BIRTHDATE.toString(16).padStart(2, \"0\") +\n ProofTypeLength[ProofType.BIRTHDATE].evm.toString(16).padStart(4, \"0\") +\n minDateBytes.map((x) => x.toString(16).padStart(2, \"0\")).join(\"\") +\n maxDateBytes.map((x) => x.toString(16).padStart(2, \"0\")).join(\"\")\n } else if (circuitName === \"compare_expiry_evm\") {\n const value = proof.committedInputs[circuitName] as DateCommittedInputs\n const minDateBytes = Array.from(numberToBytesBE(value.minDateTimestamp, 8))\n const maxDateBytes = Array.from(numberToBytesBE(value.maxDateTimestamp, 8))\n compressedCommittedInputs =\n ProofType.EXPIRY_DATE.toString(16).padStart(2, \"0\") +\n ProofTypeLength[ProofType.EXPIRY_DATE].evm.toString(16).padStart(4, \"0\") +\n minDateBytes.map((x) => x.toString(16).padStart(2, \"0\")).join(\"\") +\n maxDateBytes.map((x) => x.toString(16).padStart(2, \"0\")).join(\"\")\n } else if (circuitName === \"disclose_bytes_evm\") {\n const value = proof.committedInputs[circuitName] as DiscloseCommittedInputs\n compressedCommittedInputs =\n ProofType.DISCLOSE.toString(16).padStart(2, \"0\") +\n ProofTypeLength[ProofType.DISCLOSE].evm.toString(16).padStart(4, \"0\") +\n value.discloseMask.map((x) => x.toString(16).padStart(2, \"0\")).join(\"\") +\n value.disclosedBytes.map((x) => x.toString(16).padStart(2, \"0\")).join(\"\")\n } else if (circuitName === \"bind_evm\") {\n const value = proof.committedInputs[circuitName] as BindCommittedInputs\n compressedCommittedInputs =\n ProofType.BIND.toString(16).padStart(2, \"0\") +\n ProofTypeLength[ProofType.BIND].evm.toString(16).padStart(4, \"0\") +\n rightPadArrayWithZeros(formatBoundData(value.data), 509)\n .map((x) => x.toString(16).padStart(2, \"0\"))\n .join(\"\")\n } else if (circuitName === \"exclusion_check_sanctions_evm\") {\n const value = proof.committedInputs[circuitName] as SanctionsCommittedInputs\n compressedCommittedInputs += ProofType.SANCTIONS_EXCLUSION.toString(16).padStart(2, \"0\")\n compressedCommittedInputs += ProofTypeLength[ProofType.SANCTIONS_EXCLUSION].evm\n .toString(16)\n .padStart(4, \"0\")\n compressedCommittedInputs += Array.from(numberToBytesBE(BigInt(value.rootHash), 32))\n .map((x) => x.toString(16).padStart(2, \"0\"))\n .join(\"\")\n compressedCommittedInputs += value.isStrict ? \"01\" : \"00\"\n } else if (circuitName.startsWith(\"facematch\") && circuitName.endsWith(\"_evm\")) {\n compressedCommittedInputs += facematchStyleInputs(\n ProofType.FACEMATCH,\n proof.committedInputs[circuitName] as FacematchCommittedInputs,\n commitsRevocationRoot,\n )\n } else {\n throw new Error(`Unsupported circuit for EVM verification: ${circuitName}`)\n }\n committedInputs.push({ circuitName, inputs: compressedCommittedInputs })\n }\n const parameterCommitments = getParamCommitmentsFromOuterProof(proofData, proof.version).map(\n (x) => x.toString(16).padStart(64, \"0\"),\n )\n let compressedCommittedInputs = \"\"\n const committedInputCountsArray = []\n for (const commitment of parameterCommitments) {\n const committedInput = committedInputs.find((x) => {\n const rawHashedInputs = sha256(hexToBytes(x.inputs))\n // Shift the hash 8 bits to the right (1 byte)\n // as one byte is dropped in the circuit to fit in the 254-bit field size\n const hashedInputs = new Uint8Array(rawHashedInputs.length)\n // Move each byte 1 position to the right (shifting 8 bits)\n for (let i = 0; i < rawHashedInputs.length - 1; i++) {\n hashedInputs[i + 1] = rawHashedInputs[i]\n }\n // First byte becomes 0 (since we're shifting right)\n hashedInputs[0] = 0\n\n return bytesToHex(hashedInputs) === commitment.replace(\"0x\", \"\")\n })\n if (committedInput) {\n const count = committedInputCounts.find(\n (x) => x.circuitName === committedInput.circuitName,\n )?.count\n if (count) {\n committedInputCountsArray.push(count)\n compressedCommittedInputs += committedInput.inputs\n } else {\n throw new Error(`Unknown circuit name: ${committedInput.circuitName}`)\n }\n } else {\n throw new Error(`Invalid commitment: ${commitment}`)\n }\n }\n const params: SolidityVerifierParameters = {\n version: circuitVersionToBytes32(proof.version!),\n proofVerificationData: {\n // Make sure the vkeyHash is 32 bytes\n vkeyHash: `0x${proof.vkeyHash!.replace(\"0x\", \"\").padStart(64, \"0\")}`,\n proof: `0x${proofData.proof.join(\"\")}`,\n publicInputs: proofData.publicInputs,\n },\n committedInputs: `0x${compressedCommittedInputs}`,\n serviceConfig: {\n validityPeriodInSeconds,\n domain,\n scope: scope ?? \"\",\n devMode,\n },\n }\n return params\n }\n\n /** Verify an outer EVM proof with the RootVerifier of the chain behind `rpcUrl` */\n public static async verify({\n proof,\n rpcUrl,\n validityPeriodInSeconds,\n domain,\n scope,\n devMode,\n }: {\n proof: ProofResult\n rpcUrl: string\n validityPeriodInSeconds?: number\n domain: string\n scope?: string\n devMode?: boolean\n }): Promise<boolean> {\n try {\n const { createPublicClient, http } = await import(\"viem\")\n const { address, abi, functionName } = SolidityVerifier.getDetails()\n const client = createPublicClient({ transport: http(rpcUrl) })\n const params = SolidityVerifier.getParameters({\n proof,\n validityPeriodInSeconds,\n domain,\n scope,\n devMode,\n })\n const result = await client.readContract({ address, abi, functionName, args: [params] })\n return Array.isArray(result) ? Boolean(result[0]) : false\n } catch (error) {\n console.warn(\"Error verifying proof\", error)\n return false\n }\n }\n}\n\nconst toHex = (bytes: Uint8Array) =>\n Array.from(bytes)\n .map((x) => x.toString(16).padStart(2, \"0\"))\n .join(\"\")\n\n/** A face match's committed inputs, as the contract reads them, under the given proof type */\nfunction facematchStyleInputs(\n proofType: ProofType.FACEMATCH | ProofType.ATTESTED_ID,\n value: FacematchCommittedInputs,\n commitsRevocationRoot: boolean = true,\n): string {\n const length = commitsRevocationRoot\n ? ProofTypeLength[proofType].evm\n : getFacematchCommittedInputLength(false).evm\n return (\n proofType.toString(16).padStart(2, \"0\") +\n length.toString(16).padStart(4, \"0\") +\n toHex(numberToBytesBE(BigInt(value.rootKeyLeaf), 32)) +\n (value.environment === \"development\" ? \"00\" : \"01\") +\n toHex(numberToBytesBE(BigInt(value.appIdHash), 32)) +\n toHex(numberToBytesBE(BigInt(value.integrityPubkeyHash), 32)) +\n (value.mode === \"regular\" ? \"01\" : \"02\") +\n (commitsRevocationRoot ? toHex(numberToBytesBE(BigInt(value.revocationRoot ?? 0), 32)) : \"\")\n )\n}\n","import type { ProofResult, Query, QueryResult } from \"@zkpassport/utils\"\nimport { DASHBOARD_API_BASE_URL, VERSION } from \"./constants\"\nimport { noLogger as logger } from \"./logger\"\n\n/** Fire-and-forget: errors are logged, never thrown. */\nexport async function submitProof({\n domain,\n proofs,\n query,\n queryResult,\n scope,\n policyId,\n requestId,\n}: {\n domain: string\n proofs: Array<ProofResult>\n query: Query\n queryResult: QueryResult\n scope: string | undefined\n policyId: string | undefined\n requestId: string | undefined\n}) {\n const payload = proofs.map((p) => ({\n proof: p.proof,\n vkeyHash: p.vkeyHash,\n version: p.version,\n name: p.name,\n index: p.index,\n total: p.total,\n committedInputs: p.committedInputs,\n }))\n try {\n const response = await fetch(`${DASHBOARD_API_BASE_URL}/public/proofs`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n domain,\n proofs: payload,\n query,\n queryResult,\n scope,\n policyId,\n sdkVersion: VERSION,\n requestId,\n }),\n signal: AbortSignal.timeout(30000),\n })\n if (!response.ok) {\n logger.warn(\"API request failed with status:\", response.status)\n } else {\n logger.debug(\"API response status:\", response.status)\n }\n } catch (e) {\n logger.warn(\"API call failed:\", e)\n }\n}\n","import {\n getNumberOfPublicInputs,\n getProofData,\n type PackagedCircuit,\n type ProofResult,\n} from \"@zkpassport/utils\"\nimport { Buffer } from \"buffer/\"\n\nexport type BBVersion = \"v5\" | \"v6\"\n\nconst V6_MIN_CIRCUIT_VERSION = [0, 22, 0] as const\n\nexport function getBBVersionForCircuitVersion(circuitVersion?: string): BBVersion {\n if (!circuitVersion) return \"v6\"\n const parts = circuitVersion.split(\".\").map((x) => Number(x))\n if (parts.length !== 3 || parts.some((n) => Number.isNaN(n))) return \"v6\"\n\n return isAtLeast(parts, V6_MIN_CIRCUIT_VERSION) ? \"v6\" : \"v5\"\n}\n\nexport interface UltraHonkVerifier {\n verifyProof(proofData: {\n proof: Uint8Array\n publicInputs: string[]\n verificationKey: Uint8Array\n }): Promise<boolean>\n}\n\nexport interface LoadedVerifier {\n verifier: UltraHonkVerifier\n destroy: () => Promise<void>\n}\n\nexport async function createUltraHonkVerifier(\n bbVersion: BBVersion,\n { writingDirectory }: { writingDirectory?: string } = {},\n): Promise<LoadedVerifier> {\n await clearStaleCrsCacheOnVersionChange()\n const crsPath = writingDirectory ? writingDirectory + \"/.bb-crs\" : undefined\n\n if (bbVersion === \"v5\") {\n const { UltraHonkVerifierBackend, Barretenberg } = await import(\"@aztec/bb.js\")\n const barretenberg = await Barretenberg.new({ crsPath })\n const verifier = new UltraHonkVerifierBackend(barretenberg)\n return { verifier, destroy: () => barretenberg.destroy() }\n }\n const { UltraHonkVerifierBackend, Barretenberg } = await import(\"@aztec-foundation/bb.js\")\n const barretenberg = await Barretenberg.new({ crsPath })\n const verifier = new UltraHonkVerifierBackend(barretenberg)\n return { verifier, destroy: () => barretenberg.destroy() }\n}\n\nexport class BBVerifier {\n private readonly writingDirectory: string | undefined\n private loadedVerifier: LoadedVerifier | undefined\n\n constructor({ writingDirectory }: { writingDirectory?: string } = {}) {\n this.writingDirectory = writingDirectory\n }\n\n /** Verify a proof with bb.js, starting the bb it needs on first use */\n async verify(proof: ProofResult, circuit: PackagedCircuit): Promise<boolean> {\n const proofData = getProofData(\n proof.proof as string,\n getNumberOfPublicInputs(proof.name!, proof.version),\n )\n this.loadedVerifier ??= await createUltraHonkVerifier(\n getBBVersionForCircuitVersion(proof.version),\n { writingDirectory: this.writingDirectory },\n )\n\n try {\n return await this.loadedVerifier.verifier.verifyProof({\n proof: Buffer.from(proofData.proof.join(\"\"), \"hex\"),\n publicInputs: proofData.publicInputs,\n verificationKey: new Uint8Array(Buffer.from(circuit.vkey, \"base64\")),\n })\n } catch (error) {\n console.warn(`Error verifying proof ${proof.name}`, error)\n return false\n }\n }\n\n /** Release the bb.js instance it started */\n async destroy(): Promise<void> {\n await this.loadedVerifier?.destroy()\n }\n}\n\nconst BB_VERSION_KEY = \"__zkpassport_bb_version\"\nconst BB_CRS_DB_NAME = \"keyval-store\"\nconst BB_CRS_CACHE_VERSION = \"v5\"\n\n// Clear bb cache on v4 -> v5 due to default CRS size change. bb.js 6 reads the bb.js 5 cache.\nasync function clearStaleCrsCacheOnVersionChange(): Promise<void> {\n if (typeof indexedDB === \"undefined\") return\n try {\n const store = typeof localStorage !== \"undefined\" ? localStorage : undefined\n if ((store?.getItem(BB_VERSION_KEY) ?? \"v4\") === BB_CRS_CACHE_VERSION) return\n\n let dbExists = true\n if (typeof indexedDB.databases === \"function\") {\n try {\n dbExists = (await indexedDB.databases()).some((db) => db.name === BB_CRS_DB_NAME)\n } catch {\n dbExists = true\n }\n }\n if (dbExists) {\n await new Promise<void>((resolve) => {\n const req = indexedDB.deleteDatabase(BB_CRS_DB_NAME)\n req.onsuccess = req.onerror = req.onblocked = () => resolve()\n })\n }\n store?.setItem(BB_VERSION_KEY, BB_CRS_CACHE_VERSION)\n } catch {\n // Best-effort cache reset; if it fails, bb.js will surface its own error.\n }\n}\n\nfunction isAtLeast(version: number[], minimum: readonly number[]): boolean {\n for (const [index, minimumPart] of minimum.entries()) {\n if (version[index] !== minimumPart) {\n return version[index] > minimumPart\n }\n }\n return true\n}\n","import type { AllowedVerificationMethod, ProofResult, Query, QueryResult } from \"@zkpassport/utils\"\nimport { VERIFIER_API_BASE_URL } from \"./constants\"\nimport type { VerificationResult } from \"./types\"\n\n// Returns null when the API gave no verdict (unreachable, timed out, server error),\n// so callers can fall back to their own result instead of reporting \"not verified\".\nexport async function verifyWithVerifierApi({\n proofs,\n originalQuery,\n queryResult,\n domain,\n validity,\n scope,\n devMode,\n oprfKeyId,\n allowedVerificationMethods,\n}: {\n proofs: Array<ProofResult>\n originalQuery: Query\n queryResult: QueryResult\n domain: string\n validity?: number\n scope?: string\n devMode?: boolean\n oprfKeyId?: string\n allowedVerificationMethods?: AllowedVerificationMethod[]\n}): Promise<VerificationResult | null> {\n try {\n const response = await fetch(`${VERIFIER_API_BASE_URL}/verify`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n proofs,\n originalQuery,\n queryResult,\n serviceConfig: { domain, scope, validityPeriodInSeconds: validity, devMode },\n oprfKeyId,\n allowedVerificationMethods,\n }),\n signal: AbortSignal.timeout(60000),\n })\n if (response.status >= 500) {\n console.warn(`Verifier API error (status ${response.status})`)\n return null\n }\n const body = (await response.json().catch(() => null)) as\n (VerificationResult & { error?: string }) | null\n if (!body || typeof body.verified !== \"boolean\") {\n console.warn(`Unexpected verifier API response (status ${response.status})`)\n return null\n }\n if (!body.verified) {\n console.warn(\"Verifier API did not verify the proofs:\", body.error)\n return {\n uniqueIdentifier: undefined,\n uniqueIdentifierType: undefined,\n verified: false,\n queryResultErrors: body.queryResultErrors,\n }\n }\n return {\n uniqueIdentifier: body.uniqueIdentifier,\n uniqueIdentifierType: body.uniqueIdentifierType,\n verified: true,\n verificationMethod: body.verificationMethod,\n }\n } catch (e) {\n console.warn(\"Verifier API call failed:\", e)\n return null\n }\n}\n","import {\n type DisclosableIDCredential,\n type IDCredential,\n type IDCredentialValue,\n type NumericalIDCredential,\n type ProofResult,\n type QueryResult,\n type CountryName,\n type JsonRpcRequest,\n type Query,\n type FacematchMode,\n type SanctionsCountries,\n type SanctionsLists,\n type SupportedChain,\n type ProofMode,\n type BoundData,\n type Service,\n NullifierType,\n formatQueryResultDates,\n getChainFromQuery,\n VerificationMethod,\n VerificationTier,\n serializeAllowedVerificationMethods,\n isCircuitVersion,\n isVerificationMethodAllowed,\n type AllowedVerificationMethod,\n} from \"@zkpassport/utils\"\nimport { noLogger as logger } from \"./logger\"\nimport { Buffer } from \"buffer/\"\nimport { createRegistryClient } from \"@zkpassport/registry\"\nimport { Bridge, BridgeInterface, type KeyPair } from \"@obsidion/bridge\"\nimport {\n QueryBuilder,\n QueryBuilderResult,\n OfflineQueryBuilderResult,\n DashboardConfig,\n Policy,\n QueryResultErrors,\n RequestSuccess,\n OnSuccessVerdict,\n VerifierMode,\n VerificationResult,\n RequestedNullifierType,\n VerificationConfig,\n} from \"./types\"\nimport {\n createOfflineQuery,\n generalCompare,\n normalizeCountry,\n numericalCompare,\n rangeCompare,\n} from \"./offline-query\"\nimport { PublicInputChecker, withDocumentType } from \"./public-input-checker\"\nimport { SolidityVerifier } from \"./solidity-verifier\"\nimport { submitProof } from \"./dashboard-api\"\nimport { BBVerifier } from \"./bb-verifier\"\nimport { verifyWithVerifierApi } from \"./verifier-api\"\nimport { DASHBOARD_API_BASE_URL, DEFAULT_VALIDITY, VERSION } from \"./constants\"\n\n// If Buffer is not defined, then we use the Buffer from the buffer package\nif (typeof globalThis.Buffer === \"undefined\") {\n globalThis.Buffer = Buffer as any // eslint-disable-line\n if (typeof window !== \"undefined\") {\n window.Buffer = Buffer as any // eslint-disable-line\n }\n}\n\nconst DEFAULT_PURPOSE = \"Verify identity privately\"\n\ntype RegistryClientOptions = NonNullable<Parameters<typeof createRegistryClient>[1]>\n\n/** The registry client overrides a {@link VerificationConfig} asks for */\nexport function getRegistryClientOptions(\n config: VerificationConfig | undefined,\n): RegistryClientOptions {\n if (!config) return {}\n const { circuitsUrl, ...options } = config\n if (!circuitsUrl) return options\n const base = circuitsUrl.replace(/\\/+$/, \"\")\n return {\n ...options,\n circuitManifestUrlGenerator: (_chainId, { root, version }) =>\n root\n ? `${base}/by-root/${root}/manifest.json`\n : `${base}/by-version/${version}/manifest.json`,\n packagedCircuitUrlGenerator: (_chainId, hash) => `${base}/by-hash/${hash}.json`,\n }\n}\n\nfunction realNullifierType({\n uniqueIdentifier,\n uniqueIdentifierType,\n}: VerificationResult): NullifierType | undefined {\n if (uniqueIdentifierType === NullifierType.SALTED_MOCK) return NullifierType.SALTED\n if (uniqueIdentifierType === NullifierType.NON_SALTED_MOCK) {\n // Mock IDs keep their mock type even when the identifier is hidden\n return uniqueIdentifier === undefined ? NullifierType.NONE : NullifierType.NON_SALTED\n }\n return uniqueIdentifierType\n}\n\n/**\n * Applies the service's credential policy to a result, whichever verifier gave it: the hosted\n * verifier checks proofs under the default policy, not the service's. A result without a scheme\n * comes from a verifier that predates it, which only knew chip reads.\n */\nfunction enforceVerificationMethodPolicy(\n result: VerificationResult,\n allowedVerificationMethods: AllowedVerificationMethod[] | undefined,\n): VerificationResult {\n if (!result.verified) return result\n const scheme = result.verificationMethod ?? VerificationMethod.ICAO_CHIP\n if (isVerificationMethodAllowed(scheme, allowedVerificationMethods)) return result\n console.warn(`The verification method ${scheme} is not one the service accepts`)\n return {\n ...result,\n verified: false,\n uniqueIdentifier: undefined,\n uniqueIdentifierType: undefined,\n }\n}\n\nfunction enforceUniqueIdentifierType(\n result: VerificationResult,\n requestedType: RequestedNullifierType | undefined,\n): VerificationResult {\n if (requestedType == null || !result.verified) return result\n if (realNullifierType(result) === requestedType) return result\n const proofType = result.uniqueIdentifierType\n const proofTypeName = proofType === undefined ? \"missing\" : NullifierType[proofType]\n console.warn(\n `Unique identifier type mismatch: requested ${NullifierType[requestedType]}, got ${proofTypeName}`,\n )\n return {\n ...result,\n uniqueIdentifier: undefined,\n uniqueIdentifierType: undefined,\n verified: false,\n }\n}\n\nexport {\n getChainFromId,\n getIdFromChain,\n SANCTIONED_COUNTRIES,\n EU_COUNTRIES,\n EEA_COUNTRIES,\n SCHENGEN_COUNTRIES,\n ASEAN_COUNTRIES,\n MERCOSUR_COUNTRIES,\n ProofType,\n ProofTypeLength,\n NullifierType,\n type ProofResult,\n type DisclosableIDCredential,\n type IDCredential,\n type IDCredentialValue,\n type NumericalIDCredential,\n type QueryResult,\n type CountryName,\n type JsonRpcRequest,\n type Query,\n type FacematchMode,\n type SanctionsCountries,\n type SanctionsLists,\n type SupportedChain,\n type ProofMode,\n type BoundData,\n type Service,\n VerificationMethod,\n VerificationTier,\n DEFAULT_ALLOWED_VERIFICATION_METHODS,\n getTierForVerificationMethod,\n isVerificationMethodAllowed,\n expandAllowedVerificationMethods,\n type AllowedVerificationMethod,\n} from \"@zkpassport/utils\"\n\nexport * from \"./types\"\nexport { createOfflineQuery, normalizeCountry } from \"./offline-query\"\nexport type { KeyPair } from \"@obsidion/bridge\"\nexport { VERSION } from \"./constants\"\n\nlet onResultDeprecationWarned = false\nfunction warnOnResultDeprecated() {\n if (onResultDeprecationWarned) return\n onResultDeprecationWarned = true\n console.warn(\n \"[zkpassport] onResult is deprecated. Use onSuccess and verify the proofs on your backend with verify().\",\n )\n}\n\nexport class ZKPassport {\n private domain: string\n private domainProvided: boolean\n private topicToConfig: Record<string, Query> = {}\n private topicToLocalConfig: Record<\n string,\n {\n validity: number\n mode: ProofMode\n devMode: boolean\n uniqueIdentifierType: RequestedNullifierType | undefined\n oprfKeyId: string | null\n returnDeepLink: string | undefined\n verifierMode: VerifierMode | undefined\n config: VerificationConfig | undefined\n appClip: boolean\n allowedVerificationMethods: AllowedVerificationMethod[] | undefined\n }\n > = {}\n private topicToPublicKey: Record<string, string> = {}\n private topicToBridge: Record<string, BridgeInterface> = {}\n private topicToRequestReceived: Record<string, boolean> = {}\n private topicToService: Record<string, Service> = {}\n private topicToCallerPurpose: Record<string, string | undefined> = {}\n private topicToProofs: Record<string, Array<ProofResult>> = {}\n private topicToFailedProofCount: Record<string, number> = {}\n private topicToResults: Record<string, QueryResult> = {}\n private topicToPolicy: Record<string, { id: string; proofStorageEnabled: boolean }> = {}\n private dashboardConfig: DashboardConfig | null = null\n private dashboardConfigPromise: Promise<DashboardConfig | null> | null = null\n private dashboardConfigError: Error | null = null\n\n private onRequestReceivedCallbacks: Record<string, Array<() => void>> = {}\n private onGeneratingProofCallbacks: Record<string, Array<(topic: string) => void>> = {}\n private onBridgeConnectCallbacks: Record<string, Array<() => void>> = {}\n private onBridgeConnectionLostCallbacks: Record<string, Array<() => void>> = {}\n private onProofGeneratedCallbacks: Record<string, Array<(proof: ProofResult) => void>> = {}\n private onSuccessCallbacks: Record<\n string,\n Array<(response: RequestSuccess) => OnSuccessVerdict>\n > = {}\n private onResultCallbacks: Record<\n string,\n Array<\n (response: {\n uniqueIdentifier: string | undefined\n uniqueIdentifierType: NullifierType | undefined\n verified: boolean\n verificationMethod?: VerificationMethod\n result: QueryResult\n queryResultErrors?: Partial<QueryResultErrors>\n proofs: ProofResult[]\n sdkInstance: ZKPassport\n }) => void\n >\n > = {}\n private onRejectCallbacks: Record<string, Array<() => void>> = {}\n private onErrorCallbacks: Record<string, Array<(topic: string) => void>> = {}\n //private wasmVerifierInit: boolean = false\n\n private normalizeDomain(domain: string) {\n return (\n domain\n .trim()\n // Remove protocol\n .replace(/^https?:\\/\\//, \"\")\n // Remove trailing slash and anything after it\n .replace(/\\/[^/]*$/, \"\")\n // Remove port\n .replace(/:[0-9]+/, \"\")\n // Remove query parameters\n .replace(/\\?.*$/, \"\")\n // Remove hash\n .replace(/#.*$/, \"\")\n .toLowerCase()\n )\n }\n\n constructor(_domain?: string) {\n if (!_domain && typeof window === \"undefined\") {\n throw new Error(\"Domain argument is required in Node.js environment\")\n }\n this.domainProvided = !!_domain\n this.domain = this.normalizeDomain(_domain || window.location.hostname)\n }\n\n private async handleResult(topic: string) {\n logger.debug(\"Handling result for topic:\", topic)\n const result = this.topicToResults[topic]\n // Clear the results straight away to avoid concurrency issues\n delete this.topicToResults[topic]\n const proofs = this.topicToProofs[topic]\n const hasFailedProofs = this.topicToFailedProofCount[topic] > 0\n const requestSucceeded = !hasFailedProofs && proofs.length > 0\n\n if (requestSucceeded) {\n // A throwing callback must not block proof storage or the onResult flow below\n try {\n await Promise.all(\n this.onSuccessCallbacks[topic].map((callback) => callback({ proofs, result })),\n )\n } catch (reason) {\n logger.error(\"onSuccess callback failed:\", reason)\n }\n }\n\n // Browser-only callers (no explicit domain) can't be authenticated; devMode submits would\n // pollute real-domain stats.\n const devMode = this.topicToLocalConfig[topic]?.devMode === true\n const proofStorageEnabled = this.topicToPolicy[topic]?.proofStorageEnabled === true\n if (requestSucceeded && proofStorageEnabled && this.domainProvided && !devMode) {\n void submitProof({\n domain: this.domain,\n proofs,\n query: this.topicToConfig[topic],\n queryResult: result,\n scope: this.topicToService[topic]?.scope,\n policyId: this.topicToPolicy[topic]?.id,\n requestId: this.topicToPublicKey[topic],\n })\n }\n\n // Verification only runs for the deprecated onResult listeners\n if (this.onResultCallbacks[topic].length > 0) {\n await this.verifyAndReportResult(topic, proofs, result, hasFailedProofs)\n }\n\n delete this.topicToProofs[topic]\n delete this.topicToFailedProofCount[topic]\n }\n\n private async verifyAndReportResult(\n topic: string,\n proofs: Array<ProofResult>,\n result: QueryResult,\n hasFailedProofs: boolean,\n ) {\n let verification: VerificationResult\n try {\n verification = await this.verify({\n proofs,\n originalQuery: this.topicToConfig[topic],\n queryResult: result,\n validity: this.topicToLocalConfig[topic]?.validity,\n scope: this.topicToService[topic]?.scope,\n devMode: this.topicToLocalConfig[topic]?.devMode,\n oprfKeyId: this.topicToLocalConfig[topic]?.oprfKeyId ?? undefined,\n uniqueIdentifierType: this.topicToLocalConfig[topic]?.uniqueIdentifierType,\n verifierMode: this.topicToLocalConfig[topic]?.verifierMode,\n config: this.topicToLocalConfig[topic]?.config,\n allowedVerificationMethods: this.topicToLocalConfig[topic]?.allowedVerificationMethods,\n })\n } catch (e) {\n const message = e instanceof Error ? e.message : String(e)\n await Promise.all(this.onErrorCallbacks[topic].map((callback) => callback(message)))\n return\n }\n const {\n uniqueIdentifier,\n uniqueIdentifierType,\n verified,\n queryResultErrors,\n verificationMethod,\n } = verification\n logger.debug(\"Verification complete, verified:\", verified)\n await Promise.all(\n this.onResultCallbacks[topic].map((callback) =>\n callback({\n // If there are failed proofs, we don't return the unique identifier\n // and we set the verified result to false\n uniqueIdentifier: hasFailedProofs ? undefined : uniqueIdentifier,\n uniqueIdentifierType: hasFailedProofs ? undefined : uniqueIdentifierType,\n verified: hasFailedProofs ? false : verified,\n verificationMethod,\n result,\n queryResultErrors,\n proofs,\n sdkInstance: this,\n }),\n ),\n )\n }\n\n /**\n * @notice Handle an encrypted message.\n * @param request The request.\n * @param outerRequest The outer request.\n */\n private async handleEncryptedMessage(topic: string, request: JsonRpcRequest) {\n logger.debug(\"Received encrypted message:\", request)\n if (request.method === \"accept\") {\n logger.debug(`User accepted the request and is generating a proof`)\n await Promise.all(this.onGeneratingProofCallbacks[topic].map((callback) => callback(topic)))\n } else if (request.method === \"reject\") {\n logger.debug(`User rejected the request`)\n await Promise.all(this.onRejectCallbacks[topic].map((callback) => callback()))\n } else if (request.method === \"proof\") {\n logger.debug(`User generated proof`)\n this.topicToProofs[topic].push(request.params)\n await Promise.all(\n this.onProofGeneratedCallbacks[topic].map((callback) => callback(request.params)),\n )\n // If the results were received before all the proofs were generated,\n // we can handle the result now\n if (\n this.topicToResults[topic] &&\n request.params.total ===\n this.topicToProofs[topic].length + this.topicToFailedProofCount[topic]\n ) {\n await this.handleResult(topic)\n }\n } else if (request.method === \"done\") {\n logger.debug(`User sent the query result`)\n this.topicToResults[topic] = formatQueryResultDates(request.params)\n // Make sure all the proofs have been received, otherwise we'll handle the result later\n // once the proofs have all been received\n if (\n this.topicToProofs[topic].length > 0 &&\n this.topicToProofs[topic].length + this.topicToFailedProofCount[topic] ===\n this.topicToProofs[topic][0].total\n ) {\n await this.handleResult(topic)\n }\n } else if (request.method === \"error\") {\n const error = request.params.error\n if (error && error === \"This ID is not supported yet\") {\n // This means the user has an ID that is not supported yet\n // So we won't receive any proofs and we can handle the result now\n if (this.topicToResults[topic]) {\n await this.handleResult(topic)\n }\n } else if (error && error.startsWith(\"Cannot generate proof\")) {\n // This means one of the disclosure proofs failed to be generated\n // So we need to keep track of the failed proof count\n this.topicToFailedProofCount[topic] += 1\n // If the expected proof count is now equal to the number of proofs received\n // and the results were received, we can handle the result now\n if (\n this.topicToResults[topic] &&\n this.topicToProofs[topic].length > 0 &&\n this.topicToProofs[topic].length + this.topicToFailedProofCount[topic] ===\n this.topicToProofs[topic][0].total\n ) {\n await this.handleResult(topic)\n }\n }\n await Promise.all(this.onErrorCallbacks[topic].map((callback) => callback(error)))\n }\n }\n\n private assertNotPolicyLocked(topic: string, method: string) {\n if (this.topicToPolicy[topic]) {\n throw new Error(\n `Cannot call .${method}() on a policy-driven request. The query for policy '${this.topicToPolicy[topic].id}' is immutable.`,\n )\n }\n }\n\n private getZkPassportRequest<T extends \"online\" | \"offline\" = \"online\">(\n topic: string,\n ): QueryBuilder<T> {\n return {\n eq: <T extends IDCredential>(key: T, value: IDCredentialValue<T>) => {\n this.assertNotPolicyLocked(topic, \"eq\")\n if (key === \"issuing_country\" || key === \"nationality\") {\n value = normalizeCountry(value as CountryName) as IDCredentialValue<T>\n }\n generalCompare(\"eq\", key, value, topic, this.topicToConfig)\n return this.getZkPassportRequest(topic)\n },\n gte: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n this.assertNotPolicyLocked(topic, \"gte\")\n numericalCompare(\"gte\", key, value, topic, this.topicToConfig)\n if (key === \"age\" && ((value as number) < 1 || (value as number) >= 100)) {\n throw new Error(\"Age must be between 1 and 99 (inclusive)\")\n }\n return this.getZkPassportRequest(topic)\n },\n gt: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n this.assertNotPolicyLocked(topic, \"gt\")\n numericalCompare(\"gt\", key, value, topic, this.topicToConfig)\n return this.getZkPassportRequest(topic)\n },\n lte: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n this.assertNotPolicyLocked(topic, \"lte\")\n numericalCompare(\"lte\", key, value, topic, this.topicToConfig)\n return this.getZkPassportRequest(topic)\n },\n lt: <T extends NumericalIDCredential>(key: T, value: IDCredentialValue<T>) => {\n this.assertNotPolicyLocked(topic, \"lt\")\n numericalCompare(\"lt\", key, value, topic, this.topicToConfig)\n return this.getZkPassportRequest(topic)\n },\n range: <T extends NumericalIDCredential>(\n key: T,\n start: IDCredentialValue<T>,\n end: IDCredentialValue<T>,\n ) => {\n this.assertNotPolicyLocked(topic, \"range\")\n rangeCompare(key, [start, end], topic, this.topicToConfig)\n return this.getZkPassportRequest(topic)\n },\n in: <T extends \"nationality\" | \"issuing_country\">(key: T, value: IDCredentialValue<T>[]) => {\n this.assertNotPolicyLocked(topic, \"in\")\n value = value.map((v) => normalizeCountry(v as CountryName)) as IDCredentialValue<T>[]\n generalCompare(\"in\", key, value, topic, this.topicToConfig)\n return this.getZkPassportRequest(topic)\n },\n out: <T extends \"nationality\" | \"issuing_country\">(key: T, value: IDCredentialValue<T>[]) => {\n this.assertNotPolicyLocked(topic, \"out\")\n value = value.map((v) => normalizeCountry(v as CountryName)) as IDCredentialValue<T>[]\n generalCompare(\"out\", key, value, topic, this.topicToConfig)\n return this.getZkPassportRequest(topic)\n },\n disclose: (key: DisclosableIDCredential) => {\n this.assertNotPolicyLocked(topic, \"disclose\")\n this.topicToConfig[topic][key] = {\n ...this.topicToConfig[topic][key],\n disclose: true,\n }\n return this.getZkPassportRequest(topic)\n },\n bind: <T extends keyof BoundData>(\n key: T,\n value: T extends \"chain\"\n ? SupportedChain\n : T extends \"user_address\"\n ? `0x${string}`\n : string | undefined,\n ) => {\n this.topicToConfig[topic].bind = {\n ...this.topicToConfig[topic].bind,\n [key]: value,\n }\n return this.getZkPassportRequest(topic)\n },\n sanctions: (\n countries: SanctionsCountries = \"all\",\n lists: SanctionsLists = \"all\",\n options: { strict?: boolean } = { strict: false },\n ) => {\n this.assertNotPolicyLocked(topic, \"sanctions\")\n this.topicToConfig[topic].sanctions = {\n ...this.topicToConfig[topic].sanctions,\n countries,\n // TODO: enable this once the circuits support custom lists\n /*countries === \"all\"\n ? \"all\"\n : Array.isArray(countries)\n ? ([\n ...(this.topicToConfig[topic].sanctions?.countries ?? []),\n ...countries,\n ] as SanctionsCountries)\n : ([\n ...(this.topicToConfig[topic].sanctions?.countries ?? []),\n countries,\n ] as SanctionsCountries),*/\n lists,\n // TODO: enable this once the circuits support custom lists\n /*lists === \"all\"\n ? \"all\"\n : Array.isArray(lists)\n ? [...(this.topicToConfig[topic].sanctions?.lists ?? []), ...lists]\n : [...(this.topicToConfig[topic].sanctions?.lists ?? []), lists],*/\n strict: options.strict ?? false,\n }\n return this.getZkPassportRequest(topic)\n },\n facematch: (mode: FacematchMode = \"strict\") => {\n this.assertNotPolicyLocked(topic, \"facematch\")\n this.topicToConfig[topic].facematch = {\n mode,\n }\n return this.getZkPassportRequest(topic)\n },\n raw: (query: Query) => {\n this.assertNotPolicyLocked(topic, \"raw\")\n const { policy, bind, ...conditions } = query\n if (policy) {\n if (Object.keys(conditions).length > 0) {\n throw new Error(\"A query with `policy` cannot also carry conditions (bind is allowed).\")\n }\n this.getZkPassportRequest(topic).policy(policy)\n if (bind) this.topicToConfig[topic].bind = bind\n } else {\n this.topicToConfig[topic] = query\n }\n return this.getZkPassportRequest(topic)\n },\n policy: (id: string) => {\n this.assertCanApplyPolicy(topic, id)\n if (!this.dashboardConfig) {\n if (this.dashboardConfigError) throw this.dashboardConfigError\n throw new Error(\n `${this.domain} is not set up for ZKPassport verification. If this is your site, ` +\n `register the domain at https://dashboard.zkpassport.id.`,\n )\n }\n const policy = this.findPolicy(this.dashboardConfig, id)\n // Copy the query: the policy object is reused across requests, and a\n // later .bind() writes into it\n const { bind: _, ...policyQuery } = policy.query\n this.topicToConfig[topic] = policyQuery\n const svc = this.topicToService[topic]\n if (svc) {\n if (!this.topicToCallerPurpose[topic]) {\n svc.purpose = policy.purpose || DEFAULT_PURPOSE\n }\n if (!svc.scope) {\n svc.scope = policy.id\n }\n svc.policyId = policy.id\n }\n this.topicToPolicy[topic] = {\n id: policy.id,\n proofStorageEnabled: policy.proofStorageEnabled === true,\n }\n return this.getZkPassportRequest(topic)\n },\n done: (() => {\n this.topicToFailedProofCount[topic] = 0\n // Expose document_type if any fields are disclosed\n this.topicToConfig[topic] = withDocumentType(this.topicToConfig[topic])\n if (topic === \"offline-query\") {\n const query = this.topicToConfig[topic]\n delete this.topicToConfig[topic]\n delete this.topicToPolicy[topic]\n return { query }\n }\n\n const localConfig = this.topicToLocalConfig[topic]\n const query = this.topicToConfig[topic]\n const hasFaceMatch = !!query.facematch\n const hasStrictFacematch = !!query.facematch && query.facematch?.mode === \"strict\"\n\n // If nullifier type wasn't explicitly set, default to SALTED only for strict facematch\n // if (localConfig.uniqueIdentifierType === undefined) {\n // if (hasStrictFacematch) {\n // localConfig.uniqueIdentifierType = NullifierType.SALTED\n // if (!localConfig.oprfKeyId) {\n // localConfig.oprfKeyId = OPRF_DEFAULT_KEY_ID\n // }\n // }\n // }\n\n // Validate: SALTED nullifier requires strict facematch\n if (localConfig.uniqueIdentifierType === NullifierType.SALTED) {\n if ((localConfig.devMode === false && !hasStrictFacematch) || !hasFaceMatch) {\n throw new Error(\n \"Salted nullifier requires strict facematch. Add .facematch('strict') to your query or remove the salted nullifier option.\",\n )\n }\n }\n\n return {\n url: this._getUrl(topic),\n query: this.topicToConfig[topic],\n requestId: topic,\n policy: this.topicToPolicy[topic]?.id,\n onRequestReceived: (callback: () => void) =>\n this.onRequestReceivedCallbacks[topic].push(callback),\n onGeneratingProof: (callback: () => void) =>\n this.onGeneratingProofCallbacks[topic].push(callback),\n onBridgeConnect: (callback: () => void) =>\n this.onBridgeConnectCallbacks[topic].push(callback),\n onBridgeConnectionLost: (callback: () => void) =>\n this.onBridgeConnectionLostCallbacks[topic].push(callback),\n onProofGenerated: (callback: (proof: ProofResult) => void) =>\n this.onProofGeneratedCallbacks[topic].push(callback),\n onSuccess: (callback: (response: RequestSuccess) => OnSuccessVerdict) =>\n this.onSuccessCallbacks[topic].push(callback),\n onResult: (\n callback: (response: {\n uniqueIdentifier: string | undefined\n uniqueIdentifierType: NullifierType | undefined\n verified: boolean\n verificationMethod?: VerificationMethod\n result: QueryResult\n queryResultErrors?: Partial<QueryResultErrors>\n proofs: ProofResult[]\n sdkInstance: ZKPassport\n }) => void,\n ) => {\n warnOnResultDeprecated()\n this.onResultCallbacks[topic].push(callback)\n },\n onReject: (callback: () => void) => this.onRejectCallbacks[topic].push(callback),\n onError: (callback: (error: string) => void) =>\n this.onErrorCallbacks[topic].push(callback),\n isBridgeConnected: () => this.topicToBridge[topic].isBridgeConnected(),\n requestReceived: () => this.topicToRequestReceived[topic] === true,\n }\n }) as () => T extends \"online\" ? QueryBuilderResult : OfflineQueryBuilderResult,\n }\n }\n\n private async getDashboardConfig(): Promise<DashboardConfig | null> {\n if (this.dashboardConfig) return this.dashboardConfig\n if (!this.dashboardConfigPromise) {\n this.dashboardConfigPromise = this.fetchDashboardConfig()\n .then((c) => {\n this.dashboardConfig = c\n return c\n })\n .catch((e) => {\n this.dashboardConfigPromise = null\n throw e\n })\n }\n return this.dashboardConfigPromise\n }\n\n // Returns null when the domain is not registered with the dashboard.\n // That answer gets cached like a normal config; only failed requests are retried.\n private async fetchDashboardConfig(): Promise<DashboardConfig | null> {\n const url = `${DASHBOARD_API_BASE_URL}/public/project?domain=${encodeURIComponent(this.domain)}`\n let response: Response\n try {\n response = await fetch(url, { signal: AbortSignal.timeout(10000) })\n } catch (e) {\n throw new Error(\n `Failed to fetch dashboard config for domain '${this.domain}': ${(e as Error).message}`,\n )\n }\n if (!response.ok) {\n throw new Error(\n `Failed to fetch dashboard config for domain '${this.domain}': ${response.status} ${response.statusText}`,\n )\n }\n const config = (await response.json()) as DashboardConfig\n if (config && config.project === null) {\n return null\n }\n if (!config || !config.project || !Array.isArray(config.policies)) {\n throw new Error(`Invalid dashboard config response for domain '${this.domain}'`)\n }\n return config\n }\n\n private findPolicy(config: DashboardConfig, policyId: string): Policy {\n const policy = config.policies.find((p) => p.id === policyId)\n if (!policy) {\n throw new Error(\n `Policy '${policyId}' not found for domain '${this.domain}'. The dashboard returned ${config.policies.length} policies for this domain.`,\n )\n }\n if (!policy.query || typeof policy.query !== \"object\") {\n throw new Error(\n `Invalid policy '${policyId}' for domain '${this.domain}': missing query object.`,\n )\n }\n return policy\n }\n\n private assertCanApplyPolicy(topic: string, id: string): void {\n if (typeof id !== \"string\" || id.length === 0) {\n throw new Error(\".policy() requires a non-empty string id.\")\n }\n if (this.topicToPolicy[topic]) {\n throw new Error(\n `Cannot call .policy() more than once on a request (already set to '${this.topicToPolicy[topic].id}').`,\n )\n }\n if (Object.keys(this.topicToConfig[topic]).length > 0) {\n throw new Error(\n \"Cannot combine .policy() with builder methods like .gte()/.disclose()/etc. Call .policy() first; only .bind() may follow it.\",\n )\n }\n }\n\n /**\n * @notice Create a new request. To apply a policy, chain `.policy('<id>')` on\n * the returned builder; a policy locks the query.\n * @param name Your service name. Defaults to the dashboard branding, then the domain.\n * @param logo Your service logo. Defaults to the dashboard branding.\n * @param purpose Explanation shown to the user. Defaults to the policy's purpose (if any), then a generic message.\n * @param scope Use-case scope (drives the nullifier). Defaults to the policy id (if any), then the domain.\n * @param projectID The project ID of your service\n * @param validity How many seconds ago the proof checking the expiry date of the ID should have been generated\n * @param mode The proof mode (e.g. \"fast\" / \"compressed\").\n * @param devMode Whether to enable dev mode. This will allow you to verify mock proofs (i.e. from ZKR)\n * @param verifierMode How the received proofs are verified: \"local\", \"api\" or \"auto\" (default).\n * @param keyPairOverride A keypair from {@link getRequestKeyPair}, which keeps the request ID and bridge topic.\n * @param replayMissedMessages Redelivers what was already sent on this topic, for a request resumed on a new page.\n * @param config Settings for verifying the received proofs, see {@link VerificationConfig}.\n * @param allowedVerificationMethods The credentials your service accepts: tiers and/or exact schemes,\n * see {@link AllowedVerificationMethod}. Defaults to signed credentials only (tier 1); an ID verified\n * another way is refused by the app before proving and by `verify()` after.\n * @returns The query builder object.\n */\n public async request({\n name,\n logo,\n purpose,\n scope,\n projectID,\n mode,\n validity,\n devMode,\n uniqueIdentifierType,\n oprfKeyId,\n topicOverride,\n keyPairOverride,\n replayMissedMessages,\n cloudProverUrl,\n bridgeUrl,\n returnDeepLink,\n verifierMode,\n config,\n overrides,\n allowedVerificationMethods,\n }: {\n name?: string\n logo?: string\n purpose?: string\n scope?: string\n mode?: ProofMode\n projectID?: string\n validity?: number\n devMode?: boolean\n uniqueIdentifierType?: RequestedNullifierType\n oprfKeyId?: string\n topicOverride?: string\n keyPairOverride?: KeyPair\n replayMissedMessages?: boolean\n cloudProverUrl?: string\n bridgeUrl?: string\n returnDeepLink?: string\n verifierMode?: VerifierMode\n config?: VerificationConfig\n /** `appClip` allows the popup to send a chip-only request to the no-install App Clip lane */\n overrides?: { appClip?: boolean }\n allowedVerificationMethods?: AllowedVerificationMethod[]\n }): Promise<QueryBuilder> {\n if (topicOverride === \"offline-query\") {\n throw new Error(\"You cannot override the topic with 'offline-query'\")\n }\n // Rejects unknown entries now rather than in the app\n if (allowedVerificationMethods) serializeAllowedVerificationMethods(allowedVerificationMethods)\n\n if (oprfKeyId && uniqueIdentifierType === NullifierType.NONE) {\n throw new Error(\n \"An OPRF key cannot be used with the NONE unique identifier type. Remove the oprfKeyId option or use the SALTED type.\",\n )\n }\n\n let dashboardConfig: DashboardConfig | null = null\n try {\n dashboardConfig = await this.getDashboardConfig()\n this.dashboardConfigError = null\n } catch (e) {\n this.dashboardConfigError = e as Error\n }\n\n const bridge = await Bridge.create({\n keyPair: keyPairOverride,\n bridgeId: topicOverride,\n bridgeUrl,\n replayFrom: replayMissedMessages ? 1 : undefined,\n })\n\n const topic = bridge.connection.getBridgeId()\n\n this.topicToConfig[topic] = {}\n this.topicToCallerPurpose[topic] = purpose\n this.topicToService[topic] = {\n name: name || dashboardConfig?.project?.name || this.domain,\n logo: logo || dashboardConfig?.project?.logoUrl || \"\",\n purpose: purpose || DEFAULT_PURPOSE,\n scope,\n projectID,\n cloudProverUrl,\n bridgeUrl,\n }\n this.topicToProofs[topic] = []\n this.topicToLocalConfig[topic] = {\n validity: validity || DEFAULT_VALIDITY,\n mode: mode || \"fast\",\n devMode: devMode ?? false,\n uniqueIdentifierType: oprfKeyId ? NullifierType.SALTED : uniqueIdentifierType,\n oprfKeyId: oprfKeyId ?? null,\n returnDeepLink,\n verifierMode,\n config,\n appClip: overrides?.appClip ?? false,\n allowedVerificationMethods,\n }\n\n this.onRequestReceivedCallbacks[topic] = []\n this.onGeneratingProofCallbacks[topic] = []\n this.onBridgeConnectCallbacks[topic] = []\n this.onBridgeConnectionLostCallbacks[topic] = []\n this.onProofGeneratedCallbacks[topic] = []\n this.onSuccessCallbacks[topic] = []\n this.onResultCallbacks[topic] = []\n this.onRejectCallbacks[topic] = []\n this.onErrorCallbacks[topic] = []\n\n this.topicToPublicKey[topic] = bridge.getPublicKey()\n\n this.topicToBridge[topic] = bridge\n\n bridge.onConnect(async (reconnection: boolean) => {\n logger.debug(\"Bridge connected\")\n logger.debug(\"Is reconnection:\", reconnection)\n await Promise.all(this.onBridgeConnectCallbacks[topic].map((callback) => callback()))\n })\n bridge.onDisconnect(async (event) => {\n if (event.wasIntentionalClose || event.willReconnect) return\n logger.debug(\"Bridge connection lost\")\n await Promise.all(this.onBridgeConnectionLostCallbacks[topic].map((callback) => callback()))\n })\n bridge.onSecureChannelEstablished(async () => {\n logger.debug(\"Secure channel established\")\n await Promise.all(this.onRequestReceivedCallbacks[topic].map((callback) => callback()))\n })\n // eslint-disable-next-line\n bridge.onSecureMessage(async (message: any) => {\n logger.debug(\"Received message:\", message)\n try {\n await this.handleEncryptedMessage(topic, message)\n } catch (reason) {\n logger.error(\"Failed to handle a bridge message:\", reason)\n }\n })\n return this.getZkPassportRequest(topic)\n }\n\n /**\n * @notice Create a new offline query\n * Unlike request(), this function does not connect to the bridge.\n * It returns only the query object and no callbacks and no URL.\n * This can be useful to recreate the same query server-side when calling `verify()`\n * to ensure the original query wasn't tampered with.\n * @returns The query builder object.\n */\n public createQuery(): QueryBuilder<\"offline\"> {\n return createOfflineQuery()\n }\n\n /**\n * @notice Verify the proofs received from the mobile app.\n * @param proofs The proofs to verify.\n * @param originalQuery The original query that was sent to the mobile app.\n * @param queryResult The query result to verify against\n * @param validity How many seconds ago the proof checking the expiry date of the ID should have been generated\n * @param scope The scope used in the original request, if any. Proofs generated for a different scope fail verification.\n * @param devMode Whether to enable dev mode. This will allow you to verify mock proofs (i.e. from ZKR)\n * @param writingDirectory The directory (e.g. `./tmp`) where the necessary temporary artifacts for verification are written to.\n * It should only be needed when running the `verify` function on a server with restricted write access (e.g. Vercel)\n * @param oprfKeyId The OPRF key id used in the original request, if any.\n * @param uniqueIdentifierType The unique identifier type requested in the original request, if any.\n * Proofs using a different type fail verification.\n * @param verifierMode \"local\" verifies with the verifier bundled in this SDK, \"api\" with the\n * ZKPassport verifier API, and \"auto\" (default) verifies locally but defers to the API when\n * the local result is not verified — e.g. proofs from a newer bb version than this SDK supports.\n * @param config Verification settings such as the RPC URL, see {@link VerificationConfig}.\n * @param allowedVerificationMethods The credentials your service accepts, see {@link AllowedVerificationMethod}.\n * Defaults to signed credentials only (tier 1).\n * @returns An object containing the unique identifier associated to the user\n * and a boolean indicating whether the proofs were successfully verified.\n */\n public async verify({\n proofs,\n originalQuery,\n queryResult,\n validity,\n scope,\n devMode = false,\n writingDirectory,\n oprfKeyId,\n uniqueIdentifierType,\n verifierMode = \"auto\",\n config,\n allowedVerificationMethods,\n }: {\n proofs: Array<ProofResult>\n originalQuery: Query\n queryResult: QueryResult\n validity?: number\n scope?: string\n devMode?: boolean\n writingDirectory?: string\n oprfKeyId?: string\n uniqueIdentifierType?: RequestedNullifierType\n verifierMode?: VerifierMode\n config?: VerificationConfig\n allowedVerificationMethods?: AllowedVerificationMethod[]\n }): Promise<VerificationResult> {\n if (!originalQuery || !queryResult) {\n throw new Error(\"verify() requires `originalQuery` and `queryResult`\")\n }\n // Expose document_type if any fields are disclosed\n originalQuery = withDocumentType(originalQuery)\n const notVerified: VerificationResult = {\n uniqueIdentifier: undefined,\n uniqueIdentifierType: undefined,\n verified: false,\n }\n // If no proofs were generated, the results can't be trusted.\n // We still return it but verified will be false\n if (!proofs || proofs.length === 0) {\n return notVerified\n }\n const params = {\n proofs,\n originalQuery,\n queryResult,\n validity,\n scope,\n devMode,\n oprfKeyId,\n allowedVerificationMethods,\n }\n const localParams = { ...params, writingDirectory, config }\n const apiParams = { ...params, domain: this.domain }\n const requestedType = oprfKeyId ? NullifierType.SALTED : uniqueIdentifierType\n\n let result: VerificationResult\n // The hosted verifier only knows the published circuits, so proofs made with circuits\n // served from elsewhere can only be verified locally, and its errors would be misleading\n if (verifierMode === \"local\" || (verifierMode === \"auto\" && config?.circuitsUrl)) {\n result = await this.verifyLocally(localParams)\n } else if (verifierMode === \"api\") {\n result = (await verifyWithVerifierApi(apiParams)) ?? notVerified\n } else {\n let localResult: VerificationResult | undefined\n try {\n localResult = await this.verifyLocally(localParams)\n } catch (e) {\n console.warn(\"Local proof verification failed:\", e)\n }\n result = localResult?.verified\n ? localResult\n : ((await verifyWithVerifierApi(apiParams)) ?? localResult ?? notVerified)\n }\n return enforceUniqueIdentifierType(\n enforceVerificationMethodPolicy(result, allowedVerificationMethods),\n requestedType,\n )\n }\n\n private async verifyLocally({\n proofs,\n originalQuery,\n queryResult,\n validity,\n scope,\n devMode = false,\n writingDirectory,\n oprfKeyId,\n config,\n allowedVerificationMethods,\n }: {\n proofs: Array<ProofResult>\n originalQuery: Query\n queryResult: QueryResult\n validity?: number\n scope?: string\n devMode?: boolean\n writingDirectory?: string\n oprfKeyId?: string\n config?: VerificationConfig\n allowedVerificationMethods?: AllowedVerificationMethod[]\n }): Promise<VerificationResult> {\n const formattedResult: QueryResult = formatQueryResultDates(queryResult)\n\n // The version picks the public-input layout and the circuit manifest, so every proof must\n // state the same well-formed one: a proof without it would be read with the layout of\n // circuits made before the verification method existed, as a chip read\n const version = proofs[0]?.version\n if (!isCircuitVersion(version) || proofs.some((proof) => proof.version !== version)) {\n console.warn(\"The proofs must all state the same circuit version\")\n return { uniqueIdentifier: undefined, uniqueIdentifierType: undefined, verified: false }\n }\n\n // Automatically set the writing directory to `/tmp` if it is not provided\n // and the code is not running in the browser\n if (typeof window === \"undefined\" && !writingDirectory) {\n writingDirectory = \"/tmp\"\n }\n // Starts bb only once the public inputs check out and a proof needs it, so rejected proofs and\n // outer EVM proofs, which are verified on chain, never spawn bb\n const bbVerifier = new BBVerifier({ writingDirectory })\n let verified = true\n let uniqueIdentifier: string | undefined\n let uniqueIdentifierType: NullifierType | undefined\n let queryResultErrors: Partial<QueryResultErrors> | undefined = undefined\n let verificationMethod: VerificationMethod | undefined\n try {\n const registryClient = createRegistryClient(\n getChainFromQuery(originalQuery, devMode),\n getRegistryClientOptions(config),\n )\n const {\n isCorrect,\n uniqueIdentifier: uniqueIdentifierFromPublicInputs,\n uniqueIdentifierType: uniqueIdentifierTypeFromPublicInputs,\n queryResultErrors: queryResultErrorsFromPublicInputs,\n verificationMethod: verificationMethodFromPublicInputs,\n } = await PublicInputChecker.checkPublicInputs(\n this.domain,\n proofs,\n originalQuery,\n formattedResult,\n validity,\n scope,\n oprfKeyId,\n devMode,\n registryClient,\n allowedVerificationMethods,\n )\n verificationMethod = verificationMethodFromPublicInputs\n uniqueIdentifier = uniqueIdentifierFromPublicInputs\n uniqueIdentifierType = uniqueIdentifierTypeFromPublicInputs\n verified = isCorrect\n queryResultErrors = isCorrect ? undefined : queryResultErrorsFromPublicInputs\n if (\n (uniqueIdentifierType === NullifierType.SALTED_MOCK ||\n uniqueIdentifierType === NullifierType.NON_SALTED_MOCK) &&\n !devMode\n ) {\n // If the unique identifier type is a mock nullifier and it is not in dev mode,\n // the proofs are considered invalid as these are mock proofs only meant\n // for testing purposes\n verified = false\n console.warn(\n \"You are trying to verify a mock proof. This is only allowed in dev mode. To enable dev mode, set the `devMode` parameter to `true` in the request function parameters.\",\n )\n }\n // Only proceed with the proof verification if the public inputs are correct\n if (verified) {\n const circuitManifest = await registryClient.getCircuitManifest(undefined, {\n // We assume all proofs have the same version\n version: proofs[0].version,\n })\n for (const proof of proofs) {\n const isOuterEVM = proof.name?.startsWith(\"outer_evm_\")\n const proofName = proof.name!\n const hostedPackagedCircuit = await registryClient.getPackagedCircuit(\n proofName,\n circuitManifest,\n // TODO: set to always validate when the issue is vkey hash calculation is fixed\n { validate: !isOuterEVM },\n )\n if (isOuterEVM) {\n verified = await SolidityVerifier.verify({\n proof,\n rpcUrl: registryClient.getRpcUrl(),\n validityPeriodInSeconds: validity,\n domain: this.domain,\n scope,\n devMode,\n })\n } else {\n verified = await bbVerifier.verify(proof, hostedPackagedCircuit)\n }\n if (!verified) {\n // Break the loop if the proof is not valid\n // and don't bother checking the other proofs\n break\n }\n }\n }\n } finally {\n // Always release the bb.js instance, or its worker threads keep the process alive\n await bbVerifier.destroy()\n }\n\n // If the proofs are not verified, we don't return the unique identifier\n uniqueIdentifier = verified ? uniqueIdentifier : undefined\n uniqueIdentifierType = verified ? uniqueIdentifierType : undefined\n return {\n uniqueIdentifier,\n uniqueIdentifierType,\n verified,\n queryResultErrors,\n verificationMethod,\n }\n }\n\n public getSolidityVerifierDetails(): {\n address: `0x${string}`\n functionName: string\n abi: {\n type: \"function\" | \"event\" | \"constructor\"\n name: string\n inputs: { name: string; type: string; internalType: string }[]\n outputs: { name: string; type: string; internalType: string }[]\n }[]\n } {\n return SolidityVerifier.getDetails()\n }\n\n public getSolidityVerifierParameters({\n proof,\n validityPeriodInSeconds = DEFAULT_VALIDITY,\n domain,\n scope,\n devMode = false,\n }: {\n proof: ProofResult\n validityPeriodInSeconds?: number\n domain?: string\n scope?: string\n devMode?: boolean\n }) {\n return SolidityVerifier.getParameters({\n proof,\n validityPeriodInSeconds,\n domain: domain ?? this.domain,\n scope,\n devMode,\n })\n }\n\n private _getUrl(requestId: string) {\n const base64Config = Buffer.from(JSON.stringify(this.topicToConfig[requestId])).toString(\n \"base64\",\n )\n const base64Service = Buffer.from(JSON.stringify(this.topicToService[requestId])).toString(\n \"base64\",\n )\n const pubkey = this.topicToPublicKey[requestId]\n // The timestamp is the current time minus the validity period\n // essentially, the data integrity check proof needs to have been generated after the timestamp\n const timestamp = Math.floor(Date.now() / 1000) - this.topicToLocalConfig[requestId].validity\n const nullifierType = this.topicToLocalConfig[requestId].uniqueIdentifierType\n const oprfKeyId = this.topicToLocalConfig[requestId].oprfKeyId\n const returnDeepLink = this.topicToLocalConfig[requestId].returnDeepLink\n // The popup moves a request to the App Clip lane (`/c`) when its policy accepts chip reads\n // only and `overrides.appClip` allows it; the SDK's own URL stays on `/r`\n let url = `https://zkpassport.id/r?d=${this.domain}&t=${requestId}&c=${encodeURIComponent(base64Config)}&s=${encodeURIComponent(base64Service)}&p=${pubkey}&m=${this.topicToLocalConfig[requestId].mode}&v=${VERSION}&dt=${timestamp}&dev=${this.topicToLocalConfig[requestId].devMode ? \"1\" : \"0\"}`\n if (nullifierType != null) {\n url += `&nt=${nullifierType}`\n }\n if (oprfKeyId) {\n url += `&oprf_k=${oprfKeyId}`\n }\n if (returnDeepLink) {\n url += `&r=${encodeURIComponent(returnDeepLink)}`\n }\n const allowedVerificationMethods = this.topicToLocalConfig[requestId].allowedVerificationMethods\n if (allowedVerificationMethods) {\n url += `&ac=${serializeAllowedVerificationMethods(allowedVerificationMethods)}`\n }\n return url\n }\n\n /**\n * @notice Returns the URL of the request.\n * @param requestId The request ID.\n * @returns The URL of the request.\n */\n public getUrl(requestId: string) {\n return this._getUrl(requestId)\n }\n\n /**\n * @notice Returns the resolved service details (name, logo, purpose) shown to the\n * user for a pending request, including branding resolved from the dashboard config.\n * @param requestId The request ID.\n */\n public getServiceDetails(requestId: string): Service | undefined {\n return this.topicToService[requestId]\n }\n\n /**\n * @notice Returns the bridge keypair of a request. A request ID is its public key, so passing the\n * keypair back as `keyPairOverride` rebuilds the same request on the same bridge topic.\n * @param requestId The request ID.\n * @returns The keypair, or undefined once the request has been cancelled.\n */\n public getRequestKeyPair(requestId: string): KeyPair | undefined {\n return this.topicToBridge[requestId]?.getKeyPair()\n }\n\n /**\n * @notice Cancels a request by closing the WebSocket connection and deleting the associated data.\n * @param requestId The request ID.\n */\n public cancelRequest(requestId: string) {\n if (this.topicToBridge[requestId]) {\n this.topicToBridge[requestId].close()\n delete this.topicToBridge[requestId]\n }\n delete this.topicToPublicKey[requestId]\n delete this.topicToConfig[requestId]\n delete this.topicToLocalConfig[requestId]\n delete this.topicToProofs[requestId]\n delete this.topicToFailedProofCount[requestId]\n delete this.topicToResults[requestId]\n delete this.topicToPolicy[requestId]\n this.onRequestReceivedCallbacks[requestId] = []\n this.onGeneratingProofCallbacks[requestId] = []\n this.onBridgeConnectCallbacks[requestId] = []\n this.onBridgeConnectionLostCallbacks[requestId] = []\n this.onProofGeneratedCallbacks[requestId] = []\n this.onSuccessCallbacks[requestId] = []\n this.onResultCallbacks[requestId] = []\n this.onRejectCallbacks[requestId] = []\n this.onErrorCallbacks[requestId] = []\n }\n\n /**\n * @notice Clears all requests.\n */\n public clearAllRequests() {\n for (const requestId in this.topicToBridge) {\n this.cancelRequest(requestId)\n }\n }\n}\n"]}