diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index a76c0af1b..edac2becd 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -16,7 +16,7 @@ on: jobs: build: - runs-on: ['self-hosted', 'org', 'ubuntu-22-04'] + runs-on: ['self-hosted', 'selfxyz-org', 'ubuntu-22-04'] steps: - name: Checkout Repository diff --git a/app/android/app/build.gradle b/app/android/app/build.gradle index 382fc1afe..d6dc6cece 100644 --- a/app/android/app/build.gradle +++ b/app/android/app/build.gradle @@ -85,8 +85,8 @@ android { applicationId "com.proofofpassportapp" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 35 - versionName "2.4.4" + versionCode 38 + versionName "2.4.7" externalNativeBuild { cmake { cppFlags += "-fexceptions -frtti -std=c++11" diff --git a/app/ios/Self.xcodeproj/project.pbxproj b/app/ios/Self.xcodeproj/project.pbxproj index c7884f540..18891bbd2 100644 --- a/app/ios/Self.xcodeproj/project.pbxproj +++ b/app/ios/Self.xcodeproj/project.pbxproj @@ -481,7 +481,7 @@ CODE_SIGN_ENTITLEMENTS = OpenPassport/OpenPassportDebug.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 95; + CURRENT_PROJECT_VERSION = 99; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = 5B29R5LYHQ; ENABLE_BITCODE = NO; @@ -596,7 +596,7 @@ "$(PROJECT_DIR)", "$(PROJECT_DIR)/MoproKit/Libs", ); - MARKETING_VERSION = 2.4.3; + MARKETING_VERSION = 2.4.7; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -619,7 +619,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = OpenPassport/OpenPassport.entitlements; - CURRENT_PROJECT_VERSION = 95; + CURRENT_PROJECT_VERSION = 99; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = 5B29R5LYHQ; FRAMEWORK_SEARCH_PATHS = ( @@ -733,7 +733,7 @@ "$(PROJECT_DIR)", "$(PROJECT_DIR)/MoproKit/Libs", ); - MARKETING_VERSION = 2.4.3; + MARKETING_VERSION = 2.4.7; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/app/src/components/Disclosures.tsx b/app/src/components/Disclosures.tsx index e4b6aad12..0d7c53a6c 100644 --- a/app/src/components/Disclosures.tsx +++ b/app/src/components/Disclosures.tsx @@ -43,7 +43,10 @@ export default function Disclosures({ disclosures }: DisclosureProps) { {ORDERED_KEYS.map(key => { const isEnabled = disclosures[key]; - if (!isEnabled) { + if ( + !isEnabled || + (Array.isArray(isEnabled) && isEnabled.length === 0) + ) { return null; } diff --git a/app/src/consts/links.ts b/app/src/consts/links.ts index b2725545d..9f562ede9 100644 --- a/app/src/consts/links.ts +++ b/app/src/consts/links.ts @@ -4,13 +4,11 @@ export const termsUrl = 'https://self.xyz/terms'; export const privacyUrl = 'https://self.xyz/privacy'; -// TODO REAL LINK -export const telegramUrl = 'https://self.xyz/telegram'; +export const telegramUrl = 'https://t.me/self_xyz'; export const gitHubUrl = 'https://github.com/selfxyz/self'; -// TODO real link -export const appStoreUrl = 'https://self.xyz/app-store'; +export const appStoreUrl = 'https://apps.apple.com/app/self-zk/id6478563710'; -// TODO real link -export const playStoreUrl = 'https://self.xyz/play-store'; +export const playStoreUrl = + 'https://play.google.com/store/apps/details?id=com.proofofpassportapp'; diff --git a/app/src/screens/AccountFlow/AccountRecoveryChoiceScreen.tsx b/app/src/screens/AccountFlow/AccountRecoveryChoiceScreen.tsx index 28bccae2d..69b114046 100644 --- a/app/src/screens/AccountFlow/AccountRecoveryChoiceScreen.tsx +++ b/app/src/screens/AccountFlow/AccountRecoveryChoiceScreen.tsx @@ -1,5 +1,6 @@ import React, { useCallback, useState } from 'react'; +import { useNavigation } from '@react-navigation/native'; import { Separator, View, XStack, YStack } from 'tamagui'; import { PrimaryButton } from '../../components/buttons/PrimaryButton'; @@ -12,9 +13,11 @@ import Keyboard from '../../images/icons/keyboard.svg'; import RestoreAccountSvg from '../../images/icons/restore_account.svg'; import { ExpandableBottomLayout } from '../../layouts/ExpandableBottomLayout'; import { useAuth } from '../../stores/authProvider'; +import { loadPassportDataAndSecret } from '../../stores/passportDataProvider'; import { useSettingStore } from '../../stores/settingStore'; import { STORAGE_NAME, useBackupMnemonic } from '../../utils/cloudBackup'; import { black, slate500, slate600, white } from '../../utils/colors'; +import { isUserRegistered } from '../../utils/proving/payload'; interface AccountRecoveryChoiceScreenProps {} @@ -26,6 +29,7 @@ const AccountRecoveryChoiceScreen: React.FC< const { cloudBackupEnabled, toggleCloudBackupEnabled, biometricsAvailable } = useSettingStore(); const { download } = useBackupMnemonic(); + const navigation = useNavigation(); const onRestoreFromCloudNext = useHapticNavigation('AccountVerifiedSuccess'); const onEnterRecoveryPress = useHapticNavigation('RecoverWithPhrase'); @@ -34,11 +38,34 @@ const AccountRecoveryChoiceScreen: React.FC< setRestoring(true); try { const mnemonic = await download(); - await restoreAccountFromMnemonic(mnemonic.phrase); + const result = await restoreAccountFromMnemonic(mnemonic.phrase); + + if (!result) { + console.warn('Failed to restore account'); + navigation.navigate('Launch'); + setRestoring(false); + return; + } + + const passportDataAndSecret = + (await loadPassportDataAndSecret()) as string; + const { passportData, secret } = JSON.parse(passportDataAndSecret); + const isRegistered = await isUserRegistered(passportData, secret); + console.log('User is registered:', isRegistered); + if (!isRegistered) { + console.log( + 'Secret provided did not match a registered passport. Please try again.', + ); + navigation.navigate('Launch'); + setRestoring(false); + return; + } + if (!cloudBackupEnabled) { toggleCloudBackupEnabled(); } onRestoreFromCloudNext(); + setRestoring(false); } catch (e) { console.error(e); setRestoring(false); @@ -63,7 +90,7 @@ const AccountRecoveryChoiceScreen: React.FC< Restore your Self account By continuing, you certify that this passport belongs to you and is - not stolen or forged. + not stolen or forged.{' '} {biometricsAvailable && ( <> Your device doesn't support biometrics or is disabled for apps diff --git a/app/src/screens/AccountFlow/RecoverWithPhraseScreen.tsx b/app/src/screens/AccountFlow/RecoverWithPhraseScreen.tsx index 8c9eea4fc..a938fce02 100644 --- a/app/src/screens/AccountFlow/RecoverWithPhraseScreen.tsx +++ b/app/src/screens/AccountFlow/RecoverWithPhraseScreen.tsx @@ -10,6 +10,7 @@ import { SecondaryButton } from '../../components/buttons/SecondaryButton'; import Description from '../../components/typography/Description'; import Paste from '../../images/icons/paste.svg'; import { useAuth } from '../../stores/authProvider'; +import { loadPassportDataAndSecret } from '../../stores/passportDataProvider'; import { black, slate300, @@ -18,6 +19,7 @@ import { slate700, white, } from '../../utils/colors'; +import { isUserRegistered } from '../../utils/proving/payload'; interface RecoverWithPhraseScreenProps {} @@ -48,10 +50,24 @@ const RecoverWithPhraseScreen: React.FC< if (!result) { console.warn('Failed to restore account'); - // TODO SOMETHING ELSE? + navigation.navigate('Launch'); setRestoring(false); return; } + + const passportDataAndSecret = (await loadPassportDataAndSecret()) as string; + const { passportData, secret } = JSON.parse(passportDataAndSecret); + const isRegistered = await isUserRegistered(passportData, secret); + console.log('User is registered:', isRegistered); + if (!isRegistered) { + console.log( + 'Secret provided did not match a registered passport. Please try again.', + ); + navigation.navigate('Launch'); + setRestoring(false); + return; + } + setRestoring(false); navigation.navigate('AccountVerifiedSuccess'); }, [mnemonic, restoreAccountFromMnemonic]); diff --git a/app/src/screens/HomeScreen.tsx b/app/src/screens/HomeScreen.tsx index 76e28394e..6af604b32 100644 --- a/app/src/screens/HomeScreen.tsx +++ b/app/src/screens/HomeScreen.tsx @@ -111,7 +111,7 @@ const Card = styled(YStack, { flexGrow: 0, backgroundColor: slate800, - borderRadius: 4, + borderRadius: 8, gap: 12, alignItems: 'center', padding: 20, diff --git a/app/src/screens/MockDataScreen.tsx b/app/src/screens/MockDataScreen.tsx index 8de80e7b9..8551eab66 100644 --- a/app/src/screens/MockDataScreen.tsx +++ b/app/src/screens/MockDataScreen.tsx @@ -3,12 +3,11 @@ import { TouchableOpacity } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { useNavigation } from '@react-navigation/native'; -import { ChevronDown, Cpu, Minus, Plus, X } from '@tamagui/lucide-icons'; +import { ChevronDown, Minus, Plus, X } from '@tamagui/lucide-icons'; import { flag } from 'country-emoji'; import getCountryISO2 from 'country-iso-3-to-2'; import { Button, - Fieldset, ScrollView, Separator, Sheet, @@ -21,7 +20,13 @@ import { import { countryCodes } from '../../../common/src/constants/constants'; import { genMockPassportData } from '../../../common/src/utils/passports/genMockPassportData'; -import { usePassport } from '../stores/passportDataProvider'; +import { initPassportDataParsing } from '../../../common/src/utils/passports/passport'; +import ButtonsContainer from '../components/ButtonsContainer'; +import { PrimaryButton } from '../components/buttons/PrimaryButton'; +import { SecondaryButton } from '../components/buttons/SecondaryButton'; +import { BodyText } from '../components/typography/BodyText'; +import { Title } from '../components/typography/Title'; +import { storePassportData } from '../stores/passportDataProvider'; import { borderColor, separatorColor, textBlack, white } from '../utils/colors'; import { buttonTap, selectionChange } from '../utils/haptic'; @@ -42,8 +47,6 @@ const MockDataScreen: React.FC = ({}) => { date.toISOString().slice(8, 10) ).toString(); }; - const { setData } = usePassport(); - const [selectedCountry, setSelectedCountry] = useState('USA'); const [selectedAlgorithm, setSelectedAlgorithm] = useState('rsa sha256'); const [isCountrySheetOpen, setCountrySheetOpen] = useState(false); @@ -60,9 +63,20 @@ const MockDataScreen: React.FC = ({}) => { }; const signatureAlgorithmToStrictSignatureAlgorithm = { - 'rsa sha256': 'rsa_sha256_65537_4096', - 'rsa sha1': 'rsa_sha1_65537_2048', - 'rsapss sha256': 'rsapss_sha256_65537_2048', + 'rsa sha256': ['sha256', 'sha256', 'rsa_sha256_65537_4096'], + 'rsa sha1': ['sha256', 'sha256', 'rsa_sha1_65537_2048'], + 'rsapss sha256': ['sha256', 'sha256', 'rsapss_sha256_65537_2048'], + 'sha256 brainpoolP256r1': [ + 'sha256', + 'sha256', + 'ecdsa_sha384_brainpoolP256r1_256', + ], + 'sha384 brainpoolP384r1': [ + 'sha384', + 'sha384', + 'ecdsa_sha384_brainpoolP384r1_384', + ], + 'sha384 secp384r1': ['sha384', 'sha384', 'ecdsa_sha384_secp384r1_384'], } as const; const handleGenerate = useCallback(async () => { @@ -73,17 +87,21 @@ const MockDataScreen: React.FC = ({}) => { .replace(/[^a-z0-9]/gi, '') .toUpperCase(); await new Promise(resolve => - setTimeout(() => { + setTimeout(async () => { let mockPassportData; + const [hashFunction1, hashFunction2, signatureAlgorithm] = + signatureAlgorithmToStrictSignatureAlgorithm[ + selectedAlgorithm as keyof typeof signatureAlgorithmToStrictSignatureAlgorithm + ]; + if (isInOfacList) { mockPassportData = genMockPassportData( - 'sha1', - 'sha256', - signatureAlgorithmToStrictSignatureAlgorithm[ - selectedAlgorithm as keyof typeof signatureAlgorithmToStrictSignatureAlgorithm - ], + hashFunction1, + hashFunction2, + signatureAlgorithm, selectedCountry as keyof typeof countryCodes, - castDate(-age), + // We disregard the age to stick with Arcangel's birth date + '541007', castDate(expiryYears), randomPassportNumber, 'HENAO MONTOYA', // this name is on the OFAC list @@ -91,19 +109,17 @@ const MockDataScreen: React.FC = ({}) => { ); } else { mockPassportData = genMockPassportData( - 'sha1', - 'sha256', - signatureAlgorithmToStrictSignatureAlgorithm[ - selectedAlgorithm as keyof typeof signatureAlgorithmToStrictSignatureAlgorithm - ], + hashFunction1, + hashFunction2, + signatureAlgorithm, selectedCountry as keyof typeof countryCodes, castDate(-age), castDate(expiryYears), randomPassportNumber, ); } - - setData(mockPassportData); + mockPassportData = initPassportDataParsing(mockPassportData); + await storePassportData(mockPassportData); resolve(null); }, 0), ); @@ -116,171 +132,144 @@ const MockDataScreen: React.FC = ({}) => { const { top, bottom } = useSafeAreaInsets(); return ( - <> - - - Generate passport data - - - - Encryption - - - - - - Nationality - - - + + + + + Generate Passport Data + + Configure the passport data parameters below + + -
- - Age (🎂) - - - - - - {age} yo - - -
- -
- - Passport expires in - - - - - - {expiryYears} years - - -
- - -
- + Encryption + + + + + Nationality + + + + + Age (🎂) + + + + {isInOfacList ? 71 : age} yo + + + + + + + Passport expires in + + + + {expiryYears} years + + + + + + + In OFAC list = ({}) => { > -
- - OFAC list is a list of people who are suspected of being involved in - terrorism or other illegal activities. - -
+ - - - - - These passport data are only for testing purposes. - - + {isInOfacList && ( + + OFAC list is a list of people who are suspected of being involved + in terrorism or other illegal activities. + + )} +
+ + + + + {isGenerating ? ( + + ) : ( + 'Generate Passport Data' + )} + + navigation.goBack()}> + Cancel + + + = ({}) => { - {['rsa sha256', 'rsa sha1', 'rsapss sha256'].map(algorithm => ( + {[ + 'rsa sha256', + 'rsa sha1', + 'rsapss sha256', + 'sha256 brainpoolP256r1', + 'sha384 brainpoolP384r1', + 'sha384 secp384r1', + ].map(algorithm => ( { @@ -415,7 +412,7 @@ const MockDataScreen: React.FC = ({}) => {
- +
); }; diff --git a/app/src/screens/Onboarding/LoadingScreen.tsx b/app/src/screens/Onboarding/LoadingScreen.tsx index 7fdcfb56e..da1e89a47 100644 --- a/app/src/screens/Onboarding/LoadingScreen.tsx +++ b/app/src/screens/Onboarding/LoadingScreen.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useRef, useState } from 'react'; -import { StyleSheet } from 'react-native'; +import { StyleSheet, Text, View } from 'react-native'; import { StaticScreenProps, useNavigation } from '@react-navigation/native'; import LottieView from 'lottie-react-native'; @@ -10,6 +10,7 @@ import successAnimation from '../../assets/animations/loading/success.json'; import useHapticNavigation from '../../hooks/useHapticNavigation'; import { usePassport } from '../../stores/passportDataProvider'; import { ProofStatusEnum, useProofInfo } from '../../stores/proofProvider'; +import analytics from '../../utils/analytics'; import { checkPassportSupported, isPassportNullified, @@ -17,11 +18,13 @@ import { registerPassport, } from '../../utils/proving/payload'; +const { trackEvent } = analytics(); + type LoadingScreenProps = StaticScreenProps<{}>; const LoadingScreen: React.FC = ({}) => { const goToSuccessScreen = useHapticNavigation('AccountVerifiedSuccess'); - const goToErrorScreen = useHapticNavigation('ConfirmBelongingScreen'); + const goToErrorScreen = useHapticNavigation('Launch'); const goToUnsupportedScreen = useHapticNavigation('UnsupportedPassport'); const navigation = useNavigation(); @@ -71,8 +74,12 @@ const LoadingScreen: React.FC = ({}) => { return; } const { passportData, secret } = passportDataAndSecret.data; - const isSupported = checkPassportSupported(passportData); - if (!isSupported) { + const isSupported = await checkPassportSupported(passportData); + if (isSupported.status !== 'passport_supported') { + trackEvent('Passport not supported', { + reason: isSupported.status, + details: isSupported.details, + }); goToUnsupportedScreen(); console.log('Passport not supported'); clearPassportData(); @@ -107,18 +114,27 @@ const LoadingScreen: React.FC = ({}) => { }, []); return ( - + + + + This can take up to one minute, don't close the app + + ); }; const styles = StyleSheet.create({ + container: { + flex: 1, + position: 'relative', + }, animation: { position: 'absolute', top: 0, @@ -126,6 +142,17 @@ const styles = StyleSheet.create({ right: 0, bottom: 0, }, + warningText: { + position: 'absolute', + bottom: 40, + left: 0, + right: 0, + textAlign: 'center', + color: 'white', + fontSize: 16, + fontWeight: '500', + padding: 16, + }, }); export default LoadingScreen; diff --git a/app/src/screens/Onboarding/PassportCameraScreen.tsx b/app/src/screens/Onboarding/PassportCameraScreen.tsx index ec7581d89..e6296f08b 100644 --- a/app/src/screens/Onboarding/PassportCameraScreen.tsx +++ b/app/src/screens/Onboarding/PassportCameraScreen.tsx @@ -1,4 +1,4 @@ -import React, { useCallback } from 'react'; +import React, { useCallback, useRef } from 'react'; import { Platform, StyleSheet } from 'react-native'; import { useIsFocused, useNavigation } from '@react-navigation/native'; @@ -32,16 +32,33 @@ const PassportCameraScreen: React.FC = ({}) => { const isFocused = useIsFocused(); const store = useUserStore(); + // Add a ref to track when the camera screen is mounted + const scanStartTimeRef = useRef(Date.now()); + const onPassportRead = useCallback( (error, result) => { + // Calculate scan duration in seconds with exactly 2 decimal places + const scanDurationSeconds = ( + (Date.now() - scanStartTimeRef.current) / + 1000 + ).toFixed(2); + if (error) { console.error(error); + trackEvent('Passport Camera Scan Failed', { + error: error.message || 'Unknown error', + duration_seconds: parseFloat(scanDurationSeconds), + }); //TODO: Add error handling here return; } if (!result) { console.error('No result from passport scan'); + trackEvent('Passport Camera Scan Failed', { + error: 'No result from scan', + duration_seconds: parseFloat(scanDurationSeconds), + }); return; } @@ -63,6 +80,7 @@ const PassportCameraScreen: React.FC = ({}) => { passportNumberLength: passportNumber.length, dateOfBirthLength: formattedDateOfBirth.length, dateOfExpiryLength: formattedDateOfExpiry.length, + duration_seconds: parseFloat(scanDurationSeconds), }); navigation.navigate('PassportCameraTrouble'); return; @@ -78,6 +96,11 @@ const PassportCameraScreen: React.FC = ({}) => { dateOfBirth: formattedDateOfBirth, dateOfExpiry: formattedDateOfExpiry, }); + + trackEvent('Passport Camera Scan Successful', { + duration_seconds: parseFloat(scanDurationSeconds), + }); + navigation.navigate('PassportNFCScan'); }, [store, navigation], diff --git a/app/src/screens/Onboarding/PassportNFCScanScreen.tsx b/app/src/screens/Onboarding/PassportNFCScanScreen.tsx index 33bceaa20..951c059e8 100644 --- a/app/src/screens/Onboarding/PassportNFCScanScreen.tsx +++ b/app/src/screens/Onboarding/PassportNFCScanScreen.tsx @@ -79,19 +79,32 @@ const PassportNFCScanScreen: React.FC = ({}) => { if (isNfcEnabled) { setIsNfcSheetOpen(true); + // Add timestamp when scan starts + const scanStartTime = Date.now(); + try { const scanResponse = await scan({ passportNumber, dateOfBirth, dateOfExpiry, }); - console.log('NFC Scan Successful'); - trackEvent('NFC Scan Successful'); + const scanDurationSeconds = ( + (Date.now() - scanStartTime) / + 1000 + ).toFixed(2); + console.log( + 'NFC Scan Successful - Duration:', + scanDurationSeconds, + 'seconds', + ); + trackEvent('NFC Scan Successful', { + duration_seconds: parseFloat(scanDurationSeconds), + }); + let passportData: PassportData | null = null; let parsedPassportData: PassportData | null = null; try { - const passportData = parseScanResponse(scanResponse); - parsedPassportData = initPassportDataParsing(passportData); + passportData = parseScanResponse(scanResponse); } catch (e: any) { console.error('Parsing NFC Response Unsuccessful'); trackEvent('Parsing NFC Response Unsuccessful', { @@ -99,44 +112,56 @@ const PassportNFCScanScreen: React.FC = ({}) => { }); return; } - - await storePassportData(parsedPassportData); - const passportMetadata = parsedPassportData.passportMetadata!; - trackEvent('Passport Parsed', { - success: true, - data_groups: passportMetadata.dataGroups, - dg1_size: passportMetadata.dg1Size, - dg1_hash_size: passportMetadata.dg1HashSize, - dg1_hash_function: passportMetadata.dg1HashFunction, - dg1_hash_offset: passportMetadata.dg1HashOffset, - dg_padding_bytes: passportMetadata.dgPaddingBytes, - e_content_size: passportMetadata.eContentSize, - e_content_hash_function: passportMetadata.eContentHashFunction, - e_content_hash_offset: passportMetadata.eContentHashOffset, - signed_attr_size: passportMetadata.signedAttrSize, - signed_attr_hash_function: passportMetadata.signedAttrHashFunction, - signature_algorithm: passportMetadata.signatureAlgorithm, - salt_length: passportMetadata.saltLength, - curve_or_exponent: passportMetadata.curveOrExponent, - signature_algorithm_bits: passportMetadata.signatureAlgorithmBits, - country_code: passportMetadata.countryCode, - csca_found: passportMetadata.cscaFound, - csca_hash_function: passportMetadata.cscaHashFunction, - csca_signature_algorithm: passportMetadata.cscaSignatureAlgorithm, - csca_salt_length: passportMetadata.cscaSaltLength, - csca_curve_or_exponent: passportMetadata.cscaCurveOrExponent, - csca_signature_algorithm_bits: - passportMetadata.cscaSignatureAlgorithmBits, - dsc: passportMetadata.dsc, - }); - - // Feels better somehow - await new Promise(resolve => setTimeout(resolve, 1000)); - navigation.navigate('ConfirmBelongingScreen'); + try { + parsedPassportData = initPassportDataParsing(passportData); + const passportMetadata = parsedPassportData.passportMetadata!; + trackEvent('Passport Parsed', { + success: true, + data_groups: passportMetadata.dataGroups, + dg1_size: passportMetadata.dg1Size, + dg1_hash_size: passportMetadata.dg1HashSize, + dg1_hash_function: passportMetadata.dg1HashFunction, + dg1_hash_offset: passportMetadata.dg1HashOffset, + dg_padding_bytes: passportMetadata.dgPaddingBytes, + e_content_size: passportMetadata.eContentSize, + e_content_hash_function: passportMetadata.eContentHashFunction, + e_content_hash_offset: passportMetadata.eContentHashOffset, + signed_attr_size: passportMetadata.signedAttrSize, + signed_attr_hash_function: passportMetadata.signedAttrHashFunction, + signature_algorithm: passportMetadata.signatureAlgorithm, + salt_length: passportMetadata.saltLength, + curve_or_exponent: passportMetadata.curveOrExponent, + signature_algorithm_bits: passportMetadata.signatureAlgorithmBits, + country_code: passportMetadata.countryCode, + csca_found: passportMetadata.cscaFound, + csca_hash_function: passportMetadata.cscaHashFunction, + csca_signature_algorithm: passportMetadata.cscaSignatureAlgorithm, + csca_salt_length: passportMetadata.cscaSaltLength, + csca_curve_or_exponent: passportMetadata.cscaCurveOrExponent, + csca_signature_algorithm_bits: + passportMetadata.cscaSignatureAlgorithmBits, + dsc: passportMetadata.dsc, + }); + await storePassportData(parsedPassportData); + // Feels better somehow + await new Promise(resolve => setTimeout(resolve, 1000)); + navigation.navigate('ConfirmBelongingScreen'); + } catch (e: any) { + console.error('Passport Parsed Failed:', e); + trackEvent('Passport Parsed Failed', { + error: e.message, + }); + return; + } } catch (e: any) { + const scanDurationSeconds = ( + (Date.now() - scanStartTime) / + 1000 + ).toFixed(2); console.error('NFC Scan Unsuccessful:', e); trackEvent('NFC Scan Unsuccessful', { error: e.message, + duration_seconds: parseFloat(scanDurationSeconds), }); if (e.message.includes('InvalidMRZKey')) { @@ -152,6 +177,14 @@ const PassportNFCScanScreen: React.FC = ({}) => { } else if (e.message.includes('UnexpectedError')) { // iOS // Timeout reached, do nothing + } else if ( + e.message.includes('Error: Lost connection to chip on card') + ) { + // android + navigation.navigate('PassportNFCTrouble'); + } else if (e.message.includes('Could not tranceive APDU')) { + // android + navigation.navigate('PassportNFCTrouble'); } else { // TODO: Handle other error types } diff --git a/app/src/screens/ProveFlow/ProofRequestStatusScreen.tsx b/app/src/screens/ProveFlow/ProofRequestStatusScreen.tsx index a6951fb5a..6e6680337 100644 --- a/app/src/screens/ProveFlow/ProofRequestStatusScreen.tsx +++ b/app/src/screens/ProveFlow/ProofRequestStatusScreen.tsx @@ -2,6 +2,7 @@ import React, { useEffect } from 'react'; import { StatusBar, StyleSheet, View } from 'react-native'; import LottieView from 'lottie-react-native'; +import { Spinner } from 'tamagui'; import loadingAnimation from '../../assets/animations/loading/misc.json'; import failAnimation from '../../assets/animations/proof_failed.json'; @@ -22,12 +23,13 @@ import { } from '../../utils/haptic'; const SuccessScreen: React.FC = () => { - const { selectedApp, disclosureStatus } = useProofInfo(); + const { selectedApp, disclosureStatus, cleanSelfApp } = useProofInfo(); const appName = selectedApp?.appName; const goHome = useHapticNavigation('Home'); function onOkPress() { buttonTap(); + cleanSelfApp(); goHome(); } @@ -64,13 +66,16 @@ const SuccessScreen: React.FC = () => { > {getTitle(disclosureStatus)} - + - OK + {disclosureStatus === 'pending' ? : 'OK'} @@ -92,7 +97,7 @@ function getAnimation(status: ProofStatusEnum) { function getTitle(status: ProofStatusEnum) { switch (status) { case 'success': - return 'Identity Verified'; + return 'Proof Verified'; case 'failure': case 'error': return 'Proof Failed'; diff --git a/app/src/screens/ProveFlow/ProveScreen.tsx b/app/src/screens/ProveFlow/ProveScreen.tsx index 93e7c5f29..d705da05e 100644 --- a/app/src/screens/ProveFlow/ProveScreen.tsx +++ b/app/src/screens/ProveFlow/ProveScreen.tsx @@ -44,6 +44,7 @@ const ProveScreen: React.FC = () => { const { selectedApp, resetProof, cleanSelfApp } = useProofInfo(); const { handleProofVerified } = useApp(); const selectedAppRef = useRef(selectedApp); + const isProcessing = useRef(false); const [hasScrolledToBottom, setHasScrolledToBottom] = useState(false); const [scrollViewContentHeight, setScrollViewContentHeight] = useState(0); @@ -106,16 +107,22 @@ const ProveScreen: React.FC = () => { const onVerify = useCallback( async function () { + if (isProcessing.current) { + return; + } + isProcessing.current = true; + resetProof(); buttonTap(); const currentApp = selectedAppRef.current; + try { let timeToNavigateToStatusScreen: NodeJS.Timeout; + const passportDataAndSecret = await getPassportDataAndSecret().catch( (e: Error) => { console.error('Error getPassportDataAndSecret', e); globalSetDisclosureStatus?.(ProofStatusEnum.ERROR); - cleanSelfApp(); }, ); @@ -126,13 +133,13 @@ const ProveScreen: React.FC = () => { if (!passportDataAndSecret) { console.log('No passport data or secret'); globalSetDisclosureStatus?.(ProofStatusEnum.ERROR); - cleanSelfApp(); return; } const { passportData, secret } = passportDataAndSecret.data; const isRegistered = await isUserRegistered(passportData, secret); console.log('isRegistered', isRegistered); + if (!isRegistered) { clearTimeout(timeToNavigateToStatusScreen); console.log( @@ -153,10 +160,11 @@ const ProveScreen: React.FC = () => { currentApp.sessionId, status === ProofStatusEnum.SUCCESS, ); - cleanSelfApp(); } catch (e) { console.log('Error sending VC and disclose payload', e); globalSetDisclosureStatus?.(ProofStatusEnum.ERROR); + } finally { + isProcessing.current = false; } }, [navigate, getPassportDataAndSecret, handleProofVerified, resetProof], diff --git a/app/src/screens/SettingsScreen.tsx b/app/src/screens/SettingsScreen.tsx index 5a38719b0..0e8abf969 100644 --- a/app/src/screens/SettingsScreen.tsx +++ b/app/src/screens/SettingsScreen.tsx @@ -67,12 +67,11 @@ const routes = [ // get the actual type of the routes so we can use in the onMenuPress function so it // doesnt worry about us linking to screens with required props which we dont want to go to anyway -type RouteLinks = (typeof routes)[number][2]; +type RouteLinks = (typeof routes)[number][2] | (typeof DEBUG_MENU)[number][2]; -const DEBUG_MENU: [React.FC, string, RouteOption] = [ - Bug as React.FC, - 'Debug menu', - 'DevSettings', +const DEBUG_MENU: [React.FC, string, RouteOption][] = [ + [Data as React.FC, 'Gen Mock Passport Data', 'CreateMock'], + [Bug as React.FC, 'Debug menu', 'DevSettings'], ]; const social = [ @@ -123,7 +122,7 @@ const SettingsScreen: React.FC = ({}) => { const navigation = useNavigation(); const screenRoutes = useMemo(() => { - return isDevMode ? [...routes, DEBUG_MENU] : routes; + return isDevMode ? [...routes, ...DEBUG_MENU] : routes; }, [isDevMode]); const twoFingerTap = Gesture.Tap() @@ -175,7 +174,7 @@ ${deviceInfo.map(([k, v]) => `${k}=${v}`).join('; ')} break; default: - navigation.navigate(menuRoute); + navigation.navigate(menuRoute as any); break; } }; diff --git a/app/src/stores/appProvider.tsx b/app/src/stores/appProvider.tsx index 907e262a7..5f7fd09cc 100644 --- a/app/src/stores/appProvider.tsx +++ b/app/src/stores/appProvider.tsx @@ -47,6 +47,7 @@ const initSocket = (sessionId: string) => { const socket = io(socketUrl, { path: '/', transports: ['websocket'], + forceNew: true, query: { sessionId, clientType: 'mobile', diff --git a/app/src/stores/authProvider.tsx b/app/src/stores/authProvider.tsx index fe77109f4..cc4ade198 100644 --- a/app/src/stores/authProvider.tsx +++ b/app/src/stores/authProvider.tsx @@ -100,7 +100,17 @@ async function loadOrCreateMnemonic() { service: SERVICE_NAME, }); if (storedMnemonic) { - return storedMnemonic.password; + try { + JSON.parse(storedMnemonic.password); + console.log('Stored mnemonic parsed successfully'); + return storedMnemonic.password; + } catch (e) { + console.log( + 'Error parsing stored mnemonic, old secret format was used', + e, + ); + console.log('Creating a new one'); + } } console.log('No secret found, creating one'); diff --git a/app/src/utils/nfcScannerNew.ts b/app/src/utils/nfcScannerNew.ts index 945ad01df..bc63a17af 100644 --- a/app/src/utils/nfcScannerNew.ts +++ b/app/src/utils/nfcScannerNew.ts @@ -89,7 +89,8 @@ const handleResponseIOS = (response: any) => { signedAttr: signedEContentArray, encryptedDigest: encryptedDigestArray, parsed: false, - }; + documentType: 'passport', + } as PassportData; }; const handleResponseAndroid = (response: any) => { @@ -131,5 +132,6 @@ const handleResponseAndroid = (response: any) => { eContent: JSON.parse(encapContent), signedAttr: JSON.parse(eContent), encryptedDigest: JSON.parse(encryptedDigest), + documentType: 'passport', } as PassportData; }; diff --git a/app/src/utils/proving/inputs.ts b/app/src/utils/proving/inputs.ts new file mode 100644 index 000000000..df3d5441e --- /dev/null +++ b/app/src/utils/proving/inputs.ts @@ -0,0 +1,131 @@ +import { LeanIMT } from '@openpassport/zk-kit-lean-imt'; +import { SMT } from '@openpassport/zk-kit-smt'; +import { poseidon2 } from 'poseidon-lite'; + +import nameAndDobSMTData from '../../../../common/ofacdata/outputs/nameAndDobSMT.json'; +import nameAndYobSMTData from '../../../../common/ofacdata/outputs/nameAndYobSMT.json'; +import passportNoAndNationalitySMTData from '../../../../common/ofacdata/outputs/passportNoAndNationalitySMT.json'; +import { + DEFAULT_MAJORITY, + PASSPORT_ATTESTATION_ID, + attributeToPosition, +} from '../../../../common/src/constants/constants'; +import { EndpointType, SelfApp } from '../../../../common/src/utils/appType'; +import { getCircuitNameFromPassportData } from '../../../../common/src/utils/circuits/circuitsName'; +import { + generateCircuitInputsDSC, + generateCircuitInputsRegister, + generateCircuitInputsVCandDisclose, +} from '../../../../common/src/utils/circuits/generateInputs'; +import { + getCSCATree, + getCommitmentTree, + getDSCTree, +} from '../../../../common/src/utils/trees'; +import { PassportData } from '../../../../common/src/utils/types'; + +export async function generateTeeInputsRegister( + secret: string, + passportData: PassportData, + endpointType: EndpointType, +) { + const serialized_dsc_tree = await getDSCTree(endpointType); + const inputs = generateCircuitInputsRegister( + secret, + passportData, + serialized_dsc_tree, + ); + const circuitName = getCircuitNameFromPassportData(passportData, 'register'); + if (circuitName == null) { + throw new Error('Circuit name is null'); + } + return { inputs, circuitName }; +} + +export async function generateTeeInputsDsc( + passportData: PassportData, + endpointType: EndpointType, +) { + const serialized_csca_tree = await getCSCATree(endpointType); + const inputs = generateCircuitInputsDSC( + passportData.dsc, + serialized_csca_tree, + ); + const circuitName = getCircuitNameFromPassportData(passportData, 'dsc'); + if (circuitName == null) { + throw new Error('Circuit name is null'); + } + return { inputs, circuitName }; +} + +export async function generateTeeInputsVCAndDisclose( + secret: string, + passportData: PassportData, + selfApp: SelfApp, +) { + const { scope, userId, disclosures } = selfApp; + + const selector_dg1 = Array(88).fill('0'); + + Object.entries(disclosures).forEach(([attribute, reveal]) => { + if (['ofac', 'excludedCountries', 'minimumAge'].includes(attribute)) { + return; + } + if (reveal) { + const [start, end] = + attributeToPosition[attribute as keyof typeof attributeToPosition]; + selector_dg1.fill('1', start, end + 1); + } + }); + + const majority = disclosures.minimumAge + ? disclosures.minimumAge.toString() + : DEFAULT_MAJORITY; + const selector_older_than = disclosures.minimumAge ? '1' : '0'; + + const selector_ofac = disclosures.ofac ? 1 : 0; + + const { passportNoAndNationalitySMT, nameAndDobSMT, nameAndYobSMT } = + await getOfacSMTs(); + const serialized_tree = await getCommitmentTree(passportData.documentType); + const tree = LeanIMT.import((a, b) => poseidon2([a, b]), serialized_tree); + console.log('tree', tree); + // const commitment = generateCommitment( + // secret, + // PASSPORT_ATTESTATION_ID, + // passportData, + // ); + // tree.insert(BigInt(commitment)); + // Uncomment to add artificially the commitment to the tree + + const inputs = generateCircuitInputsVCandDisclose( + secret, + PASSPORT_ATTESTATION_ID, + passportData, + scope, + selector_dg1, + selector_older_than, + tree, + majority, + passportNoAndNationalitySMT, + nameAndDobSMT, + nameAndYobSMT, + selector_ofac, + disclosures.excludedCountries ?? [], + userId, + ); + return { inputs, circuitName: 'vc_and_disclose' }; +} + +/*** DISCLOSURE ***/ + +async function getOfacSMTs() { + // TODO: get the SMT from an endpoint + const passportNoAndNationalitySMT = new SMT(poseidon2, true); + passportNoAndNationalitySMT.import(passportNoAndNationalitySMTData); + const nameAndDobSMT = new SMT(poseidon2, true); + nameAndDobSMT.import(nameAndDobSMTData); + const nameAndYobSMT = new SMT(poseidon2, true); + nameAndYobSMT.import(nameAndYobSMTData); + return { passportNoAndNationalitySMT, nameAndDobSMT, nameAndYobSMT }; +} diff --git a/app/src/utils/proving/payload.ts b/app/src/utils/proving/payload.ts index 9cebe80db..15b2e5d30 100644 --- a/app/src/utils/proving/payload.ts +++ b/app/src/utils/proving/payload.ts @@ -1,105 +1,94 @@ import { LeanIMT } from '@openpassport/zk-kit-lean-imt'; -import { SMT } from '@openpassport/zk-kit-smt'; import { poseidon2 } from 'poseidon-lite'; -import nameAndDobSMTData from '../../../../common/ofacdata/outputs/nameAndDobSMT.json'; -import nameAndYobSMTData from '../../../../common/ofacdata/outputs/nameAndYobSMT.json'; -import passportNoAndNationalitySMTData from '../../../../common/ofacdata/outputs/passportNoAndNationalitySMT.json'; import { API_URL, - DEFAULT_MAJORITY, - DEPLOYED_CIRCUITS_DSC, - DEPLOYED_CIRCUITS_REGISTER, PASSPORT_ATTESTATION_ID, - WS_RPC_URL_DSC, - WS_RPC_URL_REGISTER, WS_RPC_URL_VC_AND_DISCLOSE, - attributeToPosition, } from '../../../../common/src/constants/constants'; -import { SelfApp } from '../../../../common/src/utils/appType'; +import { EndpointType, SelfApp } from '../../../../common/src/utils/appType'; import { getCircuitNameFromPassportData } from '../../../../common/src/utils/circuits/circuitsName'; -import { - generateCircuitInputsDSC, - generateCircuitInputsRegister, - generateCircuitInputsVCandDisclose, -} from '../../../../common/src/utils/circuits/generateInputs'; import { generateCommitment, generateNullifier, } from '../../../../common/src/utils/passports/passport'; import { - getCSCATree, getCommitmentTree, getDSCTree, getLeafDscTree, } from '../../../../common/src/utils/trees'; import { PassportData } from '../../../../common/src/utils/types'; import { ProofStatusEnum } from '../../stores/proofProvider'; +import { + generateTeeInputsDsc, + generateTeeInputsRegister, + generateTeeInputsVCAndDisclose, +} from './inputs'; import { sendPayload } from './tee'; -async function generateTeeInputsRegister( - secret: string, +export type PassportSupportStatus = + | 'passport_metadata_missing' + | 'csca_not_found' + | 'registration_circuit_not_supported' + | 'dsc_circuit_not_supported' + | 'passport_supported'; +export async function checkPassportSupported( passportData: PassportData, -) { - const serialized_dsc_tree = await getDSCTree(); - const inputs = generateCircuitInputsRegister( - secret, - passportData, - serialized_dsc_tree, - ); - const circuitName = getCircuitNameFromPassportData(passportData, 'register'); - if (circuitName == null) { - throw new Error('Circuit name is null'); - } - return { inputs, circuitName }; -} - -export function checkPassportSupported(passportData: PassportData) { +): Promise<{ + status: PassportSupportStatus; + details: string; +}> { const passportMetadata = passportData.passportMetadata; if (!passportMetadata) { console.log('Passport metadata is null'); - return false; + return { status: 'passport_metadata_missing', details: passportData.dsc }; } if (!passportMetadata.cscaFound) { console.log('CSCA not found'); - return false; + return { status: 'csca_not_found', details: passportData.dsc }; } const circuitNameRegister = getCircuitNameFromPassportData( passportData, 'register', ); + const deployedCircuits = await getDeployedCircuits(); + console.log('circuitNameRegister', circuitNameRegister); if ( !circuitNameRegister || - !DEPLOYED_CIRCUITS_REGISTER.includes(circuitNameRegister) + !deployedCircuits.REGISTER.includes(circuitNameRegister) ) { - console.log('Circuit not supported:', circuitNameRegister); - return false; + return { + status: 'registration_circuit_not_supported', + details: circuitNameRegister, + }; } const circuitNameDsc = getCircuitNameFromPassportData(passportData, 'dsc'); - if (!circuitNameDsc || !DEPLOYED_CIRCUITS_DSC.includes(circuitNameDsc)) { + if (!circuitNameDsc || !deployedCircuits.DSC.includes(circuitNameDsc)) { console.log('DSC circuit not supported:', circuitNameDsc); - return false; + return { status: 'dsc_circuit_not_supported', details: circuitNameDsc }; } console.log('Passport supported'); - return true; + return { status: 'passport_supported', details: 'null' }; } export async function sendRegisterPayload( passportData: PassportData, secret: string, + circuitDNSMapping: Record, + endpointType: EndpointType, ) { const { inputs, circuitName } = await generateTeeInputsRegister( secret, passportData, + endpointType, ); - console.log('WS_RPC_URL_REGISTER', WS_RPC_URL_REGISTER); await sendPayload( inputs, 'register', circuitName, - 'https', + endpointType, 'https://self.xyz', - WS_RPC_URL_REGISTER, + (circuitDNSMapping as any).REGISTER[circuitName], undefined, { updateGlobalOnSuccess: true, @@ -109,23 +98,12 @@ export async function sendRegisterPayload( ); } -async function generateTeeInputsDsc(passportData: PassportData) { - const serialized_csca_tree = await getCSCATree(); - const inputs = generateCircuitInputsDSC( - passportData.dsc, - serialized_csca_tree, - ); - const circuitName = getCircuitNameFromPassportData(passportData, 'dsc'); - if (circuitName == null) { - throw new Error('Circuit name is null'); - } - return { inputs, circuitName }; -} - async function checkIdPassportDscIsInTree( passportData: PassportData, + dscTree: string, + circuitDNSMapping: Record, + endpointType: EndpointType, ): Promise { - const dscTree = await getDSCTree(); const hashFunction = (a: any, b: any) => poseidon2([a, b]); const tree = LeanIMT.import(hashFunction, dscTree); const leaf = getLeafDscTree( @@ -136,7 +114,11 @@ async function checkIdPassportDscIsInTree( const index = tree.indexOf(BigInt(leaf)); if (index === -1) { console.log('DSC is not found in the tree, sending DSC payload'); - const dscStatus = await sendDscPayload(passportData); + const dscStatus = await sendDscPayload( + passportData, + circuitDNSMapping, + endpointType, + ); if (dscStatus !== ProofStatusEnum.SUCCESS) { console.log('DSC proof failed'); return false; @@ -155,102 +137,35 @@ async function checkIdPassportDscIsInTree( export async function sendDscPayload( passportData: PassportData, + circuitDNSMapping: Record, + endpointType: EndpointType, ): Promise { if (!passportData) { return false; } - const isSupported = checkPassportSupported(passportData); - if (!isSupported) { - console.log('Passport not supported'); - return false; - } - const { inputs, circuitName } = await generateTeeInputsDsc(passportData); - console.log('circuitName', circuitName); + // const isSupported = checkPassportSupported(passportData); + // if (!isSupported) { + // console.log('Passport not supported'); + // return false; + // } + const { inputs, circuitName } = await generateTeeInputsDsc( + passportData, + endpointType, + ); + const dscStatus = await sendPayload( inputs, 'dsc', circuitName, - 'https', + endpointType, 'https://self.xyz', - WS_RPC_URL_DSC, + (circuitDNSMapping.DSC as any)[circuitName], undefined, { updateGlobalOnSuccess: false }, ); return dscStatus; } -/*** DISCLOSURE ***/ - -async function getOfacSMTs() { - // TODO: get the SMT from an endpoint - const passportNoAndNationalitySMT = new SMT(poseidon2, true); - passportNoAndNationalitySMT.import(passportNoAndNationalitySMTData); - const nameAndDobSMT = new SMT(poseidon2, true); - nameAndDobSMT.import(nameAndDobSMTData); - const nameAndYobSMT = new SMT(poseidon2, true); - nameAndYobSMT.import(nameAndYobSMTData); - return { passportNoAndNationalitySMT, nameAndDobSMT, nameAndYobSMT }; -} - -async function generateTeeInputsVCAndDisclose( - secret: string, - passportData: PassportData, - selfApp: SelfApp, -) { - const { scope, userId, disclosures } = selfApp; - - const selector_dg1 = Array(88).fill('0'); - - Object.entries(disclosures).forEach(([attribute, reveal]) => { - if (['ofac', 'excludedCountries', 'minimumAge'].includes(attribute)) { - return; - } - if (reveal) { - const [start, end] = - attributeToPosition[attribute as keyof typeof attributeToPosition]; - selector_dg1.fill('1', start, end + 1); - } - }); - - const majority = disclosures.minimumAge - ? disclosures.minimumAge.toString() - : DEFAULT_MAJORITY; - const selector_older_than = disclosures.minimumAge ? '1' : '0'; - - const selector_ofac = disclosures.ofac ? 1 : 0; - - const { passportNoAndNationalitySMT, nameAndDobSMT, nameAndYobSMT } = - await getOfacSMTs(); - const serialized_tree = await getCommitmentTree(); - const tree = LeanIMT.import((a, b) => poseidon2([a, b]), serialized_tree); - console.log('tree', tree); - // const commitment = generateCommitment( - // secret, - // PASSPORT_ATTESTATION_ID, - // passportData, - // ); - // tree.insert(BigInt(commitment)); - // Uncomment to add artificially the commitment to the tree - - const inputs = generateCircuitInputsVCandDisclose( - secret, - PASSPORT_ATTESTATION_ID, - passportData, - scope, - selector_dg1, - selector_older_than, - tree, - majority, - passportNoAndNationalitySMT, - nameAndDobSMT, - nameAndYobSMT, - selector_ofac, - disclosures.excludedCountries ?? [], - userId, - ); - return { inputs, circuitName: 'vc_and_disclose' }; -} - export async function sendVcAndDisclosePayload( secret: string, passportData: PassportData | null, @@ -286,12 +201,15 @@ export async function isUserRegistered( passportData: PassportData, secret: string, ) { + if (!passportData) { + return false; + } const commitment = generateCommitment( secret, PASSPORT_ATTESTATION_ID, passportData, ); - const serializedTree = await getCommitmentTree(); + const serializedTree = await getCommitmentTree(passportData.documentType); const tree = LeanIMT.import((a, b) => poseidon2([a, b]), serializedTree); const index = tree.indexOf(BigInt(commitment)); return index !== -1; @@ -317,9 +235,84 @@ export async function registerPassport( passportData: PassportData, secret: string, ) { - const dscOk = await checkIdPassportDscIsInTree(passportData); + // First get the mapping, then use it for the check + const endpointType = + passportData.documentType && passportData.documentType === 'mock_passport' + ? 'staging_celo' + : 'celo'; + const [circuitDNSMapping, dscTree] = await Promise.all([ + getCircuitDNSMapping(), + getDSCTree(endpointType), + ]); + console.log('circuitDNSMapping', circuitDNSMapping); + const dscOk = await checkIdPassportDscIsInTree( + passportData, + dscTree, + circuitDNSMapping, + endpointType, + ); if (!dscOk) { return; } - await sendRegisterPayload(passportData, secret); + await sendRegisterPayload( + passportData, + secret, + circuitDNSMapping, + endpointType, + ); +} + +export async function getDeployedCircuits() { + console.log('Fetching deployed circuits from api'); + const response = await fetch(`${API_URL}/deployed-circuits/`); + if (!response.ok) { + throw new Error( + `API server error: ${response.status} ${response.statusText}`, + ); + } + const contentType = response.headers.get('content-type'); + if (contentType && contentType.includes('text/html')) { + throw new Error( + 'API returned HTML instead of JSON - server may be down or misconfigured', + ); + } + try { + const data = await response.json(); + + if (!data.data || !data.data.REGISTER || !data.data.DSC) { + throw new Error( + 'Invalid data structure received from API: missing REGISTER or DSC fields', + ); + } + return data.data; + } catch (error) { + throw new Error('API returned invalid JSON response - server may be down'); + } +} +export async function getCircuitDNSMapping() { + console.log('Fetching deployed circuits from api'); + const response = await fetch(`${API_URL}/circuit-dns-mapping/`); + if (!response.ok) { + throw new Error( + `API server error: ${response.status} ${response.statusText}`, + ); + } + const contentType = response.headers.get('content-type'); + if (contentType && contentType.includes('text/html')) { + throw new Error( + 'API returned HTML instead of JSON - server may be down or misconfigured', + ); + } + try { + const data = await response.json(); + + if (!data.data) { + throw new Error( + 'Invalid data structure received from API: missing REGISTER or DSC fields', + ); + } + return data.data; + } catch (error) { + throw new Error('API returned invalid JSON response - server may be down'); + } } diff --git a/app/src/utils/proving/tee.ts b/app/src/utils/proving/tee.ts index c66367599..dcd68b1c6 100644 --- a/app/src/utils/proving/tee.ts +++ b/app/src/utils/proving/tee.ts @@ -6,6 +6,7 @@ import { v4 } from 'uuid'; import { CIRCUIT_TYPES, WS_DB_RELAYER, + WS_DB_RELAYER_STAGING, } from '../../../../common/src/constants/constants'; import { EndpointType } from '../../../../common/src/utils/appType'; import { @@ -161,11 +162,14 @@ export async function sendPayload( console.log('Truncated submit body:', truncatedBody); ws.send(JSON.stringify(submitBody)); } else { + if (result.error) { + finalize(ProofStatusEnum.ERROR); + } const receivedUuid = result.result; console.log('Received UUID:', receivedUuid); console.log(result); if (!socket) { - socket = io(WS_DB_RELAYER, { + socket = io(getWSDbRelayerUrl(endpointType), { path: '/', transports: ['websocket'], }); @@ -177,7 +181,14 @@ export async function sendPayload( const data = typeof message === 'string' ? JSON.parse(message) : message; console.log('SocketIO message:', data); - if (data.status === 4) { + if (data.status === 3) { + console.log('Failed to generate proof'); + socket?.disconnect(); + if (ws.readyState === WebSocket.OPEN) { + ws.close(); + } + finalize(ProofStatusEnum.FAILURE); + } else if (data.status === 4) { console.log('Proof verified'); socket?.disconnect(); if (ws.readyState === WebSocket.OPEN) { @@ -249,6 +260,7 @@ export type TEEPayloadDisclose = { export type TEEPayload = { type: 'register' | 'dsc'; onchain: true; + endpointType: string; circuit: { name: string; inputs: string; @@ -277,6 +289,7 @@ export function getPayload( const payload: TEEPayload = { type: circuit as 'register' | 'dsc', onchain: true, + endpointType: endpointType, circuit: { name: circuitName, inputs: JSON.stringify(inputs), @@ -285,3 +298,9 @@ export function getPayload( return payload; } } + +function getWSDbRelayerUrl(endpointType: EndpointType) { + return endpointType === 'celo' || endpointType === 'https' + ? WS_DB_RELAYER + : WS_DB_RELAYER_STAGING; +} diff --git a/circuits/scripts/server/download_circuits_from_aws.sh b/circuits/scripts/server/download_circuits_from_aws.sh deleted file mode 100755 index 6805400d9..000000000 --- a/circuits/scripts/server/download_circuits_from_aws.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/sh - -# Define environment variables -DESTINATION_DIR="build/fromAWS" -CONTRACTS_BASE_DIR="../contracts/contracts/verifiers" - -# Create the destination directories if they don't exist -echo "Creating destination directories..." -mkdir -p ${DESTINATION_DIR} -mkdir -p "${CONTRACTS_BASE_DIR}/register" -mkdir -p "${CONTRACTS_BASE_DIR}/dsc" -mkdir -p "${CONTRACTS_BASE_DIR}/disclose" - -# List of circuit names -CIRCUIT_NAMES=( - "vc_and_disclose" - "register_sha256_sha256_sha256_rsa_3_4096" - "register_sha1_sha1_sha1_rsa_65537_4096" - "register_sha1_sha256_sha256_rsa_65537_4096" - "register_sha256_sha256_sha256_rsa_65537_4096" - "register_sha256_sha256_sha256_rsapss_3_32_2048" - "dsc_sha1_rsa_65537_4096" - "dsc_sha256_rsa_65537_4096" - "register_sha256_sha256_sha256_rsapss_65537_32_2048" - "register_sha256_sha256_sha256_rsapss_65537_32_3072" - "dsc_sha256_rsapss_3_32_3072" - "register_sha512_sha512_sha512_rsa_65537_4096" - "dsc_sha256_rsapss_65537_32_3072" - "register_sha1_sha1_sha1_ecdsa_brainpoolP224r1" - "register_sha256_sha256_sha256_ecdsa_brainpoolP256r1" - "register_sha256_sha256_sha256_ecdsa_secp256r1" - "dsc_sha256_rsapss_65537_32_4096" - "dsc_sha1_ecdsa_brainpoolP256r1" - "register_sha224_sha224_sha224_ecdsa_brainpoolP224r1" - "register_sha256_sha224_sha224_ecdsa_secp224r1" - "dsc_sha256_ecdsa_secp256r1" - "dsc_sha256_ecdsa_brainpoolP256r1" - "dsc_sha512_rsa_65537_4096" - "register_sha384_sha384_sha384_rsapss_65537_48_2048" - "register_sha512_sha512_sha512_rsapss_65537_64_2048" - "dsc_sha512_rsapss_65537_64_4096" - "register_sha256_sha256_sha256_ecdsa_brainpoolP384r1" - "register_sha256_sha256_sha256_ecdsa_secp384r1" - "dsc_sha256_ecdsa_brainpoolP384r1" - "dsc_sha256_ecdsa_secp384r1" - "register_sha384_sha384_sha384_ecdsa_brainpoolP384r1" - "register_sha384_sha384_sha384_ecdsa_secp384r1" - "dsc_sha384_ecdsa_brainpoolP384r1" - "dsc_sha384_ecdsa_secp384r1" - "register_sha384_sha384_sha384_ecdsa_brainpoolP512r1" - "register_sha512_sha512_sha512_ecdsa_brainpoolP512r1" - "dsc_sha384_ecdsa_brainpoolP512r1" - "dsc_sha512_ecdsa_brainpoolP512r1" -) - -# Download function -download_files() { - local circuit_name=$1 - local circuit_dir="${DESTINATION_DIR}/${circuit_name}" - - # Determine contracts directory based on prefix - local contracts_dir - if [[ ${circuit_name} == "register"* ]]; then - contracts_dir="${CONTRACTS_BASE_DIR}/register" - elif [[ ${circuit_name} == "dsc"* ]]; then - contracts_dir="${CONTRACTS_BASE_DIR}/dsc" - elif [[ ${circuit_name} == "vc_and_disclose"* ]]; then - contracts_dir="${CONTRACTS_BASE_DIR}/disclose" - else - echo "Unknown circuit type: ${circuit_name}" - exit 1 - fi - - # Create circuit-specific directory in build/fromAWS - mkdir -p "${circuit_dir}" - - # Download Verifier.sol and copy to both locations - echo "Downloading ${circuit_name} Verifier.sol..." - curl -s "https://self-protocol.s3.eu-west-1.amazonaws.com/verifiers/Verifier_${circuit_name}.sol" \ - --output "${circuit_dir}/Verifier_${circuit_name}.sol" - cp "${circuit_dir}/Verifier_${circuit_name}.sol" "${contracts_dir}/" - - # Download zkey - # echo "Downloading ${circuit_name} zkey..." - # curl -s "https://self-protocol.s3.eu-west-1.amazonaws.com/all_zkeys/${circuit_name}_0000.zkey" \ - # --output "${circuit_dir}/${circuit_name}_0000.zkey" -} - -# Process each circuit -for circuit_name in "${CIRCUIT_NAMES[@]}"; do - echo "Processing ${circuit_name}..." - download_files "${circuit_name}" - - # Check if files were downloaded successfully - if [ -f "${DESTINATION_DIR}/${circuit_name}/Verifier_${circuit_name}.sol" ] - # s&& [ -f "${DESTINATION_DIR}/${circuit_name}/${circuit_name}_0000.zkey" ]; - then - echo "Successfully downloaded files for ${circuit_name}" - else - echo "Failed to download some files for ${circuit_name}" - exit 1 - fi -done - -echo "All downloads completed successfully" \ No newline at end of file diff --git a/common/src/constants/constants.ts b/common/src/constants/constants.ts index d9e6d5594..e421d84c8 100644 --- a/common/src/constants/constants.ts +++ b/common/src/constants/constants.ts @@ -5,15 +5,16 @@ export const COMMITMENT_TREE_DEPTH = 33; export const DEFAULT_USER_ID_TYPE = 'uuid'; export const REDIRECT_URL = 'https://redirect.self.xyz'; -export const WS_RPC_URL_REGISTER = "ws://register.proving.self.xyz:8888/"; -export const WS_RPC_URL_DSC = "ws://dsc.proving.self.xyz:8888/"; export const WS_RPC_URL_VC_AND_DISCLOSE = "ws://disclose.proving.self.xyz:8888/"; export const WS_DB_RELAYER = 'wss://websocket.self.xyz'; - +export const WS_DB_RELAYER_STAGING = 'wss://websocket.staging.self.xyz'; export const API_URL = 'https://api.self.xyz'; export const CSCA_TREE_URL = 'https://tree.self.xyz/csca'; export const DSC_TREE_URL = 'https://tree.self.xyz/dsc'; +export const CSCA_TREE_URL_STAGING = 'https://tree.staging.self.xyz/csca'; +export const DSC_TREE_URL_STAGING = 'https://tree.staging.self.xyz/dsc'; export const IDENTITY_TREE_URL = 'https://tree.self.xyz/identity'; +export const IDENTITY_TREE_URL_STAGING = 'https://tree.staging.self.xyz/identity'; export const PASSPORT_ATTESTATION_ID = '1'; //"8518753152044246090169372947057357973469996808638122125210848696986717482788" @@ -23,7 +24,7 @@ export const PCR0_MANAGER_ADDRESS = '0xE36d4EE5Fd3916e703A46C21Bb3837dB7680C8B8' // we make it global here because passing it to generateCircuitInputsRegister caused trouble -export const DEVELOPMENT_MODE = false; +export const DEVELOPMENT_MODE = true; export const DEFAULT_MAJORITY = '18'; export const hashAlgos = ['sha512', 'sha384', 'sha256', 'sha224', 'sha1']; @@ -266,6 +267,7 @@ export const n_dsc_ecdsa = 64; export const k_dsc_ecdsa = 4; export const max_dsc_bytes = 1792; export const max_csca_bytes = 1792; + export const countryCodes = { AFG: 'Afghanistan', ALA: 'Aland Islands', @@ -527,259 +529,6 @@ export function getCountryCode(countryName: string): string | string { return found ? found[0] : 'undefined'; } -export const countryNames = [ - 'Any', - 'Afghanistan', - 'Aland Islands', - 'Albania', - 'Algeria', - 'American Samoa', - 'Andorra', - 'Angola', - 'Anguilla', - 'Antarctica', - 'Antigua and Barbuda', - 'Argentina', - 'Armenia', - 'Aruba', - 'Australia', - 'Austria', - 'Azerbaijan', - 'Bahamas', - 'Bahrain', - 'Bangladesh', - 'Barbados', - 'Belarus', - 'Belgium', - 'Belize', - 'Benin', - 'Bermuda', - 'Bhutan', - 'Bolivia (Plurinational State of)', - 'Bonaire, Sint Eustatius and Saba', - 'Bosnia and Herzegovina', - 'Botswana', - 'Bouvet Island', - 'Brazil', - 'British Indian Ocean Territory', - 'Brunei Darussalam', - 'Bulgaria', - 'Burkina Faso', - 'Burundi', - 'Cabo Verde', - 'Cambodia', - 'Cameroon', - 'Canada', - 'Cayman Islands', - 'Central African Republic', - 'Chad', - 'Chile', - 'China', - 'Christmas Island', - 'Cocos (Keeling) Islands', - 'Colombia', - 'Comoros', - 'Congo', - 'Congo, Democratic Republic of the', - 'Cook Islands', - 'Costa Rica', - "Cote d'Ivoire", - 'Croatia', - 'Cuba', - 'Curacao', - 'Cyprus', - 'Czechia', - 'Denmark', - 'Djibouti', - 'Dominica', - 'Dominican Republic', - 'Ecuador', - 'Egypt', - 'El Salvador', - 'Equatorial Guinea', - 'Eritrea', - 'Estonia', - 'Eswatini', - 'Ethiopia', - 'Falkland Islands (Malvinas)', - 'Faroe Islands', - 'Fiji', - 'Finland', - 'France', - 'French Guiana', - 'French Polynesia', - 'French Southern Territories', - 'Gabon', - 'Gambia', - 'Georgia', - 'Germany', - 'Ghana', - 'Gibraltar', - 'Greece', - 'Greenland', - 'Grenada', - 'Guadeloupe', - 'Guam', - 'Guatemala', - 'Guernsey', - 'Guinea', - 'Guinea-Bissau', - 'Guyana', - 'Haiti', - 'Heard Island and McDonald Islands', - 'Holy See', - 'Honduras', - 'Hong Kong', - 'Hungary', - 'Iceland', - 'India', - 'Indonesia', - 'Iran (Islamic Republic of)', - 'Iraq', - 'Ireland', - 'Isle of Man', - 'Israel', - 'Italy', - 'Jamaica', - 'Japan', - 'Jersey', - 'Jordan', - 'Kazakhstan', - 'Kenya', - 'Kiribati', - "Korea (Democratic People's Republic of)", - 'Korea, Republic of', - 'Kuwait', - 'Kyrgyzstan', - "Lao People's Democratic Republic", - 'Latvia', - 'Lebanon', - 'Lesotho', - 'Liberia', - 'Libya', - 'Liechtenstein', - 'Lithuania', - 'Luxembourg', - 'Macao', - 'Madagascar', - 'Malawi', - 'Malaysia', - 'Maldives', - 'Mali', - 'Malta', - 'Marshall Islands', - 'Martinique', - 'Mauritania', - 'Mauritius', - 'Mayotte', - 'Mexico', - 'Micronesia (Federated States of)', - 'Moldova, Republic of', - 'Monaco', - 'Mongolia', - 'Montenegro', - 'Montserrat', - 'Morocco', - 'Mozambique', - 'Myanmar', - 'Namibia', - 'Nauru', - 'Nepal', - 'Netherlands', - 'New Caledonia', - 'New Zealand', - 'Nicaragua', - 'Niger', - 'Nigeria', - 'Niue', - 'Norfolk Island', - 'North Macedonia', - 'Northern Mariana Islands', - 'Norway', - 'Oman', - 'Pakistan', - 'Palau', - 'Palestine, State of', - 'Panama', - 'Papua New Guinea', - 'Paraguay', - 'Peru', - 'Philippines', - 'Pitcairn', - 'Poland', - 'Portugal', - 'Puerto Rico', - 'Qatar', - 'Reunion', - 'Romania', - 'Russian Federation', - 'Rwanda', - 'Saint Barthelemy', - 'Saint Helena, Ascension and Tristan da Cunha', - 'Saint Kitts and Nevis', - 'Saint Lucia', - 'Saint Martin (French part)', - 'Saint Pierre and Miquelon', - 'Saint Vincent and the Grenadines', - 'Samoa', - 'San Marino', - 'Sao Tome and Principe', - 'Saudi Arabia', - 'Senegal', - 'Serbia', - 'Seychelles', - 'Sierra Leone', - 'Singapore', - 'Sint Maarten (Dutch part)', - 'Slovakia', - 'Slovenia', - 'Solomon Islands', - 'Somalia', - 'South Africa', - 'South Georgia and the South Sandwich Islands', - 'South Sudan', - 'Spain', - 'Sri Lanka', - 'Sudan', - 'Suriname', - 'Svalbard and Jan Mayen', - 'Sweden', - 'Switzerland', - 'Syrian Arab Republic', - 'Taiwan, Province of China', - 'Tajikistan', - 'Tanzania, United Republic of', - 'Thailand', - 'Timor-Leste', - 'Togo', - 'Tokelau', - 'Tonga', - 'Trinidad and Tobago', - 'Tunisia', - 'Turkey', - 'Turkmenistan', - 'Turks and Caicos Islands', - 'Tuvalu', - 'Uganda', - 'Ukraine', - 'United Arab Emirates', - 'United Kingdom of Great Britain and Northern Ireland', - 'United States of America', - 'United States Minor Outlying Islands', - 'Uruguay', - 'Uzbekistan', - 'Vanuatu', - 'Venezuela (Bolivarian Republic of)', - 'Viet Nam', - 'Virgin Islands (British)', - 'Virgin Islands (U.S.)', - 'Wallis and Futuna', - 'Western Sahara', - 'Yemen', - 'Zambia', - 'Zimbabwe', -] as const; - export const contribute_publicKey = `-----BEGIN RSA PUBLIC KEY----- MIICCgKCAgEAv/hm7FZZ2KBmaeDHmLoRwuWmCcNKT561RqbsW8ZuYSyPWJUldE9U Cf0lW3K1H5lsSDkl0Cq84cooL9f6X59Mffb/N24ZKTdL0xdcPwjk4LbcrVm8qubL diff --git a/common/src/scripts/extensions.cnf b/common/src/scripts/extensions.cnf new file mode 100644 index 000000000..643a232da --- /dev/null +++ b/common/src/scripts/extensions.cnf @@ -0,0 +1,2 @@ +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid,issuer diff --git a/common/src/scripts/generateCertificates.sh b/common/src/scripts/generateCertificates.sh index 7f7168e1e..71bcd20c9 100755 --- a/common/src/scripts/generateCertificates.sh +++ b/common/src/scripts/generateCertificates.sh @@ -190,6 +190,7 @@ generate_certificate() { # For RSAPSS, we need to specify the PSS padding mode during signing openssl x509 -req -in "$csr_file" \ -CA "$csca_crt" -CAkey "$csca_key" -CAcreateserial \ + -extfile src/scripts/extensions.cnf \ -days 3650 -sha${hash#sha} \ -sigopt rsa_padding_mode:pss \ -sigopt rsa_pss_saltlen:"$salt" \ @@ -198,6 +199,7 @@ generate_certificate() { # For standard RSA or ECDSA openssl x509 -req -in "$csr_file" \ -CA "$csca_crt" -CAkey "$csca_key" -CAcreateserial \ + -extfile src/scripts/extensions.cnf \ -days 3650 -sha${hash#sha} \ -out "$dir_name/$crt_file" fi diff --git a/common/src/utils/appType.ts b/common/src/utils/appType.ts index 415a74924..e42586cae 100644 --- a/common/src/utils/appType.ts +++ b/common/src/utils/appType.ts @@ -1,7 +1,7 @@ -import { UserIdType } from "./circuits/uuid"; +import { UserIdType, validateUserId } from "./circuits/uuid"; export type Mode = 'register' | 'dsc' | 'vc_and_disclose'; -export type EndpointType = 'https' | 'celo'; +export type EndpointType = 'https' | 'celo' | 'staging_celo' | 'staging_https'; import { v4 } from 'uuid'; import { Country3LetterCode } from "../constants/constants"; @@ -48,19 +48,30 @@ export class SelfAppBuilder { if (!config.endpoint) { throw new Error('endpoint is required'); } + if (!config.userId) { + throw new Error('userId is required'); + } if (config.endpointType === 'https' && !config.endpoint.startsWith('https://')) { throw new Error('endpoint must start with https://'); } if (config.endpointType === 'celo' && !config.endpoint.startsWith('0x')) { throw new Error('endpoint must be a valid address'); } - + if (config.userIdType === 'hex') { + if (!config.userId.startsWith('0x')) { + throw new Error('userId as hex must start with 0x'); + } + config.userId = config.userId.slice(2); + } + if (!validateUserId(config.userId, config.userIdType ?? "uuid")) { + throw new Error('userId must be a valid UUID or address'); + } + this.config = { - sessionId : v4(), - userIdType : 'uuid', - userId: "", - devMode : false, - endpointType : 'https', + sessionId: v4(), + userIdType: 'uuid', + devMode: false, + endpointType: 'https', header: "", logoBase64: "", disclosures: {}, diff --git a/common/src/utils/circuits/circuitsName.ts b/common/src/utils/circuits/circuitsName.ts index 7ad5468d9..c9786387b 100644 --- a/common/src/utils/circuits/circuitsName.ts +++ b/common/src/utils/circuits/circuitsName.ts @@ -1,10 +1,4 @@ import { PassportData } from '../types'; -import { parseCertificateSimple } from '../certificate_parsing/parseCertificateSimple'; -import { - PublicKeyDetailsECDSA, - PublicKeyDetailsRSA, - PublicKeyDetailsRSAPSS, -} from '../certificate_parsing/dataStructure'; export function getCircuitNameFromPassportData(passportData: PassportData, circuitType: 'register' | 'dsc') { if (circuitType === 'register') { @@ -15,52 +9,86 @@ export function getCircuitNameFromPassportData(passportData: PassportData, circu } function getDSCircuitNameFromPassportData(passportData: PassportData) { + console.log('Getting DSC circuit name from passport data...'); if (!passportData.passportMetadata) { + console.error('Passport metadata is missing'); throw new Error("Passport data are not parsed"); } const passportMetadata = passportData.passportMetadata; + if (!passportMetadata.cscaFound) { + console.error('CSCA not found in passport metadata'); throw new Error("CSCA not found"); } - const parsedCSCA = passportData.csca_parsed; + const signatureAlgorithm = passportMetadata.cscaSignatureAlgorithm; const hashFunction = passportMetadata.cscaHashFunction; + console.log('CSCA Signature Algorithm:', signatureAlgorithm); + console.log('CSCA Hash Function:', hashFunction); + if (signatureAlgorithm === 'ecdsa') { - const curve = (parsedCSCA.publicKeyDetails as PublicKeyDetailsECDSA).curve; - return `dsc_${hashFunction}_${signatureAlgorithm}_${curve}`; + console.log('Processing ECDSA signature...'); + const curve = passportMetadata.cscaCurveOrExponent; + console.log('ECDSA curve:', curve); + const circuitName = `dsc_${hashFunction}_${signatureAlgorithm}_${curve}`; + console.log('Generated circuit name:', circuitName); + return circuitName; + } else if (signatureAlgorithm === 'rsa') { - const exponent = (parsedCSCA.publicKeyDetails as PublicKeyDetailsRSA).exponent; - const bits = (parsedCSCA.publicKeyDetails as PublicKeyDetailsRSA).bits; - if (parseInt(bits) <= 4096) { - return `dsc_${hashFunction}_${signatureAlgorithm}_${exponent}_${4096}`; + console.log('Processing RSA signature...'); + const exponent = passportMetadata.cscaCurveOrExponent; + const bits = passportMetadata.cscaSignatureAlgorithmBits; + console.log('RSA exponent:', exponent); + console.log('RSA bits:', bits); + + if (bits <= 4096) { + const circuitName = `dsc_${hashFunction}_${signatureAlgorithm}_${exponent}_${4096}`; + console.log('Generated circuit name:', circuitName); + return circuitName; } else { + console.error('RSA key length exceeds maximum supported length'); throw new Error(`Unsupported key length: ${bits}`); } - } else if (parsedCSCA.signatureAlgorithm === 'rsapss') { - const exponent = (parsedCSCA.publicKeyDetails as PublicKeyDetailsRSA).exponent; - const saltLength = (parsedCSCA.publicKeyDetails as PublicKeyDetailsRSAPSS).saltLength; - const bits = (parsedCSCA.publicKeyDetails as PublicKeyDetailsRSAPSS).bits; - if (parseInt(bits) <= 4096) { - return `dsc_${hashFunction}_${signatureAlgorithm}_${exponent}_${saltLength}_${bits}`; + + } else if (signatureAlgorithm === 'rsapss') { + console.log('Processing RSA-PSS signature...'); + const exponent = passportMetadata.cscaCurveOrExponent; + const saltLength = passportMetadata.cscaSaltLength; + const bits = passportMetadata.cscaSignatureAlgorithmBits; + console.log('RSA-PSS exponent:', exponent); + console.log('RSA-PSS salt length:', saltLength); + console.log('RSA-PSS bits:', bits); + + if (bits <= 4096) { + const circuitName = `dsc_${hashFunction}_${signatureAlgorithm}_${exponent}_${saltLength}_${bits}`; + console.log('Generated circuit name:', circuitName); + return circuitName; } else { + console.error('RSA-PSS key length exceeds maximum supported length'); throw new Error(`Unsupported key length: ${bits}`); } } else { + console.error('Unsupported signature algorithm:', signatureAlgorithm); throw new Error('Unsupported signature algorithm'); } - } function getRegisterNameFromPassportData(passportData: PassportData) { + console.log('Getting register circuit name from passport data...'); + if (!passportData.passportMetadata) { + console.error('Passport metadata is missing'); throw new Error("Passport data are not parsed"); } const passportMetadata = passportData.passportMetadata; + if (!passportMetadata.cscaFound) { + console.error('CSCA not found in passport metadata'); throw new Error("CSCA not found"); } + const parsedDsc = passportData.dsc_parsed; const dgHashAlgo = passportMetadata.dg1HashFunction; @@ -68,27 +96,60 @@ function getRegisterNameFromPassportData(passportData: PassportData) { const signedAttrHashAlgo = passportMetadata.signedAttrHashFunction; const sigAlg = passportMetadata.signatureAlgorithm; + console.log('DG Hash Algorithm:', dgHashAlgo); + console.log('eContent Hash Algorithm:', eContentHashAlgo); + console.log('Signed Attributes Hash Algorithm:', signedAttrHashAlgo); + console.log('Signature Algorithm:', sigAlg); + if (parsedDsc.signatureAlgorithm === 'ecdsa') { - const curve = (parsedDsc.publicKeyDetails as PublicKeyDetailsECDSA).curve; - return `register_${dgHashAlgo}_${eContentHashAlgo}_${signedAttrHashAlgo}_${sigAlg}_${curve}`; + console.log('Processing ECDSA signature...'); + const { + curveOrExponent, + } = passportMetadata + console.log('ECDSA curve:', curveOrExponent); + const circuitName = `register_${dgHashAlgo}_${eContentHashAlgo}_${signedAttrHashAlgo}_${sigAlg}_${curveOrExponent}`; + console.log('Generated circuit name:', circuitName); + return circuitName; + } else if (parsedDsc.signatureAlgorithm === 'rsa') { - const exponent = (parsedDsc.publicKeyDetails as PublicKeyDetailsRSA).exponent; - const bits = (parsedDsc.publicKeyDetails as PublicKeyDetailsRSA).bits; - if (parseInt(bits) <= 4096) { - return `register_${dgHashAlgo}_${eContentHashAlgo}_${signedAttrHashAlgo}_${sigAlg}_${exponent}_${4096}`; + console.log('Processing RSA signature...'); + const { + curveOrExponent, + signatureAlgorithmBits + } = passportMetadata + console.log('RSA exponent:', curveOrExponent); + console.log('RSA bits:', signatureAlgorithmBits); + + if (signatureAlgorithmBits <= 4096) { + const circuitName = `register_${dgHashAlgo}_${eContentHashAlgo}_${signedAttrHashAlgo}_${sigAlg}_${curveOrExponent}_${4096}`; + console.log('Generated circuit name:', circuitName); + return circuitName; } else { - throw new Error(`Unsupported key length: ${bits}`); + console.error('RSA key length exceeds maximum supported length'); + throw new Error(`Unsupported key length: ${signatureAlgorithmBits}`); } + } else if (parsedDsc.signatureAlgorithm === 'rsapss') { - const exponent = (parsedDsc.publicKeyDetails as PublicKeyDetailsRSA).exponent; - const saltLength = (parsedDsc.publicKeyDetails as PublicKeyDetailsRSAPSS).saltLength; - const bits = (parsedDsc.publicKeyDetails as PublicKeyDetailsRSAPSS).bits; - if (parseInt(bits) <= 4096) { - return `register_${dgHashAlgo}_${eContentHashAlgo}_${signedAttrHashAlgo}_${sigAlg}_${exponent}_${saltLength}_${bits}`; + console.log('Processing RSA-PSS signature...'); + const { + curveOrExponent, + saltLength, + signatureAlgorithmBits + } = passportMetadata + console.log('RSA-PSS exponent:', curveOrExponent); + console.log('RSA-PSS salt length:', saltLength); + console.log('RSA-PSS bits:', signatureAlgorithmBits); + + if (signatureAlgorithmBits <= 4096) { + const circuitName = `register_${dgHashAlgo}_${eContentHashAlgo}_${signedAttrHashAlgo}_${sigAlg}_${curveOrExponent}_${saltLength}_${signatureAlgorithmBits}`; + console.log('Generated circuit name:', circuitName); + return circuitName; } else { - throw new Error(`Unsupported key length: ${bits}`); + console.error('RSA-PSS key length exceeds maximum supported length'); + throw new Error(`Unsupported key length: ${signatureAlgorithmBits}`); } } else { + console.error('Unsupported signature algorithm:', parsedDsc.signatureAlgorithm); throw new Error('Unsupported signature algorithm'); } } \ No newline at end of file diff --git a/common/src/utils/circuits/generateInputs.ts b/common/src/utils/circuits/generateInputs.ts index 8aa6bf343..1ddd405ad 100644 --- a/common/src/utils/circuits/generateInputs.ts +++ b/common/src/utils/circuits/generateInputs.ts @@ -8,7 +8,7 @@ import { import { PassportData } from '../types'; import { LeanIMT } from '@openpassport/zk-kit-lean-imt'; import { getCountryLeaf, getNameDobLeaf, getPassportNumberAndNationalityLeaf, getLeafCscaTree, getLeafDscTree, getNameYobLeaf } from '../trees'; -import { getCSCATree, getCscaTreeInclusionProof, getDSCTree, getDscTreeInclusionProof } from '../trees'; +import { getCscaTreeInclusionProof, getDscTreeInclusionProof } from '../trees'; import { SMT } from '@openpassport/zk-kit-smt'; import { extractSignatureFromDSC, @@ -43,7 +43,7 @@ export function generateCircuitInputsDSC( const dscTbsBytes = dscParsed.tbsBytes; // DSC is padded using sha padding because it will be hashed in the circuit - const [dscTbsBytesPadded, dscTbsBytesLen] = pad(cscaParsed.hashAlgorithm)( + const [dscTbsBytesPadded, dscTbsBytesLen] = pad(dscMetadata.cscaHashAlgorithm)( dscTbsBytes, max_dsc_bytes ); @@ -54,8 +54,8 @@ export function generateCircuitInputsDSC( // Parse CSCA certificate and get its public key const csca_pubKey_formatted = getCertificatePubKey( cscaParsed, - cscaParsed.signatureAlgorithm, - cscaParsed.hashAlgorithm + dscMetadata.cscaSignatureAlgorithm, + dscMetadata.cscaHashAlgorithm ); const signatureRaw = extractSignatureFromDSC(dscCertificate); @@ -67,7 +67,7 @@ export function generateCircuitInputsDSC( ); // Get start index of CSCA pubkey based on algorithm - const [startIndex, keyLength] = findStartPubKeyIndex(cscaParsed, cscaTbsBytesPadded, cscaParsed.signatureAlgorithm); + const [startIndex, keyLength] = findStartPubKeyIndex(cscaParsed, cscaTbsBytesPadded, dscMetadata.cscaSignatureAlgorithm); return { diff --git a/common/src/utils/circuits/uuid.ts b/common/src/utils/circuits/uuid.ts index 40f2a1f9e..1e85993ed 100644 --- a/common/src/utils/circuits/uuid.ts +++ b/common/src/utils/circuits/uuid.ts @@ -1,3 +1,5 @@ +export type UserIdType = 'hex' | 'uuid'; + /// UUID function hexToBigInt(hex: string): bigint { return BigInt(`0x${hex}`); @@ -35,6 +37,19 @@ export function castToUUID(bigInt: bigint): string { return hexToUUID(hex); } +export function castToUserIdentifier(bigInt: bigint, user_identifier_type: UserIdType): string { + switch (user_identifier_type) { + case 'hex': + return castToAddress(bigInt); + case 'uuid': + return castToUUID(bigInt); + } +} + +export function castToAddress(bigInt: bigint): string { + return `0x${bigInt.toString(16).padStart(40, '0')}`; +} + /// scope function checkStringLength(str: string) { if (str.length > 25) { @@ -70,14 +85,8 @@ export function stringToAsciiBigIntArray(str: string): bigint[] { return asciiBigIntArray; } - -// custom user_identifier type validation -export type UserIdType = 'ascii' | 'hex' | 'uuid'; - -const validateUserId = (userId: string, type: UserIdType): boolean => { +export function validateUserId(userId: string, type: UserIdType): boolean { switch (type) { - case 'ascii': - return /^[\x00-\xFF]+$/.test(userId); case 'hex': return /^[0-9A-Fa-f]+$/.test(userId); case 'uuid': @@ -88,37 +97,3 @@ const validateUserId = (userId: string, type: UserIdType): boolean => { return false; } }; - -const getMaxLenght = (idType: UserIdType) => { - switch (idType) { - case 'ascii': - return 25; - default: - return 63; - } -}; - -export const parseUIDToBigInt = ( - user_identifier: string, - user_identifier_type: UserIdType -): string => { - if (!validateUserId(user_identifier, user_identifier_type)) { - throw new Error(`User identifier of type ${user_identifier_type} is not valid`); - } - - const maxLength = getMaxLenght(user_identifier_type); - if (user_identifier.length > maxLength) { - throw new Error( - `User identifier of type ${user_identifier_type} exceeds maximum length of ${maxLength} characters` - ); - } - - switch (user_identifier_type) { - case 'ascii': - return stringToBigInt(user_identifier).toString(); - case 'hex': - return hexToBigInt(user_identifier).toString(); - case 'uuid': - return uuidToBigInt(user_identifier).toString(); - } -}; diff --git a/common/src/utils/passports/genMockPassportData.ts b/common/src/utils/passports/genMockPassportData.ts index db3bff59d..e2e04324c 100644 --- a/common/src/utils/passports/genMockPassportData.ts +++ b/common/src/utils/passports/genMockPassportData.ts @@ -259,6 +259,7 @@ export function genMockPassportData( eContent: eContent, signedAttr: signedAttr, encryptedDigest: signatureBytes, + documentType: "mock_passport" }); } diff --git a/common/src/utils/passports/passport_parsing/brutForceDscSignature.ts b/common/src/utils/passports/passport_parsing/brutForceDscSignature.ts index 5f793577b..4f462bb3a 100644 --- a/common/src/utils/passports/passport_parsing/brutForceDscSignature.ts +++ b/common/src/utils/passports/passport_parsing/brutForceDscSignature.ts @@ -102,14 +102,20 @@ function verifyECDSA(dsc: CertificateData, csca: CertificateData, hashAlgorithm: } function verifyRSA(dsc: CertificateData, csca: CertificateData, hashAlgorithm: string): boolean { try { - const dscCert = forge.pki.certificateFromPem(dsc.rawPem); const cscaCert = forge.pki.certificateFromPem(csca.rawPem); const tbsHash = getTBSHash(dsc.rawPem, hashAlgorithm); if (!tbsHash) { return false; } const publicKey = cscaCert.publicKey as forge.pki.rsa.PublicKey; - const signature = dscCert.signature; + const certBuffer_dsc = Buffer.from( + dsc.rawPem.replace(/(-----(BEGIN|END) CERTIFICATE-----|\n)/g, ''), + 'base64' + ); + const asn1Data_dsc = asn1js.fromBER(certBuffer_dsc); + const cert_dsc = new Certificate({ schema: asn1Data_dsc.result }); + const signatureValue = cert_dsc.signatureValue.valueBlock.valueHexView; + const signature = Buffer.from(signatureValue).toString('binary'); try { const verified = publicKey.verify(tbsHash, signature); return verified; diff --git a/common/src/utils/selfAttestation.ts b/common/src/utils/selfAttestation.ts index 2d015a895..8e50a6e12 100644 --- a/common/src/utils/selfAttestation.ts +++ b/common/src/utils/selfAttestation.ts @@ -1,6 +1,3 @@ -import { bigIntToHex, castToScope, castToUUID, UserIdType } from './circuits/uuid'; -import { formatForbiddenCountriesListFromCircuitOutput, getAttributeFromUnpackedReveal } from './circuits/formatOutputs'; -import { unpackReveal } from './circuits/formatOutputs'; import { Groth16Proof, PublicSignals } from 'snarkjs'; export interface SelfVerificationResult { @@ -26,9 +23,9 @@ export interface SelfVerificationResult { gender?: string; expiry_date?: string; older_than?: string; - passport_no_ofac?: string; - name_and_dob_ofac?: string; - name_and_yob_ofac?: string; + passport_no_ofac?: boolean; + name_and_dob_ofac?: boolean; + name_and_yob_ofac?: boolean; }; proof: { value: { diff --git a/common/src/utils/trees.ts b/common/src/utils/trees.ts index f002802ea..4b61e7eaa 100644 --- a/common/src/utils/trees.ts +++ b/common/src/utils/trees.ts @@ -8,17 +8,20 @@ import { import { packBytesAndPoseidon } from './hash'; import { DscCertificateMetaData, parseDscCertificateData } from './passports/passport_parsing/parseDscCertificateData'; import { parseCertificateSimple } from './certificate_parsing/parseCertificateSimple'; -import { CSCA_TREE_DEPTH, DSC_TREE_DEPTH, IDENTITY_TREE_URL, max_csca_bytes, OFAC_TREE_LEVELS } from '../constants/constants'; +import { CSCA_TREE_DEPTH, CSCA_TREE_URL_STAGING, DSC_TREE_DEPTH, DSC_TREE_URL_STAGING, IDENTITY_TREE_URL, IDENTITY_TREE_URL_STAGING, max_csca_bytes, OFAC_TREE_LEVELS } from '../constants/constants'; import { CSCA_TREE_URL, DSC_TREE_URL } from '../constants/constants'; import { max_dsc_bytes } from '../constants/constants'; import { IMT } from '@openpassport/zk-kit-imt'; import { pad } from './passports/passport'; import countries from "i18n-iso-countries"; import en from "i18n-iso-countries/langs/en.json"; +import { EndpointType } from './appType'; +import { DocumentType } from './types'; countries.registerLocale(en); -export async function getCSCATree(): Promise { - const response = await fetch(CSCA_TREE_URL); +export async function getCSCATree(endpointType: EndpointType): Promise { + const cscaTreeUrl = (endpointType === 'celo' || endpointType === 'https') ? CSCA_TREE_URL : CSCA_TREE_URL_STAGING + const response = await fetch(cscaTreeUrl); const data = await response.json(); const status = data.status ? data.status : data; if (status === 'error') { @@ -30,8 +33,9 @@ export async function getCSCATree(): Promise { return tree; } -export async function getDSCTree(): Promise { - const response = await fetch(DSC_TREE_URL); +export async function getDSCTree(endpointType: EndpointType): Promise { + const dscTreeUrl = (endpointType === 'celo' || endpointType === 'https') ? DSC_TREE_URL : DSC_TREE_URL_STAGING + const response = await fetch(dscTreeUrl); const data = await response.json(); const status = data.status ? data.status : data; if (status === 'error') { @@ -42,8 +46,9 @@ export async function getDSCTree(): Promise { return tree; } -export async function getCommitmentTree(): Promise { - const response = await fetch(IDENTITY_TREE_URL); +export async function getCommitmentTree(documentType: DocumentType | null): Promise { + const identityTreeUrl = !documentType || typeof documentType !== 'string' || documentType === 'passport' ? IDENTITY_TREE_URL : IDENTITY_TREE_URL_STAGING; + const response = await fetch(identityTreeUrl); return await response.json().then(data => data.data ? data.data : data); } diff --git a/common/src/utils/types.ts b/common/src/utils/types.ts index c5a052c3c..aa9275041 100644 --- a/common/src/utils/types.ts +++ b/common/src/utils/types.ts @@ -13,8 +13,11 @@ export type PassportData = { passportMetadata?: PassportMetadata; dsc_parsed?: CertificateData; csca_parsed?: CertificateData; + documentType: DocumentType; }; +export type DocumentType = "passport" | "mock_passport"; + // Define the signature algorithm in "algorithm_hashfunction_domainPapameter_keyLength" export type SignatureAlgorithm = | 'rsa_sha1_65537_2048' diff --git a/contracts/contracts/tests/testUpgradedIdentityRegistryImplV1.sol b/contracts/contracts/tests/testUpgradedIdentityRegistryImplV1.sol index f368b8764..726a112b8 100644 --- a/contracts/contracts/tests/testUpgradedIdentityRegistryImplV1.sol +++ b/contracts/contracts/tests/testUpgradedIdentityRegistryImplV1.sol @@ -2,6 +2,7 @@ pragma solidity 0.8.28; import {IdentityRegistryStorageV1} from "../registry/IdentityRegistryImplV1.sol"; +import { InternalLeanIMT, LeanIMTData } from "@zk-kit/imt.sol/internal/InternalLeanIMT.sol"; /** * @title IdentityRegistryStorageV1 @@ -22,6 +23,8 @@ contract testUpgradedIdentityRegistryImplV1 is IdentityRegistryStorageV1, UpgradedIdentityRegistryStorageV1 { + using InternalLeanIMT for LeanIMTData; + // ==================================================== // Events // ==================================================== @@ -76,4 +79,193 @@ contract testUpgradedIdentityRegistryImplV1 is return _isTest; } + function hub() + external + virtual + onlyProxy + view + returns (address) + { + return _hub; + } + + function nullifiers( + bytes32 attestationId, + uint256 nullifier + ) + external + virtual + onlyProxy + view + returns (bool) + { + return _nullifiers[attestationId][nullifier]; + } + + function isRegisteredDscKeyCommitment( + uint256 commitment + ) + external + virtual + onlyProxy + view + returns (bool) + { + return _isRegisteredDscKeyCommitment[commitment]; + } + + function rootTimestamps( + uint256 root + ) + external + virtual + onlyProxy + view + returns (uint256) + { + return _rootTimestamps[root]; + } + + function checkIdentityCommitmentRoot( + uint256 root + ) + external + onlyProxy + view + returns (bool) + { + return _rootTimestamps[root] != 0; + } + + function getIdentityCommitmentMerkleTreeSize() + external + onlyProxy + view + returns (uint256) + { + return _identityCommitmentIMT.size; + } + + function getIdentityCommitmentMerkleRoot() + external + onlyProxy + view + returns (uint256) + { + return _identityCommitmentIMT._root(); + } + + function getIdentityCommitmentIndex( + uint256 commitment + ) + external + onlyProxy + view + returns (uint256) + { + return _identityCommitmentIMT._indexOf(commitment); + } + + function getPassportNoOfacRoot() + external + onlyProxy + view + returns (uint256) + { + return _passportNoOfacRoot; + } + + function getNameAndDobOfacRoot() + external + onlyProxy + view + returns (uint256) + { + return _nameAndDobOfacRoot; + } + + function getNameAndYobOfacRoot() + external + onlyProxy + view + returns (uint256) + { + return _nameAndYobOfacRoot; + } + + function checkOfacRoots( + uint256 passportNoRoot, + uint256 nameAndDobRoot, + uint256 nameAndYobRoot + ) + external + onlyProxy + view + returns (bool) + { + return _passportNoOfacRoot == passportNoRoot + && _nameAndDobOfacRoot == nameAndDobRoot + && _nameAndYobOfacRoot == nameAndYobRoot; + } + + function getCscaRoot() + external + onlyProxy + view + returns (uint256) + { + return _cscaRoot; + } + + function checkCscaRoot( + uint256 root + ) + external + onlyProxy + view + returns (bool) + { + return _cscaRoot == root; + } + + function getDscKeyCommitmentMerkleRoot() + external + onlyProxy + view + returns (uint256) + { + return _dscKeyCommitmentIMT._root(); + } + + function checkDscKeyCommitmentMerkleRoot( + uint256 root + ) + external + onlyProxy + view + returns (bool) + { + return _dscKeyCommitmentIMT._root() == root; + } + + function getDscKeyCommitmentTreeSize() + external + onlyProxy + view + returns (uint256) + { + return _dscKeyCommitmentIMT.size; + } + + function getDscKeyCommitmentIndex( + uint256 commitment + ) + external + onlyProxy + view + returns (uint256) + { + return _dscKeyCommitmentIMT._indexOf(commitment); + } + } \ No newline at end of file diff --git a/contracts/contracts/tests/testUpgradedIdentityVerificationHubImplV1.sol b/contracts/contracts/tests/testUpgradedIdentityVerificationHubImplV1.sol index 57457c484..1b3cd81d9 100644 --- a/contracts/contracts/tests/testUpgradedIdentityVerificationHubImplV1.sol +++ b/contracts/contracts/tests/testUpgradedIdentityVerificationHubImplV1.sol @@ -73,4 +73,48 @@ contract testUpgradedIdentityVerificationHubImplV1 is return _isTest; } + function registry() + external + virtual + onlyProxy + view + returns (address) + { + return _registry; + } + + function vcAndDiscloseCircuitVerifier() + external + virtual + onlyProxy + view + returns (address) + { + return _vcAndDiscloseCircuitVerifier; + } + + function sigTypeToRegisterCircuitVerifiers( + uint256 typeId + ) + external + virtual + onlyProxy + view + returns (address) + { + return _sigTypeToRegisterCircuitVerifiers[typeId]; + } + + function sigTypeToDscCircuitVerifiers( + uint256 typeId + ) + external + virtual + onlyProxy + view + returns (address) + { + return _sigTypeToDscCircuitVerifiers[typeId]; + } + } \ No newline at end of file diff --git a/contracts/package.json b/contracts/package.json index 1dbe4cc76..cf689029a 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -59,6 +59,7 @@ "test:local": "TEST_ENV=local npx hardhat test", "test:register:local": "TEST_ENV=local npx hardhat test test/integration/commitmentRegistration.test.ts", "test:registry:local": "TEST_ENV=local npx hardhat test test/unit/IdentityRegistry.test.ts", + "test:pcr:local": "TEST_ENV=local npx hardhat test test/unit/PCR0Manager.test.ts", "test:unit:local": "TEST_ENV=local npx hardhat test test/unit/*", "test:view": "npx hardhat test test/view.ts", "update:cscaroot:sepolia": "npx hardhat ignition deploy ignition/modules/scripts/updateRegistryCscaRoot.ts --network sepolia", diff --git a/contracts/scripts/findErrorSignature.ts b/contracts/scripts/findErrorSignature.ts index 3f990b0b0..6971d34f8 100644 --- a/contracts/scripts/findErrorSignature.ts +++ b/contracts/scripts/findErrorSignature.ts @@ -1,5 +1,38 @@ import { ethers } from 'ethers'; +// Error Signatures and their Selectors: +// ===================================== +// 0x09bde339 - InvalidProof() +// 0x646cf558 - AlreadyClaimed() +// 0xf5ae3f6f - NotRegistered(address nonRegisteredAddress) +// 0x153745d3 - RegistrationNotOpen() +// 0x697e379b - RegistrationNotClosed() +// 0x6b687806 - ClaimNotOpen() +// 0xfe9a439f - INSUFFICIENT_CHARCODE_LEN() +// 0xb3375953 - InvalidDateLength() +// 0xf1ebec96 - InvalidAsciiCode() +// 0x16f40c94 - InvalidYearRange() +// 0x25e62788 - InvalidMonthRange() +// 0x8930acef - InvalidDayRange() +// 0x3ae4ed6b - InvalidFieldElement() +// 0x17af8154 - InvalidDateDigit() +// 0x899ef10d - LENGTH_MISMATCH() +// 0x8e727f46 - NO_VERIFIER_SET() +// 0xed8cf9ff - CURRENT_DATE_NOT_IN_VALID_RANGE() +// 0xf0e539b9 - INVALID_OLDER_THAN() +// 0xbf21b11c - INVALID_FORBIDDEN_COUNTRIES() +// 0x71b125ed - INVALID_OFAC() +// 0x9003ac4d - INVALID_REGISTER_PROOF() +// 0x6a86dd76 - INVALID_DSC_PROOF() +// 0xd4d37a7a - INVALID_VC_AND_DISCLOSE_PROOF() +// 0x52906601 - INVALID_COMMITMENT_ROOT() +// 0x1ce3d3ca - INVALID_OFAC_ROOT() +// 0xa294ad3c - INVALID_CSCA_ROOT() +// 0xe0f15544 - INVALID_REVEALED_DATA_TYPE() +// 0x4ffa9998 - HUB_NOT_SET() +// 0xba0318cb - ONLY_HUB_CAN_ACCESS() +// 0x034acfcc - REGISTERED_COMMITMENT() + const errorSignatures = [ 'InvalidProof()', 'AlreadyClaimed()', @@ -35,7 +68,7 @@ const errorSignatures = [ errorSignatures.forEach(sig => { // Pls input the error code - const errorCode = '0xf1ebec96'; + const errorCode = '0x9003ac4d'; const selector = ethers.id(sig).slice(0, 10); if (selector === errorCode) { console.log(`Found matching error: ${sig}`); diff --git a/contracts/test/integration/commitmentRegistration.test.ts b/contracts/test/integration/commitmentRegistration.test.ts index 74461fa17..09784a6c0 100644 --- a/contracts/test/integration/commitmentRegistration.test.ts +++ b/contracts/test/integration/commitmentRegistration.test.ts @@ -7,7 +7,7 @@ import { ATTESTATION_ID } from "../utils/constants"; import { generateRegisterProof, generateDscProof } from "../utils/generateProof"; import { generateRandomFieldElement } from "../utils/utils"; import { TransactionReceipt, ZeroAddress } from "ethers"; -import serialized_dsc_tree from '../../../common/pubkeys/serialized_dsc_tree.json'; +import serialized_dsc_tree from '../utils/pubkeys/serialized_dsc_tree.json'; import { LeanIMT } from "@openpassport/zk-kit-lean-imt"; import {poseidon2} from "poseidon-lite"; diff --git a/contracts/test/integration/endToEnd.test.ts b/contracts/test/integration/endToEnd.test.ts index 9460971ac..a168d22c5 100644 --- a/contracts/test/integration/endToEnd.test.ts +++ b/contracts/test/integration/endToEnd.test.ts @@ -6,8 +6,8 @@ import { RegisterVerifierId, DscVerifierId, CIRCUIT_CONSTANTS } from "../../../c import { ATTESTATION_ID } from "../utils/constants"; import { generateRegisterProof, generateDscProof, generateVcAndDiscloseProof } from "../utils/generateProof"; import { generateRandomFieldElement, splitHexFromBack } from "../utils/utils"; -import { TransactionReceipt, ZeroAddress } from "ethers"; -import serialized_dsc_tree from '../../../common/pubkeys/serialized_dsc_tree.json'; +import { BigNumberish, TransactionReceipt, ZeroAddress } from "ethers"; +import serialized_dsc_tree from '../utils/pubkeys/serialized_dsc_tree.json'; import { LeanIMT } from "@openpassport/zk-kit-lean-imt"; import {poseidon2} from "poseidon-lite"; import { castFromScope } from "../../../common/src/utils/circuits/uuid"; @@ -179,15 +179,13 @@ describe("End to End Tests", function () { const airdropFactory = await ethers.getContractFactory("Airdrop"); const airdrop = await airdropFactory.connect(owner).deploy( hub.target, - registry.target, castFromScope("test-scope"), ATTESTATION_ID.E_PASSPORT, token.target, - rootTimestamp, true, 20, true, - countriesListPacked, + countriesListPacked as [BigNumberish, BigNumberish, BigNumberish, BigNumberish], [true, true, true], ); await airdrop.waitForDeployment(); @@ -195,7 +193,7 @@ describe("End to End Tests", function () { await token.connect(owner).mint(airdrop.target, BigInt(1000000000000000000)); await airdrop.connect(owner).openRegistration(); - await airdrop.connect(user1).registerAddress(vcAndDiscloseProof); + await airdrop.connect(user1).verifySelfProof(vcAndDiscloseProof); await airdrop.connect(owner).closeRegistration(); const tree = new BalanceTree([ diff --git a/contracts/test/integration/vcAndDisclose.test.ts b/contracts/test/integration/vcAndDisclose.test.ts index 51efd83bb..07ae4eb92 100644 --- a/contracts/test/integration/vcAndDisclose.test.ts +++ b/contracts/test/integration/vcAndDisclose.test.ts @@ -86,8 +86,6 @@ describe("VC and Disclose", () => { it("should verify and get result successfully", async () => { const {hub, registry, owner} = deployedActors; - console.log(vcAndDiscloseProof.pubSignals); - // console.log("root in proof: ", vcAndDiscloseProof.pubSignals[CIRCUIT_CONSTANTS.VC_AND_DISCLOSE_MERKLE_ROOT_INDEX]); const vcAndDiscloseHubProof = { olderThanEnabled: true, diff --git a/contracts/test/integration/verifyAll.test.ts b/contracts/test/integration/verifyAll.test.ts index 41e7ae1ff..b139efd76 100644 --- a/contracts/test/integration/verifyAll.test.ts +++ b/contracts/test/integration/verifyAll.test.ts @@ -12,6 +12,7 @@ import { generateVcAndDiscloseProof, parseSolidityCalldata } from "../utils/gene import { Formatter } from "../utils/formatter"; import { formatCountriesList, reverseBytes } from "../../../common/src/utils/circuits/formatInputs"; import { VerifyAll } from "../../typechain-types"; +import { getSMTs } from "../utils/generateProof"; import { Groth16Proof, PublicSignals, groth16 } from "snarkjs"; import { VcAndDiscloseProof } from "../utils/types"; @@ -26,7 +27,9 @@ describe("VerifyAll", () => { let commitment: any; let nullifier: any; let forbiddenCountriesList: string[]; + let invalidForbiddenCountriesList: string[]; let forbiddenCountriesListPacked: string[]; + let invalidForbiddenCountriesListPacked: string[]; before(async () => { deployedActors = await deploySystemFixtures(); @@ -44,8 +47,13 @@ describe("VerifyAll", () => { imt = new LeanIMT(hashFunction); await imt.insert(BigInt(commitment)); - forbiddenCountriesList = ['AAA', 'ABC', 'CBA']; - forbiddenCountriesListPacked = splitHexFromBack(reverseBytes(Formatter.bytesToHexString(new Uint8Array(formatCountriesList(forbiddenCountriesList))))); + forbiddenCountriesList = ['AAA', 'ABC', 'CBA', 'AAA', 'AAA', 'ABC', 'CBA', 'AAA', 'ABC', 'CBA','AAA', 'ABC', 'CBA', 'AAA', 'ABC', 'CBA', 'AAA', 'ABC', 'CBA', 'AAA', 'ABC', 'CBA','AAA', 'ABC', 'CBA', 'AAA', 'ABC', 'CBA','AAA', 'ABC', 'CBA', 'AAA', 'ABC', 'CBA', 'AAA', 'ABC', 'CBA', 'AAA', 'ABC', 'CBA']; + const wholePacked = reverseBytes(Formatter.bytesToHexString(new Uint8Array(formatCountriesList(forbiddenCountriesList)))); + forbiddenCountriesListPacked = splitHexFromBack(wholePacked); + + invalidForbiddenCountriesList = ['AAA', 'ABC', 'CBA', 'CBA']; + const invalidWholePacked = reverseBytes(Formatter.bytesToHexString(new Uint8Array(formatCountriesList(invalidForbiddenCountriesList)))); + invalidForbiddenCountriesListPacked = splitHexFromBack(invalidWholePacked); baseVcAndDiscloseProof = await generateVcAndDiscloseProof( registerSecret, @@ -196,6 +204,304 @@ describe("VerifyAll", () => { expect(success).to.be.false; expect(readableData.name).to.be.empty; }); + + describe("Error Handling", () => { + it("should return error code 'INVALID_VC_AND_DISCLOSE_PROOF' when proof is invalid", async () => { + const {registry, owner} = deployedActors; + await registry.connect(owner).devAddIdentityCommitment( + ATTESTATION_ID.E_PASSPORT, + nullifier, + commitment + ); + + vcAndDiscloseProof.a[0] = generateRandomFieldElement(); + + const vcAndDiscloseHubProof = { + olderThanEnabled: false, + olderThan: "20", + forbiddenCountriesEnabled: false, + forbiddenCountriesListPacked: forbiddenCountriesListPacked, + ofacEnabled: [false, false, false], + vcAndDiscloseProof: vcAndDiscloseProof + }; + + const types = ["0", "1", "2"]; + const [readableData, success, errorCode] = await verifyAll.verifyAll( + 0, + vcAndDiscloseHubProof, + types + ); + + expect(success).to.be.false; + expect(errorCode).to.equal("INVALID_VC_AND_DISCLOSE_PROOF"); + expect(readableData.name).to.be.empty; + }); + + it("should return error code 'CURRENT_DATE_NOT_IN_VALID_RANGE' when date is invalid", async () => { + const {registry, owner} = deployedActors; + await registry.connect(owner).devAddIdentityCommitment( + ATTESTATION_ID.E_PASSPORT, + nullifier, + commitment + ); + + vcAndDiscloseProof.pubSignals[CIRCUIT_CONSTANTS.VC_AND_DISCLOSE_CURRENT_DATE_INDEX] = 0; + + const vcAndDiscloseHubProof = { + olderThanEnabled: true, + olderThan: "20", + forbiddenCountriesEnabled: true, + forbiddenCountriesListPacked: forbiddenCountriesListPacked, + ofacEnabled: [true, true, true], + vcAndDiscloseProof: vcAndDiscloseProof + }; + + const types = ["0", "1", "2"]; + const [readableData, success, errorCode] = await verifyAll.verifyAll( + 0, + vcAndDiscloseHubProof, + types + ); + + expect(success).to.be.false; + expect(errorCode).to.equal("CURRENT_DATE_NOT_IN_VALID_RANGE"); + expect(readableData.name).to.be.empty; + }); + + it("should return error code 'INVALID_OLDER_THAN' when age check fails", async () => { + const {registry, owner} = deployedActors; + await registry.connect(owner).devAddIdentityCommitment( + ATTESTATION_ID.E_PASSPORT, + nullifier, + commitment + ); + + const vcAndDiscloseHubProof = { + olderThanEnabled: true, + olderThan: "21", // Higher than the age in proof + forbiddenCountriesEnabled: false, + forbiddenCountriesListPacked: forbiddenCountriesListPacked, + ofacEnabled: [false, false, false], + vcAndDiscloseProof: vcAndDiscloseProof + }; + + const types = ["0", "1", "2"]; + const [readableData, success, errorCode] = await verifyAll.verifyAll( + 0, + vcAndDiscloseHubProof, + types + ); + + expect(success).to.be.false; + expect(errorCode).to.equal("INVALID_OLDER_THAN"); + expect(readableData.name).to.be.empty; + }); + + it("should return error code 'INVALID_OFAC' when OFAC check fails", async () => { + const {registry, owner} = deployedActors; + await registry.connect(owner).devAddIdentityCommitment( + ATTESTATION_ID.E_PASSPORT, + nullifier, + commitment + ); + + const { + passportNo_smt, + nameAndDob_smt, + nameAndYob_smt + } = getSMTs(); + + vcAndDiscloseProof = await generateVcAndDiscloseProof( + registerSecret, + BigInt(ATTESTATION_ID.E_PASSPORT).toString(), + deployedActors.mockPassport, + "test-scope", + new Array(88).fill("1"), + "1", + imt, + "20", + passportNo_smt, + nameAndDob_smt, + nameAndYob_smt, + "0" + ); + + const vcAndDiscloseHubProof = { + olderThanEnabled: true, + olderThan: "20", + forbiddenCountriesEnabled: false, + forbiddenCountriesListPacked: forbiddenCountriesListPacked, + ofacEnabled: [true, true, true], + vcAndDiscloseProof: vcAndDiscloseProof + }; + + const types = ["0", "1", "2"]; + const [readableData, success, errorCode] = await verifyAll.verifyAll( + 0, + vcAndDiscloseHubProof, + types + ); + console.log("return values"); + console.log("readable data: ", readableData); + console.log("success: ", success); + console.log("errorCode: ", errorCode); + + expect(success).to.be.false; + expect(errorCode).to.equal("INVALID_OFAC"); + expect(readableData.name).to.be.empty; + }); + + it("should return error code 'INVALID_FORBIDDEN_COUNTRIES' when countries check fails", async () => { + const {registry, owner} = deployedActors; + await registry.connect(owner).devAddIdentityCommitment( + ATTESTATION_ID.E_PASSPORT, + nullifier, + commitment + ); + + const vcAndDiscloseHubProof = { + olderThanEnabled: true, + olderThan: "20", + forbiddenCountriesEnabled: true, + forbiddenCountriesListPacked: invalidForbiddenCountriesListPacked, + ofacEnabled: [true, true, true], + vcAndDiscloseProof: vcAndDiscloseProof + }; + + const types = ["0", "1", "2"]; + const [readableData, success, errorCode] = await verifyAll.verifyAll( + 0, + vcAndDiscloseHubProof, + types + ); + + expect(success).to.be.false; + expect(errorCode).to.equal("INVALID_FORBIDDEN_COUNTRIES"); + expect(readableData.name).to.be.empty; + }); + + it("should return error code 'INVALID_TIMESTAMP' when root timestamp doesn't match", async () => { + const {registry, owner} = deployedActors; + await registry.connect(owner).devAddIdentityCommitment( + ATTESTATION_ID.E_PASSPORT, + nullifier, + commitment + ); + + const vcAndDiscloseHubProof = { + olderThanEnabled: true, + olderThan: "20", + forbiddenCountriesEnabled: true, + forbiddenCountriesListPacked: forbiddenCountriesListPacked, + ofacEnabled: [true, true, true], + vcAndDiscloseProof: vcAndDiscloseProof + }; + + const types = ["0", "1", "2"]; + const [readableData, success, errorCode] = await verifyAll.verifyAll( + 123456, // Invalid timestamp + vcAndDiscloseHubProof, + types + ); + + expect(success).to.be.false; + expect(errorCode).to.equal("INVALID_TIMESTAMP"); + expect(readableData.name).to.be.empty; + }); + + it("should return error code 'INVALID_OFAC_ROOT' when passport number OFAC root is invalid", async () => { + const {registry, owner} = deployedActors; + await registry.connect(owner).devAddIdentityCommitment( + ATTESTATION_ID.E_PASSPORT, + nullifier, + commitment + ); + + vcAndDiscloseProof.pubSignals[CIRCUIT_CONSTANTS.VC_AND_DISCLOSE_PASSPORT_NO_SMT_ROOT_INDEX] = generateRandomFieldElement(); + + const vcAndDiscloseHubProof = { + olderThanEnabled: true, + olderThan: "20", + forbiddenCountriesEnabled: true, + forbiddenCountriesListPacked: forbiddenCountriesListPacked, + ofacEnabled: [true, true, true], + vcAndDiscloseProof: vcAndDiscloseProof + }; + + const types = ["0", "1", "2"]; + const [readableData, success, errorCode] = await verifyAll.verifyAll( + 0, + vcAndDiscloseHubProof, + types + ); + + expect(success).to.be.false; + expect(errorCode).to.equal("INVALID_OFAC_ROOT"); + expect(readableData.name).to.be.empty; + }); + + it("should return error code 'INVALID_OFAC_ROOT' when name and dob OFAC root is invalid", async () => { + const {registry, owner} = deployedActors; + await registry.connect(owner).devAddIdentityCommitment( + ATTESTATION_ID.E_PASSPORT, + nullifier, + commitment + ); + + vcAndDiscloseProof.pubSignals[CIRCUIT_CONSTANTS.VC_AND_DISCLOSE_NAME_DOB_SMT_ROOT_INDEX] = generateRandomFieldElement(); + + const vcAndDiscloseHubProof = { + olderThanEnabled: true, + olderThan: "20", + forbiddenCountriesEnabled: true, + forbiddenCountriesListPacked: forbiddenCountriesListPacked, + ofacEnabled: [false, true, false], + vcAndDiscloseProof: vcAndDiscloseProof + }; + + const types = ["0", "1", "2"]; + const [readableData, success, errorCode] = await verifyAll.verifyAll( + 0, + vcAndDiscloseHubProof, + types + ); + + expect(success).to.be.false; + expect(errorCode).to.equal("INVALID_OFAC_ROOT"); + expect(readableData.name).to.be.empty; + }); + + it("should return error code 'INVALID_OFAC_ROOT' when name and yob OFAC root is invalid", async () => { + const {registry, owner} = deployedActors; + await registry.connect(owner).devAddIdentityCommitment( + ATTESTATION_ID.E_PASSPORT, + nullifier, + commitment + ); + + vcAndDiscloseProof.pubSignals[CIRCUIT_CONSTANTS.VC_AND_DISCLOSE_NAME_YOB_SMT_ROOT_INDEX] = generateRandomFieldElement(); + + const vcAndDiscloseHubProof = { + olderThanEnabled: true, + olderThan: "20", + forbiddenCountriesEnabled: true, + forbiddenCountriesListPacked: forbiddenCountriesListPacked, + ofacEnabled: [false, false, true], + vcAndDiscloseProof: vcAndDiscloseProof + }; + + const types = ["0", "1", "2"]; + const [readableData, success, errorCode] = await verifyAll.verifyAll( + 0, + vcAndDiscloseHubProof, + types + ); + + expect(success).to.be.false; + expect(errorCode).to.equal("INVALID_OFAC_ROOT"); + expect(readableData.name).to.be.empty; + }); + }); }); describe("admin functions", () => { diff --git a/contracts/test/unit/IdentityRegistry.test.ts b/contracts/test/unit/IdentityRegistry.test.ts index 8e804635d..adee3ca63 100644 --- a/contracts/test/unit/IdentityRegistry.test.ts +++ b/contracts/test/unit/IdentityRegistry.test.ts @@ -741,30 +741,27 @@ describe("Unit Tests for IdentityRegistry", () => { const initialCommitmentRoot = await registry.getIdentityCommitmentMerkleRoot(); const initialTreeSize = await registry.getIdentityCommitmentMerkleTreeSize(); - const PoseidonT3Factory = await ethers.getContractFactory("PoseidonT3", owner); - const poseidonT3 = await PoseidonT3Factory.deploy(); - await poseidonT3.waitForDeployment(); - - const IdentityRegistryImplFactory = await ethers.getContractFactory( - "IdentityRegistryImplV1", - { - libraries: { - PoseidonT3: poseidonT3.target - } - }, + // Deploy testUpgradedIdentityRegistryImplV1 instead + const UpgradedRegistryFactory = await ethers.getContractFactory( + "testUpgradedIdentityRegistryImplV1", owner ); - const registryV2Implementation = await IdentityRegistryImplFactory.deploy(); + const registryV2Implementation = await UpgradedRegistryFactory.deploy(); await registryV2Implementation.waitForDeployment(); + // Upgrade and initialize with isTest = true await registry.connect(owner).upgradeToAndCall( registryV2Implementation.target, - "0x" + UpgradedRegistryFactory.interface.encodeFunctionData("initialize", [true]) ); - const registryV2 = await ethers.getContractAt("IdentityRegistryImplV1", registry.target); + const registryV2 = await ethers.getContractAt("testUpgradedIdentityRegistryImplV1", registry.target); + // Check new functionality + expect(await registryV2.isTest()).to.equal(true); + + // Check preserved state expect(await registryV2.hub()).to.equal(initialHub); expect(await registryV2.getCscaRoot()).to.equal(initialCscaRoot); expect(await registryV2.getPassportNoOfacRoot()).to.equal(initialPassportNoOfacRoot); diff --git a/contracts/test/unit/IdentityVerificationHub.test.ts b/contracts/test/unit/IdentityVerificationHub.test.ts index 1eed36b81..513c60ad7 100644 --- a/contracts/test/unit/IdentityVerificationHub.test.ts +++ b/contracts/test/unit/IdentityVerificationHub.test.ts @@ -370,7 +370,6 @@ describe("Unit Tests for IdentityVerificationHub", () => { }); describe("Upgradeabilitiy", () => { - it("should preserve state after upgrade", async () => { const {hub, owner} = deployedActors; @@ -383,23 +382,25 @@ describe("Unit Tests for IdentityVerificationHub", () => { DscVerifierId.dsc_sha256_rsa_65537_4096 ); - const HubV2Factory = await ethers.getContractFactory("IdentityVerificationHubImplV1", owner); + const HubV2Factory = await ethers.getContractFactory("testUpgradedIdentityVerificationHubImplV1", owner); const hubV2Implementation = await HubV2Factory.deploy(); await hubV2Implementation.waitForDeployment(); const hubAsImpl = await ethers.getContractAt( - "IdentityVerificationHubImplV1", + "testUpgradedIdentityVerificationHubImplV1", hub.target ); await hubAsImpl.connect(owner).upgradeToAndCall( hubV2Implementation.target, - "0x" + HubV2Factory.interface.encodeFunctionData("initialize", [true]) ); - const hubV2 = await ethers.getContractAt("IdentityVerificationHubImplV1", hub.target); - const registryAddressAfter = await hubV2.registry(); - expect(registryAddressAfter).to.equal(registryAddressBefore); + const hubV2 = await ethers.getContractAt("testUpgradedIdentityVerificationHubImplV1", hub.target); + + expect(await hubV2.isTest()).to.equal(true); + + expect(await hubV2.registry()).to.equal(registryAddressBefore); expect(await hubV2.vcAndDiscloseCircuitVerifier()).to.equal(vcAndDiscloseCircuitVerifierBefore); expect(await hubV2.sigTypeToRegisterCircuitVerifiers( RegisterVerifierId.register_sha256_sha256_sha256_rsa_65537_4096 @@ -415,21 +416,21 @@ describe("Unit Tests for IdentityVerificationHub", () => { }); it("should not allow non-proxy to upgrade implementation", async() => { - const {hub, hubImpl, owner, user1} = deployedActors; + const {hub, hubImpl, owner} = deployedActors; - const HubV2Factory = await ethers.getContractFactory("IdentityVerificationHubImplV1", owner); + const HubV2Factory = await ethers.getContractFactory("testUpgradedIdentityVerificationHubImplV1", owner); const hubV2Implementation = await HubV2Factory.deploy(); await hubV2Implementation.waitForDeployment(); const hubAsImpl = await ethers.getContractAt( - "IdentityVerificationHubImplV1", + "testUpgradedIdentityVerificationHubImplV1", hub.target ); await expect( hubImpl.connect(owner).upgradeToAndCall( hubV2Implementation.target, - "0x" + HubV2Factory.interface.encodeFunctionData("initialize", [true]) ) ).to.be.revertedWithCustomError(hubAsImpl, "UUPSUnauthorizedCallContext"); }); @@ -437,19 +438,19 @@ describe("Unit Tests for IdentityVerificationHub", () => { it("should not allow non-owner to upgrade implementation", async () => { const {hub, owner, user1} = deployedActors; - const HubV2Factory = await ethers.getContractFactory("IdentityVerificationHubImplV1", owner); + const HubV2Factory = await ethers.getContractFactory("testUpgradedIdentityVerificationHubImplV1", owner); const hubV2Implementation = await HubV2Factory.deploy(); await hubV2Implementation.waitForDeployment(); const hubAsImpl = await ethers.getContractAt( - "IdentityVerificationHubImplV1", + "testUpgradedIdentityVerificationHubImplV1", hub.target ); await expect( hubAsImpl.connect(user1).upgradeToAndCall( hubV2Implementation.target, - "0x" + HubV2Factory.interface.encodeFunctionData("initialize", [true]) ) ).to.be.revertedWithCustomError(hubAsImpl, "OwnableUnauthorizedAccount"); }); @@ -457,31 +458,24 @@ describe("Unit Tests for IdentityVerificationHub", () => { it("should not allow implementation contract to be initialized directly", async () => { const {hub, owner} = deployedActors; - const HubV2Factory = await ethers.getContractFactory("IdentityVerificationHubImplV1", owner); + const HubV2Factory = await ethers.getContractFactory("testUpgradedIdentityVerificationHubImplV1", owner); const hubV2Implementation = await HubV2Factory.deploy(); await hubV2Implementation.waitForDeployment(); await expect( - hubV2Implementation.initialize( - ethers.ZeroAddress, - ethers.ZeroAddress, - [], - [], - [], - [] - ) + hubV2Implementation.initialize(true) ).to.be.revertedWithCustomError(hub, "InvalidInitialization"); }); it("should not allow direct calls to implementation contract", async () => { const {hub, owner} = deployedActors; - const HubV2Factory = await ethers.getContractFactory("IdentityVerificationHubImplV1", owner); + const HubV2Factory = await ethers.getContractFactory("testUpgradedIdentityVerificationHubImplV1", owner); const hubV2Implementation = await HubV2Factory.deploy(); await hubV2Implementation.waitForDeployment(); await expect( - hubV2Implementation.updateRegistry(ethers.ZeroAddress) + hubV2Implementation.isTest() ).to.be.revertedWithCustomError(hubV2Implementation, "UUPSUnauthorizedCallContext"); }); }); diff --git a/contracts/test/unit/PCR0Manager.test.ts b/contracts/test/unit/PCR0Manager.test.ts new file mode 100644 index 000000000..b7a455994 --- /dev/null +++ b/contracts/test/unit/PCR0Manager.test.ts @@ -0,0 +1,102 @@ +import { expect } from "chai"; +import { ethers } from "hardhat"; +import { PCR0Manager } from "../typechain-types"; +import { SignerWithAddress } from "@nomicfoundation/hardhat-ethers/signers"; + +describe("PCR0Manager", function () { + let pcr0Manager: PCR0Manager; + let owner: SignerWithAddress; + let other: SignerWithAddress; + + // Sample PCR0 value for testing (48 bytes) + const samplePCR0 = "0x" + "00".repeat(48); + const invalidPCR0 = "0x" + "00".repeat(32); // 32 bytes (invalid size) + + beforeEach(async function () { + [owner, other] = await ethers.getSigners(); + + const PCR0Manager = await ethers.getContractFactory("PCR0Manager"); + pcr0Manager = await PCR0Manager.deploy(); + }); + + describe("addPCR0", function () { + it("should allow owner to add PCR0 value", async function () { + await expect(pcr0Manager.addPCR0(samplePCR0)) + .to.emit(pcr0Manager, "PCR0Added"); + + expect(await pcr0Manager.isPCR0Set(samplePCR0)).to.be.true; + }); + + it("should allow owner to add PCR0 value", async function () { + await expect(pcr0Manager.addPCR0(samplePCR0)) + .to.emit(pcr0Manager, "PCR0Added"); + + expect(await pcr0Manager.isPCR0Set(samplePCR0)).to.be.true; + }); + + it("should not allow non-owner to add PCR0 value", async function () { + await expect(pcr0Manager.connect(other).addPCR0(samplePCR0)) + .to.be.revertedWithCustomError(pcr0Manager, "OwnableUnauthorizedAccount") + .withArgs(other.address); + }); + + it("should not allow adding PCR0 with invalid size", async function () { + await expect(pcr0Manager.addPCR0(invalidPCR0)) + .to.be.revertedWith("PCR0 must be 48 bytes"); + }); + + it("should not allow adding duplicate PCR0", async function () { + await pcr0Manager.addPCR0(samplePCR0); + await expect(pcr0Manager.addPCR0(samplePCR0)) + .to.be.revertedWith("PCR0 already set"); + }); + }); + + describe("removePCR0", function () { + beforeEach(async function () { + await pcr0Manager.addPCR0(samplePCR0); + }); + + it("should allow owner to remove PCR0 value", async function () { + await expect(pcr0Manager.removePCR0(samplePCR0)) + .to.emit(pcr0Manager, "PCR0Removed"); + + expect(await pcr0Manager.isPCR0Set(samplePCR0)).to.be.false; + }); + + // This is not actually needed, just for increase the coverage of the test code + it("should not allow remove PCR0 with invalid size", async function () { + await expect(pcr0Manager.removePCR0(invalidPCR0)) + .to.be.revertedWith("PCR0 must be 48 bytes"); + }); + + it("should not allow non-owner to remove PCR0 value", async function () { + await expect(pcr0Manager.connect(other).removePCR0(samplePCR0)) + .to.be.revertedWithCustomError(pcr0Manager, "OwnableUnauthorizedAccount") + .withArgs(other.address); + }); + + it("should not allow removing non-existent PCR0", async function () { + const otherPCR0 = "0x" + "11".repeat(48); + await expect(pcr0Manager.removePCR0(otherPCR0)) + .to.be.revertedWith("PCR0 not set"); + }); + }); + + describe("isPCR0Set", function () { + it("should correctly return PCR0 status", async function () { + expect(await pcr0Manager.isPCR0Set(samplePCR0)).to.be.false; + + await pcr0Manager.addPCR0(samplePCR0); + expect(await pcr0Manager.isPCR0Set(samplePCR0)).to.be.true; + + await pcr0Manager.removePCR0(samplePCR0); + expect(await pcr0Manager.isPCR0Set(samplePCR0)).to.be.false; + }); + + it("should not allow checking PCR0 with invalid size", async function () { + await expect(pcr0Manager.isPCR0Set(invalidPCR0)) + .to.be.revertedWith("PCR0 must be 48 bytes"); + }); + }); +}); \ No newline at end of file diff --git a/contracts/test/unit/formatter.test.ts b/contracts/test/unit/formatter.test.ts index 69e5ba304..1ea2b3dee 100644 --- a/contracts/test/unit/formatter.test.ts +++ b/contracts/test/unit/formatter.test.ts @@ -83,22 +83,6 @@ describe("Formatter", function () { expect(() => Formatter.formatDate(input)) .to.throw("InvalidDayRange"); }); - - it("should handle errors consistently when input is not a number", async function () { - const input = "94012a"; - await expect(testFormatter.testFormatDate(input)) - .to.be.revertedWithCustomError(testFormatter, "InvalidAsciiCode"); - expect(() => Formatter.formatDate(input)) - .to.throw("InvalidAsciiCode"); - }); - - it("should handle errors consistently when input is not a number", async function () { - const input = "94012."; - await expect(testFormatter.testFormatDate(input)) - .to.be.revertedWithCustomError(testFormatter, "InvalidAsciiCode"); - expect(() => Formatter.formatDate(input)) - .to.throw("InvalidAsciiCode"); - }); }); describe("numAsciiToUint", function () { @@ -112,15 +96,6 @@ describe("Formatter", function () { } }); - it("should handle errors consistently between contract and ts", async function () { - const invalidInputs = [47, 58]; - for (const input of invalidInputs) { - await expect(testFormatter.testNumAsciiToUint(input)) - .to.be.revertedWithCustomError(testFormatter, "InvalidAsciiCode"); - expect(() => Formatter.numAsciiToUint(input)) - .to.throw("InvalidAsciiCode"); - } - }); }); describe("fieldElementsToBytes", function () { @@ -286,18 +261,6 @@ describe("Formatter", function () { .to.be.revertedWithCustomError(testFormatter, "InvalidDayRange"); }); - it("should revert when date digit is out of range", async function () { - const input = "94012a"; - await expect(testFormatter.testDateToUnixTimestamp(input)) - .to.be.revertedWithCustomError(testFormatter, "InvalidAsciiCode"); - }); - - it("should revert when date digit is out of range", async function () { - const input = "94012."; - await expect(testFormatter.testDateToUnixTimestamp(input)) - .to.be.revertedWithCustomError(testFormatter, "InvalidAsciiCode"); - }); - }); describe("substring", function () { @@ -342,18 +305,6 @@ describe("Formatter", function () { } }); - it("should revert when input is not a number", async function () { - const input = "12a"; - await expect(testFormatter.testParseDatePart(input)) - .to.be.revertedWithCustomError(testFormatter, "InvalidAsciiCode"); - }); - - - it("should revert when input is not a number", async function () { - const input = "12."; - await expect(testFormatter.testParseDatePart(input)) - .to.be.revertedWithCustomError(testFormatter, "InvalidAsciiCode"); - }); }); describe("toTimestamp", function () { @@ -466,4 +417,4 @@ function toHexString(bytes: Uint8Array): string { return '0x' + Array.from(bytes) .map(b => b.toString(16).padStart(2, '0')) .join(''); -} +} \ No newline at end of file diff --git a/contracts/test/utils/deployment.ts b/contracts/test/utils/deployment.ts index 9fecd7dc7..43ed986e0 100644 --- a/contracts/test/utils/deployment.ts +++ b/contracts/test/utils/deployment.ts @@ -5,7 +5,7 @@ import { PassportData } from "../../../common/src/utils/types"; import { genMockPassportData } from "../../../common/src/utils/passports/genMockPassportData"; import { RegisterVerifierId, DscVerifierId } from "../../../common/src/constants/constants"; import { getCscaTreeRoot } from "../../../common/src/utils/trees"; -import serialized_csca_tree from "../../../common/pubkeys/serialized_csca_tree.json"; +import serialized_csca_tree from "./pubkeys/serialized_csca_tree.json"; import { DeployedActors, VcAndDiscloseVerifier, @@ -49,7 +49,7 @@ export async function deploySystemFixtures(): Promise { mockPassport = genMockPassportData( "sha256", "sha256", - "rsa_sha256_65537_2048", + "rsa_sha256_65537_4096", "FRA", "940131", "401031" @@ -176,4 +176,4 @@ export async function deploySystemFixtures(): Promise { user2: user2, mockPassport: mockPassport }; -} +} \ No newline at end of file diff --git a/contracts/test/utils/generateProof.ts b/contracts/test/utils/generateProof.ts index be3907554..b0ad48a68 100644 --- a/contracts/test/utils/generateProof.ts +++ b/contracts/test/utils/generateProof.ts @@ -23,8 +23,8 @@ import { generateCircuitInputsDSC, generateCircuitInputsVCandDisclose } from "../../../common/src/utils/circuits/generateInputs"; -import serialized_csca_tree from '../../../common/pubkeys/serialized_csca_tree.json'; -import serialized_dsc_tree from '../../../common/pubkeys/serialized_dsc_tree.json'; +import serialized_csca_tree from './pubkeys/serialized_csca_tree.json'; +import serialized_dsc_tree from './pubkeys/serialized_dsc_tree.json'; const registerCircuits: CircuitArtifacts = { "register_sha256_sha256_sha256_rsa_65537_4096": { @@ -58,7 +58,7 @@ export async function generateRegisterProof( const registerCircuitInputs: CircuitSignals = await generateCircuitInputsRegister( secret, passportData, - serialized_dsc_tree + serialized_dsc_tree as string ); // Generate the proof diff --git a/contracts/test/utils/pubkeys/serialized_csca_tree.json b/contracts/test/utils/pubkeys/serialized_csca_tree.json new file mode 100644 index 000000000..39a1b4114 --- /dev/null +++ b/contracts/test/utils/pubkeys/serialized_csca_tree.json @@ -0,0 +1 @@ +[["6302746167612040169287204224641965049119379670159808996613022200426959969278","21737912865216631366336567244260032647310946375673351181140174093591714702999","7881627741362630218419203394369410748786507764316669620068500512816306974393","8442633355440465296842644318461346259324083140085137778501389055937910431110","494385956299168270408334656570463268819757224023693256178124768603625095689","11109705732184239012583404749930109480114669765649070936031155493622876369432","9074991679283645951358641479142018086508433068636738897852818247691550887353","10472104103456953748165921858843921722705273802507936987918628317450502368318","20465532314290048641249890589020580844800312880610998262795900425795687925759","5768994172638224755740597462572068991220057867415414997645244086458792645415","17252018052637913533753543738759416074689182570352156984838315665730273174771","344641985496327935255151802075808884620413685031595062530048227920050721780","12136951745768356780790830952320550859256567348204838329686829291956271851018","13156935969312787083658542670212591426438912414983737359002368687207144158384","18390019689329531194486865663275817993149098196912806933141622083576329149060","1481242557340385890029242958318001323542042109291864424212505135403557049174","8212379972296569224239707053291801266656219357105654879157065434106153446780","7259130865988598378063439736597905343524876834653292276109931166452499429748","9121308753649396222680496889506939509201230922178179924059434299141020697403","285292161892340475671724520102600999462489619312686773735450615184611138494","17039352924793721634937165985544670409252882635692632479205349210469115588765","13502358060740841171380532205068310953416088597412723446166411697331808464867","17340560759412667275187297637986710225182012906580596771637656874104617617955","8161679470983166059226129385619085265731972285960057248143860608525733203270","14871986472052100593919450740854089518175775672170855933096343961866149319949","1024796798868617073580401107121867347946885220866292564654180021134775438463","21314659513316629128269900118046844671368217281573948618189189184438357521850","14333285970232052794263361289909650744651387298949229098454892979931317772146","16041205263585308774562352509747184978808349452049402919724529400974025427436","8087267757933126132764313502987988617372965137423098839133763536652762365681","7962106263240616478489255388356842229007064058701247603002333884146997650489","3623426348190205637422491853880154438593931070755716928634661523298474873370","14890281186129558220608231498920908810133225689204820445535572821472349664447"],["4799972325846543794225228491143787399389885942417063987224237164999385319062","17050236804818394861130974609766586541491094962728898163841781451223822854686","1684095988446507706929542511950029896329456076438958417914434742534053808377","13030822995128201263800907485086206983654704449426873876221363197647850166314","20387868117709928393743787975391876407731857373450679028712293718320824421501","20648800321790649263930241990062778433044036026899293567267368546697502978404","5558822243190898430854422659247277485120763541538425901094235849734898971547","9648977827828540671109446184233701627175773049876679003145259446306367526913","19587958295993125277460383800858337068930180629959346593667253473373677697838","10766098235994178632473997874302736133480358322525035521842128765122396106753","3280132879539287366527818935691748975940933587498820629810825597324185825847","16042507993949674348775016509851234008694527541085892473255432193590272155228","9861886961854997054898644300025435424974733812770562105962523420323474270014","19963900440588427317645840967905315109665755922636714102274837921808725924490","14560929249637716209472399173281335447881032559475124155250089695314652709191","8793029054134443177154661146037690681847213703147023923126117330651746975093","6925999197894078032454979151597762706585652495739163647097172857061948107548"],["15437505910104448767291373721892514134533670716520577686244116418756186347964","9662712081254759511361246703401148719683866951663061909834810685640445739155","20383431234416469352301291449238452506080771017490889548224583250446902949522","17761227464350859107613675961034420867642506074271853781885405739945665021951","10107612039899335485435001531034291183382103402117414413277201288890819890175","21676120760606796382962041245156922927516003007606533210349079976883427407876","3959481944782480427438878998268686710659856580112036162216134326047024223619","13995366414942085322718873409710308506843557459098667415203661966308146712276","12396189675521664477208213044494994395570714180213788407180369449372794337406"],["17536551248416856833253545290007826015310552834679591084728236812275380736581","21178262016621282270578676828655596120453358323099758552458721672074592774466","12983142270089439210893516110450393549941947745609655791579563598275214147990","11138438821067972642938006246604783995156242377512994534882399065269415238242","14367141578614776950464394914864658179440566498674064519890241555879050349273"],["4746628767395628818871695814217923898815372663453343963780833567597879413422","6217935900653585035630246253466782187759116959924419206414312068302028006200","1712622252469401905020836297393811034367718131168934306349084470952949672370"],["9591986692462415575100546764405459060632901984266333538073859143124986153857","16005335605576341683358111497065243375958891362902160878740195332217005325867"],["10058083772386987881503691291273436622272886362704429356343750534180295442877"],["948496844530378519444411419272223562136844993455458676689351273655202389660"],["6104686411816540186205486815934621935504228294686310666920439592650163266817"],["8785911549693694407543433563052767959786709016516642293679450790050523979623"],["7409592596312085101815420137623073822216578588711762918861029979315261400521"],["21777804325204060904854919426171461175668073322071471253268661582106674611134"],["13859398115974385161464830211947258005860166431741677064758266112192747818198"]] \ No newline at end of file diff --git a/contracts/test/utils/pubkeys/serialized_dsc_tree.json b/contracts/test/utils/pubkeys/serialized_dsc_tree.json new file mode 100644 index 000000000..1a229c5c7 --- /dev/null +++ b/contracts/test/utils/pubkeys/serialized_dsc_tree.json @@ -0,0 +1 @@ +"[[\"8474170120361574158328936749210134677109057903005360945237099789945718842442\",\"19025861045901247405057316482734230273999651461753587376586889481054653237298\",\"20875820196105056284418196645437121025521090457969915100313025042226816593058\",\"7981401722738051151242865671764881670381691410051713896829121611466467295296\",\"12686075888445000028034879614337002534166281820554518240319859431277458776808\",\"14407479994300627796369211860752956065461957169462957624471349543175814297361\",\"12876099927862331079950419893066049696538807114168859906501896216679946602822\",\"5034430740274171017815797630858587451285547946739275122278422412563124952340\",\"124908299050395035311905641407789814479238558810338620545288553719611907579\",\"2220350286514662949665617433093307231741026918951518572442081261648362984066\",\"21054071841429471407849176541802267087608621767405046215729266220057231321239\",\"18615459511690451805285056890862312778437329715516723596790967668107849472332\",\"11005834873878236310149874426944776526137242691148625759790072174524730632293\",\"7750466501575524692208442425341714971523444376628469247291115085823741362258\",\"2825614199585564216616864222833372928389506766845048349547149599270041996580\",\"20178939917842893412863622473123830356625340961044353255941385554773117435807\",\"15457105913874757357155517217216962392853062937896722147907639311387695489612\",\"5769570513706963538956166571458035734925811338270969027092827256594315896305\",\"6944618873207772930654947866168069208208574383743967671528812057261674809023\",\"481787392403338571656555722870122978065125892949434958835001773033712625191\",\"629022117628670814916597453011668822767584986875266116143558377822126606210\",\"3477506405023338639718612883193130086582505996283986141234891023161625314400\",\"10391239348681537631698595933529223926008268217047488115607852208836329547314\",\"17714411760364866672536495662484312224393687256599208863125247267615177780962\",\"8235397798041831527134655625941532067772455314854641402993505266475178259142\",\"15400445794279992494417489709867566126537687907753955918275441261129856435204\",\"18390538379285507212129312705208118101486722955290795425636438098737923067560\",\"15884158870062763074209623120979824036430500099471957276287699843774740810060\",\"9761474784835077830881823851138622604776507060902897946796201272804305644780\",\"10691342730033436831098118713873643843887824911850191956325145412899736489783\",\"5383646477412575449009401478396232205746537027068927954390800800393113212132\",\"11221442935955024550310715250831163771206851175519681722264731998826151062912\",\"5908215522026944047821144963285306601790999208803054898792188809472216445547\",\"19125477641235279033749474384585292663869320556945218215852551798484901700632\",\"21131596906673841534294586137917770250418344721734587506304435102735580889655\",\"5546854205853827616610180972262457239247839686812479293725221982292586246857\",\"765319165068330175794491754566055878846660871087781618280248834367406785408\",\"9065563084454046530671534818701959328556136219713201237904842104821385096277\",\"11685470115846281888274197814651339961028617777494077059927246879793227459012\",\"2276790636588619756427393596069501098393513502175223999114797598139979501715\"],[\"18261435412082991275184532065290531009107742677653928657546608300990409875179\",\"9319096001557865141309312824962941754323190215020661725351078769489865210042\",\"19426464515945862948128564234105343408552273980845098594209919356069483229628\",\"4821438189762812946550415462056480603193509374059280985662653954928168448767\",\"5172906179275109031852701363533115355308886025681591977544612584826814597738\",\"3030902410998504999074059222657043445867065651115237138539258929106073952351\",\"14984550843964273185801085401106206042254593799102067736545138712711200363110\",\"4913017693235246056337618677701835414584892336316530224150731143499438377822\",\"20331547282693860184739325401078246632991653782842932001956973617899699067126\",\"7600383600608310101623426738393844905406553598472129359788500052979517101086\",\"21052687276768682440237728714031588951028862448534763565173935420275983308030\",\"8624573291232390725167327242752231606002232362298782976538648069452315809692\",\"8822425521071097948786926466502634257594788443097595142360595191654091518800\",\"19870347064194260309549332912586515029667844641153191360540616815967059032631\",\"20465460310501582547409465331218341819661912832562849210077024323229630431309\",\"8822852684497325396969645265731037061910702688625880340802544167587243049164\",\"4478528672717298316804099458930548551969390361723990676862003909749451604942\",\"17325287090866702355475285665146878940121103201057390207999938983310817624720\",\"19625874220796709797520370627316734190983871032135923532916997267931941944017\",\"4971210922480782538363635536321057597816923124821190325639868004751176123095\"],[\"4116500508658592197045562123902818266144060908634297057533152651751621275415\",\"6279942219928883797763183575386930078658513224739644044432142134698996392345\",\"17873714886463212348626929321462768984929311072311394677407846329308137071177\",\"1780903854488782716523110881333093026159313079337979149518816941412656424372\",\"20050373159836077479057811893536206817195523291436452658040605882811525003132\",\"5410620983195375911090727814270361454832036795917695206544043001420960637777\",\"11266551165651302260349077780564641889328703387362942837789171445336788206333\",\"3608626782139895235764576982540708534353226535204704760149123479387449221471\",\"3145665689117343568678004953880446893036465022181894889004516583481449637793\",\"8073537774997617083133123196297054007342256527983221664627563913756598041137\"],[\"16950176155260599508276620633155897140104757247891462208942656524243675299741\",\"4384637840548698893518161520012906111962786493558848227457354530627659879521\",\"5124677781615023074976959243179487140944992271935523984403489366636038434778\",\"12988207380549681248970615897816015977834414112005771449262709089864569444208\",\"4960783735404364608985140352905530473941590990406201882678348579000881422078\"],[\"20387009608350563521735170556423317268483084337333204688511143658578884542027\",\"19972334535313243417117998358484532425461333194385844246074835217244635372928\",\"4960783735404364608985140352905530473941590990406201882678348579000881422078\"],[\"1003947683617565493626440885069112088208918036484637499642204220769104979880\",\"4960783735404364608985140352905530473941590990406201882678348579000881422078\"],[\"17493683025876340868978454534142017149014501237522261427894104407551129583657\"]]" \ No newline at end of file diff --git a/registry/src/csca/build_csca_merkle_tree.ts b/registry/src/csca/build_csca_merkle_tree.ts index 5d60440e3..66e19afe4 100644 --- a/registry/src/csca/build_csca_merkle_tree.ts +++ b/registry/src/csca/build_csca_merkle_tree.ts @@ -57,7 +57,7 @@ function processCertificate(pemContent: string, filePath: string) { async function buildCscaMerkleTree() { const tree = new IMT(poseidon2, CSCA_TREE_DEPTH, 0, 2); - if (true) { + if (!DEVELOPMENT_MODE) { const path_to_pem_files = "outputs/csca/pem_masterlist"; for (const file of fs.readdirSync(path_to_pem_files)) { const file_path = path.join(path_to_pem_files, file); @@ -73,7 +73,7 @@ async function buildCscaMerkleTree() { } } - if (true) { + if (DEVELOPMENT_MODE) { const dev_pem_path = path.join(__dirname, '..', '..', '..', 'common', 'src', 'mock_certificates'); const subdirectories = fs.readdirSync(dev_pem_path, { withFileTypes: true }) .filter(item => item.isDirectory()) diff --git a/registry/src/dsc/build_dsc_merkle_tree.ts b/registry/src/dsc/build_dsc_merkle_tree.ts index c481484c2..3a8c3d293 100644 --- a/registry/src/dsc/build_dsc_merkle_tree.ts +++ b/registry/src/dsc/build_dsc_merkle_tree.ts @@ -113,7 +113,7 @@ function processCertificate(pemContent: string, filePath: string) { async function buildDscMerkleTree() { const tree = new LeanIMT((a, b) => poseidon2([a, b]), []); - if (true) { + if (!DEVELOPMENT_MODE) { const path_to_pem_files = "outputs/dsc/pem_masterlist"; for (const file of fs.readdirSync(path_to_pem_files)) { const file_path = path.join(path_to_pem_files, file); @@ -129,7 +129,7 @@ async function buildDscMerkleTree() { } } - if (true) { + if (DEVELOPMENT_MODE) { const dev_pem_path = path.join(__dirname, '..', '..', '..', 'common', 'src', 'mock_certificates'); const subdirectories = fs.readdirSync(dev_pem_path, { withFileTypes: true }) .filter(item => item.isDirectory()) diff --git a/sdk/core/README.md b/sdk/core/README.md index 76bfb5e41..4b8aa7276 100644 --- a/sdk/core/README.md +++ b/sdk/core/README.md @@ -1,199 +1,245 @@ -# How to use this SDK -## Install -You can install with this command -``` -npm i @selfxyz/core +# @selfxyz/core + +SDK for verifying passport proofs from Self. + +## Installation + +You can install with this command: + +```bash +npm install @selfxyz/core +# or +yarn add @selfxyz/core ``` -## Initialize -You should have CELO_RPC_URL and SCOPE in your environment or somewhere in your code. +## Initialization + +Initialize the verifier with your RPC URL and application scope: + ```typescript import { SelfBackendVerifier } from "@selfxyz/core"; const selfBackendVerifier = new SelfBackendVerifier( - process.env.CELO_RPC_URL as string, - process.env.SCOPE as string, + process.env.CELO_RPC_URL as string, // e.g., 'https://forno.celo.org' + process.env.SCOPE as string, // Your application's unique scope. Should be the same as when initializing SelfApp ); ``` -## Setup -You can setup which data you want to verify in this sdk + +## Configuration + +You can configure which verification rules to apply: + ```typescript -// Set minimum age verification +// Set minimum age verification (must be between 10-100) selfBackendVerifier.setMinimumAge(20); + // Set nationality verification -selfBackendVerifier.setNationality('France') -// Set exclude countries verification -// At most 40 -selfBackendVerifier.excludeCountries('Country Name1', 'Country Name2', 'Coutry Name3', 'etc...'); -// Enable if you want to do passport number ofac check -// Default false +selfBackendVerifier.setNationality('France'); + +// Set excluded countries verification (max 40 countries) +selfBackendVerifier.excludeCountries('Iran', 'North Korea', 'Russia', 'Syria'); + +// Enable passport number OFAC check (default: false) selfBackendVerifier.enablePassportNoOfacCheck(); -// Enable if you want to do name and date of birth ofac check -// Default false + +// Enable name and date of birth OFAC check (default: false) selfBackendVerifier.enableNameAndDobOfacCheck(); -// Enable if you want to do name and year of birth ofac check -// Default false + +// Enable name and year of birth OFAC check (default: false) selfBackendVerifier.enableNameAndYobOfacCheck(); ``` ## Verification -You can do the verification with this + +Verify a proof with the received proof and public signals: + ```typescript -const result = await selfBackendVerifier.verify( - request.body.proof, - request.body.publicSignals -); +const result = await selfBackendVerifier.verify(proof, publicSignals); ``` -## Result -Result from the verify function is like this + +## Extracting User Identifier + +You can extract the user identifier from the public signals: + +```typescript +import { getUserIdentifier } from "@selfxyz/core"; + +const userId = await getUserIdentifier(publicSignals); +``` + +This allows linking proofs with verification requests generated by `@selfxyz/qrcode`. + +## Verification Result + +The `verify` method returns a detailed verification result: + ```typescript export interface SelfVerificationResult { - // Check if the whole verification is succeeded - isValid: boolean; - isValidDetails: { - // Verifies that the proof is generated under the expected scope. - isValidScope: boolean; - // Checks that the attestation identifier in the proof matches the expected value. - isValidAttestationId: boolean; - // Verifies the cryptographic validity of the proof. - isValidProof: boolean; - // Ensures that the revealed nationality is correct (when nationality verification is enabled). - isValidNationality: boolean; - }; - // User Identifier which is included in the proof - userId: string; - // Application name which is showed as scope - application: string; - // A cryptographic value used to prevent double registration or reuse of the same proof. - nullifier: string; - // Revealed data by users - credentialSubject: { - // Merkle root which is used to generate proof. - merkle_root?: string; - // Proved identity type, for passport this value is fixed as 1. - attestation_id?: string; - // Date when the proof is generated - current_date?: string; - // Revealed issuing state in the passport - issuing_state?: string; - // Revealed name in the passport - name?: string; - // Revealed passport number in the passport - passport_number?: string; - // Revealed nationality in the passport - nationality?: string; - // Revealed date of birth in the passport - date_of_birth?: string; - // Revealed gender in the passport - gender?: string; - // Revealed expiry date in the passport - expiry_date?: string; - // Result of older than - older_than?: string; - // Result of passport number ofac check - passport_no_ofac?: string; - // Result of name and date of birth ofac check - name_and_dob_ofac?: string; - // Result of name and year of birth ofac check - name_and_yob_ofac?: string; - }; - proof: { - // Proof which is used for this verification - value: { - proof: Groth16Proof; - publicSignals: PublicSignals; - }; + // Overall verification status + isValid: boolean; + + // Detailed validation statuses + isValidDetails: { + isValidScope: boolean; // Proof was generated for the expected scope + isValidAttestationId: boolean; // Attestation ID matches expected value + isValidProof: boolean; // Cryptographic validity of the proof + isValidNationality: boolean; // Nationality check (when enabled) + }; + + // User identifier from the proof + userId: string; + + // Application scope + application: string; + + // Cryptographic nullifier to prevent reuse + nullifier: string; + + // Revealed data from the passport + credentialSubject: { + merkle_root?: string; // Merkle root used for proof generation + attestation_id?: string; // Identity type (1 for passport) + current_date?: string; // Proof generation timestamp + issuing_state?: string; // Passport issuing country + name?: string; // User's name + passport_number?: string; // Passport number + nationality?: string; // User's nationality + date_of_birth?: string; // Date of birth + gender?: string; // Gender + expiry_date?: string; // Passport expiry date + older_than?: string; // Age verification result + passport_no_ofac?: boolean; // Passport OFAC check result. + // Gives true if the user passed the check (is not on the list), + // false if the check was not requested or if the user is in the list + name_and_dob_ofac?: boolean; // Name and DOB OFAC check result + name_and_yob_ofac?: boolean; // Name and birth year OFAC check result + }; + + // Original proof data + proof: { + value: { + proof: any; + publicSignals: any; }; + }; + + // Error information if verification failed + error?: any; } ``` -## How to return the result in your api implementation -This backend SDK is designed to be used with APIs managed by third parties, and it communicates with Self's managed relayer to enable smooth usage of applications provided by Self. +## API Implementation Example -When using it: -1. Set the endpoint of the API that imports this backend SDK in SelfAppBuilder -```typescript - const selfApp = new SelfAppBuilder({ - appName: "Application name", - scope: "Application id", - endpoint: "API endpoint which imports this backend sdk", - logoBase64: logo, - userId, - disclosures: { - name: true, - nationality: true, - date_of_birth: true, - passport_number: true, - minimumAge: 20, - excludedCountries: [ - "Exclude countries which you want" - ], - ofac: true, - } - }).build(); -``` - -2. This API needs to return values in the following format: -```typescript -response: { - 200: t.Object({ - status: t.String(), - result: t.Boolean(), - }), - 500: t.Object({ - status: t.String(), - result: t.Boolean(), - message: t.String(), - }), -}, -``` -Bit more explanation to the values in the return value. - -status: Indicates that the API processing has completed successfully - -result: Contains the verification result from the SelfBackendVerifier - -message: Represents the error details when an error occurs - -Here is the little example to implement the api. +Here's an example of implementing an API endpoint that uses the SDK: ```typescript -try { - const result = await selfBackendVerifier.verify( - request.body.proof, - request.body.publicSignals - ); - return { - status: "success", - result: result.isValid, - }; -} catch (error) { - return { - status: "error", +import { NextApiRequest, NextApiResponse } from 'next'; +import { getUserIdentifier, SelfBackendVerifier, countryCodes } from '@selfxyz/core'; + +export default async function handler(req: NextApiRequest, res: NextApiResponse) { + if (req.method === 'POST') { + try { + const { proof, publicSignals } = req.body; + + if (!proof || !publicSignals) { + return res.status(400).json({ message: 'Proof and publicSignals are required' }); + } + + // Extract user ID from the proof + const userId = await getUserIdentifier(publicSignals); + console.log("Extracted userId:", userId); + + // Initialize and configure the verifier + const selfBackendVerifier = new SelfBackendVerifier( + 'https://forno.celo.org', + 'my-application-scope' + ); + + // Configure verification options + selfBackendVerifier.setMinimumAge(18); + selfBackendVerifier.excludeCountries( + countryCodes.IRN, // Iran + countryCodes.PRK // North Korea + ); + selfBackendVerifier.enableNameAndDobOfacCheck(); + + // Verify the proof + const result = await selfBackendVerifier.verify(proof, publicSignals); + + if (result.isValid) { + // Return successful verification response + return res.status(200).json({ + status: 'success', + result: true, + credentialSubject: result.credentialSubject + }); + } else { + // Return failed verification response + return res.status(400).json({ + status: 'error', + result: false, + message: 'Verification failed', + details: result.isValidDetails + }); + } + } catch (error) { + console.error('Error verifying proof:', error); + return res.status(500).json({ + status: 'error', result: false, - message: error instanceof Error ? error.message : "Unknown error", - }; + message: error instanceof Error ? error.message : 'Unknown error' + }); + } + } else { + return res.status(405).json({ message: 'Method not allowed' }); + } } ``` -# When you run the tests +## Working with Country Codes -First you need to copy the abi files to the sdk/core/src/abi folder. +The SDK provides a `countryCodes` object for referencing ISO country codes: -``` -cd ../sdk/core -yarn run copy-abi +```typescript +import { countryCodes } from '@selfxyz/core'; + +// Examples of usage +const iranCode = countryCodes.IRN; // "Iran" +const northKoreaCode = countryCodes.PRK; // "North Korea" + +// Use in excludeCountries +selfBackendVerifier.excludeCountries( + countryCodes.IRN, + countryCodes.PRK, + countryCodes.SYR +); ``` -Then you need to run the local hardhat node. +## Integration with SelfQRcode -``` -cd contracts -npx hardhat node +This backend SDK is designed to work with the `@selfxyz/qrcode` package. When configuring your QR code, set the verification endpoint to point to your API that uses this SDK: + +```typescript +import { SelfAppBuilder } from '@selfxyz/qrcode'; + +const selfApp = new SelfAppBuilder({ + appName: 'My Application', + scope: 'my-application-scope', + endpoint: 'https://my-api.com/api/verify', // Your API using SelfBackendVerifier + logoBase64: myLogoBase64, + userId, + disclosures: { + name: true, + nationality: true, + date_of_birth: true, + passport_number: true, + minimumAge: 20, + excludedCountries: ["IRN", "PRK"], + ofac: true, + }, +}).build(); ``` -Then you need to run the tests in the contract dir. +## Example -``` -yarn run test:sdkcore:local -``` +For a more advanced implementation example, see the [playground](https://github.com/selfxyz/playground/blob/main/pages/api/verify.ts). \ No newline at end of file diff --git a/sdk/core/index.ts b/sdk/core/index.ts index 43344da07..f3755d14f 100644 --- a/sdk/core/index.ts +++ b/sdk/core/index.ts @@ -1,3 +1,5 @@ import { SelfBackendVerifier } from './src/SelfBackendVerifier'; +import { getUserIdentifier } from './src/utils/utils'; +import { countryCodes } from '../../common/src/constants/constants'; -export { SelfBackendVerifier }; +export { SelfBackendVerifier, getUserIdentifier, countryCodes }; diff --git a/sdk/core/package.json b/sdk/core/package.json index 760def483..05f7e00cd 100644 --- a/sdk/core/package.json +++ b/sdk/core/package.json @@ -1,12 +1,12 @@ { - "name": "@openpassport/core", - "version": "0.0.24", + "name": "@selfxyz/core", + "version": "0.0.7", "repository": { "type": "git", - "url": "https://github.com/zk-passport/openpassport" + "url": "https://github.com/selfxyz/self" }, "license": "MIT", - "author": "turnoffthiscomputer", + "author": "motemotech", "main": "dist/sdk/core/index.js", "types": "dist/sdk/core/index.d.ts", "files": [ @@ -21,31 +21,15 @@ "install-sdk": "cd ../common && yarn && cd ../sdk && yarn", "lint": "prettier --check .", "prepublishOnly": "npm run build", - "publish": "npm publish --access public", - "test": "yarn ts-mocha -p ./tsconfig.json tests/openPassportVerifier.test.ts --exit" + "publish": "npm publish --access public" }, "dependencies": { - "@openpassport/zk-kit-imt": "^0.0.5", - "@openpassport/zk-kit-lean-imt": "^0.0.6", - "@openpassport/zk-kit-smt": "^0.0.1", "@types/react": "^18.3.4", "@types/react-dom": "^18.3.0", "@types/uuid": "^10.0.0", - "elliptic": "^6.5.7", "ethers": "^6.13.5", - "fs": "^0.0.1-security", - "js-sha1": "^0.7.0", - "js-sha256": "^0.11.0", - "js-sha512": "^0.9.0", - "msgpack-lite": "^0.1.26", "next": "^14.2.8", - "node-forge": "https://github.com/remicolin/forge", - "pako": "^2.1.0", - "pkijs": "^3.2.4", - "poseidon-lite": "^0.2.0", - "snarkjs": "^0.7.4", - "uuid": "^10.0.0", - "zlib": "^1.0.5" + "snarkjs": "^0.7.4" }, "devDependencies": { "@types/chai": "^4.3.6", @@ -57,15 +41,9 @@ "@types/node-forge": "^1.3.5", "@types/pako": "^2.0.3", "@types/snarkjs": "^0.7.8", - "asn1js": "^3.0.5", "axios": "^1.7.2", - "chai": "^4.3.8", - "chai-as-promised": "^7.1.1", - "dotenv": "^16.4.5", - "mocha": "^10.3.0", "prettier": "^3.3.3", "ts-loader": "^9.5.1", - "ts-mocha": "^10.0.0", "ts-node": "^10.9.2", "typescript": "^5.4.5" }, @@ -76,4 +54,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/sdk/core/src/SelfBackendVerifier.ts b/sdk/core/src/SelfBackendVerifier.ts index 36422e019..6b17b229d 100644 --- a/sdk/core/src/SelfBackendVerifier.ts +++ b/sdk/core/src/SelfBackendVerifier.ts @@ -1,53 +1,71 @@ import { registryAbi } from './abi/IdentityRegistryImplV1'; import { verifyAllAbi } from './abi/VerifyAll'; -import { REGISTRY_ADDRESS, VERIFYALL_ADDRESS } from './constants/contractAddresses'; +import { REGISTRY_ADDRESS, VERIFYALL_ADDRESS, REGISTRY_ADDRESS_STAGING, VERIFYALL_ADDRESS_STAGING } from './constants/contractAddresses'; import { ethers } from 'ethers'; import { PublicSignals } from 'snarkjs'; import { countryCodes, - countryNames, getCountryCode, } from '../../../common/src/constants/constants'; import type { SelfVerificationResult } from '../../../common/src/utils/selfAttestation'; -import { castToScope } from '../../../common/src/utils/circuits/uuid'; +import { castToScope, castToUserIdentifier, UserIdType } from '../../../common/src/utils/circuits/uuid'; import { CIRCUIT_CONSTANTS, revealedDataTypes } from '../../../common/src/constants/constants'; import { packForbiddenCountriesList } from '../../../common/src/utils/contracts/formatCallData'; +type CountryCode = (typeof countryCodes)[keyof typeof countryCodes]; + export class SelfBackendVerifier { protected scope: string; protected attestationId: number = 1; + protected user_identifier_type: UserIdType = 'uuid'; protected targetRootTimestamp: { enabled: boolean; value: number } = { enabled: false, value: 0, }; - protected nationality: { enabled: boolean; value: (typeof countryNames)[number] } = { + protected nationality: { + enabled: boolean; + value: CountryCode; + } = { + enabled: false, + value: '' as CountryCode, + }; + protected minimumAge: { enabled: boolean; value: string } = { enabled: false, - value: '' as (typeof countryNames)[number], - }; - protected minimumAge: { enabled: boolean; value: string } = { enabled: false, value: '18' }; - protected excludedCountries: { enabled: boolean; value: (typeof countryNames)[number][] } = { - enabled: false, - value: [], + value: '18', }; + protected excludedCountries: { + enabled: boolean; + value: CountryCode[]; + } = { + enabled: false, + value: [], + }; protected passportNoOfac: boolean = false; protected nameAndDobOfac: boolean = false; protected nameAndYobOfac: boolean = false; - protected registryContract: any; - protected verifyAllContract: any; + protected registryContract: ethers.Contract; + protected verifyAllContract: ethers.Contract; + protected mockPassport: boolean; - constructor(rpcUrl: string, scope: string) { + constructor( + rpcUrl: string, + scope: string, + user_identifier_type: UserIdType = 'uuid', + mockPassport: boolean = false + ) { const provider = new ethers.JsonRpcProvider(rpcUrl); - this.registryContract = new ethers.Contract(REGISTRY_ADDRESS, registryAbi, provider); - this.verifyAllContract = new ethers.Contract(VERIFYALL_ADDRESS, verifyAllAbi, provider); + const registryAddress = mockPassport ? REGISTRY_ADDRESS_STAGING : REGISTRY_ADDRESS; + const verifyAllAddress = mockPassport ? VERIFYALL_ADDRESS_STAGING : VERIFYALL_ADDRESS; + this.registryContract = new ethers.Contract(registryAddress, registryAbi, provider); + this.verifyAllContract = new ethers.Contract(verifyAllAddress, verifyAllAbi, provider); this.scope = scope; + this.user_identifier_type = user_identifier_type; + this.mockPassport = mockPassport; } - public async verify( - proof: any, - publicSignals: PublicSignals - ): Promise { + public async verify(proof: any, publicSignals: PublicSignals): Promise { const excludedCountryCodes = this.excludedCountries.value.map((country) => getCountryCode(country) ); @@ -69,7 +87,10 @@ export class SelfBackendVerifier { ofacEnabled: [this.passportNoOfac, this.nameAndDobOfac, this.nameAndYobOfac], vcAndDiscloseProof: { a: proof.a, - b: [[proof.b[0][1], proof.b[0][0]],[proof.b[1][1], proof.b[1][0]]], + b: [ + [proof.b[0][1], proof.b[0][0]], + [proof.b[1][1], proof.b[1][0]], + ], c: proof.c, pubSignals: publicSignals, }, @@ -83,15 +104,32 @@ export class SelfBackendVerifier { revealedDataTypes.date_of_birth, revealedDataTypes.gender, revealedDataTypes.expiry_date, - revealedDataTypes.older_than, - revealedDataTypes.passport_no_ofac, - revealedDataTypes.name_and_dob_ofac, - revealedDataTypes.name_and_yob_ofac, ]; + if (this.minimumAge.enabled) { + types.push(revealedDataTypes.older_than); + } + + if (this.passportNoOfac) { + types.push(revealedDataTypes.passport_no_ofac); + } + + if (this.nameAndDobOfac) { + types.push(revealedDataTypes.name_and_dob_ofac); + } + + if (this.nameAndYobOfac) { + types.push(revealedDataTypes.name_and_yob_ofac); + } + const currentRoot = await this.registryContract.getIdentityCommitmentMerkleRoot(); const timestamp = await this.registryContract.rootTimestamps(currentRoot); + const user_identifier = castToUserIdentifier( + BigInt(publicSignals[CIRCUIT_CONSTANTS.VC_AND_DISCLOSE_USER_IDENTIFIER_INDEX]), + this.user_identifier_type + ); + let result: any; try { result = await this.verifyAllContract.verifyAll(timestamp, vcAndDiscloseHubProof, types); @@ -104,18 +142,18 @@ export class SelfBackendVerifier { isValidProof: false, isValidNationality: false, }, - userId: publicSignals[CIRCUIT_CONSTANTS.VC_AND_DISCLOSE_USER_IDENTIFIER_INDEX], + userId: user_identifier, application: this.scope, nullifier: publicSignals[CIRCUIT_CONSTANTS.VC_AND_DISCLOSE_NULLIFIER_INDEX], - credentialSubject: null, + credentialSubject: {}, proof: { value: { proof: proof, publicSignals: publicSignals, }, }, - error: error - } + error: error, + }; } let isValidNationality = true; @@ -136,10 +174,10 @@ export class SelfBackendVerifier { date_of_birth: result[0][revealedDataTypes.date_of_birth], gender: result[0][revealedDataTypes.gender], expiry_date: result[0][revealedDataTypes.expiry_date], - older_than: result[0][revealedDataTypes.older_than], - passport_no_ofac: result[0][revealedDataTypes.passport_no_ofac], - name_and_dob_ofac: result[0][revealedDataTypes.name_and_dob_ofac], - name_and_yob_ofac: result[0][revealedDataTypes.name_and_yob_ofac], + older_than: result[0][revealedDataTypes.older_than].toString(), + passport_no_ofac: result[0][revealedDataTypes.passport_no_ofac].toString() === '1', + name_and_dob_ofac: result[0][revealedDataTypes.name_and_dob_ofac].toString() === '1', + name_and_yob_ofac: result[0][revealedDataTypes.name_and_yob_ofac].toString() === '1', }; const attestation: SelfVerificationResult = { @@ -150,7 +188,7 @@ export class SelfBackendVerifier { isValidProof: result[1], isValidNationality: isValidNationality, }, - userId: publicSignals[CIRCUIT_CONSTANTS.VC_AND_DISCLOSE_USER_IDENTIFIER_INDEX], + userId: user_identifier, application: this.scope, nullifier: publicSignals[CIRCUIT_CONSTANTS.VC_AND_DISCLOSE_NULLIFIER_INDEX], credentialSubject: credentialSubject, @@ -160,15 +198,15 @@ export class SelfBackendVerifier { publicSignals: publicSignals, }, }, - error: result[2] + error: result[2], }; return attestation; } setMinimumAge(age: number): this { - if (age < 10) { - throw new Error('Minimum age must be at least 10 years old'); + if (age <= 0) { + throw new Error('Minimum age must be positive'); } if (age > 100) { throw new Error('Minimum age must be at most 100 years old'); @@ -177,12 +215,12 @@ export class SelfBackendVerifier { return this; } - setNationality(country: (typeof countryNames)[number]): this { + setNationality(country: CountryCode): this { this.nationality = { enabled: true, value: country }; return this; } - excludeCountries(...countries: (typeof countryNames)[number][]): this { + excludeCountries(...countries: CountryCode[]): this { if (countries.length > 40) { throw new Error('Number of excluded countries cannot exceed 40'); } diff --git a/sdk/core/src/abi/IdentityRegistryImplV1.ts b/sdk/core/src/abi/IdentityRegistryImplV1.ts index c5e752cc1..a11e4960f 100644 --- a/sdk/core/src/abi/IdentityRegistryImplV1.ts +++ b/sdk/core/src/abi/IdentityRegistryImplV1.ts @@ -1,1228 +1,1228 @@ export const registryAbi = [ { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" + inputs: [], + stateMutability: 'nonpayable', + type: 'constructor', }, { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "target", - "type": "address" - } + internalType: 'address', + name: 'target', + type: 'address', + }, ], - "name": "AddressEmptyCode", - "type": "error" + name: 'AddressEmptyCode', + type: 'error', }, { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "implementation", - "type": "address" - } + internalType: 'address', + name: 'implementation', + type: 'address', + }, ], - "name": "ERC1967InvalidImplementation", - "type": "error" + name: 'ERC1967InvalidImplementation', + type: 'error', }, { - "inputs": [], - "name": "ERC1967NonPayable", - "type": "error" + inputs: [], + name: 'ERC1967NonPayable', + type: 'error', }, { - "inputs": [], - "name": "FailedCall", - "type": "error" + inputs: [], + name: 'FailedCall', + type: 'error', }, { - "inputs": [], - "name": "HUB_NOT_SET", - "type": "error" + inputs: [], + name: 'HUB_NOT_SET', + type: 'error', }, { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" + inputs: [], + name: 'InvalidInitialization', + type: 'error', }, { - "inputs": [], - "name": "LeafAlreadyExists", - "type": "error" + inputs: [], + name: 'LeafAlreadyExists', + type: 'error', }, { - "inputs": [], - "name": "LeafCannotBeZero", - "type": "error" + inputs: [], + name: 'LeafCannotBeZero', + type: 'error', }, { - "inputs": [], - "name": "LeafDoesNotExist", - "type": "error" + inputs: [], + name: 'LeafDoesNotExist', + type: 'error', }, { - "inputs": [], - "name": "LeafGreaterThanSnarkScalarField", - "type": "error" + inputs: [], + name: 'LeafGreaterThanSnarkScalarField', + type: 'error', }, { - "inputs": [], - "name": "NotInitializing", - "type": "error" + inputs: [], + name: 'NotInitializing', + type: 'error', }, { - "inputs": [], - "name": "ONLY_HUB_CAN_ACCESS", - "type": "error" + inputs: [], + name: 'ONLY_HUB_CAN_ACCESS', + type: 'error', }, { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "owner", - "type": "address" - } + internalType: 'address', + name: 'owner', + type: 'address', + }, ], - "name": "OwnableInvalidOwner", - "type": "error" + name: 'OwnableInvalidOwner', + type: 'error', }, { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "account", - "type": "address" - } + internalType: 'address', + name: 'account', + type: 'address', + }, ], - "name": "OwnableUnauthorizedAccount", - "type": "error" + name: 'OwnableUnauthorizedAccount', + type: 'error', }, { - "inputs": [], - "name": "REGISTERED_COMMITMENT", - "type": "error" + inputs: [], + name: 'REGISTERED_COMMITMENT', + type: 'error', }, { - "inputs": [], - "name": "UUPSUnauthorizedCallContext", - "type": "error" + inputs: [], + name: 'UUPSUnauthorizedCallContext', + type: 'error', }, { - "inputs": [ + inputs: [ { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } + internalType: 'bytes32', + name: 'slot', + type: 'bytes32', + }, ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" + name: 'UUPSUnsupportedProxiableUUID', + type: 'error', }, { - "inputs": [], - "name": "WrongSiblingNodes", - "type": "error" + inputs: [], + name: 'WrongSiblingNodes', + type: 'error', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "bytes32", - "name": "attestationId", - "type": "bytes32" + indexed: true, + internalType: 'bytes32', + name: 'attestationId', + type: 'bytes32', }, { - "indexed": true, - "internalType": "uint256", - "name": "nullifier", - "type": "uint256" + indexed: true, + internalType: 'uint256', + name: 'nullifier', + type: 'uint256', }, { - "indexed": true, - "internalType": "uint256", - "name": "commitment", - "type": "uint256" + indexed: true, + internalType: 'uint256', + name: 'commitment', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" + indexed: false, + internalType: 'uint256', + name: 'timestamp', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "imtRoot", - "type": "uint256" + indexed: false, + internalType: 'uint256', + name: 'imtRoot', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "imtIndex", - "type": "uint256" - } + indexed: false, + internalType: 'uint256', + name: 'imtIndex', + type: 'uint256', + }, ], - "name": "CommitmentRegistered", - "type": "event" + name: 'CommitmentRegistered', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": false, - "internalType": "uint256", - "name": "cscaRoot", - "type": "uint256" - } + indexed: false, + internalType: 'uint256', + name: 'cscaRoot', + type: 'uint256', + }, ], - "name": "CscaRootUpdated", - "type": "event" + name: 'CscaRootUpdated', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "bytes32", - "name": "attestationId", - "type": "bytes32" + indexed: true, + internalType: 'bytes32', + name: 'attestationId', + type: 'bytes32', }, { - "indexed": true, - "internalType": "uint256", - "name": "nullifier", - "type": "uint256" + indexed: true, + internalType: 'uint256', + name: 'nullifier', + type: 'uint256', }, { - "indexed": true, - "internalType": "uint256", - "name": "commitment", - "type": "uint256" + indexed: true, + internalType: 'uint256', + name: 'commitment', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" + indexed: false, + internalType: 'uint256', + name: 'timestamp', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "imtRoot", - "type": "uint256" + indexed: false, + internalType: 'uint256', + name: 'imtRoot', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "imtIndex", - "type": "uint256" - } + indexed: false, + internalType: 'uint256', + name: 'imtIndex', + type: 'uint256', + }, ], - "name": "DevCommitmentRegistered", - "type": "event" + name: 'DevCommitmentRegistered', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "oldLeaf", - "type": "uint256" + indexed: true, + internalType: 'uint256', + name: 'oldLeaf', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "imtRoot", - "type": "uint256" + indexed: false, + internalType: 'uint256', + name: 'imtRoot', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } + indexed: false, + internalType: 'uint256', + name: 'timestamp', + type: 'uint256', + }, ], - "name": "DevCommitmentRemoved", - "type": "event" + name: 'DevCommitmentRemoved', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "oldLeaf", - "type": "uint256" + indexed: true, + internalType: 'uint256', + name: 'oldLeaf', + type: 'uint256', }, { - "indexed": true, - "internalType": "uint256", - "name": "newLeaf", - "type": "uint256" + indexed: true, + internalType: 'uint256', + name: 'newLeaf', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "imtRoot", - "type": "uint256" + indexed: false, + internalType: 'uint256', + name: 'imtRoot', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - } + indexed: false, + internalType: 'uint256', + name: 'timestamp', + type: 'uint256', + }, ], - "name": "DevCommitmentUpdated", - "type": "event" + name: 'DevCommitmentUpdated', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "commitment", - "type": "uint256" + indexed: true, + internalType: 'uint256', + name: 'commitment', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "imtRoot", - "type": "uint256" + indexed: false, + internalType: 'uint256', + name: 'imtRoot', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "imtIndex", - "type": "uint256" - } + indexed: false, + internalType: 'uint256', + name: 'imtIndex', + type: 'uint256', + }, ], - "name": "DevDscKeyCommitmentRegistered", - "type": "event" + name: 'DevDscKeyCommitmentRegistered', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "oldLeaf", - "type": "uint256" + indexed: true, + internalType: 'uint256', + name: 'oldLeaf', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "imtRoot", - "type": "uint256" - } + indexed: false, + internalType: 'uint256', + name: 'imtRoot', + type: 'uint256', + }, ], - "name": "DevDscKeyCommitmentRemoved", - "type": "event" + name: 'DevDscKeyCommitmentRemoved', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "commitment", - "type": "uint256" + indexed: true, + internalType: 'uint256', + name: 'commitment', + type: 'uint256', }, { - "indexed": false, - "internalType": "bool", - "name": "state", - "type": "bool" - } + indexed: false, + internalType: 'bool', + name: 'state', + type: 'bool', + }, ], - "name": "DevDscKeyCommitmentStateChanged", - "type": "event" + name: 'DevDscKeyCommitmentStateChanged', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "oldLeaf", - "type": "uint256" + indexed: true, + internalType: 'uint256', + name: 'oldLeaf', + type: 'uint256', }, { - "indexed": true, - "internalType": "uint256", - "name": "newLeaf", - "type": "uint256" + indexed: true, + internalType: 'uint256', + name: 'newLeaf', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "imtRoot", - "type": "uint256" - } + indexed: false, + internalType: 'uint256', + name: 'imtRoot', + type: 'uint256', + }, ], - "name": "DevDscKeyCommitmentUpdated", - "type": "event" + name: 'DevDscKeyCommitmentUpdated', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "bytes32", - "name": "attestationId", - "type": "bytes32" + indexed: true, + internalType: 'bytes32', + name: 'attestationId', + type: 'bytes32', }, { - "indexed": true, - "internalType": "uint256", - "name": "nullifier", - "type": "uint256" + indexed: true, + internalType: 'uint256', + name: 'nullifier', + type: 'uint256', }, { - "indexed": false, - "internalType": "bool", - "name": "state", - "type": "bool" - } + indexed: false, + internalType: 'bool', + name: 'state', + type: 'bool', + }, ], - "name": "DevNullifierStateChanged", - "type": "event" + name: 'DevNullifierStateChanged', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "uint256", - "name": "commitment", - "type": "uint256" + indexed: true, + internalType: 'uint256', + name: 'commitment', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" + indexed: false, + internalType: 'uint256', + name: 'timestamp', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "imtRoot", - "type": "uint256" + indexed: false, + internalType: 'uint256', + name: 'imtRoot', + type: 'uint256', }, { - "indexed": false, - "internalType": "uint256", - "name": "imtIndex", - "type": "uint256" - } + indexed: false, + internalType: 'uint256', + name: 'imtIndex', + type: 'uint256', + }, ], - "name": "DscKeyCommitmentRegistered", - "type": "event" + name: 'DscKeyCommitmentRegistered', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": false, - "internalType": "address", - "name": "hub", - "type": "address" - } + indexed: false, + internalType: 'address', + name: 'hub', + type: 'address', + }, ], - "name": "HubUpdated", - "type": "event" + name: 'HubUpdated', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } + indexed: false, + internalType: 'uint64', + name: 'version', + type: 'uint64', + }, ], - "name": "Initialized", - "type": "event" + name: 'Initialized', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": false, - "internalType": "uint256", - "name": "nameAndDobOfacRoot", - "type": "uint256" - } + indexed: false, + internalType: 'uint256', + name: 'nameAndDobOfacRoot', + type: 'uint256', + }, ], - "name": "NameAndDobOfacRootUpdated", - "type": "event" + name: 'NameAndDobOfacRootUpdated', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": false, - "internalType": "uint256", - "name": "nameAndYobOfacRoot", - "type": "uint256" - } + indexed: false, + internalType: 'uint256', + name: 'nameAndYobOfacRoot', + type: 'uint256', + }, ], - "name": "NameAndYobOfacRootUpdated", - "type": "event" + name: 'NameAndYobOfacRootUpdated', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address', }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address', + }, ], - "name": "OwnershipTransferStarted", - "type": "event" + name: 'OwnershipTransferStarted', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address', }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address', + }, ], - "name": "OwnershipTransferred", - "type": "event" + name: 'OwnershipTransferred', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": false, - "internalType": "uint256", - "name": "passportNoOfacRoot", - "type": "uint256" - } + indexed: false, + internalType: 'uint256', + name: 'passportNoOfacRoot', + type: 'uint256', + }, ], - "name": "PassportNoOfacRootUpdated", - "type": "event" + name: 'PassportNoOfacRootUpdated', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": false, - "internalType": "address", - "name": "hub", - "type": "address" - } + indexed: false, + internalType: 'address', + name: 'hub', + type: 'address', + }, ], - "name": "RegistryInitialized", - "type": "event" + name: 'RegistryInitialized', + type: 'event', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } + indexed: true, + internalType: 'address', + name: 'implementation', + type: 'address', + }, ], - "name": "Upgraded", - "type": "event" + name: 'Upgraded', + type: 'event', }, { - "inputs": [], - "name": "UPGRADE_INTERFACE_VERSION", - "outputs": [ + inputs: [], + name: 'UPGRADE_INTERFACE_VERSION', + outputs: [ { - "internalType": "string", - "name": "", - "type": "string" - } + internalType: 'string', + name: '', + type: 'string', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: 'acceptOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "root", - "type": "uint256" - } + internalType: 'uint256', + name: 'root', + type: 'uint256', + }, ], - "name": "checkCscaRoot", - "outputs": [ + name: 'checkCscaRoot', + outputs: [ { - "internalType": "bool", - "name": "", - "type": "bool" - } + internalType: 'bool', + name: '', + type: 'bool', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "root", - "type": "uint256" - } + internalType: 'uint256', + name: 'root', + type: 'uint256', + }, ], - "name": "checkDscKeyCommitmentMerkleRoot", - "outputs": [ + name: 'checkDscKeyCommitmentMerkleRoot', + outputs: [ { - "internalType": "bool", - "name": "", - "type": "bool" - } + internalType: 'bool', + name: '', + type: 'bool', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "root", - "type": "uint256" - } + internalType: 'uint256', + name: 'root', + type: 'uint256', + }, ], - "name": "checkIdentityCommitmentRoot", - "outputs": [ + name: 'checkIdentityCommitmentRoot', + outputs: [ { - "internalType": "bool", - "name": "", - "type": "bool" - } + internalType: 'bool', + name: '', + type: 'bool', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "passportNoRoot", - "type": "uint256" + internalType: 'uint256', + name: 'passportNoRoot', + type: 'uint256', }, { - "internalType": "uint256", - "name": "nameAndDobRoot", - "type": "uint256" + internalType: 'uint256', + name: 'nameAndDobRoot', + type: 'uint256', }, { - "internalType": "uint256", - "name": "nameAndYobRoot", - "type": "uint256" - } + internalType: 'uint256', + name: 'nameAndYobRoot', + type: 'uint256', + }, ], - "name": "checkOfacRoots", - "outputs": [ + name: 'checkOfacRoots', + outputs: [ { - "internalType": "bool", - "name": "", - "type": "bool" - } + internalType: 'bool', + name: '', + type: 'bool', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "dscCommitment", - "type": "uint256" - } + internalType: 'uint256', + name: 'dscCommitment', + type: 'uint256', + }, ], - "name": "devAddDscKeyCommitment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'devAddDscKeyCommitment', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "bytes32", - "name": "attestationId", - "type": "bytes32" + internalType: 'bytes32', + name: 'attestationId', + type: 'bytes32', }, { - "internalType": "uint256", - "name": "nullifier", - "type": "uint256" + internalType: 'uint256', + name: 'nullifier', + type: 'uint256', }, { - "internalType": "uint256", - "name": "commitment", - "type": "uint256" - } + internalType: 'uint256', + name: 'commitment', + type: 'uint256', + }, ], - "name": "devAddIdentityCommitment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'devAddIdentityCommitment', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "dscCommitment", - "type": "uint256" + internalType: 'uint256', + name: 'dscCommitment', + type: 'uint256', }, { - "internalType": "bool", - "name": "state", - "type": "bool" - } + internalType: 'bool', + name: 'state', + type: 'bool', + }, ], - "name": "devChangeDscKeyCommitmentState", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'devChangeDscKeyCommitmentState', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "bytes32", - "name": "attestationId", - "type": "bytes32" + internalType: 'bytes32', + name: 'attestationId', + type: 'bytes32', }, { - "internalType": "uint256", - "name": "nullifier", - "type": "uint256" + internalType: 'uint256', + name: 'nullifier', + type: 'uint256', }, { - "internalType": "bool", - "name": "state", - "type": "bool" - } + internalType: 'bool', + name: 'state', + type: 'bool', + }, ], - "name": "devChangeNullifierState", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'devChangeNullifierState', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "oldLeaf", - "type": "uint256" + internalType: 'uint256', + name: 'oldLeaf', + type: 'uint256', }, { - "internalType": "uint256[]", - "name": "siblingNodes", - "type": "uint256[]" - } + internalType: 'uint256[]', + name: 'siblingNodes', + type: 'uint256[]', + }, ], - "name": "devRemoveCommitment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'devRemoveCommitment', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "oldLeaf", - "type": "uint256" + internalType: 'uint256', + name: 'oldLeaf', + type: 'uint256', }, { - "internalType": "uint256[]", - "name": "siblingNodes", - "type": "uint256[]" - } + internalType: 'uint256[]', + name: 'siblingNodes', + type: 'uint256[]', + }, ], - "name": "devRemoveDscKeyCommitment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'devRemoveDscKeyCommitment', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "oldLeaf", - "type": "uint256" + internalType: 'uint256', + name: 'oldLeaf', + type: 'uint256', }, { - "internalType": "uint256", - "name": "newLeaf", - "type": "uint256" + internalType: 'uint256', + name: 'newLeaf', + type: 'uint256', }, { - "internalType": "uint256[]", - "name": "siblingNodes", - "type": "uint256[]" - } + internalType: 'uint256[]', + name: 'siblingNodes', + type: 'uint256[]', + }, ], - "name": "devUpdateCommitment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'devUpdateCommitment', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "oldLeaf", - "type": "uint256" + internalType: 'uint256', + name: 'oldLeaf', + type: 'uint256', }, { - "internalType": "uint256", - "name": "newLeaf", - "type": "uint256" + internalType: 'uint256', + name: 'newLeaf', + type: 'uint256', }, { - "internalType": "uint256[]", - "name": "siblingNodes", - "type": "uint256[]" - } + internalType: 'uint256[]', + name: 'siblingNodes', + type: 'uint256[]', + }, ], - "name": "devUpdateDscKeyCommitment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'devUpdateDscKeyCommitment', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [], - "name": "getCscaRoot", - "outputs": [ + inputs: [], + name: 'getCscaRoot', + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: 'uint256', + name: '', + type: 'uint256', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "commitment", - "type": "uint256" - } + internalType: 'uint256', + name: 'commitment', + type: 'uint256', + }, ], - "name": "getDscKeyCommitmentIndex", - "outputs": [ + name: 'getDscKeyCommitmentIndex', + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: 'uint256', + name: '', + type: 'uint256', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "getDscKeyCommitmentMerkleRoot", - "outputs": [ + inputs: [], + name: 'getDscKeyCommitmentMerkleRoot', + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: 'uint256', + name: '', + type: 'uint256', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "getDscKeyCommitmentTreeSize", - "outputs": [ + inputs: [], + name: 'getDscKeyCommitmentTreeSize', + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: 'uint256', + name: '', + type: 'uint256', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "commitment", - "type": "uint256" - } + internalType: 'uint256', + name: 'commitment', + type: 'uint256', + }, ], - "name": "getIdentityCommitmentIndex", - "outputs": [ + name: 'getIdentityCommitmentIndex', + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: 'uint256', + name: '', + type: 'uint256', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "getIdentityCommitmentMerkleRoot", - "outputs": [ + inputs: [], + name: 'getIdentityCommitmentMerkleRoot', + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: 'uint256', + name: '', + type: 'uint256', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "getIdentityCommitmentMerkleTreeSize", - "outputs": [ + inputs: [], + name: 'getIdentityCommitmentMerkleTreeSize', + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: 'uint256', + name: '', + type: 'uint256', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "getNameAndDobOfacRoot", - "outputs": [ + inputs: [], + name: 'getNameAndDobOfacRoot', + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: 'uint256', + name: '', + type: 'uint256', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "getNameAndYobOfacRoot", - "outputs": [ + inputs: [], + name: 'getNameAndYobOfacRoot', + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: 'uint256', + name: '', + type: 'uint256', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "getPassportNoOfacRoot", - "outputs": [ + inputs: [], + name: 'getPassportNoOfacRoot', + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: 'uint256', + name: '', + type: 'uint256', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "hub", - "outputs": [ + inputs: [], + name: 'hub', + outputs: [ { - "internalType": "address", - "name": "", - "type": "address" - } + internalType: 'address', + name: '', + type: 'address', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "_hub", - "type": "address" - } + internalType: 'address', + name: '_hub', + type: 'address', + }, ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'initialize', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "commitment", - "type": "uint256" - } + internalType: 'uint256', + name: 'commitment', + type: 'uint256', + }, ], - "name": "isRegisteredDscKeyCommitment", - "outputs": [ + name: 'isRegisteredDscKeyCommitment', + outputs: [ { - "internalType": "bool", - "name": "", - "type": "bool" - } + internalType: 'bool', + name: '', + type: 'bool', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "bytes32", - "name": "attestationId", - "type": "bytes32" + internalType: 'bytes32', + name: 'attestationId', + type: 'bytes32', }, { - "internalType": "uint256", - "name": "nullifier", - "type": "uint256" - } + internalType: 'uint256', + name: 'nullifier', + type: 'uint256', + }, ], - "name": "nullifiers", - "outputs": [ + name: 'nullifiers', + outputs: [ { - "internalType": "bool", - "name": "", - "type": "bool" - } + internalType: 'bool', + name: '', + type: 'bool', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "owner", - "outputs": [ + inputs: [], + name: 'owner', + outputs: [ { - "internalType": "address", - "name": "", - "type": "address" - } + internalType: 'address', + name: '', + type: 'address', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "pendingOwner", - "outputs": [ + inputs: [], + name: 'pendingOwner', + outputs: [ { - "internalType": "address", - "name": "", - "type": "address" - } + internalType: 'address', + name: '', + type: 'address', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ + inputs: [], + name: 'proxiableUUID', + outputs: [ { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } + internalType: 'bytes32', + name: '', + type: 'bytes32', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "bytes32", - "name": "attestationId", - "type": "bytes32" + internalType: 'bytes32', + name: 'attestationId', + type: 'bytes32', }, { - "internalType": "uint256", - "name": "nullifier", - "type": "uint256" + internalType: 'uint256', + name: 'nullifier', + type: 'uint256', }, { - "internalType": "uint256", - "name": "commitment", - "type": "uint256" - } + internalType: 'uint256', + name: 'commitment', + type: 'uint256', + }, ], - "name": "registerCommitment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'registerCommitment', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "dscCommitment", - "type": "uint256" - } + internalType: 'uint256', + name: 'dscCommitment', + type: 'uint256', + }, ], - "name": "registerDscKeyCommitment", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'registerDscKeyCommitment', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "root", - "type": "uint256" - } + internalType: 'uint256', + name: 'root', + type: 'uint256', + }, ], - "name": "rootTimestamps", - "outputs": [ + name: 'rootTimestamps', + outputs: [ { - "internalType": "uint256", - "name": "", - "type": "uint256" - } + internalType: 'uint256', + name: '', + type: 'uint256', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "newOwner", - "type": "address" - } + internalType: 'address', + name: 'newOwner', + type: 'address', + }, ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "newCscaRoot", - "type": "uint256" - } + internalType: 'uint256', + name: 'newCscaRoot', + type: 'uint256', + }, ], - "name": "updateCscaRoot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'updateCscaRoot', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "newHubAddress", - "type": "address" - } + internalType: 'address', + name: 'newHubAddress', + type: 'address', + }, ], - "name": "updateHub", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'updateHub', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "newNameAndDobOfacRoot", - "type": "uint256" - } + internalType: 'uint256', + name: 'newNameAndDobOfacRoot', + type: 'uint256', + }, ], - "name": "updateNameAndDobOfacRoot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'updateNameAndDobOfacRoot', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "newNameAndYobOfacRoot", - "type": "uint256" - } + internalType: 'uint256', + name: 'newNameAndYobOfacRoot', + type: 'uint256', + }, ], - "name": "updateNameAndYobOfacRoot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'updateNameAndYobOfacRoot', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "newPassportNoOfacRoot", - "type": "uint256" - } + internalType: 'uint256', + name: 'newPassportNoOfacRoot', + type: 'uint256', + }, ], - "name": "updatePassportNoOfacRoot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'updatePassportNoOfacRoot', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "newImplementation", - "type": "address" + internalType: 'address', + name: 'newImplementation', + type: 'address', }, { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } + internalType: 'bytes', + name: 'data', + type: 'bytes', + }, ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } -]; \ No newline at end of file + name: 'upgradeToAndCall', + outputs: [], + stateMutability: 'payable', + type: 'function', + }, +]; diff --git a/sdk/core/src/abi/VerifyAll.ts b/sdk/core/src/abi/VerifyAll.ts index 67b185fdd..5b783c181 100644 --- a/sdk/core/src/abi/VerifyAll.ts +++ b/sdk/core/src/abi/VerifyAll.ts @@ -1,294 +1,294 @@ export const verifyAllAbi = [ { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "hubAddress", - "type": "address" + internalType: 'address', + name: 'hubAddress', + type: 'address', }, { - "internalType": "address", - "name": "registryAddress", - "type": "address" - } + internalType: 'address', + name: 'registryAddress', + type: 'address', + }, ], - "stateMutability": "nonpayable", - "type": "constructor" + stateMutability: 'nonpayable', + type: 'constructor', }, { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "owner", - "type": "address" - } + internalType: 'address', + name: 'owner', + type: 'address', + }, ], - "name": "OwnableInvalidOwner", - "type": "error" + name: 'OwnableInvalidOwner', + type: 'error', }, { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "account", - "type": "address" - } + internalType: 'address', + name: 'account', + type: 'address', + }, ], - "name": "OwnableUnauthorizedAccount", - "type": "error" + name: 'OwnableUnauthorizedAccount', + type: 'error', }, { - "anonymous": false, - "inputs": [ + anonymous: false, + inputs: [ { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address', }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address', + }, ], - "name": "OwnershipTransferred", - "type": "event" + name: 'OwnershipTransferred', + type: 'event', }, { - "inputs": [], - "name": "hub", - "outputs": [ + inputs: [], + name: 'hub', + outputs: [ { - "internalType": "contract IIdentityVerificationHubV1", - "name": "", - "type": "address" - } + internalType: 'contract IIdentityVerificationHubV1', + name: '', + type: 'address', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "owner", - "outputs": [ + inputs: [], + name: 'owner', + outputs: [ { - "internalType": "address", - "name": "", - "type": "address" - } + internalType: 'address', + name: '', + type: 'address', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "registry", - "outputs": [ + inputs: [], + name: 'registry', + outputs: [ { - "internalType": "contract IIdentityRegistryV1", - "name": "", - "type": "address" - } + internalType: 'contract IIdentityRegistryV1', + name: '', + type: 'address', + }, ], - "stateMutability": "view", - "type": "function" + stateMutability: 'view', + type: 'function', }, { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "hubAddress", - "type": "address" - } + internalType: 'address', + name: 'hubAddress', + type: 'address', + }, ], - "name": "setHub", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'setHub', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "registryAddress", - "type": "address" - } + internalType: 'address', + name: 'registryAddress', + type: 'address', + }, ], - "name": "setRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'setRegistry', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "address", - "name": "newOwner", - "type": "address" - } + internalType: 'address', + name: 'newOwner', + type: 'address', + }, ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function', }, { - "inputs": [ + inputs: [ { - "internalType": "uint256", - "name": "targetRootTimestamp", - "type": "uint256" + internalType: 'uint256', + name: 'targetRootTimestamp', + type: 'uint256', }, { - "components": [ + components: [ { - "internalType": "bool", - "name": "olderThanEnabled", - "type": "bool" + internalType: 'bool', + name: 'olderThanEnabled', + type: 'bool', }, { - "internalType": "uint256", - "name": "olderThan", - "type": "uint256" + internalType: 'uint256', + name: 'olderThan', + type: 'uint256', }, { - "internalType": "bool", - "name": "forbiddenCountriesEnabled", - "type": "bool" + internalType: 'bool', + name: 'forbiddenCountriesEnabled', + type: 'bool', }, { - "internalType": "uint256[4]", - "name": "forbiddenCountriesListPacked", - "type": "uint256[4]" + internalType: 'uint256[4]', + name: 'forbiddenCountriesListPacked', + type: 'uint256[4]', }, { - "internalType": "bool[3]", - "name": "ofacEnabled", - "type": "bool[3]" + internalType: 'bool[3]', + name: 'ofacEnabled', + type: 'bool[3]', }, { - "components": [ + components: [ { - "internalType": "uint256[2]", - "name": "a", - "type": "uint256[2]" + internalType: 'uint256[2]', + name: 'a', + type: 'uint256[2]', }, { - "internalType": "uint256[2][2]", - "name": "b", - "type": "uint256[2][2]" + internalType: 'uint256[2][2]', + name: 'b', + type: 'uint256[2][2]', }, { - "internalType": "uint256[2]", - "name": "c", - "type": "uint256[2]" + internalType: 'uint256[2]', + name: 'c', + type: 'uint256[2]', }, { - "internalType": "uint256[21]", - "name": "pubSignals", - "type": "uint256[21]" - } + internalType: 'uint256[21]', + name: 'pubSignals', + type: 'uint256[21]', + }, ], - "internalType": "struct IVcAndDiscloseCircuitVerifier.VcAndDiscloseProof", - "name": "vcAndDiscloseProof", - "type": "tuple" - } + internalType: 'struct IVcAndDiscloseCircuitVerifier.VcAndDiscloseProof', + name: 'vcAndDiscloseProof', + type: 'tuple', + }, ], - "internalType": "struct IIdentityVerificationHubV1.VcAndDiscloseHubProof", - "name": "proof", - "type": "tuple" + internalType: 'struct IIdentityVerificationHubV1.VcAndDiscloseHubProof', + name: 'proof', + type: 'tuple', }, { - "internalType": "enum IIdentityVerificationHubV1.RevealedDataType[]", - "name": "types", - "type": "uint8[]" - } + internalType: 'enum IIdentityVerificationHubV1.RevealedDataType[]', + name: 'types', + type: 'uint8[]', + }, ], - "name": "verifyAll", - "outputs": [ + name: 'verifyAll', + outputs: [ { - "components": [ + components: [ { - "internalType": "string", - "name": "issuingState", - "type": "string" + internalType: 'string', + name: 'issuingState', + type: 'string', }, { - "internalType": "string[]", - "name": "name", - "type": "string[]" + internalType: 'string[]', + name: 'name', + type: 'string[]', }, { - "internalType": "string", - "name": "passportNumber", - "type": "string" + internalType: 'string', + name: 'passportNumber', + type: 'string', }, { - "internalType": "string", - "name": "nationality", - "type": "string" + internalType: 'string', + name: 'nationality', + type: 'string', }, { - "internalType": "string", - "name": "dateOfBirth", - "type": "string" + internalType: 'string', + name: 'dateOfBirth', + type: 'string', }, { - "internalType": "string", - "name": "gender", - "type": "string" + internalType: 'string', + name: 'gender', + type: 'string', }, { - "internalType": "string", - "name": "expiryDate", - "type": "string" + internalType: 'string', + name: 'expiryDate', + type: 'string', }, { - "internalType": "uint256", - "name": "olderThan", - "type": "uint256" + internalType: 'uint256', + name: 'olderThan', + type: 'uint256', }, { - "internalType": "uint256", - "name": "passportNoOfac", - "type": "uint256" + internalType: 'uint256', + name: 'passportNoOfac', + type: 'uint256', }, { - "internalType": "uint256", - "name": "nameAndDobOfac", - "type": "uint256" + internalType: 'uint256', + name: 'nameAndDobOfac', + type: 'uint256', }, { - "internalType": "uint256", - "name": "nameAndYobOfac", - "type": "uint256" - } + internalType: 'uint256', + name: 'nameAndYobOfac', + type: 'uint256', + }, ], - "internalType": "struct IIdentityVerificationHubV1.ReadableRevealedData", - "name": "", - "type": "tuple" + internalType: 'struct IIdentityVerificationHubV1.ReadableRevealedData', + name: '', + type: 'tuple', }, { - "internalType": "bool", - "name": "", - "type": "bool" + internalType: 'bool', + name: '', + type: 'bool', }, { - "internalType": "string", - "name": "", - "type": "string" - } + internalType: 'string', + name: '', + type: 'string', + }, ], - "stateMutability": "view", - "type": "function" - } -]; \ No newline at end of file + stateMutability: 'view', + type: 'function', + }, +]; diff --git a/sdk/core/src/constants/contractAddresses.ts b/sdk/core/src/constants/contractAddresses.ts index 85428ffcd..69052b1fd 100644 --- a/sdk/core/src/constants/contractAddresses.ts +++ b/sdk/core/src/constants/contractAddresses.ts @@ -1,2 +1,4 @@ -export const REGISTRY_ADDRESS = '0x537F2fd23A0432887F32414001Cc7572260544B1'; -export const VERIFYALL_ADDRESS = '0x894974105ad57cdB7e53BaF35D5674c156B45A37'; +export const REGISTRY_ADDRESS = '0x37F5CB8cB1f6B00aa768D8aA99F1A9289802A968'; +export const REGISTRY_ADDRESS_STAGING = '0x9AcA2112D34Ef021084264F6f5eef2a99a5bA7b1'; +export const VERIFYALL_ADDRESS = '0xe6D61680A6ED381bb5A0dB5cF4E9Cc933cF43915'; +export const VERIFYALL_ADDRESS_STAGING = '0xFE847E95C9e090Cc34E69ee3A3F7fE8aCacB0328'; diff --git a/sdk/core/src/utils/utils.ts b/sdk/core/src/utils/utils.ts index 3b0936c2e..c4d24ea01 100644 --- a/sdk/core/src/utils/utils.ts +++ b/sdk/core/src/utils/utils.ts @@ -1,4 +1,7 @@ +import { CIRCUIT_CONSTANTS } from '../../../../common/src/constants/constants'; +import { castToUserIdentifier, UserIdType } from '../../../../common/src/utils/circuits/uuid'; import { BigNumberish } from 'ethers'; +import { PublicSignals } from 'snarkjs'; export function parseSolidityCalldata(rawCallData: string, _type: T): T { const parsed = JSON.parse('[' + rawCallData + ']'); @@ -13,3 +16,10 @@ export function parseSolidityCalldata(rawCallData: string, _type: T): T { pubSignals: parsed[3].map((x: string) => x.replace(/"/g, '')) as BigNumberish[], } as T; } + +export async function getUserIdentifier(publicSignals: PublicSignals, user_identifier_type: UserIdType = 'uuid'): Promise { + return castToUserIdentifier( + BigInt(publicSignals[CIRCUIT_CONSTANTS.VC_AND_DISCLOSE_USER_IDENTIFIER_INDEX]), + user_identifier_type + ); +} diff --git a/sdk/qrcode/.yarn/install-state.gz b/sdk/qrcode/.yarn/install-state.gz index 921dfc869..1171e2381 100644 Binary files a/sdk/qrcode/.yarn/install-state.gz and b/sdk/qrcode/.yarn/install-state.gz differ diff --git a/sdk/qrcode/OpenPassportQRcode.d.ts b/sdk/qrcode/OpenPassportQRcode.d.ts deleted file mode 100644 index c7e6ccd0d..000000000 --- a/sdk/qrcode/OpenPassportQRcode.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import { SelfAttestation, SelfVerifier } from '@openpassport/core'; -import { UserIdType } from '../../common/src/utils/circuits/uuid'; - -interface OpenPassportQRcodeProps { - appName: string; - userId: string; - userIdType: UserIdType; - selfVerifier: SelfVerifier; - onSuccess: (attestation: SelfAttestation) => void; - websocketUrl?: string; - size?: number; -} - -declare const OpenPassportQRcode: React.FC; - -export { OpenPassportQRcode, OpenPassportQRcodeProps }; diff --git a/sdk/qrcode/README.md b/sdk/qrcode/README.md index fc9a720dc..3c410e028 100644 --- a/sdk/qrcode/README.md +++ b/sdk/qrcode/README.md @@ -1,127 +1,193 @@ -# Installation +# @selfxyz/qrcode + +A React component for generating QR codes for Self passport verification. + +## Installation ```bash -yarn add @selfxyz/sdk +npm install @selfxyz/qrcode +# or +yarn add @selfxyz/qrcode ``` -# Generate a QR code +## Basic Usage -### Create an AppType type object: +### 1. Import the SelfQRcodeWrapper component -```typescript -import { AppType } from '@selfxyz/sdk'; -const appName = '🤠 Cowboy App'; -const scope = 'cowboyApp'; -const userID = 'user1234'; -const sessionID = uuidv4(); +```tsx +import SelfQRcodeWrapper, { SelfApp, SelfAppBuilder } from '@selfxyz/qrcode'; +import { v4 as uuidv4 } from 'uuid'; +``` -const cowboyApp: AppType = { - name: appName, - scope, - userId: userID, - sessionId: sessionID, - circuit: 'prove', - arguments: { - disclosureOptions: { older_than: '18', nationality: 'France' }, +### 2. Create a SelfApp instance using SelfAppBuilder + +```tsx +// Generate a unique user ID +const userId = uuidv4(); + +// Create a SelfApp instance using the builder pattern +const selfApp = new SelfAppBuilder({ + appName: "My App", + scope: "my-app-scope", + endpoint: "https://myapp.com/api/verify", + logoBase64: "base64EncodedLogo", // Optional + userId, + // Optional disclosure requirements + disclosures: { + // DG1 disclosures + issuing_state: true, + name: true, + nationality: true, + date_of_birth: true, + passport_number: true, + gender: true, + expiry_date: true, + // Custom verification rules + minimumAge: 18, + excludedCountries: ["IRN", "PRK"], + ofac: true, }, -}; +}).build(); ``` -| Parameter | Optional | Description | -| ----------- | -------- | ------------------------------------------------------------- | -| `scope` | M | The scope of your application, is unique for each application | -| `name` | M | Name of the application | -| `userId` | M | User ID | -| `sessionId` | M | Session ID | -| `circuit` | M | Circuit to use, only `prove` is available for now | -| `arguments` | O | Optional disclosure options, based on passport attributes | +### 3. Render the QR code component -### Display the QR code - -Use the appType object defined above to generate a QR code. -The generated QR code is an `HTML element` that you can display in your app. - -```typescript -import { QRCodeGenerator } from '@selfxyz/sdk'; - -// [...] define cowboyApp as described above - -const qrCode: HTMLElement = await QRCodeGenerator.generateQRCode(cowboyApp); +```tsx +function MyComponent() { + return ( + { + console.log('Verification successful'); + // Perform actions after successful verification + }} + darkMode={false} // Optional: set to true for dark mode + size={300} // Optional: customize QR code size (default: 300) + /> + ); +} ``` -# Verify the proof +`SelfQRcodeWrapper` wraps `SelfQRcode` to prevent server-side rendering when using nextjs. When not using nextjs, `SelfQRcode` can be used instead. -## 1 Step flow +## SelfApp Configuration -To use the `OpenPassportVerifier`, import and initialize it as follows: +The `SelfAppBuilder` allows you to configure your application's verification requirements: -```typescript -import { OpenPassportVerifier } from '@selfxyz/sdk'; -const verifier = new OpenPassportVerifier({ - scope: 'cowboyApp', - requirements: [ - ['older_than', '18'], - ['nationality', 'France'], - ], -}); +| Parameter | Type | Required | Description | +|-----------|------|----------|-------------| +| `appName` | string | Yes | The name of your application | +| `scope` | string | Yes | A unique identifier for your application | +| `endpoint` | string | Yes | The endpoint that will verify the proof | +| `logoBase64` | string | No | Base64-encoded logo to display in the Self app | +| `userId` | string | Yes | Unique identifier for the user | +| `disclosures` | object | No | Disclosure and verification requirements | + +### Disclosure Options + +The `disclosures` object can include the following options: + +| Option | Type | Description | +|--------|------|-------------| +| `issuing_state` | boolean | Request disclosure of passport issuing state | +| `name` | boolean | Request disclosure of the user's name | +| `nationality` | boolean | Request disclosure of nationality | +| `date_of_birth` | boolean | Request disclosure of birth date | +| `passport_number` | boolean | Request disclosure of passport number | +| `gender` | boolean | Request disclosure of gender | +| `expiry_date` | boolean | Request disclosure of passport expiry date | +| `minimumAge` | number | Verify the user is at least this age | +| `excludedCountries` | string[] | Array of country codes to exclude | +| `ofac` | boolean | Enable OFAC compliance check | + +## Component Props + +The `SelfQRcodeWrapper` component accepts the following props: + +| Prop | Type | Required | Default | Description | +|------|------|----------|---------|-------------| +| `selfApp` | SelfApp | Yes | - | The SelfApp configuration object | +| `onSuccess` | () => void | Yes | - | Callback function executed on successful verification | +| `websocketUrl` | string | No | WS_DB_RELAYER | Custom WebSocket URL for verification | +| `size` | number | No | 300 | QR code size in pixels | +| `darkMode` | boolean | No | false | Enable dark mode styling | +| `children` | React.ReactNode | No | - | Custom children to render | + +## Complete Example + +Here's a complete example of how to implement the Self QR code in a React application: + +```tsx +'use client'; + +import React, { useState, useEffect } from 'react'; +import SelfQRcodeWrapper, { SelfApp, SelfAppBuilder } from '@selfxyz/qrcode'; +import { v4 as uuidv4 } from 'uuid'; + +function VerificationPage() { + const [userId, setUserId] = useState(null); + + useEffect(() => { + // Generate a user ID when the component mounts + setUserId(uuidv4()); + }, []); + + if (!userId) return null; + + // Create the SelfApp configuration + const selfApp = new SelfAppBuilder({ + appName: "My Application", + scope: "my-application-scope", + endpoint: "https://myapp.com/api/verify", + userId, + disclosures: { + // Request passport information + name: true, + nationality: true, + date_of_birth: true, + + // Set verification rules + minimumAge: 18, + excludedCountries: ["IRN", "PRK", "RUS"], + ofac: true, + }, + }).build(); + + return ( +
+

Verify Your Identity

+

Scan this QR code with the Self app to verify your identity

+ + { + // Handle successful verification + console.log("Verification successful!"); + // Redirect or update UI + }} + size={350} + /> + +

+ User ID: {userId.substring(0, 8)}... +

+
+ ); +} + +export default VerificationPage; ``` -### Parameters for `OpenPassportVerifier` +## Example -| Parameter | Optional | Description | -| --------------- | -------- | --------------------------------------------------------------------------------- | -| `scope` | M | The scope of your application, is unique for each application. | -| `attestationId` | O | The ID of the attestation, defaults to `PASSPORT_ATTESTATION_ID`. | -| `requirements` | O | An array of requirements, each an array with an attribute and its expected value. | -| `rpcUrl` | O | The RPC URL to connect to the blockchain, defaults to `DEFAULT_RPC_URL`. | -| `dev_mode` | O | Allow users with generated passport to pass the verification. | +For a more comprehensive and interactive example, please refer to the [playground](https://github.com/selfxyz/playground/blob/main/app/page.tsx). -### Verify the proof +## Verification Flow -The function fired from the OpenPassport app will send an `OpenPassportVerifierInputs` object. +1. Your application displays the QR code to the user +2. The user scans the QR code with the Self app +3. The Self app guides the user through the passport verification process +4. The proof is generated and sent to your verification endpoint +5. Upon successful verification, the `onSuccess` callback is triggered -```typescript -const result: OpenPassportVerifierReport = await verifier.verify(openPassportVerifierInputs); -``` - -From the `result` object, you can inspect the validity of any submitted attribute. -To check the overall validity of the proof, you can inspect the `valid` attribute. - -```typescript -require(result.valid); -``` - -Nullifier and user identifier are accessible from the `result` object. - -```typescript -const nullifier: number = result.nullifier; -const user_identifier: number = result.user_identifier; -``` - -## 2 Steps flow - -### 🚧 Work in progress 🚧 - -# Development - -Install the dependencies - -```bash -yarn install-sdk -``` - -## Tests - -To run the tests, you need to download the circuits and the zkey files from the AWS s3 bucket. -This script will also compile the circuits to generate the wasm files. -Make sure that the circuits in the circuits folder are up to date with the AWS zkey files. - -```bash -yarn download-circuits -``` - -Then run the tests with the following command: - -```bash -yarn test -``` +The QR code component displays the current verification status with an LED indicator and changes its appearance based on the verification state. \ No newline at end of file diff --git a/sdk/qrcode/OpenPassportQRcode.tsx b/sdk/qrcode/SelfQRcode.tsx similarity index 89% rename from sdk/qrcode/OpenPassportQRcode.tsx rename to sdk/qrcode/SelfQRcode.tsx index a1754c2e6..caf03b9e7 100644 --- a/sdk/qrcode/OpenPassportQRcode.tsx +++ b/sdk/qrcode/SelfQRcode.tsx @@ -16,15 +16,16 @@ const QRCodeSVG = dynamic(() => import('qrcode.react').then((mod) => mod.QRCodeS ssr: false, }); -interface OpenPassportQRcodeProps { +interface SelfQRcodeProps { selfApp: SelfApp; onSuccess: () => void; websocketUrl?: string; size?: number; + darkMode?: boolean; + children?: React.ReactNode; } -// Create a wrapper component that handles client-side rendering -const OpenPassportQRcodeWrapper: React.FC = (props) => { +const SelfQRcodeWrapper = (props: SelfQRcodeProps) => { const [isClient, setIsClient] = useState(false); useEffect(() => { setIsClient(true); @@ -33,16 +34,16 @@ const OpenPassportQRcodeWrapper: React.FC = (props) => if (!isClient) { return null; } - return ; + return ; }; -// Your existing OpenPassportQRcode component -const OpenPassportQRcode: React.FC = ({ +const SelfQRcode = ({ selfApp, onSuccess, websocketUrl = WS_DB_RELAYER, size = 300, -}) => { + darkMode = false, +}: SelfQRcodeProps) => { const [proofStep, setProofStep] = useState(QRcodeSteps.WAITING_FOR_MOBILE); const [proofVerified, setProofVerified] = useState(false); const [sessionId] = useState(uuidv4()); @@ -116,6 +117,8 @@ const OpenPassportQRcode: React.FC = ({ ); } @@ -128,7 +131,7 @@ const OpenPassportQRcode: React.FC = ({ }; // Export the wrapper component as the default export -export default OpenPassportQRcodeWrapper; +export default SelfQRcodeWrapper; // Also export other components/types that might be needed -export { OpenPassportQRcode, SelfApp, SelfAppBuilder }; +export { SelfQRcode, SelfApp, SelfAppBuilder }; \ No newline at end of file diff --git a/sdk/qrcode/index.ts b/sdk/qrcode/index.ts index df7f326d1..8e1908906 100644 --- a/sdk/qrcode/index.ts +++ b/sdk/qrcode/index.ts @@ -1,7 +1,7 @@ -import OpenPassportQRcodeWrapper, { OpenPassportQRcode, SelfApp, SelfAppBuilder } from './OpenPassportQRcode'; +import SelfQRcodeWrapper, { SelfQRcode, SelfApp, SelfAppBuilder } from './SelfQRcode'; import { WebAppInfo } from './utils/websocket'; -export default OpenPassportQRcodeWrapper; -export { OpenPassportQRcode, SelfApp, SelfAppBuilder }; +export default SelfQRcodeWrapper; +export { SelfQRcode, SelfApp, SelfAppBuilder }; export type { WebAppInfo }; diff --git a/sdk/qrcode/package.json b/sdk/qrcode/package.json index 3fafa97c6..3f679b35a 100644 --- a/sdk/qrcode/package.json +++ b/sdk/qrcode/package.json @@ -1,9 +1,9 @@ { - "name": "@openpassport/qrcode2", - "version": "0.0.1", + "name": "@selfxyz/qrcode", + "version": "0.0.10", "repository": { "type": "git", - "url": "https://github.com/zk-passport/openpassport" + "url": "https://github.com/selfxyz/self" }, "license": "MIT", "author": "turnoffthiscomputer", @@ -17,58 +17,28 @@ ], "scripts": { "build": "tsc", - "download-circuits": "cd ../circuits && ./scripts/download_circuits_from_aws.sh && cd ../sdk", "format": "prettier --write .", "install-sdk": "cd ../common && yarn && cd ../sdk && yarn", "lint": "prettier --check .", "prepublishOnly": "npm run build", - "test": "yarn ts-mocha -p ./tsconfig.json tests/openPassportVerifier.test.ts --exit" + "test": "yarn ts-mocha -p ./tsconfig.json tests/openPassportVerifier.test.ts --exit", + "publish": "npm publish --access public" }, "dependencies": { - "@openpassport/core": "0.0.12", "@types/react": "^18.3.4", "@types/react-dom": "^18.3.0", "@types/uuid": "^10.0.0", - "elliptic": "^6.5.7", - "fs": "^0.0.1-security", - "js-sha1": "^0.7.0", - "js-sha256": "^0.11.0", - "js-sha512": "^0.9.0", "lottie-react": "^2.4.0", - "msgpack-lite": "^0.1.26", "next": "^14.2.8", - "node-forge": "https://github.com/remicolin/forge", - "pako": "^2.1.0", - "pkijs": "^3.2.4", - "poseidon-lite": "^0.2.0", "qrcode.react": "^4.1.0", "react": "^18.0.0", "react-dom": "^18.0.0", "react-spinners": "^0.14.1", - "snarkjs": "^0.7.4", "socket.io-client": "^4.8.1", - "uuid": "^10.0.0", - "zlib": "^1.0.5" + "uuid": "^10.0.0" }, "devDependencies": { - "@openpassport/zk-kit-imt": "^0.0.5", - "@openpassport/zk-kit-lean-imt": "^0.0.6", - "@openpassport/zk-kit-smt": "^0.0.1", - "@types/chai": "^4.3.6", - "@types/chai-as-promised": "^7.1.8", - "@types/circomlibjs": "^0.1.6", - "@types/expect": "^24.3.0", - "@types/mocha": "^10.0.6", "@types/node": "^20.11.19", - "@types/node-forge": "^1.3.5", - "@types/pako": "^2.0.3", - "@types/snarkjs": "^0.7.8", - "asn1js": "^3.0.5", - "axios": "^1.7.2", - "chai": "^4.3.8", - "chai-as-promised": "^7.1.1", - "dotenv": "^16.4.5", - "ethers": "^6.13.0", "mocha": "^10.3.0", "prettier": "^3.3.3", "ts-loader": "^9.5.1", @@ -84,4 +54,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/sdk/qrcode/tsconfig.json b/sdk/qrcode/tsconfig.json index 2ec7f3cb4..ecc78bd6a 100644 --- a/sdk/qrcode/tsconfig.json +++ b/sdk/qrcode/tsconfig.json @@ -16,7 +16,7 @@ "include": [ "index.ts", "src/**/*", - "OpenPassportQRcode.tsx", + "SelfQRcode.tsx", "common/**/*", "circuits/**/*", "circuits/**/*.json", diff --git a/sdk/qrcode/yarn.lock b/sdk/qrcode/yarn.lock index 483db90c5..d5f4a7c9a 100644 --- a/sdk/qrcode/yarn.lock +++ b/sdk/qrcode/yarn.lock @@ -5,31 +5,6 @@ __metadata: version: 8 cacheKey: 10c0 -"@adraffy/ens-normalize@npm:1.10.1": - version: 1.10.1 - resolution: "@adraffy/ens-normalize@npm:1.10.1" - checksum: 10c0/fdd647604e8fac6204921888aaf5a6bc65eabf0d2921bc5f93b64d01f4bc33ead167c1445f7de05468d05cd92ac31b74c68d2be840c62b79d73693308f885c06 - languageName: node - linkType: hard - -"@babel/code-frame@npm:^7.12.13": - version: 7.26.2 - resolution: "@babel/code-frame@npm:7.26.2" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.25.9" - js-tokens: "npm:^4.0.0" - picocolors: "npm:^1.0.0" - checksum: 10c0/7d79621a6849183c415486af99b1a20b84737e8c11cd55b6544f688c51ce1fd710e6d869c3dd21232023da272a79b91efb3e83b5bc2dc65c1187c5fcd1b72ea8 - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-validator-identifier@npm:7.25.9" - checksum: 10c0/4fc6f830177b7b7e887ad3277ddb3b91d81e6c4a24151540d9d1023e8dc6b1c0505f0f0628ae653601eb4388a8db45c1c14b2c07a9173837aef7e4116456259d - languageName: node - linkType: hard - "@cspotcode/source-map-support@npm:^0.8.0": version: 0.8.1 resolution: "@cspotcode/source-map-support@npm:0.8.1" @@ -39,23 +14,6 @@ __metadata: languageName: node linkType: hard -"@iden3/bigarray@npm:0.0.2": - version: 0.0.2 - resolution: "@iden3/bigarray@npm:0.0.2" - checksum: 10c0/a1c69a30f1bfb7eed0a1066e6a3d80aad3fab4dbb1bae96cf4dc7117ca9f791edc4a023d8cfb0afefbeab4d65f7bf91edfbb0a62e5ecdc8711c98bb329fedbaa - languageName: node - linkType: hard - -"@iden3/binfileutils@npm:0.0.12": - version: 0.0.12 - resolution: "@iden3/binfileutils@npm:0.0.12" - dependencies: - fastfile: "npm:0.0.20" - ffjavascript: "npm:^0.3.0" - checksum: 10c0/33783e2bad7901020bb1ba2236e0172a6f0bced519558466fe17ea2e51226a06d769e869883b1d6fe1abcc459327a77ee96265a52b53c2a964d9b4ef48b2263a - languageName: node - linkType: hard - "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -79,38 +37,6 @@ __metadata: languageName: node linkType: hard -"@jest/expect-utils@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/expect-utils@npm:29.7.0" - dependencies: - jest-get-type: "npm:^29.6.3" - checksum: 10c0/60b79d23a5358dc50d9510d726443316253ecda3a7fb8072e1526b3e0d3b14f066ee112db95699b7a43ad3f0b61b750c72e28a5a1cac361d7a2bb34747fa938a - languageName: node - linkType: hard - -"@jest/schemas@npm:^29.6.3": - version: 29.6.3 - resolution: "@jest/schemas@npm:29.6.3" - dependencies: - "@sinclair/typebox": "npm:^0.27.8" - checksum: 10c0/b329e89cd5f20b9278ae1233df74016ebf7b385e0d14b9f4c1ad18d096c4c19d1e687aa113a9c976b16ec07f021ae53dea811fb8c1248a50ac34fbe009fdf6be - languageName: node - linkType: hard - -"@jest/types@npm:^29.6.3": - version: 29.6.3 - resolution: "@jest/types@npm:29.6.3" - dependencies: - "@jest/schemas": "npm:^29.6.3" - "@types/istanbul-lib-coverage": "npm:^2.0.0" - "@types/istanbul-reports": "npm:^3.0.0" - "@types/node": "npm:*" - "@types/yargs": "npm:^17.0.8" - chalk: "npm:^4.0.0" - checksum: 10c0/ea4e493dd3fb47933b8ccab201ae573dcc451f951dc44ed2a86123cd8541b82aa9d2b1031caf9b1080d6673c517e2dcc25a44b2dc4f3fbc37bfc965d444888c0 - languageName: node - linkType: hard - "@jridgewell/resolve-uri@npm:^3.0.3": version: 3.1.2 resolution: "@jridgewell/resolve-uri@npm:3.1.2" @@ -205,29 +131,6 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:1.2.0": - version: 1.2.0 - resolution: "@noble/curves@npm:1.2.0" - dependencies: - "@noble/hashes": "npm:1.3.2" - checksum: 10c0/0bac7d1bbfb3c2286910b02598addd33243cb97c3f36f987ecc927a4be8d7d88e0fcb12b0f0ef8a044e7307d1844dd5c49bb724bfa0a79c8ec50ba60768c97f6 - languageName: node - linkType: hard - -"@noble/hashes@npm:1.3.2": - version: 1.3.2 - resolution: "@noble/hashes@npm:1.3.2" - checksum: 10c0/2482cce3bce6a596626f94ca296e21378e7a5d4c09597cbc46e65ffacc3d64c8df73111f2265444e36a3168208628258bbbaccba2ef24f65f58b2417638a20e7 - languageName: node - linkType: hard - -"@noble/hashes@npm:^1.4.0": - version: 1.7.1 - resolution: "@noble/hashes@npm:1.7.1" - checksum: 10c0/2f8ec0338ccc92b576a0f5c16ab9c017a3a494062f1fbb569ae641c5e7eab32072f9081acaa96b5048c0898f972916c818ea63cbedda707886a4b5ffcfbf94e3 - languageName: node - linkType: hard - "@npmcli/agent@npm:^3.0.0": version: 3.0.0 resolution: "@npmcli/agent@npm:3.0.0" @@ -250,130 +153,6 @@ __metadata: languageName: node linkType: hard -"@openpassport/core@npm:0.0.12": - version: 0.0.12 - resolution: "@openpassport/core@npm:0.0.12" - dependencies: - "@openpassport/zk-kit-imt": "npm:^0.0.5" - "@openpassport/zk-kit-lean-imt": "npm:^0.0.6" - "@openpassport/zk-kit-smt": "npm:^0.0.1" - "@types/react": "npm:^18.3.4" - "@types/react-dom": "npm:^18.3.0" - "@types/uuid": "npm:^10.0.0" - elliptic: "npm:^6.5.7" - fs: "npm:^0.0.1-security" - js-sha1: "npm:^0.7.0" - js-sha256: "npm:^0.11.0" - js-sha512: "npm:^0.9.0" - msgpack-lite: "npm:^0.1.26" - next: "npm:^14.2.8" - node-forge: "git+https://github.com/remicolin/forge.git" - pako: "npm:^2.1.0" - pkijs: "npm:^3.2.4" - poseidon-lite: "npm:^0.2.0" - snarkjs: "npm:^0.7.4" - uuid: "npm:^10.0.0" - zlib: "npm:^1.0.5" - peerDependencies: - react: ^18.0.0 - react-dom: ^18.0.0 - checksum: 10c0/3acb7d1199a7caa00569efc5596867352840d01b1e17d0fda6a17c494ae0f53e7579d87c3925237664fef6f57881651a9b4d3122d5215b1c9d6cd6581ae24990 - languageName: node - linkType: hard - -"@openpassport/qrcode2@workspace:.": - version: 0.0.0-use.local - resolution: "@openpassport/qrcode2@workspace:." - dependencies: - "@openpassport/core": "npm:0.0.12" - "@openpassport/zk-kit-imt": "npm:^0.0.5" - "@openpassport/zk-kit-lean-imt": "npm:^0.0.6" - "@openpassport/zk-kit-smt": "npm:^0.0.1" - "@types/chai": "npm:^4.3.6" - "@types/chai-as-promised": "npm:^7.1.8" - "@types/circomlibjs": "npm:^0.1.6" - "@types/expect": "npm:^24.3.0" - "@types/mocha": "npm:^10.0.6" - "@types/node": "npm:^20.11.19" - "@types/node-forge": "npm:^1.3.5" - "@types/pako": "npm:^2.0.3" - "@types/react": "npm:^18.3.4" - "@types/react-dom": "npm:^18.3.0" - "@types/snarkjs": "npm:^0.7.8" - "@types/uuid": "npm:^10.0.0" - asn1js: "npm:^3.0.5" - axios: "npm:^1.7.2" - chai: "npm:^4.3.8" - chai-as-promised: "npm:^7.1.1" - dotenv: "npm:^16.4.5" - elliptic: "npm:^6.5.7" - ethers: "npm:^6.13.0" - fs: "npm:^0.0.1-security" - js-sha1: "npm:^0.7.0" - js-sha256: "npm:^0.11.0" - js-sha512: "npm:^0.9.0" - lottie-react: "npm:^2.4.0" - mocha: "npm:^10.3.0" - msgpack-lite: "npm:^0.1.26" - next: "npm:^14.2.8" - node-forge: "https://github.com/remicolin/forge" - pako: "npm:^2.1.0" - pkijs: "npm:^3.2.4" - poseidon-lite: "npm:^0.2.0" - prettier: "npm:^3.3.3" - qrcode.react: "npm:^4.1.0" - react: "npm:^18.0.0" - react-dom: "npm:^18.0.0" - react-spinners: "npm:^0.14.1" - snarkjs: "npm:^0.7.4" - socket.io-client: "npm:^4.8.1" - ts-loader: "npm:^9.5.1" - ts-mocha: "npm:^10.0.0" - ts-node: "npm:^10.9.2" - typescript: "npm:^5.4.5" - uuid: "npm:^10.0.0" - zlib: "npm:^1.0.5" - peerDependencies: - lottie-react: ^2.4.0 - react: ^18.0.0 - react-dom: ^18.0.0 - languageName: unknown - linkType: soft - -"@openpassport/zk-kit-imt@npm:^0.0.5": - version: 0.0.5 - resolution: "@openpassport/zk-kit-imt@npm:0.0.5" - dependencies: - "@openpassport/zk-kit-utils": "npm:0.0.1" - checksum: 10c0/3664f0710b6472d7c406ffdcdfb9ab7590bf2b4b69c2c2e36989be888ae4730bab285791e6e8f98ea3fe9eac0271a6fb57bff88ddc92b5c038c9813ffbb2d24c - languageName: node - linkType: hard - -"@openpassport/zk-kit-lean-imt@npm:^0.0.6": - version: 0.0.6 - resolution: "@openpassport/zk-kit-lean-imt@npm:0.0.6" - dependencies: - "@openpassport/zk-kit-utils": "npm:0.0.1" - checksum: 10c0/2cb3f99e216391a325a7050290cccfa12323dc057d7cf4a26baeafe79a34c4ed3013da035fdbe9985395d5a668e37fd81f2b060834b67895bd3f82e7edfe0601 - languageName: node - linkType: hard - -"@openpassport/zk-kit-smt@npm:^0.0.1": - version: 0.0.1 - resolution: "@openpassport/zk-kit-smt@npm:0.0.1" - checksum: 10c0/2d1d6ccd51c1cdf005e71090ac3d5d505ca58f58776bb7bd178c3d6bfdf3e22b69e50816e620f376663b63fa98bf22439c9b38de523de51e018b9e52f097624b - languageName: node - linkType: hard - -"@openpassport/zk-kit-utils@npm:0.0.1": - version: 0.0.1 - resolution: "@openpassport/zk-kit-utils@npm:0.0.1" - dependencies: - buffer: "npm:^6.0.3" - checksum: 10c0/3a9adb279cfd5096c44934bb6c73979f21247eb0119a65f8b5c0bb1f457f5500de761fc627e0bd9e72a7cbf5ca65696c144bfffe3dbd1f1ce37a300c239a8e3f - languageName: node - linkType: hard - "@pkgjs/parseargs@npm:^0.11.0": version: 0.11.0 resolution: "@pkgjs/parseargs@npm:0.11.0" @@ -381,12 +160,34 @@ __metadata: languageName: node linkType: hard -"@sinclair/typebox@npm:^0.27.8": - version: 0.27.8 - resolution: "@sinclair/typebox@npm:0.27.8" - checksum: 10c0/ef6351ae073c45c2ac89494dbb3e1f87cc60a93ce4cde797b782812b6f97da0d620ae81973f104b43c9b7eaa789ad20ba4f6a1359f1cc62f63729a55a7d22d4e - languageName: node - linkType: hard +"@selfxyz/qrcode@workspace:.": + version: 0.0.0-use.local + resolution: "@selfxyz/qrcode@workspace:." + dependencies: + "@types/node": "npm:^20.11.19" + "@types/react": "npm:^18.3.4" + "@types/react-dom": "npm:^18.3.0" + "@types/uuid": "npm:^10.0.0" + lottie-react: "npm:^2.4.0" + mocha: "npm:^10.3.0" + next: "npm:^14.2.8" + prettier: "npm:^3.3.3" + qrcode.react: "npm:^4.1.0" + react: "npm:^18.0.0" + react-dom: "npm:^18.0.0" + react-spinners: "npm:^0.14.1" + socket.io-client: "npm:^4.8.1" + ts-loader: "npm:^9.5.1" + ts-mocha: "npm:^10.0.0" + ts-node: "npm:^10.9.2" + typescript: "npm:^5.4.5" + uuid: "npm:^10.0.0" + peerDependencies: + lottie-react: ^2.4.0 + react: ^18.0.0 + react-dom: ^18.0.0 + languageName: unknown + linkType: soft "@socket.io/component-emitter@npm:~3.1.0": version: 3.1.2 @@ -440,79 +241,6 @@ __metadata: languageName: node linkType: hard -"@types/chai-as-promised@npm:^7.1.8": - version: 7.1.8 - resolution: "@types/chai-as-promised@npm:7.1.8" - dependencies: - "@types/chai": "npm:*" - checksum: 10c0/c0a19cffe8d3f406b2cb9ba17f5f0efe318b14f27896d807b3199cc2231c16a4b5b6c464fdf2a939214de481de58cffd46c240539d3d4ece18659277d71ccc23 - languageName: node - linkType: hard - -"@types/chai@npm:*": - version: 5.0.1 - resolution: "@types/chai@npm:5.0.1" - dependencies: - "@types/deep-eql": "npm:*" - checksum: 10c0/82cb718101d37698e35fb03e2a983a442303065bfcb9b9e8b50b49fdad2fa5759c14dabfa5cb4a4bfa5c6aff1f05377d6ab4310bae0cfbf7d3138f94c969f441 - languageName: node - linkType: hard - -"@types/chai@npm:^4.3.6": - version: 4.3.20 - resolution: "@types/chai@npm:4.3.20" - checksum: 10c0/4601189d611752e65018f1ecadac82e94eed29f348e1d5430e5681a60b01e1ecf855d9bcc74ae43b07394751f184f6970fac2b5561fc57a1f36e93a0f5ffb6e8 - languageName: node - linkType: hard - -"@types/circomlibjs@npm:^0.1.6": - version: 0.1.6 - resolution: "@types/circomlibjs@npm:0.1.6" - checksum: 10c0/0ef1901bb6e71fcd29c617fd266d1a06a0056d8665194e236d0e918be60aa459d4d1606bfb65e7eb05f769163e69b3eb0c7b55b941774d672499221b904df277 - languageName: node - linkType: hard - -"@types/deep-eql@npm:*": - version: 4.0.2 - resolution: "@types/deep-eql@npm:4.0.2" - checksum: 10c0/bf3f811843117900d7084b9d0c852da9a044d12eb40e6de73b552598a6843c21291a8a381b0532644574beecd5e3491c5ff3a0365ab86b15d59862c025384844 - languageName: node - linkType: hard - -"@types/expect@npm:^24.3.0": - version: 24.3.2 - resolution: "@types/expect@npm:24.3.2" - dependencies: - expect: "npm:*" - checksum: 10c0/f5da9e59ee970726df77c24df508d367e24ec307e13846b001aa598ab505a9d66d9a0f12dfcc26113e4fb69d30081ac8e83b040c6939b816cbdd76f6c2612352 - languageName: node - linkType: hard - -"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0": - version: 2.0.6 - resolution: "@types/istanbul-lib-coverage@npm:2.0.6" - checksum: 10c0/3948088654f3eeb45363f1db158354fb013b362dba2a5c2c18c559484d5eb9f6fd85b23d66c0a7c2fcfab7308d0a585b14dadaca6cc8bf89ebfdc7f8f5102fb7 - languageName: node - linkType: hard - -"@types/istanbul-lib-report@npm:*": - version: 3.0.3 - resolution: "@types/istanbul-lib-report@npm:3.0.3" - dependencies: - "@types/istanbul-lib-coverage": "npm:*" - checksum: 10c0/247e477bbc1a77248f3c6de5dadaae85ff86ac2d76c5fc6ab1776f54512a745ff2a5f791d22b942e3990ddbd40f3ef5289317c4fca5741bedfaa4f01df89051c - languageName: node - linkType: hard - -"@types/istanbul-reports@npm:^3.0.0": - version: 3.0.4 - resolution: "@types/istanbul-reports@npm:3.0.4" - dependencies: - "@types/istanbul-lib-report": "npm:*" - checksum: 10c0/1647fd402aced5b6edac87274af14ebd6b3a85447ef9ad11853a70fd92a98d35f81a5d3ea9fcb5dbb5834e800c6e35b64475e33fcae6bfa9acc70d61497c54ee - languageName: node - linkType: hard - "@types/json5@npm:^0.0.29": version: 0.0.29 resolution: "@types/json5@npm:0.0.29" @@ -520,40 +248,6 @@ __metadata: languageName: node linkType: hard -"@types/mocha@npm:^10.0.6": - version: 10.0.10 - resolution: "@types/mocha@npm:10.0.10" - checksum: 10c0/d2b8c48138cde6923493e42b38e839695eb42edd04629abe480a8f34c0e3f50dd82a55832c2e8d2b6e6f9e4deb492d7d733e600fbbdd5a0ceccbcfc6844ff9d5 - languageName: node - linkType: hard - -"@types/node-forge@npm:^1.3.5": - version: 1.3.11 - resolution: "@types/node-forge@npm:1.3.11" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/3d7d23ca0ba38ac0cf74028393bd70f31169ab9aba43f21deb787840170d307d662644bac07287495effe2812ddd7ac8a14dbd43f16c2936bbb06312e96fc3b9 - languageName: node - linkType: hard - -"@types/node@npm:*": - version: 22.13.4 - resolution: "@types/node@npm:22.13.4" - dependencies: - undici-types: "npm:~6.20.0" - checksum: 10c0/3a234fa7766a3efc382cf81f66f474c26cdab2f54f43f757634c81c0444eb2160c2dabbde9741e4983078a318a88515b65416b5f1ab5478548579d7b3ead1d95 - languageName: node - linkType: hard - -"@types/node@npm:22.7.5": - version: 22.7.5 - resolution: "@types/node@npm:22.7.5" - dependencies: - undici-types: "npm:~6.19.2" - checksum: 10c0/cf11f74f1a26053ec58066616e3a8685b6bcd7259bc569738b8f752009f9f0f7f85a1b2d24908e5b0f752482d1e8b6babdf1fbb25758711ec7bb9500bfcd6e60 - languageName: node - linkType: hard - "@types/node@npm:^20.11.19": version: 20.17.19 resolution: "@types/node@npm:20.17.19" @@ -563,13 +257,6 @@ __metadata: languageName: node linkType: hard -"@types/pako@npm:^2.0.3": - version: 2.0.3 - resolution: "@types/pako@npm:2.0.3" - checksum: 10c0/45119ac3c4e8a77317c35493327039b74e333562f06ce038048228918d8ddfaa7958125aab960d1565b3861046022754c414dba1eecb210c44a32c415956bee2 - languageName: node - linkType: hard - "@types/prop-types@npm:*": version: 15.7.14 resolution: "@types/prop-types@npm:15.7.14" @@ -596,20 +283,6 @@ __metadata: languageName: node linkType: hard -"@types/snarkjs@npm:^0.7.8": - version: 0.7.9 - resolution: "@types/snarkjs@npm:0.7.9" - checksum: 10c0/efa31acd19d8ae28a08f940a7ae610ee49d81c547cd3ecf4d730949df5f8bc058a04b0fcbb8dad371176826ddd63973ec694855767e441bf866ff1d45668b16c - languageName: node - linkType: hard - -"@types/stack-utils@npm:^2.0.0": - version: 2.0.3 - resolution: "@types/stack-utils@npm:2.0.3" - checksum: 10c0/1f4658385ae936330581bcb8aa3a066df03867d90281cdf89cc356d404bd6579be0f11902304e1f775d92df22c6dd761d4451c804b0a4fba973e06211e9bd77c - languageName: node - linkType: hard - "@types/uuid@npm:^10.0.0": version: 10.0.0 resolution: "@types/uuid@npm:10.0.0" @@ -617,22 +290,6 @@ __metadata: languageName: node linkType: hard -"@types/yargs-parser@npm:*": - version: 21.0.3 - resolution: "@types/yargs-parser@npm:21.0.3" - checksum: 10c0/e71c3bd9d0b73ca82e10bee2064c384ab70f61034bbfb78e74f5206283fc16a6d85267b606b5c22cb2a3338373586786fed595b2009825d6a9115afba36560a0 - languageName: node - linkType: hard - -"@types/yargs@npm:^17.0.8": - version: 17.0.33 - resolution: "@types/yargs@npm:17.0.33" - dependencies: - "@types/yargs-parser": "npm:*" - checksum: 10c0/d16937d7ac30dff697801c3d6f235be2166df42e4a88bf730fa6dc09201de3727c0a9500c59a672122313341de5f24e45ee0ff579c08ce91928e519090b7906b - languageName: node - linkType: hard - "abbrev@npm:^3.0.0": version: 3.0.0 resolution: "abbrev@npm:3.0.0" @@ -658,13 +315,6 @@ __metadata: languageName: node linkType: hard -"aes-js@npm:4.0.0-beta.5": - version: 4.0.0-beta.5 - resolution: "aes-js@npm:4.0.0-beta.5" - checksum: 10c0/444f4eefa1e602cbc4f2a3c644bc990f93fd982b148425fee17634da510586fc09da940dcf8ace1b2d001453c07ff042e55f7a0482b3cc9372bf1ef75479090c - languageName: node - linkType: hard - "agent-base@npm:^7.1.0, agent-base@npm:^7.1.2": version: 7.1.3 resolution: "agent-base@npm:7.1.3" @@ -702,13 +352,6 @@ __metadata: languageName: node linkType: hard -"ansi-styles@npm:^5.0.0": - version: 5.2.0 - resolution: "ansi-styles@npm:5.2.0" - checksum: 10c0/9c4ca80eb3c2fb7b33841c210d2f20807f40865d27008d7c3f707b7f95cab7d67462a565e2388ac3285b71cb3d9bb2173de8da37c57692a362885ec34d6e27df - languageName: node - linkType: hard - "ansi-styles@npm:^6.1.0": version: 6.2.1 resolution: "ansi-styles@npm:6.2.1" @@ -747,56 +390,6 @@ __metadata: languageName: node linkType: hard -"asn1js@npm:^3.0.5": - version: 3.0.5 - resolution: "asn1js@npm:3.0.5" - dependencies: - pvtsutils: "npm:^1.3.2" - pvutils: "npm:^1.1.3" - tslib: "npm:^2.4.0" - checksum: 10c0/bb8eaf4040c8f49dd475566874986f5976b81bae65a6b5526e2208a13cdca323e69ce297bcd435fdda3eb6933defe888e71974d705b6fcb14f2734a907f8aed4 - languageName: node - linkType: hard - -"assertion-error@npm:^1.1.0": - version: 1.1.0 - resolution: "assertion-error@npm:1.1.0" - checksum: 10c0/25456b2aa333250f01143968e02e4884a34588a8538fbbf65c91a637f1dbfb8069249133cd2f4e530f10f624d206a664e7df30207830b659e9f5298b00a4099b - languageName: node - linkType: hard - -"async@npm:^3.2.3": - version: 3.2.6 - resolution: "async@npm:3.2.6" - checksum: 10c0/36484bb15ceddf07078688d95e27076379cc2f87b10c03b6dd8a83e89475a3c8df5848859dd06a4c95af1e4c16fc973de0171a77f18ea00be899aca2a4f85e70 - languageName: node - linkType: hard - -"asynckit@npm:^0.4.0": - version: 0.4.0 - resolution: "asynckit@npm:0.4.0" - checksum: 10c0/d73e2ddf20c4eb9337e1b3df1a0f6159481050a5de457c55b14ea2e5cb6d90bb69e004c9af54737a5ee0917fcf2c9e25de67777bbe58261847846066ba75bc9d - languageName: node - linkType: hard - -"axios@npm:^1.7.2": - version: 1.7.9 - resolution: "axios@npm:1.7.9" - dependencies: - follow-redirects: "npm:^1.15.6" - form-data: "npm:^4.0.0" - proxy-from-env: "npm:^1.1.0" - checksum: 10c0/b7a41e24b59fee5f0f26c1fc844b45b17442832eb3a0fb42dd4f1430eb4abc571fe168e67913e8a1d91c993232bd1d1ab03e20e4d1fee8c6147649b576fc1b0b - languageName: node - linkType: hard - -"b4a@npm:^1.0.1": - version: 1.6.7 - resolution: "b4a@npm:1.6.7" - checksum: 10c0/ec2f004d1daae04be8c5a1f8aeb7fea213c34025e279db4958eb0b82c1729ee25f7c6e89f92a5f65c8a9cf2d017ce27e3dda912403341d1781bd74528a4849d4 - languageName: node - linkType: hard - "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -804,26 +397,6 @@ __metadata: languageName: node linkType: hard -"base64-js@npm:^1.3.1": - version: 1.5.1 - resolution: "base64-js@npm:1.5.1" - checksum: 10c0/f23823513b63173a001030fae4f2dabe283b99a9d324ade3ad3d148e218134676f1ee8568c877cd79ec1c53158dcf2d2ba527a97c606618928ba99dd930102bf - languageName: node - linkType: hard - -"bfj@npm:^7.0.2": - version: 7.1.0 - resolution: "bfj@npm:7.1.0" - dependencies: - bluebird: "npm:^3.7.2" - check-types: "npm:^11.2.3" - hoopy: "npm:^0.1.4" - jsonpath: "npm:^1.1.1" - tryer: "npm:^1.0.1" - checksum: 10c0/e5fc6690cd093c06ca6ed7584a2caf0c4a762bc9d9d9cb18efbabc75c973b071a8dad7037c617d0ea4d97b7b439821fea32f7c232ed0be8fa7840533a9643171 - languageName: node - linkType: hard - "binary-extensions@npm:^2.0.0": version: 2.3.0 resolution: "binary-extensions@npm:2.3.0" @@ -831,40 +404,6 @@ __metadata: languageName: node linkType: hard -"blake2b-wasm@npm:^2.4.0": - version: 2.4.0 - resolution: "blake2b-wasm@npm:2.4.0" - dependencies: - b4a: "npm:^1.0.1" - nanoassert: "npm:^2.0.0" - checksum: 10c0/0905a47ece466c44541c8abbc94a5441ecb24a3b2622bf1f2e285c1f0f82e2b1899c7bbd70294583cfd99e1276047dd80d7afc7408f3a7c5ebf426b2f2a42f6f - languageName: node - linkType: hard - -"bluebird@npm:^3.7.2": - version: 3.7.2 - resolution: "bluebird@npm:3.7.2" - checksum: 10c0/680de03adc54ff925eaa6c7bb9a47a0690e8b5de60f4792604aae8ed618c65e6b63a7893b57ca924beaf53eee69c5af4f8314148c08124c550fe1df1add897d2 - languageName: node - linkType: hard - -"bn.js@npm:^4.11.9": - version: 4.12.1 - resolution: "bn.js@npm:4.12.1" - checksum: 10c0/b7f37a0cd5e4b79142b6f4292d518b416be34ae55d6dd6b0f66f96550c8083a50ffbbf8bda8d0ab471158cb81aa74ea4ee58fe33c7802e4a30b13810e98df116 - languageName: node - linkType: hard - -"brace-expansion@npm:^1.1.7": - version: 1.1.11 - resolution: "brace-expansion@npm:1.1.11" - dependencies: - balanced-match: "npm:^1.0.0" - concat-map: "npm:0.0.1" - checksum: 10c0/695a56cd058096a7cb71fb09d9d6a7070113c7be516699ed361317aca2ec169f618e28b8af352e02ab4233fb54eb0168460a40dc320bab0034b36ab59aaad668 - languageName: node - linkType: hard - "brace-expansion@npm:^2.0.1": version: 2.0.1 resolution: "brace-expansion@npm:2.0.1" @@ -883,13 +422,6 @@ __metadata: languageName: node linkType: hard -"brorand@npm:^1.1.0": - version: 1.1.0 - resolution: "brorand@npm:1.1.0" - checksum: 10c0/6f366d7c4990f82c366e3878492ba9a372a73163c09871e80d82fb4ae0d23f9f8924cb8a662330308206e6b3b76ba1d528b4601c9ef73c2166b440b2ea3b7571 - languageName: node - linkType: hard - "browser-stdout@npm:^1.3.1": version: 1.3.1 resolution: "browser-stdout@npm:1.3.1" @@ -904,16 +436,6 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^6.0.3": - version: 6.0.3 - resolution: "buffer@npm:6.0.3" - dependencies: - base64-js: "npm:^1.3.1" - ieee754: "npm:^1.2.1" - checksum: 10c0/2a905fbbcde73cc5d8bd18d1caa23715d5f83a5935867c2329f0ac06104204ba7947be098fe1317fbd8830e26090ff8e764f08cd14fefc977bb248c3487bcbd0 - languageName: node - linkType: hard - "busboy@npm:1.6.0": version: 1.6.0 resolution: "busboy@npm:1.6.0" @@ -923,13 +445,6 @@ __metadata: languageName: node linkType: hard -"bytestreamjs@npm:^2.0.0": - version: 2.0.1 - resolution: "bytestreamjs@npm:2.0.1" - checksum: 10c0/edd66b7ca3f94aae99a1009304a42d82ca4c2085eb934192ff47a81f59215c975dc9d3cd8f23c40a2f43ef5b2fa6f01ace70b10ad247766cec6ec641b89eab48 - languageName: node - linkType: hard - "cacache@npm:^19.0.1": version: 19.0.1 resolution: "cacache@npm:19.0.1" @@ -950,16 +465,6 @@ __metadata: languageName: node linkType: hard -"call-bind-apply-helpers@npm:^1.0.1": - version: 1.0.2 - resolution: "call-bind-apply-helpers@npm:1.0.2" - dependencies: - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - checksum: 10c0/47bd9901d57b857590431243fea704ff18078b16890a6b3e021e12d279bbf211d039155e27d7566b374d49ee1f8189344bac9833dec7a20cdec370506361c938 - languageName: node - linkType: hard - "camelcase@npm:^6.0.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" @@ -974,33 +479,7 @@ __metadata: languageName: node linkType: hard -"chai-as-promised@npm:^7.1.1": - version: 7.1.2 - resolution: "chai-as-promised@npm:7.1.2" - dependencies: - check-error: "npm:^1.0.2" - peerDependencies: - chai: ">= 2.1.2 < 6" - checksum: 10c0/ee20ed75296d8cbf828b2f3c9ad64627cee67b1a38b8e906ca59fe788fb6965ddb10f702ae66645ed88f15a905ade4f2d9f8540029e92e2d59b229c9f912273f - languageName: node - linkType: hard - -"chai@npm:^4.3.8": - version: 4.5.0 - resolution: "chai@npm:4.5.0" - dependencies: - assertion-error: "npm:^1.1.0" - check-error: "npm:^1.0.3" - deep-eql: "npm:^4.1.3" - get-func-name: "npm:^2.0.2" - loupe: "npm:^2.3.6" - pathval: "npm:^1.1.1" - type-detect: "npm:^4.1.0" - checksum: 10c0/b8cb596bd1aece1aec659e41a6e479290c7d9bee5b3ad63d2898ad230064e5b47889a3bc367b20100a0853b62e026e2dc514acf25a3c9385f936aa3614d4ab4d - languageName: node - linkType: hard - -"chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0": +"chalk@npm:^4.1.0": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -1010,22 +489,6 @@ __metadata: languageName: node linkType: hard -"check-error@npm:^1.0.2, check-error@npm:^1.0.3": - version: 1.0.3 - resolution: "check-error@npm:1.0.3" - dependencies: - get-func-name: "npm:^2.0.2" - checksum: 10c0/94aa37a7315c0e8a83d0112b5bfb5a8624f7f0f81057c73e4707729cdd8077166c6aefb3d8e2b92c63ee130d4a2ff94bad46d547e12f3238cc1d78342a973841 - languageName: node - linkType: hard - -"check-types@npm:^11.2.3": - version: 11.2.3 - resolution: "check-types@npm:11.2.3" - checksum: 10c0/08d17e528b189e0e431689f0f2f0a78f425202f6e5ac93def5c3b8d128eb888a5103fc980d4feb7b2d4248f8114d354c223dff3c0b5ac4b1def526ef441aaf55 - languageName: node - linkType: hard - "chokidar@npm:^3.5.3": version: 3.6.0 resolution: "chokidar@npm:3.6.0" @@ -1052,24 +515,6 @@ __metadata: languageName: node linkType: hard -"ci-info@npm:^3.2.0": - version: 3.9.0 - resolution: "ci-info@npm:3.9.0" - checksum: 10c0/6f0109e36e111684291d46123d491bc4e7b7a1934c3a20dea28cba89f1d4a03acd892f5f6a81ed3855c38647e285a150e3c9ba062e38943bef57fee6c1554c3a - languageName: node - linkType: hard - -"circom_runtime@npm:0.1.28": - version: 0.1.28 - resolution: "circom_runtime@npm:0.1.28" - dependencies: - ffjavascript: "npm:0.3.1" - bin: - calcwit: calcwit.js - checksum: 10c0/f2636b3cf553ea37701b527331ff740be7e31d51dc367c7f7bdffb69cf3a0d86c34ce215e4dbc0ad47f9c221c129ab11b111c6814e009c4d469592d73ab3c513 - languageName: node - linkType: hard - "client-only@npm:0.0.1": version: 0.0.1 resolution: "client-only@npm:0.0.1" @@ -1104,22 +549,6 @@ __metadata: languageName: node linkType: hard -"combined-stream@npm:^1.0.8": - version: 1.0.8 - resolution: "combined-stream@npm:1.0.8" - dependencies: - delayed-stream: "npm:~1.0.0" - checksum: 10c0/0dbb829577e1b1e839fa82b40c07ffaf7de8a09b935cadd355a73652ae70a88b4320db322f6634a4ad93424292fa80973ac6480986247f1734a1137debf271d5 - languageName: node - linkType: hard - -"concat-map@npm:0.0.1": - version: 0.0.1 - resolution: "concat-map@npm:0.0.1" - checksum: 10c0/c996b1cfdf95b6c90fee4dae37e332c8b6eb7d106430c17d538034c0ad9a1630cb194d2ab37293b1bdd4d779494beee7786d586a50bd9376fd6f7bcc2bd4c98f - languageName: node - linkType: hard - "create-require@npm:^1.1.0": version: 1.1.1 resolution: "create-require@npm:1.1.1" @@ -1176,36 +605,6 @@ __metadata: languageName: node linkType: hard -"deep-eql@npm:^4.1.3": - version: 4.1.4 - resolution: "deep-eql@npm:4.1.4" - dependencies: - type-detect: "npm:^4.0.0" - checksum: 10c0/264e0613493b43552fc908f4ff87b8b445c0e6e075656649600e1b8a17a57ee03e960156fce7177646e4d2ddaf8e5ee616d76bd79929ff593e5c79e4e5e6c517 - languageName: node - linkType: hard - -"deep-is@npm:~0.1.3": - version: 0.1.4 - resolution: "deep-is@npm:0.1.4" - checksum: 10c0/7f0ee496e0dff14a573dc6127f14c95061b448b87b995fc96c017ce0a1e66af1675e73f1d6064407975bc4ea6ab679497a29fff7b5b9c4e99cb10797c1ad0b4c - languageName: node - linkType: hard - -"delayed-stream@npm:~1.0.0": - version: 1.0.0 - resolution: "delayed-stream@npm:1.0.0" - checksum: 10c0/d758899da03392e6712f042bec80aa293bbe9e9ff1b2634baae6a360113e708b91326594c8a486d475c69d6259afb7efacdc3537bfcda1c6c648e390ce601b19 - languageName: node - linkType: hard - -"diff-sequences@npm:^29.6.3": - version: 29.6.3 - resolution: "diff-sequences@npm:29.6.3" - checksum: 10c0/32e27ac7dbffdf2fb0eb5a84efd98a9ad084fbabd5ac9abb8757c6770d5320d2acd172830b28c4add29bb873d59420601dfc805ac4064330ce59b1adfd0593b2 - languageName: node - linkType: hard - "diff@npm:^3.1.0": version: 3.5.0 resolution: "diff@npm:3.5.0" @@ -1227,24 +626,6 @@ __metadata: languageName: node linkType: hard -"dotenv@npm:^16.4.5": - version: 16.4.7 - resolution: "dotenv@npm:16.4.7" - checksum: 10c0/be9f597e36a8daf834452daa1f4cc30e5375a5968f98f46d89b16b983c567398a330580c88395069a77473943c06b877d1ca25b4afafcdd6d4adb549e8293462 - languageName: node - linkType: hard - -"dunder-proto@npm:^1.0.1": - version: 1.0.1 - resolution: "dunder-proto@npm:1.0.1" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - gopd: "npm:^1.2.0" - checksum: 10c0/199f2a0c1c16593ca0a145dbf76a962f8033ce3129f01284d48c45ed4e14fea9bbacd7b3610b6cdc33486cef20385ac054948fefc6272fcce645c09468f93031 - languageName: node - linkType: hard - "eastasianwidth@npm:^0.2.0": version: 0.2.0 resolution: "eastasianwidth@npm:0.2.0" @@ -1252,32 +633,6 @@ __metadata: languageName: node linkType: hard -"ejs@npm:^3.1.6": - version: 3.1.10 - resolution: "ejs@npm:3.1.10" - dependencies: - jake: "npm:^10.8.5" - bin: - ejs: bin/cli.js - checksum: 10c0/52eade9e68416ed04f7f92c492183340582a36482836b11eab97b159fcdcfdedc62233a1bf0bf5e5e1851c501f2dca0e2e9afd111db2599e4e7f53ee29429ae1 - languageName: node - linkType: hard - -"elliptic@npm:^6.5.7": - version: 6.6.1 - resolution: "elliptic@npm:6.6.1" - dependencies: - bn.js: "npm:^4.11.9" - brorand: "npm:^1.1.0" - hash.js: "npm:^1.0.0" - hmac-drbg: "npm:^1.0.1" - inherits: "npm:^2.0.4" - minimalistic-assert: "npm:^1.0.1" - minimalistic-crypto-utils: "npm:^1.0.1" - checksum: 10c0/8b24ef782eec8b472053793ea1e91ae6bee41afffdfcb78a81c0a53b191e715cbe1292aa07165958a9bbe675bd0955142560b1a007ffce7d6c765bcaf951a867 - languageName: node - linkType: hard - "emoji-regex@npm:^8.0.0": version: 8.0.0 resolution: "emoji-regex@npm:8.0.0" @@ -1345,41 +700,6 @@ __metadata: languageName: node linkType: hard -"es-define-property@npm:^1.0.1": - version: 1.0.1 - resolution: "es-define-property@npm:1.0.1" - checksum: 10c0/3f54eb49c16c18707949ff25a1456728c883e81259f045003499efba399c08bad00deebf65cccde8c0e07908c1a225c9d472b7107e558f2a48e28d530e34527c - languageName: node - linkType: hard - -"es-errors@npm:^1.3.0": - version: 1.3.0 - resolution: "es-errors@npm:1.3.0" - checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 - languageName: node - linkType: hard - -"es-object-atoms@npm:^1.0.0": - version: 1.1.1 - resolution: "es-object-atoms@npm:1.1.1" - dependencies: - es-errors: "npm:^1.3.0" - checksum: 10c0/65364812ca4daf48eb76e2a3b7a89b3f6a2e62a1c420766ce9f692665a29d94fe41fe88b65f24106f449859549711e4b40d9fb8002d862dfd7eb1c512d10be0c - languageName: node - linkType: hard - -"es-set-tostringtag@npm:^2.1.0": - version: 2.1.0 - resolution: "es-set-tostringtag@npm:2.1.0" - dependencies: - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.6" - has-tostringtag: "npm:^1.0.2" - hasown: "npm:^2.0.2" - checksum: 10c0/ef2ca9ce49afe3931cb32e35da4dcb6d86ab02592cfc2ce3e49ced199d9d0bb5085fc7e73e06312213765f5efa47cc1df553a6a5154584b21448e9fb8355b1af - languageName: node - linkType: hard - "escalade@npm:^3.1.1": version: 3.2.0 resolution: "escalade@npm:3.2.0" @@ -1387,13 +707,6 @@ __metadata: languageName: node linkType: hard -"escape-string-regexp@npm:^2.0.0": - version: 2.0.0 - resolution: "escape-string-regexp@npm:2.0.0" - checksum: 10c0/2530479fe8db57eace5e8646c9c2a9c80fa279614986d16dcc6bcaceb63ae77f05a851ba6c43756d816c61d7f4534baf56e3c705e3e0d884818a46808811c507 - languageName: node - linkType: hard - "escape-string-regexp@npm:^4.0.0": version: 4.0.0 resolution: "escape-string-regexp@npm:4.0.0" @@ -1401,94 +714,6 @@ __metadata: languageName: node linkType: hard -"escodegen@npm:^1.8.1": - version: 1.14.3 - resolution: "escodegen@npm:1.14.3" - dependencies: - esprima: "npm:^4.0.1" - estraverse: "npm:^4.2.0" - esutils: "npm:^2.0.2" - optionator: "npm:^0.8.1" - source-map: "npm:~0.6.1" - dependenciesMeta: - source-map: - optional: true - bin: - escodegen: bin/escodegen.js - esgenerate: bin/esgenerate.js - checksum: 10c0/30d337803e8f44308c90267bf6192399e4b44792497c77a7506b68ab802ba6a48ebbe1ce77b219aba13dfd2de5f5e1c267e35be1ed87b2a9c3315e8b283e302a - languageName: node - linkType: hard - -"esprima@npm:1.2.2": - version: 1.2.2 - resolution: "esprima@npm:1.2.2" - bin: - esparse: ./bin/esparse.js - esvalidate: ./bin/esvalidate.js - checksum: 10c0/a5a8fd359651dd8228736d7352eb7636c7765e1ec6ff8fff3f6641622039a9f51fa501969a1a4777ba4187cf9942a8d7e0367dccaff768b782bdb1a71d046abf - languageName: node - linkType: hard - -"esprima@npm:^4.0.1": - version: 4.0.1 - resolution: "esprima@npm:4.0.1" - bin: - esparse: ./bin/esparse.js - esvalidate: ./bin/esvalidate.js - checksum: 10c0/ad4bab9ead0808cf56501750fd9d3fb276f6b105f987707d059005d57e182d18a7c9ec7f3a01794ebddcca676773e42ca48a32d67a250c9d35e009ca613caba3 - languageName: node - linkType: hard - -"estraverse@npm:^4.2.0": - version: 4.3.0 - resolution: "estraverse@npm:4.3.0" - checksum: 10c0/9cb46463ef8a8a4905d3708a652d60122a0c20bb58dec7e0e12ab0e7235123d74214fc0141d743c381813e1b992767e2708194f6f6e0f9fd00c1b4e0887b8b6d - languageName: node - linkType: hard - -"esutils@npm:^2.0.2": - version: 2.0.3 - resolution: "esutils@npm:2.0.3" - checksum: 10c0/9a2fe69a41bfdade834ba7c42de4723c97ec776e40656919c62cbd13607c45e127a003f05f724a1ea55e5029a4cf2de444b13009f2af71271e42d93a637137c7 - languageName: node - linkType: hard - -"ethers@npm:^6.13.0": - version: 6.13.5 - resolution: "ethers@npm:6.13.5" - dependencies: - "@adraffy/ens-normalize": "npm:1.10.1" - "@noble/curves": "npm:1.2.0" - "@noble/hashes": "npm:1.3.2" - "@types/node": "npm:22.7.5" - aes-js: "npm:4.0.0-beta.5" - tslib: "npm:2.7.0" - ws: "npm:8.17.1" - checksum: 10c0/64bc7b8907de199392b8a88c15c9a085892919cff7efa2e5326abc7fe5c426001726c51d91e10c74e5fc5e2547188297ce4127f6e52ea42a97ade0b2ae474677 - languageName: node - linkType: hard - -"event-lite@npm:^0.1.1": - version: 0.1.3 - resolution: "event-lite@npm:0.1.3" - checksum: 10c0/68d11a1e9001d713d673866fe07f6c310fa9054fc0a936dd5eacc37a793aa6b3331ddb1d85dbcb88ddbe6b04944566a0f1c5b515118e1ec2e640ffcb30858b3f - languageName: node - linkType: hard - -"expect@npm:*": - version: 29.7.0 - resolution: "expect@npm:29.7.0" - dependencies: - "@jest/expect-utils": "npm:^29.7.0" - jest-get-type: "npm:^29.6.3" - jest-matcher-utils: "npm:^29.7.0" - jest-message-util: "npm:^29.7.0" - jest-util: "npm:^29.7.0" - checksum: 10c0/2eddeace66e68b8d8ee5f7be57f3014b19770caaf6815c7a08d131821da527fb8c8cb7b3dcd7c883d2d3d8d184206a4268984618032d1e4b16dc8d6596475d41 - languageName: node - linkType: hard - "exponential-backoff@npm:^3.1.1": version: 3.1.2 resolution: "exponential-backoff@npm:3.1.2" @@ -1496,51 +721,6 @@ __metadata: languageName: node linkType: hard -"fast-levenshtein@npm:~2.0.6": - version: 2.0.6 - resolution: "fast-levenshtein@npm:2.0.6" - checksum: 10c0/111972b37338bcb88f7d9e2c5907862c280ebf4234433b95bc611e518d192ccb2d38119c4ac86e26b668d75f7f3894f4ff5c4982899afced7ca78633b08287c4 - languageName: node - linkType: hard - -"fastfile@npm:0.0.20": - version: 0.0.20 - resolution: "fastfile@npm:0.0.20" - checksum: 10c0/ca91f5658eec188c7ba3b910d7d87ed90d4d7ca92852fa14dd8c6d4ae4c2149b8147a30bbcafe727bf12f0ebb25c585a6cf0a112a3957b761ec913f8299fdd4f - languageName: node - linkType: hard - -"ffjavascript@npm:0.3.0": - version: 0.3.0 - resolution: "ffjavascript@npm:0.3.0" - dependencies: - wasmbuilder: "npm:0.0.16" - wasmcurves: "npm:0.2.2" - web-worker: "npm:1.2.0" - checksum: 10c0/2899db6ab67162eb9a7a052c420d31b0e15c6fd12bc738c48559e0a926649f1d11afe9cfa2611ff13f816b2fd9fa047fb11f6f8682f0dea4f84c4dd9f5dc7c3c - languageName: node - linkType: hard - -"ffjavascript@npm:0.3.1, ffjavascript@npm:^0.3.0": - version: 0.3.1 - resolution: "ffjavascript@npm:0.3.1" - dependencies: - wasmbuilder: "npm:0.0.16" - wasmcurves: "npm:0.2.2" - web-worker: "npm:1.2.0" - checksum: 10c0/6928afe37cdbe9a88a9901a37d0abbdcfa61a8533517cb86e2584bf2701eaa10ce2bfa1d417499042f9b10b79bc058ec0ecc14d3fdc6cb55d21bfcac3d1c4521 - languageName: node - linkType: hard - -"filelist@npm:^1.0.4": - version: 1.0.4 - resolution: "filelist@npm:1.0.4" - dependencies: - minimatch: "npm:^5.0.1" - checksum: 10c0/426b1de3944a3d153b053f1c0ebfd02dccd0308a4f9e832ad220707a6d1f1b3c9784d6cadf6b2f68f09a57565f63ebc7bcdc913ccf8012d834f472c46e596f41 - languageName: node - linkType: hard - "fill-range@npm:^7.1.1": version: 7.1.1 resolution: "fill-range@npm:7.1.1" @@ -1569,16 +749,6 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.15.6": - version: 1.15.9 - resolution: "follow-redirects@npm:1.15.9" - peerDependenciesMeta: - debug: - optional: true - checksum: 10c0/5829165bd112c3c0e82be6c15b1a58fa9dcfaede3b3c54697a82fe4a62dd5ae5e8222956b448d2f98e331525f05d00404aba7d696de9e761ef6e42fdc780244f - languageName: node - linkType: hard - "foreground-child@npm:^3.1.0": version: 3.3.0 resolution: "foreground-child@npm:3.3.0" @@ -1589,18 +759,6 @@ __metadata: languageName: node linkType: hard -"form-data@npm:^4.0.0": - version: 4.0.2 - resolution: "form-data@npm:4.0.2" - dependencies: - asynckit: "npm:^0.4.0" - combined-stream: "npm:^1.0.8" - es-set-tostringtag: "npm:^2.1.0" - mime-types: "npm:^2.1.12" - checksum: 10c0/e534b0cf025c831a0929bf4b9bbe1a9a6b03e273a8161f9947286b9b13bf8fb279c6944aae0070c4c311100c6d6dbb815cd955dc217728caf73fad8dc5b8ee9c - languageName: node - linkType: hard - "fs-minipass@npm:^3.0.0": version: 3.0.3 resolution: "fs-minipass@npm:3.0.3" @@ -1617,13 +775,6 @@ __metadata: languageName: node linkType: hard -"fs@npm:^0.0.1-security": - version: 0.0.1-security - resolution: "fs@npm:0.0.1-security" - checksum: 10c0/e0c0b585ec6f7483d63d067215d9d6bb2e0dba5912060d32554c8e566a0e22ee65e4c2a2b0567476efbbfb47682554b4711d69cab49950d01f227a3dfa7d671a - languageName: node - linkType: hard - "fsevents@npm:~2.3.2": version: 2.3.3 resolution: "fsevents@npm:2.3.3" @@ -1643,13 +794,6 @@ __metadata: languageName: node linkType: hard -"function-bind@npm:^1.1.2": - version: 1.1.2 - resolution: "function-bind@npm:1.1.2" - checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5 - languageName: node - linkType: hard - "get-caller-file@npm:^2.0.5": version: 2.0.5 resolution: "get-caller-file@npm:2.0.5" @@ -1657,41 +801,6 @@ __metadata: languageName: node linkType: hard -"get-func-name@npm:^2.0.1, get-func-name@npm:^2.0.2": - version: 2.0.2 - resolution: "get-func-name@npm:2.0.2" - checksum: 10c0/89830fd07623fa73429a711b9daecdb304386d237c71268007f788f113505ef1d4cc2d0b9680e072c5082490aec9df5d7758bf5ac6f1c37062855e8e3dc0b9df - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.2.6": - version: 1.2.7 - resolution: "get-intrinsic@npm:1.2.7" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - es-define-property: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - function-bind: "npm:^1.1.2" - get-proto: "npm:^1.0.0" - gopd: "npm:^1.2.0" - has-symbols: "npm:^1.1.0" - hasown: "npm:^2.0.2" - math-intrinsics: "npm:^1.1.0" - checksum: 10c0/b475dec9f8bff6f7422f51ff4b7b8d0b68e6776ee83a753c1d627e3008c3442090992788038b37eff72e93e43dceed8c1acbdf2d6751672687ec22127933080d - languageName: node - linkType: hard - -"get-proto@npm:^1.0.0": - version: 1.0.1 - resolution: "get-proto@npm:1.0.1" - dependencies: - dunder-proto: "npm:^1.0.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/9224acb44603c5526955e83510b9da41baf6ae73f7398875fba50edc5e944223a89c4a72b070fcd78beb5f7bdda58ecb6294adc28f7acfc0da05f76a2399643c - languageName: node - linkType: hard - "glob-parent@npm:~5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" @@ -1730,14 +839,7 @@ __metadata: languageName: node linkType: hard -"gopd@npm:^1.2.0": - version: 1.2.0 - resolution: "gopd@npm:1.2.0" - checksum: 10c0/50fff1e04ba2b7737c097358534eacadad1e68d24cccee3272e04e007bed008e68d2614f3987788428fd192a5ae3889d08fb2331417e4fc4a9ab366b2043cead - languageName: node - linkType: hard - -"graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": +"graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 @@ -1751,41 +853,6 @@ __metadata: languageName: node linkType: hard -"has-symbols@npm:^1.0.3, has-symbols@npm:^1.1.0": - version: 1.1.0 - resolution: "has-symbols@npm:1.1.0" - checksum: 10c0/dde0a734b17ae51e84b10986e651c664379018d10b91b6b0e9b293eddb32f0f069688c841fb40f19e9611546130153e0a2a48fd7f512891fb000ddfa36f5a20e - languageName: node - linkType: hard - -"has-tostringtag@npm:^1.0.2": - version: 1.0.2 - resolution: "has-tostringtag@npm:1.0.2" - dependencies: - has-symbols: "npm:^1.0.3" - checksum: 10c0/a8b166462192bafe3d9b6e420a1d581d93dd867adb61be223a17a8d6dad147aa77a8be32c961bb2f27b3ef893cae8d36f564ab651f5e9b7938ae86f74027c48c - languageName: node - linkType: hard - -"hash.js@npm:^1.0.0, hash.js@npm:^1.0.3": - version: 1.1.7 - resolution: "hash.js@npm:1.1.7" - dependencies: - inherits: "npm:^2.0.3" - minimalistic-assert: "npm:^1.0.1" - checksum: 10c0/41ada59494eac5332cfc1ce6b7ebdd7b88a3864a6d6b08a3ea8ef261332ed60f37f10877e0c825aaa4bddebf164fbffa618286aeeec5296675e2671cbfa746c4 - languageName: node - linkType: hard - -"hasown@npm:^2.0.2": - version: 2.0.2 - resolution: "hasown@npm:2.0.2" - dependencies: - function-bind: "npm:^1.1.2" - checksum: 10c0/3769d434703b8ac66b209a4cca0737519925bbdb61dd887f93a16372b14694c63ff4e797686d87c90f08168e81082248b9b028bad60d4da9e0d1148766f56eb9 - languageName: node - linkType: hard - "he@npm:^1.2.0": version: 1.2.0 resolution: "he@npm:1.2.0" @@ -1795,24 +862,6 @@ __metadata: languageName: node linkType: hard -"hmac-drbg@npm:^1.0.1": - version: 1.0.1 - resolution: "hmac-drbg@npm:1.0.1" - dependencies: - hash.js: "npm:^1.0.3" - minimalistic-assert: "npm:^1.0.0" - minimalistic-crypto-utils: "npm:^1.0.1" - checksum: 10c0/f3d9ba31b40257a573f162176ac5930109816036c59a09f901eb2ffd7e5e705c6832bedfff507957125f2086a0ab8f853c0df225642a88bf1fcaea945f20600d - languageName: node - linkType: hard - -"hoopy@npm:^0.1.4": - version: 0.1.4 - resolution: "hoopy@npm:0.1.4" - checksum: 10c0/4ef749e1a13d46cae52014b9de452635637086c333fc67245369a1262dee806386354a4ed845d507e59e5a0d3aef55246c0ec66f5bf2908d40eb77e7dff2a254 - languageName: node - linkType: hard - "http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" @@ -1849,13 +898,6 @@ __metadata: languageName: node linkType: hard -"ieee754@npm:^1.1.8, ieee754@npm:^1.2.1": - version: 1.2.1 - resolution: "ieee754@npm:1.2.1" - checksum: 10c0/b0782ef5e0935b9f12883a2e2aa37baa75da6e66ce6515c168697b42160807d9330de9a32ec1ed73149aea02e0d822e572bca6f1e22bdcbd2149e13b050b17bb - languageName: node - linkType: hard - "imurmurhash@npm:^0.1.4": version: 0.1.4 resolution: "imurmurhash@npm:0.1.4" @@ -1873,20 +915,13 @@ __metadata: languageName: node linkType: hard -"inherits@npm:2, inherits@npm:^2.0.3, inherits@npm:^2.0.4": +"inherits@npm:2": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: 10c0/4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 languageName: node linkType: hard -"int64-buffer@npm:^0.1.9": - version: 0.1.10 - resolution: "int64-buffer@npm:0.1.10" - checksum: 10c0/22688f6d1f4db11eaacbf8e7f0b80a23690c29d023987302c367f8c071a53b84fa1cef6f8db0a347e9326f94ff76aa3529e8e9964e99d37fc675f5dcd835ee50 - languageName: node - linkType: hard - "ip-address@npm:^9.0.5": version: 9.0.5 resolution: "ip-address@npm:9.0.5" @@ -1950,13 +985,6 @@ __metadata: languageName: node linkType: hard -"isarray@npm:^1.0.0": - version: 1.0.0 - resolution: "isarray@npm:1.0.0" - checksum: 10c0/18b5be6669be53425f0b84098732670ed4e727e3af33bc7f948aac01782110eb9a18b3b329c5323bcdd3acdaae547ee077d3951317e7f133bff7105264b3003d - languageName: node - linkType: hard - "isexe@npm:^2.0.0": version: 2.0.0 resolution: "isexe@npm:2.0.0" @@ -1984,111 +1012,7 @@ __metadata: languageName: node linkType: hard -"jake@npm:^10.8.5": - version: 10.9.2 - resolution: "jake@npm:10.9.2" - dependencies: - async: "npm:^3.2.3" - chalk: "npm:^4.0.2" - filelist: "npm:^1.0.4" - minimatch: "npm:^3.1.2" - bin: - jake: bin/cli.js - checksum: 10c0/c4597b5ed9b6a908252feab296485a4f87cba9e26d6c20e0ca144fb69e0c40203d34a2efddb33b3d297b8bd59605e6c1f44f6221ca1e10e69175ecbf3ff5fe31 - languageName: node - linkType: hard - -"jest-diff@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-diff@npm:29.7.0" - dependencies: - chalk: "npm:^4.0.0" - diff-sequences: "npm:^29.6.3" - jest-get-type: "npm:^29.6.3" - pretty-format: "npm:^29.7.0" - checksum: 10c0/89a4a7f182590f56f526443dde69acefb1f2f0c9e59253c61d319569856c4931eae66b8a3790c443f529267a0ddba5ba80431c585deed81827032b2b2a1fc999 - languageName: node - linkType: hard - -"jest-get-type@npm:^29.6.3": - version: 29.6.3 - resolution: "jest-get-type@npm:29.6.3" - checksum: 10c0/552e7a97a983d3c2d4e412a44eb7de0430ff773dd99f7500962c268d6dfbfa431d7d08f919c9d960530e5f7f78eb47f267ad9b318265e5092b3ff9ede0db7c2b - languageName: node - linkType: hard - -"jest-matcher-utils@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-matcher-utils@npm:29.7.0" - dependencies: - chalk: "npm:^4.0.0" - jest-diff: "npm:^29.7.0" - jest-get-type: "npm:^29.6.3" - pretty-format: "npm:^29.7.0" - checksum: 10c0/0d0e70b28fa5c7d4dce701dc1f46ae0922102aadc24ed45d594dd9b7ae0a8a6ef8b216718d1ab79e451291217e05d4d49a82666e1a3cc2b428b75cd9c933244e - languageName: node - linkType: hard - -"jest-message-util@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-message-util@npm:29.7.0" - dependencies: - "@babel/code-frame": "npm:^7.12.13" - "@jest/types": "npm:^29.6.3" - "@types/stack-utils": "npm:^2.0.0" - chalk: "npm:^4.0.0" - graceful-fs: "npm:^4.2.9" - micromatch: "npm:^4.0.4" - pretty-format: "npm:^29.7.0" - slash: "npm:^3.0.0" - stack-utils: "npm:^2.0.3" - checksum: 10c0/850ae35477f59f3e6f27efac5215f706296e2104af39232bb14e5403e067992afb5c015e87a9243ec4d9df38525ef1ca663af9f2f4766aa116f127247008bd22 - languageName: node - linkType: hard - -"jest-util@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-util@npm:29.7.0" - dependencies: - "@jest/types": "npm:^29.6.3" - "@types/node": "npm:*" - chalk: "npm:^4.0.0" - ci-info: "npm:^3.2.0" - graceful-fs: "npm:^4.2.9" - picomatch: "npm:^2.2.3" - checksum: 10c0/bc55a8f49fdbb8f51baf31d2a4f312fb66c9db1483b82f602c9c990e659cdd7ec529c8e916d5a89452ecbcfae4949b21b40a7a59d4ffc0cd813a973ab08c8150 - languageName: node - linkType: hard - -"js-sha1@npm:^0.7.0": - version: 0.7.0 - resolution: "js-sha1@npm:0.7.0" - checksum: 10c0/f6ae6d7a3d7e8772fac8a82b2f002c282bef0b75a42ab36b4cafd99c7e02fb4654eb51c444dd026b24ff9fef5d762239aeed42a88fa44ca4b67a0a90ebce059e - languageName: node - linkType: hard - -"js-sha256@npm:^0.11.0": - version: 0.11.0 - resolution: "js-sha256@npm:0.11.0" - checksum: 10c0/90980fe01ca01fbd166751fb16c4caa09c1ab997e8bf77c0764cc05c772c6044946f4c1b3bad266ce78357280d2131d3dc0cf2dd7646e78272996bd4d590aa4f - languageName: node - linkType: hard - -"js-sha3@npm:^0.8.0": - version: 0.8.0 - resolution: "js-sha3@npm:0.8.0" - checksum: 10c0/43a21dc7967c871bd2c46cb1c2ae97441a97169f324e509f382d43330d8f75cf2c96dba7c806ab08a425765a9c847efdd4bffbac2d99c3a4f3de6c0218f40533 - languageName: node - linkType: hard - -"js-sha512@npm:^0.9.0": - version: 0.9.0 - resolution: "js-sha512@npm:0.9.0" - checksum: 10c0/00b85acae8ffde790a703a5424ae03c97c623b008135388396db1bfb1ac0ebf7356c5ff0d5a17630b5ae25ac09fe35eed2abc66bc276e9dc86fcb3cabcfcdfa2 - languageName: node - linkType: hard - -"js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": +"js-tokens@npm:^3.0.0 || ^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" checksum: 10c0/e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed @@ -2124,27 +1048,6 @@ __metadata: languageName: node linkType: hard -"jsonpath@npm:^1.1.1": - version: 1.1.1 - resolution: "jsonpath@npm:1.1.1" - dependencies: - esprima: "npm:1.2.2" - static-eval: "npm:2.0.2" - underscore: "npm:1.12.1" - checksum: 10c0/4fea3f83bcb4df08c32090ba8a0d1a6d26244f6d19c4296f9b58caa01eeb7de0f8347eba40077ceee2f95acc69d032b0b48226d350339063ba580e87983f6dec - languageName: node - linkType: hard - -"levn@npm:~0.3.0": - version: 0.3.0 - resolution: "levn@npm:0.3.0" - dependencies: - prelude-ls: "npm:~1.1.2" - type-check: "npm:~0.3.2" - checksum: 10c0/e440df9de4233da0b389cd55bd61f0f6aaff766400bebbccd1231b81801f6dbc1d816c676ebe8d70566394b749fa624b1ed1c68070e9c94999f0bdecc64cb676 - languageName: node - linkType: hard - "locate-path@npm:^6.0.0": version: 6.0.0 resolution: "locate-path@npm:6.0.0" @@ -2164,13 +1067,6 @@ __metadata: languageName: node linkType: hard -"logplease@npm:^1.2.15": - version: 1.2.15 - resolution: "logplease@npm:1.2.15" - checksum: 10c0/e835ce89895c9335460a9b4b3a79f9f4161879f5cd49efc249f8af2a128403e391c177bf55ca7207fd6687aa16e376f9a96ce58dc639acc6b4b8b00d6225323c - languageName: node - linkType: hard - "loose-envify@npm:^1.1.0": version: 1.4.0 resolution: "loose-envify@npm:1.4.0" @@ -2201,15 +1097,6 @@ __metadata: languageName: node linkType: hard -"loupe@npm:^2.3.6": - version: 2.3.7 - resolution: "loupe@npm:2.3.7" - dependencies: - get-func-name: "npm:^2.0.1" - checksum: 10c0/71a781c8fc21527b99ed1062043f1f2bb30bdaf54fa4cf92463427e1718bc6567af2988300bc243c1f276e4f0876f29e3cbf7b58106fdc186915687456ce5bf4 - languageName: node - linkType: hard - "lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": version: 10.4.3 resolution: "lru-cache@npm:10.4.3" @@ -2243,14 +1130,7 @@ __metadata: languageName: node linkType: hard -"math-intrinsics@npm:^1.1.0": - version: 1.1.0 - resolution: "math-intrinsics@npm:1.1.0" - checksum: 10c0/7579ff94e899e2f76ab64491d76cf606274c874d8f2af4a442c016bd85688927fcfca157ba6bf74b08e9439dc010b248ce05b96cc7c126a354c3bae7fcb48b7f - languageName: node - linkType: hard - -"micromatch@npm:^4.0.0, micromatch@npm:^4.0.4": +"micromatch@npm:^4.0.0": version: 4.0.8 resolution: "micromatch@npm:4.0.8" dependencies: @@ -2260,45 +1140,6 @@ __metadata: languageName: node linkType: hard -"mime-db@npm:1.52.0": - version: 1.52.0 - resolution: "mime-db@npm:1.52.0" - checksum: 10c0/0557a01deebf45ac5f5777fe7740b2a5c309c6d62d40ceab4e23da9f821899ce7a900b7ac8157d4548ddbb7beffe9abc621250e6d182b0397ec7f10c7b91a5aa - languageName: node - linkType: hard - -"mime-types@npm:^2.1.12": - version: 2.1.35 - resolution: "mime-types@npm:2.1.35" - dependencies: - mime-db: "npm:1.52.0" - checksum: 10c0/82fb07ec56d8ff1fc999a84f2f217aa46cb6ed1033fefaabd5785b9a974ed225c90dc72fff460259e66b95b73648596dbcc50d51ed69cdf464af2d237d3149b2 - languageName: node - linkType: hard - -"minimalistic-assert@npm:^1.0.0, minimalistic-assert@npm:^1.0.1": - version: 1.0.1 - resolution: "minimalistic-assert@npm:1.0.1" - checksum: 10c0/96730e5601cd31457f81a296f521eb56036e6f69133c0b18c13fe941109d53ad23a4204d946a0d638d7f3099482a0cec8c9bb6d642604612ce43ee536be3dddd - languageName: node - linkType: hard - -"minimalistic-crypto-utils@npm:^1.0.1": - version: 1.0.1 - resolution: "minimalistic-crypto-utils@npm:1.0.1" - checksum: 10c0/790ecec8c5c73973a4fbf2c663d911033e8494d5fb0960a4500634766ab05d6107d20af896ca2132e7031741f19888154d44b2408ada0852446705441383e9f8 - languageName: node - linkType: hard - -"minimatch@npm:^3.1.2": - version: 3.1.2 - resolution: "minimatch@npm:3.1.2" - dependencies: - brace-expansion: "npm:^1.1.7" - checksum: 10c0/0262810a8fc2e72cca45d6fd86bd349eee435eb95ac6aa45c9ea2180e7ee875ef44c32b55b5973ceabe95ea12682f6e3725cbb63d7a2d1da3ae1163c8b210311 - languageName: node - linkType: hard - "minimatch@npm:^5.0.1, minimatch@npm:^5.1.6": version: 5.1.6 resolution: "minimatch@npm:5.1.6" @@ -2459,27 +1300,6 @@ __metadata: languageName: node linkType: hard -"msgpack-lite@npm:^0.1.26": - version: 0.1.26 - resolution: "msgpack-lite@npm:0.1.26" - dependencies: - event-lite: "npm:^0.1.1" - ieee754: "npm:^1.1.8" - int64-buffer: "npm:^0.1.9" - isarray: "npm:^1.0.0" - bin: - msgpack: ./bin/msgpack - checksum: 10c0/ba571dca7d789fa033523b74c1aae52bbd023834bcad3f397f481889a8df6cdb6b163b73307be8b744c420ce6d3c0e697f588bb96984c04f9dcf09370b9f12d4 - languageName: node - linkType: hard - -"nanoassert@npm:^2.0.0": - version: 2.0.0 - resolution: "nanoassert@npm:2.0.0" - checksum: 10c0/fb21ce924a1ec8e8fac415a00fdd1c086c08bc185d0377e675b1d379347340fbf4a1523d8d2330e5328a542400cd7122599b6c6e21ce2ea40a9f11d68dfbfa1b - languageName: node - linkType: hard - "nanoid@npm:^3.3.6": version: 3.3.8 resolution: "nanoid@npm:3.3.8" @@ -2554,13 +1374,6 @@ __metadata: languageName: node linkType: hard -"node-forge@git+https://github.com/remicolin/forge.git, node-forge@https://github.com/remicolin/forge": - version: 1.3.2-0 - resolution: "node-forge@https://github.com/remicolin/forge.git#commit=17a11a632dd0e50343b3b8393245a2696f78afbb" - checksum: 10c0/e3f02cc45b48b90ab8715c3a03b0711559366120494a93b446da46dea7fad1c63c0e22a0162849e81dd94fcb1e5ee672e9b38aad67687c5044fd1ffb1ed631a7 - languageName: node - linkType: hard - "node-gyp@npm:latest": version: 11.1.0 resolution: "node-gyp@npm:11.1.0" @@ -2608,20 +1421,6 @@ __metadata: languageName: node linkType: hard -"optionator@npm:^0.8.1": - version: 0.8.3 - resolution: "optionator@npm:0.8.3" - dependencies: - deep-is: "npm:~0.1.3" - fast-levenshtein: "npm:~2.0.6" - levn: "npm:~0.3.0" - prelude-ls: "npm:~1.1.2" - type-check: "npm:~0.3.2" - word-wrap: "npm:~1.2.3" - checksum: 10c0/ad7000ea661792b3ec5f8f86aac28895850988926f483b5f308f59f4607dfbe24c05df2d049532ee227c040081f39401a268cf7bbf3301512f74c4d760dc6dd8 - languageName: node - linkType: hard - "p-limit@npm:^3.0.2": version: 3.1.0 resolution: "p-limit@npm:3.1.0" @@ -2654,13 +1453,6 @@ __metadata: languageName: node linkType: hard -"pako@npm:^2.1.0": - version: 2.1.0 - resolution: "pako@npm:2.1.0" - checksum: 10c0/8e8646581410654b50eb22a5dfd71159cae98145bd5086c9a7a816ec0370b5f72b4648d08674624b3870a521e6a3daffd6c2f7bc00fdefc7063c9d8232ff5116 - languageName: node - linkType: hard - "path-exists@npm:^4.0.0": version: 4.0.0 resolution: "path-exists@npm:4.0.0" @@ -2685,13 +1477,6 @@ __metadata: languageName: node linkType: hard -"pathval@npm:^1.1.1": - version: 1.1.1 - resolution: "pathval@npm:1.1.1" - checksum: 10c0/f63e1bc1b33593cdf094ed6ff5c49c1c0dc5dc20a646ca9725cc7fe7cd9995002d51d5685b9b2ec6814342935748b711bafa840f84c0bb04e38ff40a335c94dc - languageName: node - linkType: hard - "picocolors@npm:^1.0.0": version: 1.1.1 resolution: "picocolors@npm:1.1.1" @@ -2699,34 +1484,13 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be languageName: node linkType: hard -"pkijs@npm:^3.2.4": - version: 3.2.4 - resolution: "pkijs@npm:3.2.4" - dependencies: - "@noble/hashes": "npm:^1.4.0" - asn1js: "npm:^3.0.5" - bytestreamjs: "npm:^2.0.0" - pvtsutils: "npm:^1.3.2" - pvutils: "npm:^1.1.3" - tslib: "npm:^2.6.3" - checksum: 10c0/8054024f14868d570cf7c68364221942c2654be6d4f13a0aff9dd26c1e865b2ae675d895dcefea277c8b2b8e1e7778a3bb2887f65cde07a5ea078921a04e9dc0 - languageName: node - linkType: hard - -"poseidon-lite@npm:^0.2.0": - version: 0.2.1 - resolution: "poseidon-lite@npm:0.2.1" - checksum: 10c0/b1da834c8e1e8db3d8d1e8bfcbac5b5b5abbd3aa65e0a80206f8dfa09c9e858b8bc8d5291596e03c8845505af7982c6c2574fe5b184ce256dc34de9ea325b466 - languageName: node - linkType: hard - "postcss@npm:8.4.31": version: 8.4.31 resolution: "postcss@npm:8.4.31" @@ -2738,13 +1502,6 @@ __metadata: languageName: node linkType: hard -"prelude-ls@npm:~1.1.2": - version: 1.1.2 - resolution: "prelude-ls@npm:1.1.2" - checksum: 10c0/7284270064f74e0bb7f04eb9bff7be677e4146417e599ccc9c1200f0f640f8b11e592d94eb1b18f7aa9518031913bb42bea9c86af07ba69902864e61005d6f18 - languageName: node - linkType: hard - "prettier@npm:^3.3.3": version: 3.5.1 resolution: "prettier@npm:3.5.1" @@ -2754,17 +1511,6 @@ __metadata: languageName: node linkType: hard -"pretty-format@npm:^29.7.0": - version: 29.7.0 - resolution: "pretty-format@npm:29.7.0" - dependencies: - "@jest/schemas": "npm:^29.6.3" - ansi-styles: "npm:^5.0.0" - react-is: "npm:^18.0.0" - checksum: 10c0/edc5ff89f51916f036c62ed433506b55446ff739358de77207e63e88a28ca2894caac6e73dcb68166a606e51c8087d32d400473e6a9fdd2dbe743f46c9c0276f - languageName: node - linkType: hard - "proc-log@npm:^5.0.0": version: 5.0.0 resolution: "proc-log@npm:5.0.0" @@ -2782,29 +1528,6 @@ __metadata: languageName: node linkType: hard -"proxy-from-env@npm:^1.1.0": - version: 1.1.0 - resolution: "proxy-from-env@npm:1.1.0" - checksum: 10c0/fe7dd8b1bdbbbea18d1459107729c3e4a2243ca870d26d34c2c1bcd3e4425b7bcc5112362df2d93cc7fb9746f6142b5e272fd1cc5c86ddf8580175186f6ad42b - languageName: node - linkType: hard - -"pvtsutils@npm:^1.3.2": - version: 1.3.6 - resolution: "pvtsutils@npm:1.3.6" - dependencies: - tslib: "npm:^2.8.1" - checksum: 10c0/b1b42646370505ccae536dcffa662303b2c553995211330c8e39dec9ab8c197585d7751c2c5b9ab2f186feda0219d9bb23c34ee1e565573be96450f79d89a13c - languageName: node - linkType: hard - -"pvutils@npm:^1.1.3": - version: 1.1.3 - resolution: "pvutils@npm:1.1.3" - checksum: 10c0/23489e6b3c76b6afb6964a20f891d6bef092939f401c78bba186b2bfcdc7a13904a0af0a78f7933346510f8c1228d5ab02d3c80e968fd84d3c76ff98d8ec9aac - languageName: node - linkType: hard - "qrcode.react@npm:^4.1.0": version: 4.2.0 resolution: "qrcode.react@npm:4.2.0" @@ -2814,18 +1537,6 @@ __metadata: languageName: node linkType: hard -"r1csfile@npm:0.0.48": - version: 0.0.48 - resolution: "r1csfile@npm:0.0.48" - dependencies: - "@iden3/bigarray": "npm:0.0.2" - "@iden3/binfileutils": "npm:0.0.12" - fastfile: "npm:0.0.20" - ffjavascript: "npm:0.3.0" - checksum: 10c0/ea33804b4b51838603873fe4b4975b47e87fd9faad196024e49c02f4e87a0957e5cb333b9f2ac351db5372a7948bbf019218822a10f6b867b96aed90248e3e84 - languageName: node - linkType: hard - "randombytes@npm:^2.1.0": version: 2.1.0 resolution: "randombytes@npm:2.1.0" @@ -2847,13 +1558,6 @@ __metadata: languageName: node linkType: hard -"react-is@npm:^18.0.0": - version: 18.3.1 - resolution: "react-is@npm:18.3.1" - checksum: 10c0/f2f1e60010c683479e74c63f96b09fb41603527cd131a9959e2aee1e5a8b0caf270b365e5ca77d4a6b18aae659b60a86150bb3979073528877029b35aecd2072 - languageName: node - linkType: hard - "react-spinners@npm:^0.14.1": version: 0.14.1 resolution: "react-spinners@npm:0.14.1" @@ -2971,13 +1675,6 @@ __metadata: languageName: node linkType: hard -"slash@npm:^3.0.0": - version: 3.0.0 - resolution: "slash@npm:3.0.0" - checksum: 10c0/e18488c6a42bdfd4ac5be85b2ced3ccd0224773baae6ad42cfbb9ec74fc07f9fa8396bd35ee638084ead7a2a0818eb5e7151111544d4731ce843019dab4be47b - languageName: node - linkType: hard - "smart-buffer@npm:^4.2.0": version: 4.2.0 resolution: "smart-buffer@npm:4.2.0" @@ -2985,26 +1682,6 @@ __metadata: languageName: node linkType: hard -"snarkjs@npm:^0.7.4": - version: 0.7.5 - resolution: "snarkjs@npm:0.7.5" - dependencies: - "@iden3/binfileutils": "npm:0.0.12" - bfj: "npm:^7.0.2" - blake2b-wasm: "npm:^2.4.0" - circom_runtime: "npm:0.1.28" - ejs: "npm:^3.1.6" - fastfile: "npm:0.0.20" - ffjavascript: "npm:0.3.1" - js-sha3: "npm:^0.8.0" - logplease: "npm:^1.2.15" - r1csfile: "npm:0.0.48" - bin: - snarkjs: build/cli.cjs - checksum: 10c0/bc9eb1dac9c5248a4952635edc015185c5f9f268f6d2d29b32934e0b08bc284caaeba7fbc6d712ecff8a4e17c66433ba6b2f2ab5d1a6bb4704c30110fb18e9aa - languageName: node - linkType: hard - "socket.io-client@npm:^4.8.1": version: 4.8.1 resolution: "socket.io-client@npm:4.8.1" @@ -3065,7 +1742,7 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.6.0, source-map@npm:~0.6.1": +"source-map@npm:^0.6.0": version: 0.6.1 resolution: "source-map@npm:0.6.1" checksum: 10c0/ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011 @@ -3095,24 +1772,6 @@ __metadata: languageName: node linkType: hard -"stack-utils@npm:^2.0.3": - version: 2.0.6 - resolution: "stack-utils@npm:2.0.6" - dependencies: - escape-string-regexp: "npm:^2.0.0" - checksum: 10c0/651c9f87667e077584bbe848acaecc6049bc71979f1e9a46c7b920cad4431c388df0f51b8ad7cfd6eed3db97a2878d0fc8b3122979439ea8bac29c61c95eec8a - languageName: node - linkType: hard - -"static-eval@npm:2.0.2": - version: 2.0.2 - resolution: "static-eval@npm:2.0.2" - dependencies: - escodegen: "npm:^1.8.1" - checksum: 10c0/9bc1114ea5ba2a6978664907c4dd3fde6f58767274f6cb4fbfb11ba3a73cb6e74dc11e89ec4a7bf1472a587c1f976fcd4ab8fe9aae1651f5e576f097745d48ff - languageName: node - linkType: hard - "streamsearch@npm:^1.1.0": version: 1.1.0 resolution: "streamsearch@npm:1.1.0" @@ -3238,13 +1897,6 @@ __metadata: languageName: node linkType: hard -"tryer@npm:^1.0.1": - version: 1.0.1 - resolution: "tryer@npm:1.0.1" - checksum: 10c0/19070409a0009dc26127636cc14d2415e9cf8b1dc07b29694e57ea8bb5ea1bded012c0e792f6235b46e31189a7b866841668b3850867ff7eac1a6b55332c960d - languageName: node - linkType: hard - "ts-loader@npm:^9.5.1": version: 9.5.2 resolution: "ts-loader@npm:9.5.2" @@ -3346,36 +1998,13 @@ __metadata: languageName: node linkType: hard -"tslib@npm:2.7.0": - version: 2.7.0 - resolution: "tslib@npm:2.7.0" - checksum: 10c0/469e1d5bf1af585742128827000711efa61010b699cb040ab1800bcd3ccdd37f63ec30642c9e07c4439c1db6e46345582614275daca3e0f4abae29b0083f04a6 - languageName: node - linkType: hard - -"tslib@npm:^2.4.0, tslib@npm:^2.6.3, tslib@npm:^2.8.1": +"tslib@npm:^2.4.0": version: 2.8.1 resolution: "tslib@npm:2.8.1" checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 languageName: node linkType: hard -"type-check@npm:~0.3.2": - version: 0.3.2 - resolution: "type-check@npm:0.3.2" - dependencies: - prelude-ls: "npm:~1.1.2" - checksum: 10c0/776217116b2b4e50e368c7ee0c22c0a85e982881c16965b90d52f216bc296d6a52ef74f9202d22158caacc092a7645b0b8d5fe529a96e3fe35d0fb393966c875 - languageName: node - linkType: hard - -"type-detect@npm:^4.0.0, type-detect@npm:^4.1.0": - version: 4.1.0 - resolution: "type-detect@npm:4.1.0" - checksum: 10c0/df8157ca3f5d311edc22885abc134e18ff8ffbc93d6a9848af5b682730ca6a5a44499259750197250479c5331a8a75b5537529df5ec410622041650a7f293e2a - languageName: node - linkType: hard - "typescript@npm:^5.4.5": version: 5.7.3 resolution: "typescript@npm:5.7.3" @@ -3396,13 +2025,6 @@ __metadata: languageName: node linkType: hard -"underscore@npm:1.12.1": - version: 1.12.1 - resolution: "underscore@npm:1.12.1" - checksum: 10c0/00f392357e363353ac485e7c156b749505087e31ff4fdad22e04ebd2f94a56fbc554cd41a6722e3895a818466cf298b1cae93ff6211d102d373a9b50db63bfd0 - languageName: node - linkType: hard - "undici-types@npm:~6.19.2": version: 6.19.8 resolution: "undici-types@npm:6.19.8" @@ -3410,13 +2032,6 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~6.20.0": - version: 6.20.0 - resolution: "undici-types@npm:6.20.0" - checksum: 10c0/68e659a98898d6a836a9a59e6adf14a5d799707f5ea629433e025ac90d239f75e408e2e5ff086afc3cace26f8b26ee52155293564593fbb4a2f666af57fc59bf - languageName: node - linkType: hard - "unique-filename@npm:^4.0.0": version: 4.0.0 resolution: "unique-filename@npm:4.0.0" @@ -3451,29 +2066,6 @@ __metadata: languageName: node linkType: hard -"wasmbuilder@npm:0.0.16": - version: 0.0.16 - resolution: "wasmbuilder@npm:0.0.16" - checksum: 10c0/9e7e25c0b281fb83b272ba628b2f94c3e5ac7a3a488149be3548c52fa7c4502a76339bf2eb6a92e8f23b46da429dda69fe15e794b55c05ba769fe60ff74c73f3 - languageName: node - linkType: hard - -"wasmcurves@npm:0.2.2": - version: 0.2.2 - resolution: "wasmcurves@npm:0.2.2" - dependencies: - wasmbuilder: "npm:0.0.16" - checksum: 10c0/9ee35e3a333f04f5c1233ad3a59401f20cc1074a4c219a0545337e5ca78a962da4e04155f28edd205b0d52fbcd121d2b0bac4489b011affd0c68dfb7ae37cdab - languageName: node - linkType: hard - -"web-worker@npm:1.2.0": - version: 1.2.0 - resolution: "web-worker@npm:1.2.0" - checksum: 10c0/2bec036cd4784148e2f135207c62facf4457a0f2b205d6728013b9f0d7c62404dced95fcd849478387e10c8ae636d665600bd0d99d80b18c3bb2a7f045aa20d8 - languageName: node - linkType: hard - "which@npm:^2.0.1": version: 2.0.2 resolution: "which@npm:2.0.2" @@ -3496,13 +2088,6 @@ __metadata: languageName: node linkType: hard -"word-wrap@npm:~1.2.3": - version: 1.2.5 - resolution: "word-wrap@npm:1.2.5" - checksum: 10c0/e0e4a1ca27599c92a6ca4c32260e8a92e8a44f4ef6ef93f803f8ed823f486e0889fc0b93be4db59c8d51b3064951d25e43d434e95dc8c960cc3a63d65d00ba20 - languageName: node - linkType: hard - "workerpool@npm:^6.5.1": version: 6.5.1 resolution: "workerpool@npm:6.5.1" @@ -3539,7 +2124,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:8.17.1, ws@npm:~8.17.1": +"ws@npm:~8.17.1": version: 8.17.1 resolution: "ws@npm:8.17.1" peerDependencies: @@ -3636,10 +2221,3 @@ __metadata: checksum: 10c0/dceb44c28578b31641e13695d200d34ec4ab3966a5729814d5445b194933c096b7ced71494ce53a0e8820685d1d010df8b2422e5bf2cdea7e469d97ffbea306f languageName: node linkType: hard - -"zlib@npm:^1.0.5": - version: 1.0.5 - resolution: "zlib@npm:1.0.5" - checksum: 10c0/34bd33f4fdcda34f57a1ab628ceb423bdf8ef07290f46cd944eedd9a66458cc24ccf3c770da73dc0f8d28016607d861290ac5c53d49113177f7c321838df2913 - languageName: node - linkType: hard diff --git a/sdk/tests/api-server/.env.sample b/sdk/tests/api-server/.env.sample new file mode 100644 index 000000000..d6a1d35a5 --- /dev/null +++ b/sdk/tests/api-server/.env.sample @@ -0,0 +1,2 @@ +RPC_URL=https://forno.celo.org +SCOPE=test-scope \ No newline at end of file diff --git a/sdk/tests/api-server/.gitignore b/sdk/tests/api-server/.gitignore new file mode 100644 index 000000000..fb94ae776 --- /dev/null +++ b/sdk/tests/api-server/.gitignore @@ -0,0 +1,44 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env.local +.env.development.local +.env.test.local +.env.production.local + +# vercel +.vercel + +**/*.trace +**/*.zip +**/*.tar.gz +**/*.tgz +**/*.log +package-lock.json +**/*.bun + +.env \ No newline at end of file diff --git a/sdk/tests/api-server/README.md b/sdk/tests/api-server/README.md new file mode 100644 index 000000000..688c87e69 --- /dev/null +++ b/sdk/tests/api-server/README.md @@ -0,0 +1,15 @@ +# Elysia with Bun runtime + +## Getting Started +To get started with this template, simply paste this command into your terminal: +```bash +bun create elysia ./elysia-example +``` + +## Development +To start the development server run: +```bash +bun run dev +``` + +Open http://localhost:3000/ with your browser to see the result. \ No newline at end of file diff --git a/sdk/tests/api-server/bun.lockb b/sdk/tests/api-server/bun.lockb new file mode 100755 index 000000000..dea8b1fcb Binary files /dev/null and b/sdk/tests/api-server/bun.lockb differ diff --git a/sdk/tests/api-server/package.json b/sdk/tests/api-server/package.json new file mode 100644 index 000000000..f55e3eb07 --- /dev/null +++ b/sdk/tests/api-server/package.json @@ -0,0 +1,30 @@ +{ + "name": "backend-api", + "version": "1.0.50", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "dev": "bun run --watch src/app.ts", + "init": "bash scripts/copy_abi.sh && bash scripts/copy_deployedAddress.sh", + "start:daemon": "bun run src/app.ts > app.log 2>&1 &", + "stop:daemon": "pkill -f 'bun run src/app.ts'" + }, + "dependencies": { + "@elysiajs/swagger": "^1.2.0", + "@selfxyz/core": "^0.0.3", + "@openpassport/zk-kit-imt": "^0.0.5", + "@openpassport/zk-kit-lean-imt": "^0.0.6", + "dotenv": "^16.4.7", + "elysia": "latest", + "logixlysia": "^4.1.1", + "pg": "^8.13.1", + "poseidon-lite": "^0.3.0", + "snarkjs": "^0.7.5", + "swagger": "^0.7.5", + "viem": "^2.22.23" + }, + "devDependencies": { + "@types/pg": "^8.11.11", + "bun-types": "latest" + }, + "module": "index.ts" +} \ No newline at end of file diff --git a/sdk/tests/api-server/src/app.routes.ts b/sdk/tests/api-server/src/app.routes.ts new file mode 100644 index 000000000..3870e30ed --- /dev/null +++ b/sdk/tests/api-server/src/app.routes.ts @@ -0,0 +1,8 @@ +import Elysia from 'elysia'; + +import { ContractsController } from './contracts/infrastructure/contracts.controller'; + +const routes = new Elysia({ prefix: 'api/v1' }) + .use(ContractsController); + +export { routes as AppRoutes }; \ No newline at end of file diff --git a/sdk/tests/api-server/src/app.ts b/sdk/tests/api-server/src/app.ts new file mode 100644 index 000000000..34f2c3836 --- /dev/null +++ b/sdk/tests/api-server/src/app.ts @@ -0,0 +1,31 @@ +import { Elysia } from "elysia"; +import swagger from "@elysiajs/swagger"; +import logger from "logixlysia"; +import { AppRoutes } from "./app.routes.js"; +import dotenv from "dotenv"; + +dotenv.config(); + +const app = new Elysia() + .use(logger()) + .use( + swagger({ + exclude: ['/swagger'], + autoDarkMode: true, + documentation: { + info: { + title: 'backend-api', + description: + 'backend api to interact with the contracts', + version: '1.0.0', + }, + }, + }), + ) + .use(AppRoutes); + +app.listen({ port: process.env.PORT }); + +console.log( + `🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`, +); \ No newline at end of file diff --git a/sdk/tests/api-server/src/contracts/infrastructure/contracts.controller.ts b/sdk/tests/api-server/src/contracts/infrastructure/contracts.controller.ts new file mode 100644 index 000000000..526085ed3 --- /dev/null +++ b/sdk/tests/api-server/src/contracts/infrastructure/contracts.controller.ts @@ -0,0 +1,54 @@ +import Elysia, { t } from 'elysia'; +// import { SelfBackendVerifier } from "@selfxyz/core"; +import { SelfBackendVerifier } from "../../../../../core/src/SelfBackendVerifier"; + +export const ContractsController = new Elysia() + .post( + 'verify-vc-and-disclose-proof', + async (request: any) => { + try { + const selfBackendVerifier = new SelfBackendVerifier( + process.env.RPC_URL as string, + process.env.SCOPE as string, + ); + + const result = await selfBackendVerifier.verify( + request.body.proof, + request.body.publicSignals + ); + console.log(result); + + return { + status: "success", + result: result.isValid, + }; + } catch (error) { + return { + status: "error", + message: error instanceof Error ? error.message : "Unknown error", + }; + } + }, + { + body: t.Object({ + proof: t.Any(), + publicSignals: t.Any(), + }), + response: { + 200: t.Object({ + status: t.String(), + result: t.Boolean(), + }), + 500: t.Object({ + status: t.String(), + message: t.String(), + }), + }, + detail: { + tags: ['Contracts'], + summary: 'Verify a VC and disclose a proof', + description: 'Verify a VC and disclose a proof', + }, + }, + ); + \ No newline at end of file diff --git a/sdk/tests/api-server/tsconfig.json b/sdk/tests/api-server/tsconfig.json new file mode 100644 index 000000000..5a36dab8d --- /dev/null +++ b/sdk/tests/api-server/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "ES2021", + "module": "ES2022", + "moduleResolution": "node", + "types": [ + "bun-types" + ], + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true + } +} \ No newline at end of file diff --git a/sdk/tests/web-app/package.json b/sdk/tests/web-app/package.json index 2b40f4b1a..8c1bd3064 100644 --- a/sdk/tests/web-app/package.json +++ b/sdk/tests/web-app/package.json @@ -12,12 +12,11 @@ "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", "@mui/material": "^6.0.2", - "@openpassport/core": "^0.0.11", - "@openpassport/qrcode": "^0.0.14", "axios": "^1.7.7", "next": "14.2.8", "react": "^18", - "react-dom": "^18" + "react-dom": "^18", + "uuid": "^11.1.0" }, "devDependencies": { "@types/node": "^20", diff --git a/sdk/tests/web-app/src/app/disclose/page.tsx b/sdk/tests/web-app/src/app/disclose/page.tsx index 15d699747..ad6cd14a0 100644 --- a/sdk/tests/web-app/src/app/disclose/page.tsx +++ b/sdk/tests/web-app/src/app/disclose/page.tsx @@ -1,7 +1,7 @@ 'use client'; -import { SelfAppBuilder } from '../../../../../qrcode/OpenPassportQRcode'; -import OpenPassportQRcodeWrapper from '../../../../../qrcode/OpenPassportQRcode'; +import { SelfAppBuilder } from '../../../../../qrcode/SelfQRcode'; +import SelfQRcodeWrapper from '../../../../../qrcode/SelfQRcode'; import { v4 } from 'uuid'; import {logo} from './logo'; @@ -31,7 +31,7 @@ export default function Prove() { return (
- { window.location.href = '/success'; diff --git a/sdk/tests/web-app/yarn.lock b/sdk/tests/web-app/yarn.lock index fc36b4d67..113121c5f 100644 --- a/sdk/tests/web-app/yarn.lock +++ b/sdk/tests/web-app/yarn.lock @@ -329,23 +329,6 @@ __metadata: languageName: node linkType: hard -"@iden3/bigarray@npm:0.0.2": - version: 0.0.2 - resolution: "@iden3/bigarray@npm:0.0.2" - checksum: 10c0/a1c69a30f1bfb7eed0a1066e6a3d80aad3fab4dbb1bae96cf4dc7117ca9f791edc4a023d8cfb0afefbeab4d65f7bf91edfbb0a62e5ecdc8711c98bb329fedbaa - languageName: node - linkType: hard - -"@iden3/binfileutils@npm:0.0.12": - version: 0.0.12 - resolution: "@iden3/binfileutils@npm:0.0.12" - dependencies: - fastfile: "npm:0.0.20" - ffjavascript: "npm:^0.3.0" - checksum: 10c0/33783e2bad7901020bb1ba2236e0172a6f0bced519558466fe17ea2e51226a06d769e869883b1d6fe1abcc459327a77ee96265a52b53c2a964d9b4ef48b2263a - languageName: node - linkType: hard - "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -554,13 +537,6 @@ __metadata: languageName: node linkType: hard -"@next/env@npm:14.2.24": - version: 14.2.24 - resolution: "@next/env@npm:14.2.24" - checksum: 10c0/bfcb3750c0143a22fe15b66f4a201502a9d601b2f630034d2f85eb12ce7276be365b6e2ea0398c9bdd493611b95fadfe6769e5cf66d2b19e69b0036b8464566f - languageName: node - linkType: hard - "@next/env@npm:14.2.8": version: 14.2.8 resolution: "@next/env@npm:14.2.8" @@ -577,13 +553,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-darwin-arm64@npm:14.2.24": - version: 14.2.24 - resolution: "@next/swc-darwin-arm64@npm:14.2.24" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - "@next/swc-darwin-arm64@npm:14.2.8": version: 14.2.8 resolution: "@next/swc-darwin-arm64@npm:14.2.8" @@ -591,13 +560,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-darwin-x64@npm:14.2.24": - version: 14.2.24 - resolution: "@next/swc-darwin-x64@npm:14.2.24" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - "@next/swc-darwin-x64@npm:14.2.8": version: 14.2.8 resolution: "@next/swc-darwin-x64@npm:14.2.8" @@ -605,13 +567,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:14.2.24": - version: 14.2.24 - resolution: "@next/swc-linux-arm64-gnu@npm:14.2.24" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - "@next/swc-linux-arm64-gnu@npm:14.2.8": version: 14.2.8 resolution: "@next/swc-linux-arm64-gnu@npm:14.2.8" @@ -619,13 +574,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:14.2.24": - version: 14.2.24 - resolution: "@next/swc-linux-arm64-musl@npm:14.2.24" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - "@next/swc-linux-arm64-musl@npm:14.2.8": version: 14.2.8 resolution: "@next/swc-linux-arm64-musl@npm:14.2.8" @@ -633,13 +581,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:14.2.24": - version: 14.2.24 - resolution: "@next/swc-linux-x64-gnu@npm:14.2.24" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - "@next/swc-linux-x64-gnu@npm:14.2.8": version: 14.2.8 resolution: "@next/swc-linux-x64-gnu@npm:14.2.8" @@ -647,13 +588,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:14.2.24": - version: 14.2.24 - resolution: "@next/swc-linux-x64-musl@npm:14.2.24" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - "@next/swc-linux-x64-musl@npm:14.2.8": version: 14.2.8 resolution: "@next/swc-linux-x64-musl@npm:14.2.8" @@ -661,13 +595,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:14.2.24": - version: 14.2.24 - resolution: "@next/swc-win32-arm64-msvc@npm:14.2.24" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - "@next/swc-win32-arm64-msvc@npm:14.2.8": version: 14.2.8 resolution: "@next/swc-win32-arm64-msvc@npm:14.2.8" @@ -675,13 +602,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:14.2.24": - version: 14.2.24 - resolution: "@next/swc-win32-ia32-msvc@npm:14.2.24" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - "@next/swc-win32-ia32-msvc@npm:14.2.8": version: 14.2.8 resolution: "@next/swc-win32-ia32-msvc@npm:14.2.8" @@ -689,13 +609,6 @@ __metadata: languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:14.2.24": - version: 14.2.24 - resolution: "@next/swc-win32-x64-msvc@npm:14.2.24" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@next/swc-win32-x64-msvc@npm:14.2.8": version: 14.2.8 resolution: "@next/swc-win32-x64-msvc@npm:14.2.8" @@ -703,13 +616,6 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:^1.4.0": - version: 1.7.1 - resolution: "@noble/hashes@npm:1.7.1" - checksum: 10c0/2f8ec0338ccc92b576a0f5c16ab9c017a3a494062f1fbb569ae641c5e7eab32072f9081acaa96b5048c0898f972916c818ea63cbedda707886a4b5ffcfbf94e3 - languageName: node - linkType: hard - "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -766,107 +672,6 @@ __metadata: languageName: node linkType: hard -"@openpassport/core@npm:0.0.11, @openpassport/core@npm:^0.0.11": - version: 0.0.11 - resolution: "@openpassport/core@npm:0.0.11" - dependencies: - "@openpassport/zk-kit-imt": "npm:^0.0.5" - "@openpassport/zk-kit-lean-imt": "npm:^0.0.6" - "@openpassport/zk-kit-smt": "npm:^0.0.1" - "@types/react": "npm:^18.3.4" - "@types/react-dom": "npm:^18.3.0" - "@types/uuid": "npm:^10.0.0" - elliptic: "npm:^6.5.7" - fs: "npm:^0.0.1-security" - js-sha1: "npm:^0.7.0" - js-sha256: "npm:^0.11.0" - js-sha512: "npm:^0.9.0" - msgpack-lite: "npm:^0.1.26" - next: "npm:^14.2.8" - node-forge: "git+https://github.com/remicolin/forge.git" - pako: "npm:^2.1.0" - pkijs: "npm:^3.2.4" - poseidon-lite: "npm:^0.2.0" - snarkjs: "npm:^0.7.4" - uuid: "npm:^10.0.0" - zlib: "npm:^1.0.5" - peerDependencies: - react: ^18.0.0 - react-dom: ^18.0.0 - checksum: 10c0/f898583fa6202c928afd2e19eb58790cc6769f80803d3f1c5613e2a6fdebf8d1629fbbbbdd028e65e90e8c14687b89457dcaf51a37a3eb91ce1aa34de37c1151 - languageName: node - linkType: hard - -"@openpassport/qrcode@npm:^0.0.14": - version: 0.0.14 - resolution: "@openpassport/qrcode@npm:0.0.14" - dependencies: - "@openpassport/core": "npm:0.0.11" - "@types/react": "npm:^18.3.4" - "@types/react-dom": "npm:^18.3.0" - "@types/uuid": "npm:^10.0.0" - elliptic: "npm:^6.5.7" - fs: "npm:^0.0.1-security" - js-sha1: "npm:^0.7.0" - js-sha256: "npm:^0.11.0" - js-sha512: "npm:^0.9.0" - lottie-react: "npm:^2.4.0" - msgpack-lite: "npm:^0.1.26" - next: "npm:^14.2.8" - node-forge: "git+https://github.com/remicolin/forge.git" - pako: "npm:^2.1.0" - pkijs: "npm:^3.2.4" - poseidon-lite: "npm:^0.2.0" - qrcode.react: "npm:^4.1.0" - react: "npm:^18.0.0" - react-dom: "npm:^18.0.0" - react-spinners: "npm:^0.14.1" - snarkjs: "npm:^0.7.4" - socket.io-client: "npm:^4.8.1" - uuid: "npm:^10.0.0" - zlib: "npm:^1.0.5" - peerDependencies: - lottie-react: ^2.4.0 - react: ^18.0.0 - react-dom: ^18.0.0 - checksum: 10c0/7a6b2161279e29de163d9cb3ac2820bdc26af478f694f395c20a68f31260ca1b025eeb8cf2c6bf490f3cfbd993920161d41e400bda416741269fdd3dbc942c1e - languageName: node - linkType: hard - -"@openpassport/zk-kit-imt@npm:^0.0.5": - version: 0.0.5 - resolution: "@openpassport/zk-kit-imt@npm:0.0.5" - dependencies: - "@openpassport/zk-kit-utils": "npm:0.0.1" - checksum: 10c0/3664f0710b6472d7c406ffdcdfb9ab7590bf2b4b69c2c2e36989be888ae4730bab285791e6e8f98ea3fe9eac0271a6fb57bff88ddc92b5c038c9813ffbb2d24c - languageName: node - linkType: hard - -"@openpassport/zk-kit-lean-imt@npm:^0.0.6": - version: 0.0.6 - resolution: "@openpassport/zk-kit-lean-imt@npm:0.0.6" - dependencies: - "@openpassport/zk-kit-utils": "npm:0.0.1" - checksum: 10c0/2cb3f99e216391a325a7050290cccfa12323dc057d7cf4a26baeafe79a34c4ed3013da035fdbe9985395d5a668e37fd81f2b060834b67895bd3f82e7edfe0601 - languageName: node - linkType: hard - -"@openpassport/zk-kit-smt@npm:^0.0.1": - version: 0.0.1 - resolution: "@openpassport/zk-kit-smt@npm:0.0.1" - checksum: 10c0/2d1d6ccd51c1cdf005e71090ac3d5d505ca58f58776bb7bd178c3d6bfdf3e22b69e50816e620f376663b63fa98bf22439c9b38de523de51e018b9e52f097624b - languageName: node - linkType: hard - -"@openpassport/zk-kit-utils@npm:0.0.1": - version: 0.0.1 - resolution: "@openpassport/zk-kit-utils@npm:0.0.1" - dependencies: - buffer: "npm:^6.0.3" - checksum: 10c0/3a9adb279cfd5096c44934bb6c73979f21247eb0119a65f8b5c0bb1f457f5500de761fc627e0bd9e72a7cbf5ca65696c144bfffe3dbd1f1ce37a300c239a8e3f - languageName: node - linkType: hard - "@pkgjs/parseargs@npm:^0.11.0": version: 0.11.0 resolution: "@pkgjs/parseargs@npm:0.11.0" @@ -895,13 +700,6 @@ __metadata: languageName: node linkType: hard -"@socket.io/component-emitter@npm:~3.1.0": - version: 3.1.2 - resolution: "@socket.io/component-emitter@npm:3.1.2" - checksum: 10c0/c4242bad66f67e6f7b712733d25b43cbb9e19a595c8701c3ad99cbeb5901555f78b095e24852f862fffb43e96f1d8552e62def885ca82ae1bb05da3668fd87d7 - languageName: node - linkType: hard - "@swc/counter@npm:^0.1.3": version: 0.1.3 resolution: "@swc/counter@npm:0.1.3" @@ -956,7 +754,7 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:^18, @types/react-dom@npm:^18.3.0": +"@types/react-dom@npm:^18": version: 18.3.5 resolution: "@types/react-dom@npm:18.3.5" peerDependencies: @@ -974,7 +772,7 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:^18, @types/react@npm:^18.3.4": +"@types/react@npm:^18": version: 18.3.18 resolution: "@types/react@npm:18.3.18" dependencies: @@ -991,13 +789,6 @@ __metadata: languageName: node linkType: hard -"@types/uuid@npm:^10.0.0": - version: 10.0.0 - resolution: "@types/uuid@npm:10.0.0" - checksum: 10c0/9a1404bf287164481cb9b97f6bb638f78f955be57c40c6513b7655160beb29df6f84c915aaf4089a1559c216557dc4d2f79b48d978742d3ae10b937420ddac60 - languageName: node - linkType: hard - "@typescript-eslint/eslint-plugin@npm:^5.4.2 || ^6.0.0 || 7.0.0 - 7.2.0": version: 7.2.0 resolution: "@typescript-eslint/eslint-plugin@npm:7.2.0" @@ -1351,17 +1142,6 @@ __metadata: languageName: node linkType: hard -"asn1js@npm:^3.0.5": - version: 3.0.5 - resolution: "asn1js@npm:3.0.5" - dependencies: - pvtsutils: "npm:^1.3.2" - pvutils: "npm:^1.1.3" - tslib: "npm:^2.4.0" - checksum: 10c0/bb8eaf4040c8f49dd475566874986f5976b81bae65a6b5526e2208a13cdca323e69ce297bcd435fdda3eb6933defe888e71974d705b6fcb14f2734a907f8aed4 - languageName: node - linkType: hard - "ast-types-flow@npm:^0.0.8": version: 0.0.8 resolution: "ast-types-flow@npm:0.0.8" @@ -1376,13 +1156,6 @@ __metadata: languageName: node linkType: hard -"async@npm:^3.2.3": - version: 3.2.6 - resolution: "async@npm:3.2.6" - checksum: 10c0/36484bb15ceddf07078688d95e27076379cc2f87b10c03b6dd8a83e89475a3c8df5848859dd06a4c95af1e4c16fc973de0171a77f18ea00be899aca2a4f85e70 - languageName: node - linkType: hard - "asynckit@npm:^0.4.0": version: 0.4.0 resolution: "asynckit@npm:0.4.0" @@ -1424,13 +1197,6 @@ __metadata: languageName: node linkType: hard -"b4a@npm:^1.0.1": - version: 1.6.7 - resolution: "b4a@npm:1.6.7" - checksum: 10c0/ec2f004d1daae04be8c5a1f8aeb7fea213c34025e279db4958eb0b82c1729ee25f7c6e89f92a5f65c8a9cf2d017ce27e3dda912403341d1781bd74528a4849d4 - languageName: node - linkType: hard - "babel-plugin-macros@npm:^3.1.0": version: 3.1.0 resolution: "babel-plugin-macros@npm:3.1.0" @@ -1449,26 +1215,6 @@ __metadata: languageName: node linkType: hard -"base64-js@npm:^1.3.1": - version: 1.5.1 - resolution: "base64-js@npm:1.5.1" - checksum: 10c0/f23823513b63173a001030fae4f2dabe283b99a9d324ade3ad3d148e218134676f1ee8568c877cd79ec1c53158dcf2d2ba527a97c606618928ba99dd930102bf - languageName: node - linkType: hard - -"bfj@npm:^7.0.2": - version: 7.1.0 - resolution: "bfj@npm:7.1.0" - dependencies: - bluebird: "npm:^3.7.2" - check-types: "npm:^11.2.3" - hoopy: "npm:^0.1.4" - jsonpath: "npm:^1.1.1" - tryer: "npm:^1.0.1" - checksum: 10c0/e5fc6690cd093c06ca6ed7584a2caf0c4a762bc9d9d9cb18efbabc75c973b071a8dad7037c617d0ea4d97b7b439821fea32f7c232ed0be8fa7840533a9643171 - languageName: node - linkType: hard - "binary-extensions@npm:^2.0.0": version: 2.3.0 resolution: "binary-extensions@npm:2.3.0" @@ -1476,30 +1222,6 @@ __metadata: languageName: node linkType: hard -"blake2b-wasm@npm:^2.4.0": - version: 2.4.0 - resolution: "blake2b-wasm@npm:2.4.0" - dependencies: - b4a: "npm:^1.0.1" - nanoassert: "npm:^2.0.0" - checksum: 10c0/0905a47ece466c44541c8abbc94a5441ecb24a3b2622bf1f2e285c1f0f82e2b1899c7bbd70294583cfd99e1276047dd80d7afc7408f3a7c5ebf426b2f2a42f6f - languageName: node - linkType: hard - -"bluebird@npm:^3.7.2": - version: 3.7.2 - resolution: "bluebird@npm:3.7.2" - checksum: 10c0/680de03adc54ff925eaa6c7bb9a47a0690e8b5de60f4792604aae8ed618c65e6b63a7893b57ca924beaf53eee69c5af4f8314148c08124c550fe1df1add897d2 - languageName: node - linkType: hard - -"bn.js@npm:^4.11.9": - version: 4.12.1 - resolution: "bn.js@npm:4.12.1" - checksum: 10c0/b7f37a0cd5e4b79142b6f4292d518b416be34ae55d6dd6b0f66f96550c8083a50ffbbf8bda8d0ab471158cb81aa74ea4ee58fe33c7802e4a30b13810e98df116 - languageName: node - linkType: hard - "brace-expansion@npm:^1.1.7": version: 1.1.11 resolution: "brace-expansion@npm:1.1.11" @@ -1528,23 +1250,6 @@ __metadata: languageName: node linkType: hard -"brorand@npm:^1.1.0": - version: 1.1.0 - resolution: "brorand@npm:1.1.0" - checksum: 10c0/6f366d7c4990f82c366e3878492ba9a372a73163c09871e80d82fb4ae0d23f9f8924cb8a662330308206e6b3b76ba1d528b4601c9ef73c2166b440b2ea3b7571 - languageName: node - linkType: hard - -"buffer@npm:^6.0.3": - version: 6.0.3 - resolution: "buffer@npm:6.0.3" - dependencies: - base64-js: "npm:^1.3.1" - ieee754: "npm:^1.2.1" - checksum: 10c0/2a905fbbcde73cc5d8bd18d1caa23715d5f83a5935867c2329f0ac06104204ba7947be098fe1317fbd8830e26090ff8e764f08cd14fefc977bb248c3487bcbd0 - languageName: node - linkType: hard - "busboy@npm:1.6.0": version: 1.6.0 resolution: "busboy@npm:1.6.0" @@ -1554,13 +1259,6 @@ __metadata: languageName: node linkType: hard -"bytestreamjs@npm:^2.0.0": - version: 2.0.1 - resolution: "bytestreamjs@npm:2.0.1" - checksum: 10c0/edd66b7ca3f94aae99a1009304a42d82ca4c2085eb934192ff47a81f59215c975dc9d3cd8f23c40a2f43ef5b2fa6f01ace70b10ad247766cec6ec641b89eab48 - languageName: node - linkType: hard - "cacache@npm:^19.0.1": version: 19.0.1 resolution: "cacache@npm:19.0.1" @@ -1634,7 +1332,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0, chalk@npm:^4.0.2": +"chalk@npm:^4.0.0": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -1644,13 +1342,6 @@ __metadata: languageName: node linkType: hard -"check-types@npm:^11.2.3": - version: 11.2.3 - resolution: "check-types@npm:11.2.3" - checksum: 10c0/08d17e528b189e0e431689f0f2f0a78f425202f6e5ac93def5c3b8d128eb888a5103fc980d4feb7b2d4248f8114d354c223dff3c0b5ac4b1def526ef441aaf55 - languageName: node - linkType: hard - "chokidar@npm:^3.6.0": version: 3.6.0 resolution: "chokidar@npm:3.6.0" @@ -1677,17 +1368,6 @@ __metadata: languageName: node linkType: hard -"circom_runtime@npm:0.1.28": - version: 0.1.28 - resolution: "circom_runtime@npm:0.1.28" - dependencies: - ffjavascript: "npm:0.3.1" - bin: - calcwit: calcwit.js - checksum: 10c0/f2636b3cf553ea37701b527331ff740be7e31d51dc367c7f7bdffb69cf3a0d86c34ce215e4dbc0ad47f9c221c129ab11b111c6814e009c4d469592d73ab3c513 - languageName: node - linkType: hard - "client-only@npm:0.0.1": version: 0.0.1 resolution: "client-only@npm:0.0.1" @@ -1849,19 +1529,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:~4.3.1, debug@npm:~4.3.2": - version: 4.3.7 - resolution: "debug@npm:4.3.7" - dependencies: - ms: "npm:^2.1.3" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10c0/1471db19c3b06d485a622d62f65947a19a23fbd0dd73f7fd3eafb697eec5360cde447fb075919987899b1a2096e85d35d4eb5a4de09a57600ac9cf7e6c8e768b - languageName: node - linkType: hard - -"deep-is@npm:^0.1.3, deep-is@npm:~0.1.3": +"deep-is@npm:^0.1.3": version: 0.1.4 resolution: "deep-is@npm:0.1.4" checksum: 10c0/7f0ee496e0dff14a573dc6127f14c95061b448b87b995fc96c017ce0a1e66af1675e73f1d6064407975bc4ea6ab679497a29fff7b5b9c4e99cb10797c1ad0b4c @@ -1966,32 +1634,6 @@ __metadata: languageName: node linkType: hard -"ejs@npm:^3.1.6": - version: 3.1.10 - resolution: "ejs@npm:3.1.10" - dependencies: - jake: "npm:^10.8.5" - bin: - ejs: bin/cli.js - checksum: 10c0/52eade9e68416ed04f7f92c492183340582a36482836b11eab97b159fcdcfdedc62233a1bf0bf5e5e1851c501f2dca0e2e9afd111db2599e4e7f53ee29429ae1 - languageName: node - linkType: hard - -"elliptic@npm:^6.5.7": - version: 6.6.1 - resolution: "elliptic@npm:6.6.1" - dependencies: - bn.js: "npm:^4.11.9" - brorand: "npm:^1.1.0" - hash.js: "npm:^1.0.0" - hmac-drbg: "npm:^1.0.1" - inherits: "npm:^2.0.4" - minimalistic-assert: "npm:^1.0.1" - minimalistic-crypto-utils: "npm:^1.0.1" - checksum: 10c0/8b24ef782eec8b472053793ea1e91ae6bee41afffdfcb78a81c0a53b191e715cbe1292aa07165958a9bbe675bd0955142560b1a007ffce7d6c765bcaf951a867 - languageName: node - linkType: hard - "emoji-regex@npm:^8.0.0": version: 8.0.0 resolution: "emoji-regex@npm:8.0.0" @@ -2015,26 +1657,6 @@ __metadata: languageName: node linkType: hard -"engine.io-client@npm:~6.6.1": - version: 6.6.3 - resolution: "engine.io-client@npm:6.6.3" - dependencies: - "@socket.io/component-emitter": "npm:~3.1.0" - debug: "npm:~4.3.1" - engine.io-parser: "npm:~5.2.1" - ws: "npm:~8.17.1" - xmlhttprequest-ssl: "npm:~2.1.1" - checksum: 10c0/ebe0b1da6831d5a68564f9ffb80efe682da4f0538488eaffadf0bcf5177a8b4472cdb01d18a9f20dece2f8de30e2df951eb4635bef2f1b492e9f08a523db91a0 - languageName: node - linkType: hard - -"engine.io-parser@npm:~5.2.1": - version: 5.2.3 - resolution: "engine.io-parser@npm:5.2.3" - checksum: 10c0/ed4900d8dbef470ab3839ccf3bfa79ee518ea8277c7f1f2759e8c22a48f64e687ea5e474291394d0c94f84054749fd93f3ef0acb51fa2f5f234cc9d9d8e7c536 - languageName: node - linkType: hard - "enhanced-resolve@npm:^5.15.0": version: 5.18.1 resolution: "enhanced-resolve@npm:5.18.1" @@ -2213,25 +1835,6 @@ __metadata: languageName: node linkType: hard -"escodegen@npm:^1.8.1": - version: 1.14.3 - resolution: "escodegen@npm:1.14.3" - dependencies: - esprima: "npm:^4.0.1" - estraverse: "npm:^4.2.0" - esutils: "npm:^2.0.2" - optionator: "npm:^0.8.1" - source-map: "npm:~0.6.1" - dependenciesMeta: - source-map: - optional: true - bin: - escodegen: bin/escodegen.js - esgenerate: bin/esgenerate.js - checksum: 10c0/30d337803e8f44308c90267bf6192399e4b44792497c77a7506b68ab802ba6a48ebbe1ce77b219aba13dfd2de5f5e1c267e35be1ed87b2a9c3315e8b283e302a - languageName: node - linkType: hard - "eslint-config-next@npm:14.2.8": version: 14.2.8 resolution: "eslint-config-next@npm:14.2.8" @@ -2470,26 +2073,6 @@ __metadata: languageName: node linkType: hard -"esprima@npm:1.2.2": - version: 1.2.2 - resolution: "esprima@npm:1.2.2" - bin: - esparse: ./bin/esparse.js - esvalidate: ./bin/esvalidate.js - checksum: 10c0/a5a8fd359651dd8228736d7352eb7636c7765e1ec6ff8fff3f6641622039a9f51fa501969a1a4777ba4187cf9942a8d7e0367dccaff768b782bdb1a71d046abf - languageName: node - linkType: hard - -"esprima@npm:^4.0.1": - version: 4.0.1 - resolution: "esprima@npm:4.0.1" - bin: - esparse: ./bin/esparse.js - esvalidate: ./bin/esvalidate.js - checksum: 10c0/ad4bab9ead0808cf56501750fd9d3fb276f6b105f987707d059005d57e182d18a7c9ec7f3a01794ebddcca676773e42ca48a32d67a250c9d35e009ca613caba3 - languageName: node - linkType: hard - "esquery@npm:^1.4.2": version: 1.6.0 resolution: "esquery@npm:1.6.0" @@ -2508,13 +2091,6 @@ __metadata: languageName: node linkType: hard -"estraverse@npm:^4.2.0": - version: 4.3.0 - resolution: "estraverse@npm:4.3.0" - checksum: 10c0/9cb46463ef8a8a4905d3708a652d60122a0c20bb58dec7e0e12ab0e7235123d74214fc0141d743c381813e1b992767e2708194f6f6e0f9fd00c1b4e0887b8b6d - languageName: node - linkType: hard - "estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0": version: 5.3.0 resolution: "estraverse@npm:5.3.0" @@ -2529,13 +2105,6 @@ __metadata: languageName: node linkType: hard -"event-lite@npm:^0.1.1": - version: 0.1.3 - resolution: "event-lite@npm:0.1.3" - checksum: 10c0/68d11a1e9001d713d673866fe07f6c310fa9054fc0a936dd5eacc37a793aa6b3331ddb1d85dbcb88ddbe6b04944566a0f1c5b515118e1ec2e640ffcb30858b3f - languageName: node - linkType: hard - "exponential-backoff@npm:^3.1.1": version: 3.1.2 resolution: "exponential-backoff@npm:3.1.2" @@ -2570,20 +2139,13 @@ __metadata: languageName: node linkType: hard -"fast-levenshtein@npm:^2.0.6, fast-levenshtein@npm:~2.0.6": +"fast-levenshtein@npm:^2.0.6": version: 2.0.6 resolution: "fast-levenshtein@npm:2.0.6" checksum: 10c0/111972b37338bcb88f7d9e2c5907862c280ebf4234433b95bc611e518d192ccb2d38119c4ac86e26b668d75f7f3894f4ff5c4982899afced7ca78633b08287c4 languageName: node linkType: hard -"fastfile@npm:0.0.20": - version: 0.0.20 - resolution: "fastfile@npm:0.0.20" - checksum: 10c0/ca91f5658eec188c7ba3b910d7d87ed90d4d7ca92852fa14dd8c6d4ae4c2149b8147a30bbcafe727bf12f0ebb25c585a6cf0a112a3957b761ec913f8299fdd4f - languageName: node - linkType: hard - "fastq@npm:^1.6.0": version: 1.19.0 resolution: "fastq@npm:1.19.0" @@ -2605,28 +2167,6 @@ __metadata: languageName: node linkType: hard -"ffjavascript@npm:0.3.0": - version: 0.3.0 - resolution: "ffjavascript@npm:0.3.0" - dependencies: - wasmbuilder: "npm:0.0.16" - wasmcurves: "npm:0.2.2" - web-worker: "npm:1.2.0" - checksum: 10c0/2899db6ab67162eb9a7a052c420d31b0e15c6fd12bc738c48559e0a926649f1d11afe9cfa2611ff13f816b2fd9fa047fb11f6f8682f0dea4f84c4dd9f5dc7c3c - languageName: node - linkType: hard - -"ffjavascript@npm:0.3.1, ffjavascript@npm:^0.3.0": - version: 0.3.1 - resolution: "ffjavascript@npm:0.3.1" - dependencies: - wasmbuilder: "npm:0.0.16" - wasmcurves: "npm:0.2.2" - web-worker: "npm:1.2.0" - checksum: 10c0/6928afe37cdbe9a88a9901a37d0abbdcfa61a8533517cb86e2584bf2701eaa10ce2bfa1d417499042f9b10b79bc058ec0ecc14d3fdc6cb55d21bfcac3d1c4521 - languageName: node - linkType: hard - "file-entry-cache@npm:^6.0.1": version: 6.0.1 resolution: "file-entry-cache@npm:6.0.1" @@ -2636,15 +2176,6 @@ __metadata: languageName: node linkType: hard -"filelist@npm:^1.0.4": - version: 1.0.4 - resolution: "filelist@npm:1.0.4" - dependencies: - minimatch: "npm:^5.0.1" - checksum: 10c0/426b1de3944a3d153b053f1c0ebfd02dccd0308a4f9e832ad220707a6d1f1b3c9784d6cadf6b2f68f09a57565f63ebc7bcdc913ccf8012d834f472c46e596f41 - languageName: node - linkType: hard - "fill-range@npm:^7.1.1": version: 7.1.1 resolution: "fill-range@npm:7.1.1" @@ -2746,13 +2277,6 @@ __metadata: languageName: node linkType: hard -"fs@npm:^0.0.1-security": - version: 0.0.1-security - resolution: "fs@npm:0.0.1-security" - checksum: 10c0/e0c0b585ec6f7483d63d067215d9d6bb2e0dba5912060d32554c8e566a0e22ee65e4c2a2b0567476efbbfb47682554b4711d69cab49950d01f227a3dfa7d671a - languageName: node - linkType: hard - "fsevents@npm:~2.3.2": version: 2.3.3 resolution: "fsevents@npm:2.3.3" @@ -3020,16 +2544,6 @@ __metadata: languageName: node linkType: hard -"hash.js@npm:^1.0.0, hash.js@npm:^1.0.3": - version: 1.1.7 - resolution: "hash.js@npm:1.1.7" - dependencies: - inherits: "npm:^2.0.3" - minimalistic-assert: "npm:^1.0.1" - checksum: 10c0/41ada59494eac5332cfc1ce6b7ebdd7b88a3864a6d6b08a3ea8ef261332ed60f37f10877e0c825aaa4bddebf164fbffa618286aeeec5296675e2671cbfa746c4 - languageName: node - linkType: hard - "hasown@npm:^2.0.2": version: 2.0.2 resolution: "hasown@npm:2.0.2" @@ -3039,17 +2553,6 @@ __metadata: languageName: node linkType: hard -"hmac-drbg@npm:^1.0.1": - version: 1.0.1 - resolution: "hmac-drbg@npm:1.0.1" - dependencies: - hash.js: "npm:^1.0.3" - minimalistic-assert: "npm:^1.0.0" - minimalistic-crypto-utils: "npm:^1.0.1" - checksum: 10c0/f3d9ba31b40257a573f162176ac5930109816036c59a09f901eb2ffd7e5e705c6832bedfff507957125f2086a0ab8f853c0df225642a88bf1fcaea945f20600d - languageName: node - linkType: hard - "hoist-non-react-statics@npm:^3.3.1": version: 3.3.2 resolution: "hoist-non-react-statics@npm:3.3.2" @@ -3059,13 +2562,6 @@ __metadata: languageName: node linkType: hard -"hoopy@npm:^0.1.4": - version: 0.1.4 - resolution: "hoopy@npm:0.1.4" - checksum: 10c0/4ef749e1a13d46cae52014b9de452635637086c333fc67245369a1262dee806386354a4ed845d507e59e5a0d3aef55246c0ec66f5bf2908d40eb77e7dff2a254 - languageName: node - linkType: hard - "http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" @@ -3102,13 +2598,6 @@ __metadata: languageName: node linkType: hard -"ieee754@npm:^1.1.8, ieee754@npm:^1.2.1": - version: 1.2.1 - resolution: "ieee754@npm:1.2.1" - checksum: 10c0/b0782ef5e0935b9f12883a2e2aa37baa75da6e66ce6515c168697b42160807d9330de9a32ec1ed73149aea02e0d822e572bca6f1e22bdcbd2149e13b050b17bb - languageName: node - linkType: hard - "ignore@npm:^5.2.0, ignore@npm:^5.2.4": version: 5.3.2 resolution: "ignore@npm:5.3.2" @@ -3143,20 +2632,13 @@ __metadata: languageName: node linkType: hard -"inherits@npm:2, inherits@npm:^2.0.3, inherits@npm:^2.0.4": +"inherits@npm:2": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: 10c0/4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 languageName: node linkType: hard -"int64-buffer@npm:^0.1.9": - version: 0.1.10 - resolution: "int64-buffer@npm:0.1.10" - checksum: 10c0/22688f6d1f4db11eaacbf8e7f0b80a23690c29d023987302c367f8c071a53b84fa1cef6f8db0a347e9326f94ff76aa3529e8e9964e99d37fc675f5dcd835ee50 - languageName: node - linkType: hard - "internal-slot@npm:^1.1.0": version: 1.1.0 resolution: "internal-slot@npm:1.1.0" @@ -3442,13 +2924,6 @@ __metadata: languageName: node linkType: hard -"isarray@npm:^1.0.0": - version: 1.0.0 - resolution: "isarray@npm:1.0.0" - checksum: 10c0/18b5be6669be53425f0b84098732670ed4e727e3af33bc7f948aac01782110eb9a18b3b329c5323bcdd3acdaae547ee077d3951317e7f133bff7105264b3003d - languageName: node - linkType: hard - "isarray@npm:^2.0.5": version: 2.0.5 resolution: "isarray@npm:2.0.5" @@ -3510,20 +2985,6 @@ __metadata: languageName: node linkType: hard -"jake@npm:^10.8.5": - version: 10.9.2 - resolution: "jake@npm:10.9.2" - dependencies: - async: "npm:^3.2.3" - chalk: "npm:^4.0.2" - filelist: "npm:^1.0.4" - minimatch: "npm:^3.1.2" - bin: - jake: bin/cli.js - checksum: 10c0/c4597b5ed9b6a908252feab296485a4f87cba9e26d6c20e0ca144fb69e0c40203d34a2efddb33b3d297b8bd59605e6c1f44f6221ca1e10e69175ecbf3ff5fe31 - languageName: node - linkType: hard - "jiti@npm:^1.21.6": version: 1.21.7 resolution: "jiti@npm:1.21.7" @@ -3533,34 +2994,6 @@ __metadata: languageName: node linkType: hard -"js-sha1@npm:^0.7.0": - version: 0.7.0 - resolution: "js-sha1@npm:0.7.0" - checksum: 10c0/f6ae6d7a3d7e8772fac8a82b2f002c282bef0b75a42ab36b4cafd99c7e02fb4654eb51c444dd026b24ff9fef5d762239aeed42a88fa44ca4b67a0a90ebce059e - languageName: node - linkType: hard - -"js-sha256@npm:^0.11.0": - version: 0.11.0 - resolution: "js-sha256@npm:0.11.0" - checksum: 10c0/90980fe01ca01fbd166751fb16c4caa09c1ab997e8bf77c0764cc05c772c6044946f4c1b3bad266ce78357280d2131d3dc0cf2dd7646e78272996bd4d590aa4f - languageName: node - linkType: hard - -"js-sha3@npm:^0.8.0": - version: 0.8.0 - resolution: "js-sha3@npm:0.8.0" - checksum: 10c0/43a21dc7967c871bd2c46cb1c2ae97441a97169f324e509f382d43330d8f75cf2c96dba7c806ab08a425765a9c847efdd4bffbac2d99c3a4f3de6c0218f40533 - languageName: node - linkType: hard - -"js-sha512@npm:^0.9.0": - version: 0.9.0 - resolution: "js-sha512@npm:0.9.0" - checksum: 10c0/00b85acae8ffde790a703a5424ae03c97c623b008135388396db1bfb1ac0ebf7356c5ff0d5a17630b5ae25ac09fe35eed2abc66bc276e9dc86fcb3cabcfcdfa2 - languageName: node - linkType: hard - "js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" @@ -3634,17 +3067,6 @@ __metadata: languageName: node linkType: hard -"jsonpath@npm:^1.1.1": - version: 1.1.1 - resolution: "jsonpath@npm:1.1.1" - dependencies: - esprima: "npm:1.2.2" - static-eval: "npm:2.0.2" - underscore: "npm:1.12.1" - checksum: 10c0/4fea3f83bcb4df08c32090ba8a0d1a6d26244f6d19c4296f9b58caa01eeb7de0f8347eba40077ceee2f95acc69d032b0b48226d350339063ba580e87983f6dec - languageName: node - linkType: hard - "jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.5": version: 3.3.5 resolution: "jsx-ast-utils@npm:3.3.5" @@ -3692,16 +3114,6 @@ __metadata: languageName: node linkType: hard -"levn@npm:~0.3.0": - version: 0.3.0 - resolution: "levn@npm:0.3.0" - dependencies: - prelude-ls: "npm:~1.1.2" - type-check: "npm:~0.3.2" - checksum: 10c0/e440df9de4233da0b389cd55bd61f0f6aaff766400bebbccd1231b81801f6dbc1d816c676ebe8d70566394b749fa624b1ed1c68070e9c94999f0bdecc64cb676 - languageName: node - linkType: hard - "lilconfig@npm:^3.0.0, lilconfig@npm:^3.1.3": version: 3.1.3 resolution: "lilconfig@npm:3.1.3" @@ -3732,13 +3144,6 @@ __metadata: languageName: node linkType: hard -"logplease@npm:^1.2.15": - version: 1.2.15 - resolution: "logplease@npm:1.2.15" - checksum: 10c0/e835ce89895c9335460a9b4b3a79f9f4161879f5cd49efc249f8af2a128403e391c177bf55ca7207fd6687aa16e376f9a96ce58dc639acc6b4b8b00d6225323c - languageName: node - linkType: hard - "loose-envify@npm:^1.1.0, loose-envify@npm:^1.4.0": version: 1.4.0 resolution: "loose-envify@npm:1.4.0" @@ -3750,25 +3155,6 @@ __metadata: languageName: node linkType: hard -"lottie-react@npm:^2.4.0": - version: 2.4.1 - resolution: "lottie-react@npm:2.4.1" - dependencies: - lottie-web: "npm:^5.10.2" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - checksum: 10c0/7f6a0a2cf2af25deabe7b4d4c9917e47d12016673613c59dcdd8ef52e10e914dd0c1f71d4a275d56aaba03fe9d85b333087f7c8d40a8f967ece4a0444c7a3cdf - languageName: node - linkType: hard - -"lottie-web@npm:^5.10.2": - version: 5.12.2 - resolution: "lottie-web@npm:5.12.2" - checksum: 10c0/0aeaf631b10a76afd025df70c2a1486543530708e07a316946c08e55891dac483ffbaf2bf3648ae0b9c54c733118a0a086fd150aa76f7848606214c67ad72c30 - languageName: node - linkType: hard - "lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": version: 10.4.3 resolution: "lru-cache@npm:10.4.3" @@ -3835,20 +3221,6 @@ __metadata: languageName: node linkType: hard -"minimalistic-assert@npm:^1.0.0, minimalistic-assert@npm:^1.0.1": - version: 1.0.1 - resolution: "minimalistic-assert@npm:1.0.1" - checksum: 10c0/96730e5601cd31457f81a296f521eb56036e6f69133c0b18c13fe941109d53ad23a4204d946a0d638d7f3099482a0cec8c9bb6d642604612ce43ee536be3dddd - languageName: node - linkType: hard - -"minimalistic-crypto-utils@npm:^1.0.1": - version: 1.0.1 - resolution: "minimalistic-crypto-utils@npm:1.0.1" - checksum: 10c0/790ecec8c5c73973a4fbf2c663d911033e8494d5fb0960a4500634766ab05d6107d20af896ca2132e7031741f19888154d44b2408ada0852446705441383e9f8 - languageName: node - linkType: hard - "minimatch@npm:9.0.3": version: 9.0.3 resolution: "minimatch@npm:9.0.3" @@ -3867,15 +3239,6 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^5.0.1": - version: 5.1.6 - resolution: "minimatch@npm:5.1.6" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/3defdfd230914f22a8da203747c42ee3c405c39d4d37ffda284dac5e45b7e1f6c49aa8be606509002898e73091ff2a3bbfc59c2c6c71d4660609f63aa92f98e3 - languageName: node - linkType: hard - "minimatch@npm:^9.0.1, minimatch@npm:^9.0.4": version: 9.0.5 resolution: "minimatch@npm:9.0.5" @@ -3985,20 +3348,6 @@ __metadata: languageName: node linkType: hard -"msgpack-lite@npm:^0.1.26": - version: 0.1.26 - resolution: "msgpack-lite@npm:0.1.26" - dependencies: - event-lite: "npm:^0.1.1" - ieee754: "npm:^1.1.8" - int64-buffer: "npm:^0.1.9" - isarray: "npm:^1.0.0" - bin: - msgpack: ./bin/msgpack - checksum: 10c0/ba571dca7d789fa033523b74c1aae52bbd023834bcad3f397f481889a8df6cdb6b163b73307be8b744c420ce6d3c0e697f588bb96984c04f9dcf09370b9f12d4 - languageName: node - linkType: hard - "mz@npm:^2.7.0": version: 2.7.0 resolution: "mz@npm:2.7.0" @@ -4010,13 +3359,6 @@ __metadata: languageName: node linkType: hard -"nanoassert@npm:^2.0.0": - version: 2.0.0 - resolution: "nanoassert@npm:2.0.0" - checksum: 10c0/fb21ce924a1ec8e8fac415a00fdd1c086c08bc185d0377e675b1d379347340fbf4a1523d8d2330e5328a542400cd7122599b6c6e21ce2ea40a9f11d68dfbfa1b - languageName: node - linkType: hard - "nanoid@npm:^3.3.6, nanoid@npm:^3.3.8": version: 3.3.8 resolution: "nanoid@npm:3.3.8" @@ -4098,71 +3440,6 @@ __metadata: languageName: node linkType: hard -"next@npm:^14.2.8": - version: 14.2.24 - resolution: "next@npm:14.2.24" - dependencies: - "@next/env": "npm:14.2.24" - "@next/swc-darwin-arm64": "npm:14.2.24" - "@next/swc-darwin-x64": "npm:14.2.24" - "@next/swc-linux-arm64-gnu": "npm:14.2.24" - "@next/swc-linux-arm64-musl": "npm:14.2.24" - "@next/swc-linux-x64-gnu": "npm:14.2.24" - "@next/swc-linux-x64-musl": "npm:14.2.24" - "@next/swc-win32-arm64-msvc": "npm:14.2.24" - "@next/swc-win32-ia32-msvc": "npm:14.2.24" - "@next/swc-win32-x64-msvc": "npm:14.2.24" - "@swc/helpers": "npm:0.5.5" - busboy: "npm:1.6.0" - caniuse-lite: "npm:^1.0.30001579" - graceful-fs: "npm:^4.2.11" - postcss: "npm:8.4.31" - styled-jsx: "npm:5.1.1" - peerDependencies: - "@opentelemetry/api": ^1.1.0 - "@playwright/test": ^1.41.2 - react: ^18.2.0 - react-dom: ^18.2.0 - sass: ^1.3.0 - dependenciesMeta: - "@next/swc-darwin-arm64": - optional: true - "@next/swc-darwin-x64": - optional: true - "@next/swc-linux-arm64-gnu": - optional: true - "@next/swc-linux-arm64-musl": - optional: true - "@next/swc-linux-x64-gnu": - optional: true - "@next/swc-linux-x64-musl": - optional: true - "@next/swc-win32-arm64-msvc": - optional: true - "@next/swc-win32-ia32-msvc": - optional: true - "@next/swc-win32-x64-msvc": - optional: true - peerDependenciesMeta: - "@opentelemetry/api": - optional: true - "@playwright/test": - optional: true - sass: - optional: true - bin: - next: dist/bin/next - checksum: 10c0/b047fb1a1d9fe16bda1bdaac51fd52defb4a5104aec30cbd43f868a4ec819989751f5dc53ab4a270ef5d0e8efd7020c1641aa89234e230b061a54036f63ddcb8 - languageName: node - linkType: hard - -"node-forge@git+https://github.com/remicolin/forge.git": - version: 1.3.2-0 - resolution: "node-forge@https://github.com/remicolin/forge.git#commit=17a11a632dd0e50343b3b8393245a2696f78afbb" - checksum: 10c0/e3f02cc45b48b90ab8715c3a03b0711559366120494a93b446da46dea7fad1c63c0e22a0162849e81dd94fcb1e5ee672e9b38aad67687c5044fd1ffb1ed631a7 - languageName: node - linkType: hard - "node-gyp@npm:latest": version: 11.1.0 resolution: "node-gyp@npm:11.1.0" @@ -4298,20 +3575,6 @@ __metadata: languageName: node linkType: hard -"optionator@npm:^0.8.1": - version: 0.8.3 - resolution: "optionator@npm:0.8.3" - dependencies: - deep-is: "npm:~0.1.3" - fast-levenshtein: "npm:~2.0.6" - levn: "npm:~0.3.0" - prelude-ls: "npm:~1.1.2" - type-check: "npm:~0.3.2" - word-wrap: "npm:~1.2.3" - checksum: 10c0/ad7000ea661792b3ec5f8f86aac28895850988926f483b5f308f59f4607dfbe24c05df2d049532ee227c040081f39401a268cf7bbf3301512f74c4d760dc6dd8 - languageName: node - linkType: hard - "optionator@npm:^0.9.3": version: 0.9.4 resolution: "optionator@npm:0.9.4" @@ -4369,13 +3632,6 @@ __metadata: languageName: node linkType: hard -"pako@npm:^2.1.0": - version: 2.1.0 - resolution: "pako@npm:2.1.0" - checksum: 10c0/8e8646581410654b50eb22a5dfd71159cae98145bd5086c9a7a816ec0370b5f72b4648d08674624b3870a521e6a3daffd6c2f7bc00fdefc7063c9d8232ff5116 - languageName: node - linkType: hard - "parent-module@npm:^1.0.0": version: 1.0.1 resolution: "parent-module@npm:1.0.1" @@ -4477,27 +3733,6 @@ __metadata: languageName: node linkType: hard -"pkijs@npm:^3.2.4": - version: 3.2.4 - resolution: "pkijs@npm:3.2.4" - dependencies: - "@noble/hashes": "npm:^1.4.0" - asn1js: "npm:^3.0.5" - bytestreamjs: "npm:^2.0.0" - pvtsutils: "npm:^1.3.2" - pvutils: "npm:^1.1.3" - tslib: "npm:^2.6.3" - checksum: 10c0/8054024f14868d570cf7c68364221942c2654be6d4f13a0aff9dd26c1e865b2ae675d895dcefea277c8b2b8e1e7778a3bb2887f65cde07a5ea078921a04e9dc0 - languageName: node - linkType: hard - -"poseidon-lite@npm:^0.2.0": - version: 0.2.1 - resolution: "poseidon-lite@npm:0.2.1" - checksum: 10c0/b1da834c8e1e8db3d8d1e8bfcbac5b5b5abbd3aa65e0a80206f8dfa09c9e858b8bc8d5291596e03c8845505af7982c6c2574fe5b184ce256dc34de9ea325b466 - languageName: node - linkType: hard - "possible-typed-array-names@npm:^1.0.0": version: 1.1.0 resolution: "possible-typed-array-names@npm:1.1.0" @@ -4604,13 +3839,6 @@ __metadata: languageName: node linkType: hard -"prelude-ls@npm:~1.1.2": - version: 1.1.2 - resolution: "prelude-ls@npm:1.1.2" - checksum: 10c0/7284270064f74e0bb7f04eb9bff7be677e4146417e599ccc9c1200f0f640f8b11e592d94eb1b18f7aa9518031913bb42bea9c86af07ba69902864e61005d6f18 - languageName: node - linkType: hard - "proc-log@npm:^5.0.0": version: 5.0.0 resolution: "proc-log@npm:5.0.0" @@ -4653,31 +3881,6 @@ __metadata: languageName: node linkType: hard -"pvtsutils@npm:^1.3.2": - version: 1.3.6 - resolution: "pvtsutils@npm:1.3.6" - dependencies: - tslib: "npm:^2.8.1" - checksum: 10c0/b1b42646370505ccae536dcffa662303b2c553995211330c8e39dec9ab8c197585d7751c2c5b9ab2f186feda0219d9bb23c34ee1e565573be96450f79d89a13c - languageName: node - linkType: hard - -"pvutils@npm:^1.1.3": - version: 1.1.3 - resolution: "pvutils@npm:1.1.3" - checksum: 10c0/23489e6b3c76b6afb6964a20f891d6bef092939f401c78bba186b2bfcdc7a13904a0af0a78f7933346510f8c1228d5ab02d3c80e968fd84d3c76ff98d8ec9aac - languageName: node - linkType: hard - -"qrcode.react@npm:^4.1.0": - version: 4.2.0 - resolution: "qrcode.react@npm:4.2.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - checksum: 10c0/68c691d130e5fda2f57cee505ed7aea840e7d02033100687b764601f9595e1116e34c13876628a93e1a5c2b85e4efc27d30b2fda72e2050c02f3e1c4e998d248 - languageName: node - linkType: hard - "queue-microtask@npm:^1.2.2": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" @@ -4685,19 +3888,7 @@ __metadata: languageName: node linkType: hard -"r1csfile@npm:0.0.48": - version: 0.0.48 - resolution: "r1csfile@npm:0.0.48" - dependencies: - "@iden3/bigarray": "npm:0.0.2" - "@iden3/binfileutils": "npm:0.0.12" - fastfile: "npm:0.0.20" - ffjavascript: "npm:0.3.0" - checksum: 10c0/ea33804b4b51838603873fe4b4975b47e87fd9faad196024e49c02f4e87a0957e5cb333b9f2ac351db5372a7948bbf019218822a10f6b867b96aed90248e3e84 - languageName: node - linkType: hard - -"react-dom@npm:^18, react-dom@npm:^18.0.0": +"react-dom@npm:^18": version: 18.3.1 resolution: "react-dom@npm:18.3.1" dependencies: @@ -4723,16 +3914,6 @@ __metadata: languageName: node linkType: hard -"react-spinners@npm:^0.14.1": - version: 0.14.1 - resolution: "react-spinners@npm:0.14.1" - peerDependencies: - react: ^16.0.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.0.0 || ^17.0.0 || ^18.0.0 - checksum: 10c0/5b3c101f789716331a0b6afad156293fb9aa05620e65494753001afcdb611788057f379b5979b34d570d527fa978003293266b59db505bf2d243ebab899ceeda - languageName: node - linkType: hard - "react-transition-group@npm:^4.4.5": version: 4.4.5 resolution: "react-transition-group@npm:4.4.5" @@ -4748,7 +3929,7 @@ __metadata: languageName: node linkType: hard -"react@npm:^18, react@npm:^18.0.0": +"react@npm:^18": version: 18.3.1 resolution: "react@npm:18.3.1" dependencies: @@ -5113,48 +4294,6 @@ __metadata: languageName: node linkType: hard -"snarkjs@npm:^0.7.4": - version: 0.7.5 - resolution: "snarkjs@npm:0.7.5" - dependencies: - "@iden3/binfileutils": "npm:0.0.12" - bfj: "npm:^7.0.2" - blake2b-wasm: "npm:^2.4.0" - circom_runtime: "npm:0.1.28" - ejs: "npm:^3.1.6" - fastfile: "npm:0.0.20" - ffjavascript: "npm:0.3.1" - js-sha3: "npm:^0.8.0" - logplease: "npm:^1.2.15" - r1csfile: "npm:0.0.48" - bin: - snarkjs: build/cli.cjs - checksum: 10c0/bc9eb1dac9c5248a4952635edc015185c5f9f268f6d2d29b32934e0b08bc284caaeba7fbc6d712ecff8a4e17c66433ba6b2f2ab5d1a6bb4704c30110fb18e9aa - languageName: node - linkType: hard - -"socket.io-client@npm:^4.8.1": - version: 4.8.1 - resolution: "socket.io-client@npm:4.8.1" - dependencies: - "@socket.io/component-emitter": "npm:~3.1.0" - debug: "npm:~4.3.2" - engine.io-client: "npm:~6.6.1" - socket.io-parser: "npm:~4.2.4" - checksum: 10c0/544c49cc8cc77118ef68b758a8a580c8e680a5909cae05c566d2cc07ec6cd6720a4f5b7e985489bf2a8391749177a5437ac30b8afbdf30b9da6402687ad51c86 - languageName: node - linkType: hard - -"socket.io-parser@npm:~4.2.4": - version: 4.2.4 - resolution: "socket.io-parser@npm:4.2.4" - dependencies: - "@socket.io/component-emitter": "npm:~3.1.0" - debug: "npm:~4.3.1" - checksum: 10c0/9383b30358fde4a801ea4ec5e6860915c0389a091321f1c1f41506618b5cf7cd685d0a31c587467a0c4ee99ef98c2b99fb87911f9dfb329716c43b587f29ca48 - languageName: node - linkType: hard - "socks-proxy-agent@npm:^8.0.3": version: 8.0.5 resolution: "socks-proxy-agent@npm:8.0.5" @@ -5190,13 +4329,6 @@ __metadata: languageName: node linkType: hard -"source-map@npm:~0.6.1": - version: 0.6.1 - resolution: "source-map@npm:0.6.1" - checksum: 10c0/ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011 - languageName: node - linkType: hard - "sprintf-js@npm:^1.1.3": version: 1.1.3 resolution: "sprintf-js@npm:1.1.3" @@ -5220,15 +4352,6 @@ __metadata: languageName: node linkType: hard -"static-eval@npm:2.0.2": - version: 2.0.2 - resolution: "static-eval@npm:2.0.2" - dependencies: - escodegen: "npm:^1.8.1" - checksum: 10c0/9bc1114ea5ba2a6978664907c4dd3fde6f58767274f6cb4fbfb11ba3a73cb6e74dc11e89ec4a7bf1472a587c1f976fcd4ab8fe9aae1651f5e576f097745d48ff - languageName: node - linkType: hard - "streamsearch@npm:^1.1.0": version: 1.1.0 resolution: "streamsearch@npm:1.1.0" @@ -5525,13 +4648,6 @@ __metadata: languageName: node linkType: hard -"tryer@npm:^1.0.1": - version: 1.0.1 - resolution: "tryer@npm:1.0.1" - checksum: 10c0/19070409a0009dc26127636cc14d2415e9cf8b1dc07b29694e57ea8bb5ea1bded012c0e792f6235b46e31189a7b866841668b3850867ff7eac1a6b55332c960d - languageName: node - linkType: hard - "ts-api-utils@npm:^1.0.1": version: 1.4.3 resolution: "ts-api-utils@npm:1.4.3" @@ -5560,7 +4676,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.4.0, tslib@npm:^2.6.3, tslib@npm:^2.8.1": +"tslib@npm:^2.4.0": version: 2.8.1 resolution: "tslib@npm:2.8.1" checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 @@ -5576,15 +4692,6 @@ __metadata: languageName: node linkType: hard -"type-check@npm:~0.3.2": - version: 0.3.2 - resolution: "type-check@npm:0.3.2" - dependencies: - prelude-ls: "npm:~1.1.2" - checksum: 10c0/776217116b2b4e50e368c7ee0c22c0a85e982881c16965b90d52f216bc296d6a52ef74f9202d22158caacc092a7645b0b8d5fe529a96e3fe35d0fb393966c875 - languageName: node - linkType: hard - "type-fest@npm:^0.20.2": version: 0.20.2 resolution: "type-fest@npm:0.20.2" @@ -5677,13 +4784,6 @@ __metadata: languageName: node linkType: hard -"underscore@npm:1.12.1": - version: 1.12.1 - resolution: "underscore@npm:1.12.1" - checksum: 10c0/00f392357e363353ac485e7c156b749505087e31ff4fdad22e04ebd2f94a56fbc554cd41a6722e3895a818466cf298b1cae93ff6211d102d373a9b50db63bfd0 - languageName: node - linkType: hard - "undici-types@npm:~6.19.2": version: 6.19.8 resolution: "undici-types@npm:6.19.8" @@ -5725,28 +4825,12 @@ __metadata: languageName: node linkType: hard -"uuid@npm:^10.0.0": - version: 10.0.0 - resolution: "uuid@npm:10.0.0" +"uuid@npm:^11.1.0": + version: 11.1.0 + resolution: "uuid@npm:11.1.0" bin: - uuid: dist/bin/uuid - checksum: 10c0/eab18c27fe4ab9fb9709a5d5f40119b45f2ec8314f8d4cf12ce27e4c6f4ffa4a6321dc7db6c515068fa373c075b49691ba969f0010bf37f44c37ca40cd6bf7fe - languageName: node - linkType: hard - -"wasmbuilder@npm:0.0.16": - version: 0.0.16 - resolution: "wasmbuilder@npm:0.0.16" - checksum: 10c0/9e7e25c0b281fb83b272ba628b2f94c3e5ac7a3a488149be3548c52fa7c4502a76339bf2eb6a92e8f23b46da429dda69fe15e794b55c05ba769fe60ff74c73f3 - languageName: node - linkType: hard - -"wasmcurves@npm:0.2.2": - version: 0.2.2 - resolution: "wasmcurves@npm:0.2.2" - dependencies: - wasmbuilder: "npm:0.0.16" - checksum: 10c0/9ee35e3a333f04f5c1233ad3a59401f20cc1074a4c219a0545337e5ca78a962da4e04155f28edd205b0d52fbcd121d2b0bac4489b011affd0c68dfb7ae37cdab + uuid: dist/esm/bin/uuid + checksum: 10c0/34aa51b9874ae398c2b799c88a127701408cd581ee89ec3baa53509dd8728cbb25826f2a038f9465f8b7be446f0fbf11558862965b18d21c993684297628d4d3 languageName: node linkType: hard @@ -5757,8 +4841,6 @@ __metadata: "@emotion/react": "npm:^11.13.3" "@emotion/styled": "npm:^11.13.0" "@mui/material": "npm:^6.0.2" - "@openpassport/core": "npm:^0.0.11" - "@openpassport/qrcode": "npm:^0.0.14" "@types/node": "npm:^20" "@types/react": "npm:^18" "@types/react-dom": "npm:^18" @@ -5771,16 +4853,10 @@ __metadata: react-dom: "npm:^18" tailwindcss: "npm:^3.4.1" typescript: "npm:^5" + uuid: "npm:^11.1.0" languageName: unknown linkType: soft -"web-worker@npm:1.2.0": - version: 1.2.0 - resolution: "web-worker@npm:1.2.0" - checksum: 10c0/2bec036cd4784148e2f135207c62facf4457a0f2b205d6728013b9f0d7c62404dced95fcd849478387e10c8ae636d665600bd0d99d80b18c3bb2a7f045aa20d8 - languageName: node - linkType: hard - "which-boxed-primitive@npm:^1.1.0, which-boxed-primitive@npm:^1.1.1": version: 1.1.1 resolution: "which-boxed-primitive@npm:1.1.1" @@ -5863,7 +4939,7 @@ __metadata: languageName: node linkType: hard -"word-wrap@npm:^1.2.5, word-wrap@npm:~1.2.3": +"word-wrap@npm:^1.2.5": version: 1.2.5 resolution: "word-wrap@npm:1.2.5" checksum: 10c0/e0e4a1ca27599c92a6ca4c32260e8a92e8a44f4ef6ef93f803f8ed823f486e0889fc0b93be4db59c8d51b3064951d25e43d434e95dc8c960cc3a63d65d00ba20 @@ -5899,28 +4975,6 @@ __metadata: languageName: node linkType: hard -"ws@npm:~8.17.1": - version: 8.17.1 - resolution: "ws@npm:8.17.1" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ">=5.0.2" - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 10c0/f4a49064afae4500be772abdc2211c8518f39e1c959640457dcee15d4488628620625c783902a52af2dd02f68558da2868fd06e6fd0e67ebcd09e6881b1b5bfe - languageName: node - linkType: hard - -"xmlhttprequest-ssl@npm:~2.1.1": - version: 2.1.2 - resolution: "xmlhttprequest-ssl@npm:2.1.2" - checksum: 10c0/70d60869323e823f473a238f78fd108437edbc3690ecd5859c39c83217080090a18899b272e515769c0d1f518cc64cbed6b6995b23fdd7ba13b297d530b6e631 - languageName: node - linkType: hard - "yallist@npm:^4.0.0": version: 4.0.0 resolution: "yallist@npm:4.0.0" @@ -5957,10 +5011,3 @@ __metadata: checksum: 10c0/dceb44c28578b31641e13695d200d34ec4ab3966a5729814d5445b194933c096b7ced71494ce53a0e8820685d1d010df8b2422e5bf2cdea7e469d97ffbea306f languageName: node linkType: hard - -"zlib@npm:^1.0.5": - version: 1.0.5 - resolution: "zlib@npm:1.0.5" - checksum: 10c0/34bd33f4fdcda34f57a1ab628ceb423bdf8ef07290f46cd944eedd9a66458cc24ccf3c770da73dc0f8d28016607d861290ac5c53d49113177f7c321838df2913 - languageName: node - linkType: hard diff --git a/test/PCR0Manager.test.ts b/test/PCR0Manager.test.ts new file mode 100644 index 000000000..0519ecba6 --- /dev/null +++ b/test/PCR0Manager.test.ts @@ -0,0 +1 @@ + \ No newline at end of file