diff --git a/app/android/app/build.gradle b/app/android/app/build.gradle index 883482fa6..4390910b9 100644 --- a/app/android/app/build.gradle +++ b/app/android/app/build.gradle @@ -4,6 +4,9 @@ apply plugin: "org.jetbrains.kotlin.android" apply plugin: 'kotlin-android' apply plugin: 'com.google.gms.google-services' +project.ext.react = [ + enableHermes: false +] /** * This is the configuration block to customize your React Native Android app. @@ -86,7 +89,7 @@ android { applicationId "com.proofofpassportapp" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 65 + versionCode 66 versionName "2.5.2" externalNativeBuild { cmake { diff --git a/app/android/gradle.properties b/app/android/gradle.properties index 901d6cb50..7d5f9654b 100644 --- a/app/android/gradle.properties +++ b/app/android/gradle.properties @@ -41,6 +41,6 @@ newArchEnabled=false # Use this property to enable or disable the Hermes JS engine. # If set to false, you will be using JSC instead. -hermesEnabled=true +hermesEnabled=false android.jetifier.ignorelist=bcprov-jdk18on diff --git a/app/ios/OpenPassport/OpenPassport.entitlements b/app/ios/OpenPassport/OpenPassport.entitlements index 2cfe95b3c..be4b119cb 100644 --- a/app/ios/OpenPassport/OpenPassport.entitlements +++ b/app/ios/OpenPassport/OpenPassport.entitlements @@ -29,7 +29,6 @@ PACE TAG - NDEF com.apple.developer.ubiquity-container-identifiers diff --git a/app/ios/OpenPassport/OpenPassportDebug.entitlements b/app/ios/OpenPassport/OpenPassportDebug.entitlements index 2cfe95b3c..be4b119cb 100644 --- a/app/ios/OpenPassport/OpenPassportDebug.entitlements +++ b/app/ios/OpenPassport/OpenPassportDebug.entitlements @@ -29,7 +29,6 @@ PACE TAG - NDEF com.apple.developer.ubiquity-container-identifiers diff --git a/app/ios/Self.xcodeproj/project.pbxproj b/app/ios/Self.xcodeproj/project.pbxproj index ec12ced11..ef9d12a0b 100644 --- a/app/ios/Self.xcodeproj/project.pbxproj +++ b/app/ios/Self.xcodeproj/project.pbxproj @@ -427,7 +427,7 @@ CODE_SIGN_ENTITLEMENTS = OpenPassport/OpenPassportDebug.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 126; + CURRENT_PROJECT_VERSION = 127; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = 5B29R5LYHQ; ENABLE_BITCODE = NO; @@ -565,7 +565,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = OpenPassport/OpenPassport.entitlements; - CURRENT_PROJECT_VERSION = 126; + CURRENT_PROJECT_VERSION = 127; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = 5B29R5LYHQ; FRAMEWORK_SEARCH_PATHS = ( diff --git a/app/package.json b/app/package.json index 16b07c903..dc43dd5bc 100644 --- a/app/package.json +++ b/app/package.json @@ -12,10 +12,10 @@ "android:build-debug-bundle": "yarn react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/", "android:build-release": "yarn reinstall && cd ./android && ./gradlew clean bundleRelease && cd ..", "android:fastlane-debug": "yarn reinstall && bundle exec fastlane --verbose android internal_test", + "build:deps": "yarn workspaces foreach --from @selfxyz/mobile-app --topological --recursive run build", "bump-version:major": "npm version major && yarn sync-versions", "bump-version:minor": "npm version minor && yarn sync-versions", "bump-version:patch": "npm version patch && yarn sync-versions", - "types": "tsc --noEmit", "clean": "watchman watch-del-all && rm -rf ../node_modules ios/Pods ios/build android/app/build android/build ../.yarn/cache ios/.xcode.env.local", "clean:android": "rm -rf android/app/build android/build", "clean:ios": "rm -rf ios/Pods ios/build", @@ -33,7 +33,6 @@ "install-app:deploy": "yarn install-app:setup && yarn clean:xcode-env-local", "install-app:setup": "yarn install && yarn build:deps && cd ios && bundle install && cd ..", "ios": "react-native run-ios", - "build:deps": "yarn workspaces foreach --from @selfxyz/mobile-app --topological --recursive run build", "ios:fastlane-debug": "yarn reinstall && bundle exec fastlane --verbose ios internal_test", "lint": "eslint .", "lint:fix": "eslint --fix .", @@ -43,7 +42,8 @@ "sync-versions": "bundle exec fastlane ios sync_version && bundle exec fastlane android sync_version", "tag:release": "node scripts/tag.js release", "tag:remove": "node scripts/tag.js remove", - "test": "jest --passWithNoTests" + "test": "jest --passWithNoTests", + "types": "tsc --noEmit" }, "dependencies": { "@babel/runtime": "^7.27.4", diff --git a/app/src/utils/nfcScanner.ts b/app/src/utils/nfcScanner.ts index 45fe15e91..ea29b5ed4 100644 --- a/app/src/utils/nfcScanner.ts +++ b/app/src/utils/nfcScanner.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import { ENABLE_DEBUG_LOGS, MIXPANEL_PROJECT_TOKEN } from '@env'; +import { ENABLE_DEBUG_LOGS, MIXPANEL_NFC_PROJECT_TOKEN } from '@env'; import { PassportData } from '@selfxyz/common'; import { Buffer } from 'buffer'; import { NativeModules, Platform } from 'react-native'; @@ -17,11 +17,11 @@ interface Inputs { } export const scan = async (inputs: Inputs) => { - if (MIXPANEL_PROJECT_TOKEN) { + if (MIXPANEL_NFC_PROJECT_TOKEN) { if (Platform.OS === 'ios') { const enableDebugLogs = ENABLE_DEBUG_LOGS === 'true'; NativeModules.PassportReader.configure( - MIXPANEL_PROJECT_TOKEN, + MIXPANEL_NFC_PROJECT_TOKEN, enableDebugLogs, ); } else { diff --git a/circuits/package.json b/circuits/package.json index 49f429598..721f41a9c 100644 --- a/circuits/package.json +++ b/circuits/package.json @@ -1,23 +1,23 @@ { "name": "@selfxyz/circuits", "version": "0.0.1", - "license": "MIT", "private": true, + "license": "MIT", "author": "self team", "type": "module", "scripts": { "build": "tsc", - "build:deps": "yarn workspaces foreach --from @selfxyz/circuits --topological-dev --recursive run build", "build-all": "bash scripts/build/build_register_circuits.sh && bash scripts/build/build_register_circuits_id.sh && bash scripts/build/build_dsc_circuits.sh && bash scripts/build/build_disclose_circuits.sh", "build-disclose": "bash scripts/build/build_disclose_circuits.sh", "build-dsc": "bash scripts/build/build_dsc_circuits.sh", "build-register": "bash scripts/build/build_register_circuits.sh", "build-register-id": "bash scripts/build/build_register_circuits_id.sh", + "build:deps": "yarn workspaces foreach --from @selfxyz/circuits --topological-dev --recursive run build", "download": "bash scripts/server/download_circuits_from_AWS.sh", "format": "prettier --write .", - "nice": "prettier --write .", "install-circuits": "yarn workspaces focus @selfxyz/circuits", "lint": "prettier --check .", + "nice": "prettier --write .", "test": "yarn test-base 'tests/**/*.test.ts' --exit", "test-base": "NODE_OPTIONS='--loader ts-node/esm' yarn ts-mocha --max-old-space-size=8192", "test-custom-hasher": "yarn test-base 'tests/other_circuits/custom_hasher.test.ts' --exit", diff --git a/common/package.json b/common/package.json index 467feaf54..03f6f89be 100644 --- a/common/package.json +++ b/common/package.json @@ -5,9 +5,6 @@ "license": "MIT", "author": "@Selfxyz Team", "type": "module", - "main": "./dist/cjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/esm/index.d.ts", "exports": { ".": { "import": "./dist/esm/index.js", @@ -33,6 +30,9 @@ "./mock_certificates/*": "./src/mock_certificates/*", "./mock_certificates/**/*": "./src/mock_certificates/**/*" }, + "main": "./dist/cjs/index.js", + "module": "./dist/esm/index.js", + "types": "./dist/esm/index.d.ts", "files": [ "dist/cjs", "dist/esm", @@ -40,13 +40,13 @@ ], "scripts": { "build": "tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && yarn postbuild", - "types": "tsc -p tsconfig.json", + "postbuild": "node ./scripts/post-build.mjs", "format": "prettier --write .", "lint": "prettier --check .", + "prepublishOnly": "yarn build", "test": "NODE_OPTIONS='--loader ts-node/esm' ts-mocha tests/**/*.test.ts --exit", "test:scope": "NODE_OPTIONS='--loader ts-node/esm' ts-mocha tests/scope.test.ts --exit", - "postbuild": "node ./scripts/post-build.mjs", - "prepublishOnly": "yarn build" + "types": "tsc -p tsconfig.json" }, "dependencies": { "@openpassport/zk-kit-imt": "^0.0.5", diff --git a/contracts/package.json b/contracts/package.json index 56b0903b6..255232583 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -5,9 +5,9 @@ "type": "git", "url": "https://github.com/selfxyz/self" }, - "type": "commonjs", "license": "MIT", "author": "motemotech ", + "type": "commonjs", "files": [ "contracts/interfaces/*", "contracts/constants/*", @@ -15,27 +15,22 @@ "contracts/abstract/*" ], "scripts": { - "types": "tsc -noEmit", "build": "npx hardhat clean && npx hardhat compile", "deploy:all": "npm run deploy:verifiers:all && npm run deploy:registry && npm run deploy:registry:idcard && npm run deploy:hub:v2", "deploy:hub": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/hub/deployHub.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", "deploy:hub:v2": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/hub/deployHubV2.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", + "deploy:pcr0": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/utils/deployPCR0.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", "deploy:registry": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/registry/deployRegistry.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", "deploy:registry:idcard": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/registry/deployIdCardRegistry.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", "deploy:verifiers": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/verifiers/deployVerifiers.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", "deploy:verifiers:all": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/verifiers/deployAllVerifiers.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", - "deploy:pcr0": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/utils/deployPCR0.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", + "export-prod": "bash ./scripts/prod.sh", + "prettier:check": "prettier --list-different '**/*.{json,md,yml,sol,ts}'", + "prettier:write": "prettier --write '**/*.{json,md,yml,sol,ts}'", + "publish": "npm publish --access public", + "set:hub:v2": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-staging} npx ts-node scripts/setHubV2.ts'", "set:registry": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-staging} npx ts-node scripts/setRegistry.ts'", "set:registry:idcard": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-staging} npx ts-node scripts/setRegistryId.ts'", - "set:hub:v2": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-staging} npx ts-node scripts/setHubV2.ts'", - "update:cscaroot": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/scripts/updateRegistryCscaRoot.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", - "update:hub": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-staging} npx ts-node scripts/setRegistry.ts'", - "update:ofacroot": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/scripts/updateRegistryOfacRoot.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", - "update:pcr0": "npx dotenv-cli -- bash -c 'PCR0_ACTION=${PCR0_ACTION:-add} PCR0_KEY=${PCR0_KEY} npx hardhat ignition deploy ignition/modules/scripts/updatePCR0.ts --network ${NETWORK:-localhost} --reset'", - "upgrade:hub": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/upgrade/deployNewHubAndUpgrade.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", - "upgrade:registry": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/upgrade/deployNewRegistryAndUpgrade.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", - "publish": "npm publish --access public", - "export-prod": "bash ./scripts/prod.sh", "test": "npx hardhat test", "test:airdrop": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/example/airdrop.test.ts'", "test:attribute": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/unit/CircuitAttributeHandler.test.ts'", @@ -43,20 +38,25 @@ "test:coverage:local": "TEST_ENV=local npx hardhat coverage", "test:disclose": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/integration/vcAndDisclose.test.ts'", "test:endtoend": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/Integration/endToEnd.test.ts'", - "test:verifyall": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/integration/verifyAll.test.ts'", - "test:sdkcore": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/sdk/sdkCore.test.ts --network localhost'", "test:example": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/example/*'", "test:formatter": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/unit/formatter.test.ts'", "test:hub": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/unit/IdentityVerificationHub.test.ts'", "test:integration": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/integration/*'", "test:local": "TEST_ENV=local npx hardhat test", + "test:pcr": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/unit/PCR0Manager.test.ts'", "test:register": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/integration/commitmentRegistration.test.ts'", "test:registry": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/unit/IdentityRegistry.test.ts'", - "test:pcr": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/unit/PCR0Manager.test.ts'", + "test:sdkcore": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/sdk/sdkCore.test.ts --network localhost'", "test:unit": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/unit/*'", + "test:verifyall": "npx dotenv-cli -- bash -c 'TEST_ENV=${TEST_ENV:-local} npx hardhat test test/integration/verifyAll.test.ts'", "test:view": "npx hardhat test test/view.ts", - "prettier:write": "prettier --write '**/*.{json,md,yml,sol,ts}'", - "prettier:check": "prettier --list-different '**/*.{json,md,yml,sol,ts}'" + "types": "tsc -noEmit", + "update:cscaroot": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/scripts/updateRegistryCscaRoot.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", + "update:hub": "npx dotenv-cli -- bash -c 'NETWORK=${NETWORK:-staging} npx ts-node scripts/setRegistry.ts'", + "update:ofacroot": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/scripts/updateRegistryOfacRoot.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", + "update:pcr0": "npx dotenv-cli -- bash -c 'PCR0_ACTION=${PCR0_ACTION:-add} PCR0_KEY=${PCR0_KEY} npx hardhat ignition deploy ignition/modules/scripts/updatePCR0.ts --network ${NETWORK:-localhost} --reset'", + "upgrade:hub": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/upgrade/deployNewHubAndUpgrade.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'", + "upgrade:registry": "npx dotenv-cli -- bash -c 'npx hardhat ignition deploy ignition/modules/upgrade/deployNewRegistryAndUpgrade.ts --network ${NETWORK:-localhost} ${VERIFY:+--verify}'" }, "dependencies": { "@ashpect/smt": "https://github.com/ashpect/smt#main", diff --git a/package.json b/package.json index 420fab2b4..8425363e3 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,5 @@ { "name": "self-workspace-root", - "scripts": { - "build": "yarn workspaces foreach --topological-dev --parallel --exclude @selfxyz/contracts -i --all run build", - "types": "yarn workspaces foreach --topological-dev --parallel --exclude @selfxyz/contracts -i --all run types ", - "lint": "yarn workspaces foreach --parallel -i --all --exclude self-workspace-root run lint" - }, "workspaces": [ "app", "common", @@ -14,5 +9,11 @@ "sdk/tests/*", "prover/tests" ], + "scripts": { + "build": "yarn workspaces foreach --topological-dev --parallel --exclude @selfxyz/contracts -i --all run build", + "lint": "yarn workspaces foreach --parallel -i --all --exclude self-workspace-root run lint", + "sort-package-json": "find . -name 'package.json' -not -path '*/node_modules/*' -print0 | xargs -0 -I {} sh -c 'echo Sorting {}; npx sort-package-json {}'", + "types": "yarn workspaces foreach --topological-dev --parallel --exclude @selfxyz/contracts -i --all run types " + }, "packageManager": "yarn@4.6.0" } diff --git a/sdk/core/package.json b/sdk/core/package.json index 414e768b4..3f7493c41 100644 --- a/sdk/core/package.json +++ b/sdk/core/package.json @@ -17,13 +17,13 @@ "scripts": { "build": "tsc -build", "build:deps": "yarn workspaces foreach --from @selfxyz/core --topological-dev --recursive run build", - "types": "yarn build", "copy-abi": "bash scripts/copyAbi.sh", "format": "prettier --write .", "install-sdk": "yarn workspaces focus @selfxyz/core", "lint": "prettier --check .", "prepublishOnly": "npm run build", - "publish": "yarn npm publish --access public" + "publish": "yarn npm publish --access public", + "types": "yarn build" }, "dependencies": { "@selfxyz/common": "workspace:^", diff --git a/sdk/qrcode/package.json b/sdk/qrcode/package.json index fb569b35e..030b7a161 100644 --- a/sdk/qrcode/package.json +++ b/sdk/qrcode/package.json @@ -7,11 +7,11 @@ }, "license": "MIT", "author": "turnoffthiscomputer", - "main": "dist/index.js", "type": "module", "exports": { ".": "./dist/index.js" }, + "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ "dist" @@ -19,13 +19,13 @@ "scripts": { "build": "tsc --build", "build:deps": "yarn workspaces foreach --from @selfxyz/qrcode --topological-dev --recursive run build", - "types": "yarn build", "format": "prettier --write .", "install-sdk": "yarn workspace focus @selfxyz/qrcode", "lint": "prettier --check .", "prepublishOnly": "yarn build", + "publish": "yarn npm publish --access public", "test": "echo 'no tests found'", - "publish": "yarn npm publish --access public" + "types": "yarn build" }, "dependencies": { "@selfxyz/common": "workspace:^", diff --git a/sdk/tests/api-server/package.json b/sdk/tests/api-server/package.json index e16cf268e..8dc306cbd 100644 --- a/sdk/tests/api-server/package.json +++ b/sdk/tests/api-server/package.json @@ -1,13 +1,14 @@ { "name": "backend-api", "version": "1.0.50", + "module": "index.ts", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", "dev": "bun run --watch src/app.ts", - "types": "tsc --noEmit", "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'" + "stop:daemon": "pkill -f 'bun run src/app.ts'", + "test": "echo \"Error: no test specified\" && exit 1", + "types": "tsc --noEmit" }, "dependencies": { "@elysiajs/swagger": "^1.2.0", @@ -27,6 +28,5 @@ "@types/pg": "^8.11.11", "bun-types": "latest", "typescript": "^5.8.3" - }, - "module": "index.ts" + } } diff --git a/sdk/tests/web-app/package.json b/sdk/tests/web-app/package.json index bc699c59e..f0b5ac853 100644 --- a/sdk/tests/web-app/package.json +++ b/sdk/tests/web-app/package.json @@ -5,10 +5,10 @@ "type": "module", "scripts": { "build": "next build", - "types": "yarn build", "dev": "next dev", "lint": "next lint", - "start": "next start" + "start": "next start", + "types": "yarn build" }, "dependencies": { "@emotion/react": "^11.13.3",