chore: add TypeScript tooling (#891)

* chore: add TypeScript tooling

* chore: remove unused tsconfig and migration script

* update settings

* add knip config

* format

* more reliable circuits tests

* fix workflow

* fix types

* updates

* ts updates

* more updates

* fix upgrade

* fixes
This commit is contained in:
Justin Hernandez
2025-08-13 21:02:07 -07:00
committed by GitHub
parent ae5e8ccd0f
commit 07addb2a9a
30 changed files with 800 additions and 220 deletions

View File

@@ -52,10 +52,48 @@ jobs:
if: steps.circom-cache.outputs.cache-hit != 'true'
run: |
mkdir -p ~/.cache/circom
wget -qO ~/.cache/circom/circom https://github.com/iden3/circom/releases/download/v${{ env.CIRCOM_VERSION }}/circom-linux-amd64
# Download with curl (more reliable than wget in CI environments)
# Use exponential backoff retry logic
for attempt in 1 2 3; do
echo "Download attempt $attempt/3..."
if curl -L --connect-timeout 30 --max-time 300 \
--retry 3 --retry-delay 2 --retry-max-time 600 \
-o ~/.cache/circom/circom \
"https://github.com/iden3/circom/releases/download/v${{ env.CIRCOM_VERSION }}/circom-linux-amd64"; then
echo "✅ Download successful!"
break
else
echo "❌ Download failed on attempt $attempt"
if [ $attempt -eq 3 ]; then
echo "💥 All download attempts failed"
exit 1
fi
# Exponential backoff: 5s, 10s, 20s
sleep_time=$((5 * attempt))
echo "⏳ Waiting ${sleep_time}s before retry..."
sleep $sleep_time
fi
done
# Verify file exists and has content
if [ ! -f ~/.cache/circom/circom ]; then
echo "💥 Error: circom binary file is missing"
exit 1
fi
if [ ! -s ~/.cache/circom/circom ]; then
echo "💥 Error: circom binary file is empty"
exit 1
fi
echo "📁 File size: $(ls -lh ~/.cache/circom/circom | awk '{print $5}')"
chmod +x ~/.cache/circom/circom
# Verify checksum - SHA256 for circom v2.1.9 linux-amd64
echo "${{ env.CIRCOM_SHA256 }} ~/.cache/circom/circom" | sha256sum -c -
# Verify checksum
echo "🔍 Verifying checksum..."
echo "${{ env.CIRCOM_SHA256 }} $HOME/.cache/circom/circom" | sha256sum -c -
- name: Save Circom cache
if: steps.circom-cache.outputs.cache-hit != 'true'
@@ -67,7 +105,7 @@ jobs:
- name: Verify Circom checksum (cache hit)
if: steps.circom-cache.outputs.cache-hit == 'true'
run: |
echo "${{ env.CIRCOM_SHA256 }} ~/.cache/circom/circom" | sha256sum -c -
echo "${{ env.CIRCOM_SHA256 }} $HOME/.cache/circom/circom" | sha256sum -c -
- name: Add Circom to PATH
run: echo "$HOME/.cache/circom" >> "$GITHUB_PATH"

View File

@@ -54,10 +54,48 @@ jobs:
if: steps.circom-cache.outputs.cache-hit != 'true'
run: |
mkdir -p ~/.cache/circom
wget -qO ~/.cache/circom/circom https://github.com/iden3/circom/releases/download/v${{ env.CIRCOM_VERSION }}/circom-linux-amd64
# Download with curl (more reliable than wget in CI environments)
# Use exponential backoff retry logic
for attempt in 1 2 3; do
echo "Download attempt $attempt/3..."
if curl -L --connect-timeout 30 --max-time 300 \
--retry 3 --retry-delay 2 --retry-max-time 600 \
-o ~/.cache/circom/circom \
"https://github.com/iden3/circom/releases/download/v${{ env.CIRCOM_VERSION }}/circom-linux-amd64"; then
echo "✅ Download successful!"
break
else
echo "❌ Download failed on attempt $attempt"
if [ $attempt -eq 3 ]; then
echo "💥 All download attempts failed"
exit 1
fi
# Exponential backoff: 5s, 10s, 20s
sleep_time=$((5 * attempt))
echo "⏳ Waiting ${sleep_time}s before retry..."
sleep $sleep_time
fi
done
# Verify file exists and has content
if [ ! -f ~/.cache/circom/circom ]; then
echo "💥 Error: circom binary file is missing"
exit 1
fi
if [ ! -s ~/.cache/circom/circom ]; then
echo "💥 Error: circom binary file is empty"
exit 1
fi
echo "📁 File size: $(ls -lh ~/.cache/circom/circom | awk '{print $5}')"
chmod +x ~/.cache/circom/circom
# Verify checksum - SHA256 for circom v2.1.9 linux-amd64
echo "${{ env.CIRCOM_SHA256 }} ~/.cache/circom/circom" | sha256sum -c -
# Verify checksum
echo "🔍 Verifying checksum..."
echo "${{ env.CIRCOM_SHA256 }} $HOME/.cache/circom/circom" | sha256sum -c -
- name: Save Circom cache
if: steps.circom-cache.outputs.cache-hit != 'true'
@@ -69,7 +107,7 @@ jobs:
- name: Verify Circom checksum (cache hit)
if: steps.circom-cache.outputs.cache-hit == 'true'
run: |
echo "${{ env.CIRCOM_SHA256 }} ~/.cache/circom/circom" | sha256sum -c -
echo "${{ env.CIRCOM_SHA256 }} $HOME/.cache/circom/circom" | sha256sum -c -
- name: Add Circom to PATH
run: echo "$HOME/.cache/circom" >> "$GITHUB_PATH"

View File

@@ -5,7 +5,7 @@ GEM
base64
nkf
rexml
activesupport (7.2.2.1)
activesupport (7.2.2.2)
base64
benchmark (>= 0.3)
bigdecimal
@@ -25,7 +25,7 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.4.0)
aws-partitions (1.1144.0)
aws-partitions (1.1146.0)
aws-sdk-core (3.229.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)

View File

@@ -2192,7 +2192,7 @@ SPEC CHECKSUMS:
GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
hermes-engine: ea92f60f37dba025e293cbe4b4a548fd26b610a0
lottie-ios: a881093fab623c467d3bce374367755c272bdd59
lottie-react-native: d97e225bb686cf6ddda429229b370faa9599d584
lottie-react-native: b0dc69202923f4baf341b360ab636f742b84a36a
Mixpanel-swift: e9bef28a9648faff384d5ba6f48ecc2787eb24c0
nanopb: 438bc412db1928dac798aa6fd75726007be04262
NFCPassportReader: 48873f856f91215dbfa1eaaec20eae639672862e
@@ -2200,86 +2200,86 @@ SPEC CHECKSUMS:
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
QKMRZParser: 6b419b6f07d6bff6b50429b97de10846dc902c29
QKMRZScanner: cf2348fd6ce441e758328da4adf231ef2b51d769
RCT-Folly: 4464f4d875961fce86008d45f4ecf6cef6de0740
RCT-Folly: 34124ae2e667a0e5f0ea378db071d27548124321
RCTDeprecation: 726d24248aeab6d7180dac71a936bbca6a994ed1
RCTRequired: a94e7febda6db0345d207e854323c37e3a31d93b
RCTTypeSafety: 28e24a6e44f5cbf912c66dde6ab7e07d1059a205
React: c2830fa483b0334bda284e46a8579ebbe0c5447e
React-callinvoker: 4aecde929540c26b841a4493f70ebf6016691eb8
React-Core: 9c059899f00d46b5cec3ed79251f77d9c469553d
React-CoreModules: 9fac2d31803c0ed03e4ddaa17f1481714f8633a5
React-cxxreact: a979810a3ca4045ceb09407a17563046a7f71494
React-Core: 32a581847d74ce9b5f51d9d11a4e4d132ad61553
React-CoreModules: f53e0674e1747fa41c83bc970e82add97b14ad87
React-cxxreact: 86f3b1692081fd954a0cb27cc90d14674645b64b
React-debug: 7e346b6eeacd2ee1118a0ee7d39f613b428b4be8
React-defaultsnativemodule: 02b3b73698aca4f8ebfe03e3802bbb8eafb30d6c
React-domnativemodule: 90e3bc5a3e57b367b9787c78a39d7e8dc15cb3b0
React-Fabric: 7e3f79f77929338739d4f6936ecc12cca23644ac
React-FabricComponents: ba910350959d665f6335bdf6cf6347e99661cdac
React-FabricImage: df5337c9b500542ce744c98327625c420dcd1256
React-defaultsnativemodule: 5ab6844adce01f0e52671eaa6d806e2214bbfc44
React-domnativemodule: 448609757e37684cf407cda13d1f6c47deec44cf
React-Fabric: bfef5f9db01f81b73eed5a58fe1e46949c0c665e
React-FabricComponents: 4e845f93a35050a7c0f9dac7805caa62552be939
React-FabricImage: 3478af0ed02c8728680b23f2dd890e59069856ea
React-featureflags: 4c45b3c06f9a124d2598aff495bfc59470f40597
React-featureflagsnativemodule: daee66dc32dd85a16bfd912911cc33fc7d50542d
React-graphics: a2e6209991a191c94405a234460e05291fa986b9
React-hermes: 2069b08e965e48b7f8aa2c0ca0a2f383349ed55d
React-idlecallbacksnativemodule: 8e1d156b4e47cc6a5f80f53869131417979f7c64
React-ImageManager: 17772f78d93539a1a10901b5f537031772fa930c
React-jserrorhandler: 62af5111f6444688182a5850d4b584cbc0c5d6a8
React-jsi: d68f1d516e5120a510afe356647a6a1e1f98f2db
React-jsiexecutor: 6366a08a0fc01c9b65736f8deacd47c4a397912a
React-jsinspector: e21448249ea4a247f1b5786089e3cfe63d5c0111
React-jsitracing: dab78a74a581f63320604c9de4ab9039209e0501
React-logger: d79b704bf215af194f5213a6b7deec50ba8e6a9b
React-Mapbuffer: 42c779748af341935a63ad8831723b8cb1e97830
React-microtasksnativemodule: fc15e6b9e8cc5a99d1cfa0f31c454c4c3de4e7ae
react-native-app-auth: 149f01d2c824758453c9e7815217ded451974683
react-native-biometrics: 352e5a794bfffc46a0c86725ea7dc62deb085bdc
react-native-cloud-storage: 9343984544441a394b72d79de845640e3abfbc45
react-native-get-random-values: 21325b2244dfa6b58878f51f9aa42821e7ba3d06
react-native-netinfo: f0a9899081c185db1de5bb2fdc1c88c202a059ac
react-native-nfc-manager: 5213321cf6c18d879c8092c0bf56806b771ec5ac
react-native-safe-area-context: 657def25b5590dfbde705aec2925b06725f27450
react-native-sqlite-storage: f6d515e1c446d1e6d026aa5352908a25d4de3261
React-featureflagsnativemodule: 1c482a7ea0e69330cc59895192a73a2f6f737c33
React-graphics: eb61d404819486a2d9335c043a967a0c4b8ca743
React-hermes: cad69ee9a53870cc38e5386889aa7ea81c75b6a1
React-idlecallbacksnativemodule: 1e3f0212792ace82cc6f3b91f53f5d034f533acc
React-ImageManager: 6652c4cc3de260b5269d58277de383cacd53a234
React-jserrorhandler: 552c5fcd2ee64307c568734b965ea082e1be25cf
React-jsi: bc1f6073e203fb540edd6d26f926ad041809b443
React-jsiexecutor: 1e8fc70dd9614c3e9d5c3c876b2ea3cd1d931ee4
React-jsinspector: 11cf0ade960351b76217a16e31418b9d7f881513
React-jsitracing: e512a1023a25de831b51be1c773caa6036125a44
React-logger: 80d87daf2f98bf95ab668b79062c1e0c3f0c2f8a
React-Mapbuffer: b2642edd9be75d51ead8cda109c986665eae09cf
React-microtasksnativemodule: 94f7e35c4984282f04f946fb1be1d008aff4bdf0
react-native-app-auth: eb42594042a25455119a8c57194b4fd25b9352f4
react-native-biometrics: 43ed5b828646a7862dbc7945556446be00798e7d
react-native-cloud-storage: eeffe84e54f693bd2c6cdda098f006039ee8bdf9
react-native-get-random-values: d16467cf726c618e9c7a8c3c39c31faa2244bbba
react-native-netinfo: cec9c4e86083cb5b6aba0e0711f563e2fbbff187
react-native-nfc-manager: a280ef94cd4871a471b052f0dc70381cf1223049
react-native-safe-area-context: 827032edf27079702cbd006f11dc79451a2d744b
react-native-sqlite-storage: 0c84826214baaa498796c7e46a5ccc9a82e114ed
React-nativeconfig: 31072ab0146e643594f6959c7f970a04b6c9ddd0
React-NativeModulesApple: f49bb0befd8650ac3ff8fc2684072b16c09bf478
React-NativeModulesApple: 356d0eb7e3b79603e9d611cd3bac658a998c71db
React-perflogger: 59e1a3182dca2cee7b9f1f7aab204018d46d1914
React-performancetimeline: 3d70a278cc3344def506e97aff3640e658656110
React-performancetimeline: 2bf8625ff44f482cba84e48e4ab21dee405d68cd
React-RCTActionSheet: d80e68d3baa163e4012a47c1f42ddd8bcd9672cc
React-RCTAnimation: bde981f6bd7f8493696564da9b3bd05721d3b3cc
React-RCTAppDelegate: 0176615c51476c88212bf3edbafb840d39ea7631
React-RCTBlob: 520a0382bf8e89b9153d60e3c6293e51615834e9
React-RCTFabric: f04c63400264f44a252ebba62dfb8cff8e5bd9b4
React-RCTImage: 90448d2882464af6015ed57c98f463f8748be465
React-RCTLinking: 1bd95d0a704c271d21d758e0f0388cced768d77d
React-RCTNetwork: 218af6e63eb9b47935cc5a775b7a1396cf10ff91
React-RCTSettings: e10b8e42b0fce8a70fbf169de32a2ae03243ef6b
React-RCTText: e7bf9f4997a1a0b45c052d4ad9a0fe653061cf29
React-RCTVibration: 5b70b7f11e48d1c57e0d4832c2097478adbabe93
React-RCTAnimation: 051f0781709c5ed80ba8aa2b421dfb1d72a03162
React-RCTAppDelegate: 106d225d076988b06aa4834e68d1ab754f40cacf
React-RCTBlob: 895eaf8bca2e76ee1c95b479235c6ccebe586fc6
React-RCTFabric: 1d736a1f539ae72dcefd473f964f532a0e658309
React-RCTImage: b73149c0cd54b641dba2d6250aaf168fee784d9f
React-RCTLinking: 23e519712285427e50372fbc6e0265d422abf462
React-RCTNetwork: a5d06d122588031989115f293654b13353753630
React-RCTSettings: 87d03b5d94e6eadd1e8c1d16a62f790751aafb55
React-RCTText: 75e9dd39684f4bcd1836134ac2348efaca7437b3
React-RCTVibration: 033c161fe875e6fa096d0d9733c2e2501682e3d4
React-rendererconsistency: 35cef4bc4724194c544b6e5e2bd9b3f7aff52082
React-rendererdebug: 9b1a6a2d4f8086a438f75f28350ccba16b7b706a
React-rendererdebug: 4e801e9f8d16d21877565dca2845a2e56202b8c6
React-rncore: 2c7c94d6e92db0850549223eb2fa8272e0942ac2
React-RuntimeApple: 90f1dfd648cae853afb60eb13a9579c942b2df33
React-RuntimeCore: 355ee6b0c3a7f4e66afe44f757a7585fc6008c9e
React-RuntimeApple: ff845be41902d053f1348541a647e669a2f509f4
React-RuntimeCore: 8b30ac97af1bdd5d2622ee2a75becf1e552b89c7
React-runtimeexecutor: ea90d8e3a9e0f4326939858dafc6ab17c031a5d3
React-RuntimeHermes: 13d33b49355663bdbbca6719abcbc4f534f274b9
React-runtimescheduler: 1132af91176dcc8ac566b10f7b57b10873125564
React-utils: d1bae5ac6a5fb94a772ebfc7a7e1aba3a6706a3a
ReactCodegen: 18aa2cb03418f6ea9f318785e339128accab12f0
ReactCommon: 1007c09a406a451ddbd874e51511aa541d6034f6
RNCAsyncStorage: 23e56519cc41d3bade3c8d4479f7760cb1c11996
RNCClipboard: 60fed4b71560d7bfe40e9d35dea9762b024da86d
RNDeviceInfo: feea80a690d2bde1fe51461cf548039258bd03f2
RNFBApp: dd35ba8340b89c36e42c4c137915c01d3c792143
RNFBMessaging: c8d34d9ad44a3258a77e548bba6dc3561af7cf2d
RNFBRemoteConfig: 7e219246c63c47f56cfe07eee1a044ed298261c8
RNGestureHandler: a52601cdccc6213650ad4a9eb2911360d13f4447
RNKeychain: a58690e4450434e8e900ed47032fa58c59cc5570
RNLocalize: 06991b9c31e7a898a9fa6ddb204ce0f53a967248
RNReactNativeHapticFeedback: 293365e4df1faef21be8b8efe22c7b217c5e695a
RNScreens: eee0beadb969b9c1c0ceca4e89744c8d69d782e0
RNSentry: 9ecfddd2650b783586da93871ca87561c61facf8
RNSVG: 28b61fc4856abe8eaea46794419f848986ee7e80
segment-analytics-react-native: de13f89e52d49c1f4ed33ba86ae24f055722a643
React-RuntimeHermes: 6a5be21d1f8a603989d8734a0021c0534df23dd9
React-runtimescheduler: 21ad58e37e35a132f2a5ecad78e68ea7fbc8e2ba
React-utils: 0dbea1179726ad65a1b13470a3f3c73da98f4496
ReactCodegen: 688a0970a2fc6a4481718d8ca86ff504f2a21723
ReactCommon: 23eed247b5c8e57b59a823ce209353883da61dd2
RNCAsyncStorage: b44e8a4e798c3e1f56bffccd0f591f674fb9198f
RNCClipboard: 4abb037e8fe3b98a952564c9e0474f91c492df6d
RNDeviceInfo: d863506092aef7e7af3a1c350c913d867d795047
RNFBApp: 4097f75673f8b42a7cd1ba17e6ea85a94b45e4d1
RNFBMessaging: 92325b0d5619ac90ef023a23cfd16fd3b91d0a88
RNFBRemoteConfig: a569bacaa410acfcaba769370e53a787f80fd13b
RNGestureHandler: 4a7cce66468343e82d601e8f6cdc0148b18b6c6b
RNKeychain: 42a94ceb08a6c33db453bc34cae46458b6a14a08
RNLocalize: 15463c4d79c7da45230064b4adcf5e9bb984667e
RNReactNativeHapticFeedback: c873497ad3f9fa80447baa18daa9474e671d24bf
RNScreens: 584a35ba1a56a628fc564216b0b6f7b9f070c282
RNSentry: d66e96602d8e05b7789e3e095aca53a9f21dab55
RNSVG: e3ad69848b6357587545e0a49628b1148acf082c
segment-analytics-react-native: 5c3e8a4ee6d7532a011ed862d7c7d4fb5e5303e2
Sentry: 2cbbe3592f30050c60e916c63c7f5a2fa584005e
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
sovran-react-native: eec37f82e4429f0e3661f46aaf4fcd85d1b54f60
sovran-react-native: a3ad3f8ff90c2002b2aa9790001a78b0b0a38594
SwiftQRScanner: e85a25f9b843e9231dab89a96e441472fe54a724
SwiftyTesseract: 1f3d96668ae92dc2208d9842c8a59bea9fad2cbb
Yoga: b05994d1933f507b0a28ceaa4fdb968dc18da178

View File

@@ -96,7 +96,6 @@
"@tamagui/lucide-icons": "1.126.14",
"@tamagui/toast": "^1.127.2",
"@tamagui/vite-plugin": "1.126.14",
"@types/react-dom": "^19.1.6",
"@xstate/react": "^5.0.3",
"add": "^2.0.6",
"asn1js": "^3.0.5",
@@ -161,6 +160,7 @@
"@types/jest": "^29.5.14",
"@types/node-forge": "^1.3.3",
"@types/react": "^18.2.6",
"@types/react-dom": "^19.1.6",
"@types/react-native": "^0.73.0",
"@types/react-native-dotenv": "^0.2.0",
"@types/react-native-sqlite-storage": "^6.0.5",
@@ -187,7 +187,7 @@
"stream-browserify": "^3.0.0",
"ts-morph": "^22.0.0",
"ts-node": "^10.9.1",
"typescript": "^5.8.3",
"typescript": "^5.9.2",
"vite": "^7.0.0"
},
"engines": {

View File

@@ -14,7 +14,7 @@ import {
PassportLogger,
ProofLogger,
SettingsLogger,
} from '../utils/logger';
} from '@/utils/logger';
type LoggerContextType = {
AppLogger: typeof AppLogger;

View File

@@ -3,10 +3,9 @@
import type { configLoggerType } from 'react-native-logs';
import { logger } from 'react-native-logs';
import { interceptConsole } from './logger/consoleInterceptor';
import { lokiTransport } from './logger/lokiTransport';
import './logger/nativeLoggerBridge';
import { interceptConsole } from '@/utils/logger/consoleInterceptor';
import { lokiTransport } from '@/utils/logger/lokiTransport';
import { setupNativeLoggerBridge } from '@/utils/logger/nativeLoggerBridge';
export {
AppLogger,
@@ -41,9 +40,6 @@ const defaultConfig: configLoggerType<any, any> = {
const Logger = logger.createLogger(defaultConfig);
// Initialize console interceptor to route console logs to Loki
interceptConsole();
// loggers based on src/consts/analytics.ts
const AppLogger = Logger.extend('APP');
const NotificationLogger = Logger.extend('NOTIFICATION');
@@ -58,6 +54,9 @@ const DocumentLogger = Logger.extend('DOCUMENT');
//Native Modules
const NfcLogger = Logger.extend('NFC');
// Initialize console interceptor to route console logs to Loki
interceptConsole(AppLogger);
// Define log levels
export const logLevels = {
debug: 0,
@@ -65,3 +64,7 @@ export const logLevels = {
warn: 2,
error: 3,
};
// Initialize native logger bridge after all loggers are defined
// This avoids module cycle by injecting dependencies instead of importing them
setupNativeLoggerBridge({ AppLogger, NfcLogger, Logger });

View File

@@ -1,7 +1,5 @@
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
import { AppLogger } from '../logger';
// Store original console methods
const originalConsole = {
log: console.log,
@@ -11,29 +9,29 @@ const originalConsole = {
debug: console.debug,
};
const interceptConsole = () => {
const interceptConsole = (appLogger: any) => {
console.log = (...args: any[]) => {
AppLogger.info(...args);
appLogger.info(...args);
originalConsole.log(...args);
};
console.info = (...args: any[]) => {
AppLogger.info(...args);
appLogger.info(...args);
originalConsole.info(...args);
};
console.warn = (...args: any[]) => {
AppLogger.warn(...args);
appLogger.warn(...args);
originalConsole.warn(...args);
};
console.error = (...args: any[]) => {
AppLogger.error(...args);
appLogger.error(...args);
originalConsole.error(...args);
};
console.debug = (...args: any[]) => {
AppLogger.debug(...args);
appLogger.debug(...args);
originalConsole.debug(...args);
};
};

View File

@@ -133,6 +133,13 @@ registerDocumentChangeCallback((isMock: boolean) => {
isCurrentPassportMockFlag = isMock;
});
export const cleanupLokiTransport = () => {
try {
appStateSubscription.remove?.();
} catch {}
flushLokiTransport();
};
// Export flush function for manual flushing if needed
export const flushLokiTransport = () => {
if (batch.length > 0) {
@@ -145,6 +152,17 @@ export const flushLokiTransport = () => {
}
};
const handleAppStateChange = (nextAppState: AppStateStatus) => {
if (nextAppState === 'background' || nextAppState === 'inactive') {
flushLokiTransport();
}
};
const appStateSubscription = AppState.addEventListener(
'change',
handleAppStateChange,
);
// Create react-native-logs transport function
export const lokiTransport: transportFunctionType<any> = props => {
const { msg, rawMsg, level, extension } = props;
@@ -189,11 +207,3 @@ export const lokiTransport: transportFunctionType<any> = props => {
addToBatch(entry, namespace);
};
const handleAppStateChange = (nextAppState: AppStateStatus) => {
if (nextAppState === 'background' || nextAppState === 'inactive') {
flushLokiTransport();
}
};
AppState.addEventListener('change', handleAppStateChange);

View File

@@ -2,7 +2,8 @@
import { NativeEventEmitter, NativeModules, Platform } from 'react-native';
import { AppLogger, Logger, NfcLogger } from '../logger';
// Remove direct imports to avoid module cycle
// Dependencies will be injected via setupNativeLoggerBridge
interface NativeLogEvent {
level: 'debug' | 'info' | 'warn' | 'error';
@@ -13,10 +14,22 @@ interface NativeLogEvent {
let eventEmitter: NativeEventEmitter | null = null;
let isInitialized = false;
let injectedLoggers: {
AppLogger: any;
NfcLogger: any;
Logger: any;
} | null = null;
const setupNativeLoggerBridge = () => {
const setupNativeLoggerBridge = (loggers: {
AppLogger: any;
NfcLogger: any;
Logger: any;
}) => {
if (isInitialized) return;
// Store injected loggers
injectedLoggers = loggers;
const moduleName =
Platform.OS === 'android' ? 'RNPassportReader' : 'NativeLoggerBridge';
@@ -48,38 +61,43 @@ const setupEventListeners = () => {
};
const handleNativeLogEvent = (event: NativeLogEvent) => {
if (!injectedLoggers) {
console.warn('NativeLoggerBridge not initialized with loggers');
return;
}
const { level, category, message, data } = event;
// Route to appropriate logger based on category
let logger;
let logger: any;
switch (category.toLowerCase()) {
case 'nfc':
logger = NfcLogger;
logger = injectedLoggers.NfcLogger;
break;
case 'app':
logger = AppLogger;
logger = injectedLoggers.AppLogger;
break;
default:
// For unknown categories, use AppLogger with category prefix
logger = Logger.extend(category.toUpperCase());
// For unknown categories, use Logger with category prefix
logger = injectedLoggers.Logger.extend(category.toUpperCase());
}
// Log with appropriate level
switch (level) {
case 'debug':
(logger as any).debug(message, data);
logger.debug(message, data);
break;
case 'info':
(logger as any).info(message, data);
logger.info(message, data);
break;
case 'warn':
(logger as any).warn(message, data);
logger.warn(message, data);
break;
case 'error':
(logger as any).error(message, data);
logger.error(message, data);
break;
default:
(logger as any).info(message, data);
logger.info(message, data);
}
};
@@ -89,9 +107,8 @@ const cleanup = () => {
eventEmitter = null;
}
isInitialized = false;
injectedLoggers = null;
};
// Initialize the bridge
setupNativeLoggerBridge();
export { cleanup };
// Export the setup function for explicit initialization
export { cleanup, setupNativeLoggerBridge };

View File

@@ -1,6 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"types": ["node", "jest"],
"paths": {
"@env": ["./env.ts"],
"@selfxyz/common": ["../common"],

View File

@@ -66,7 +66,7 @@
"@openpassport/zk-kit-smt": "^0.0.1",
"@selfxyz/common": "workspace:^",
"@types/chai-as-promised": "^7.1.6",
"@types/node": "^20.11.19",
"@types/node": "^22.0.0",
"@types/node-forge": "^1.3.5",
"@zk-email/circuits": "^6.3.2",
"@zk-email/helpers": "^6.1.1",
@@ -91,13 +91,15 @@
"modpow": "^1.0.0",
"node-forge": "https://github.com/remicolin/forge",
"poseidon-lite": "^0.2.0",
"snarkjs": "^0.7.1",
"typescript": "^5.3.3"
"snarkjs": "^0.7.1"
},
"devDependencies": {
"@types/chai": "4.3.11",
"@types/chai-as-promised": "^7.1.6",
"@types/circomlibjs": "^0.1.6",
"@types/mocha": "^10.0.10",
"@types/node": "^22.0.0",
"@types/node-forge": "^1.3.5",
"@yarnpkg/sdks": "^3.2.0",
"chai": "4.3.8",
"mocha": "^10.3.0",
@@ -105,7 +107,8 @@
"ts-mocha": "^10.0.0",
"tsconfig-paths": "^4.2.0",
"tsup": "^8.5.0",
"tsx": "^4.20.3"
"tsx": "^4.20.3",
"typescript": "^5.9.2"
},
"engines": {
"node": ">=22 <23"

View File

@@ -11,6 +11,7 @@
"outDir": "./dist/esm",
"declaration": false,
"baseUrl": ".",
"types": ["node"],
"composite": false
},
"include": ["tests/**/*", "tests/**/*.json", "src/**/*"],

View File

@@ -375,8 +375,9 @@
"mocha": "^10.7.3",
"prettier": "^3.3.3",
"ts-mocha": "^10.0.0",
"ts-node": "^10.9.2",
"tsup": "^8.5.0",
"typescript": "^5.4.5"
"typescript": "^5.9.2"
},
"engines": {
"node": ">=22 <23"

View File

@@ -45,7 +45,7 @@ export function sha384_512Pad(
prehash_prepad_m_array: number[],
maxShaBytes: number
): [number[], number] {
let prehash_prepad_m = new Uint8Array(prehash_prepad_m_array);
let prehash_prepad_m: any = new Uint8Array(prehash_prepad_m_array);
// Length in bits before padding
const length_bits = prehash_prepad_m.length * 8;
@@ -84,7 +84,7 @@ export function sha384_512Pad(
// Copied from zk-email cuz it uses crypto so can't import it here.
// Puts an end selector, a bunch of 0s, then the length, then fill the rest with 0s.
export function shaPad(prehash_prepad_m_array: number[], maxShaBytes: number): [number[], number] {
let prehash_prepad_m = new Uint8Array(prehash_prepad_m_array);
let prehash_prepad_m: any = new Uint8Array(prehash_prepad_m_array);
const length_bits = prehash_prepad_m.length * 8; // bytes to bits
const length_in_bytes = int64toBytes(length_bits);
prehash_prepad_m = mergeUInt8Arrays(prehash_prepad_m, int8toBytes(2 ** 7)); // Add the 1 on the end, length 505

View File

@@ -5,6 +5,7 @@
"moduleResolution": "Node",
"outDir": "./dist/cjs",
"declarationDir": "./dist/cjs",
"esModuleInterop": true
"esModuleInterop": true,
"types": ["node"]
}
}

View File

@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "nodenext",
"module": "NodeNext",
"declaration": true,
"declarationDir": "./dist/esm",
"outDir": "./dist/esm",
@@ -11,6 +11,7 @@
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"moduleResolution": "NodeNext",
"types": ["node"],
"baseUrl": "./",
"composite": true
},

View File

@@ -79,8 +79,6 @@
"@openzeppelin/contracts": "^5.0.2",
"@openzeppelin/contracts-upgradeable": "^5.1.0",
"@selfxyz/common": "workspace:^",
"@types/circomlibjs": "^0.1.6",
"@types/jest": "^29.5.12",
"@zk-kit/imt": "^2.0.0-beta.4",
"@zk-kit/imt.sol": "^2.0.0-beta.12",
"@zk-kit/lean-imt": "^2.0.1",
@@ -106,6 +104,8 @@
"@typechain/ethers-v6": "^0.4.3",
"@typechain/hardhat": "^8.0.3",
"@types/chai": "^4.3.16",
"@types/circomlibjs": "^0.1.6",
"@types/jest": "^29.5.12",
"@types/mocha": "^10.0.6",
"@types/snarkjs": "^0.7.7",
"chai": "^4.4.1",
@@ -119,7 +119,7 @@
"solidity-coverage": "^0.8.14",
"ts-node": "^10.9.1",
"typechain": "^8.3.2",
"typescript": "^5.1.6"
"typescript": "^5.9.2"
},
"packageManager": "yarn@4.5.3",
"engines": {

View File

@@ -2,10 +2,12 @@
"compilerOptions": {
"target": "es2020",
"module": "node16",
"moduleResolution": "Node16",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"resolveJsonModule": true
"resolveJsonModule": true,
"types": ["node"]
}
}

169
knip.config.ts Normal file
View File

@@ -0,0 +1,169 @@
import type { KnipConfig } from 'knip';
const config: KnipConfig = {
// Global ignores for files that should stay
ignore: [
// Documentation and examples
'**/docs/**',
'**/examples/**',
// Configuration files
'react-native.config.cjs',
'**/.eslintrc.*',
'**/metro.config.*',
'**/babel.config.*',
'**/jest.config.*',
'**/tsconfig*.json',
// Build and deployment scripts
'scripts/**',
'fastlane/**',
// Native platform files
'app/android/**',
'app/ios/**',
// Web build artifacts
'app/web/**',
// Test setup files
'**/__setup__/**',
'**/__mocks__/**',
// Test files (often appear unused but are run by test runners)
'**/*.test.ts',
'**/*.test.js',
'tests/**',
// Utility files that may be used dynamically
'**/loader.ts',
'**/cryptoLoader.ts',
'**/version.cjs',
],
// Global dependency ignores
ignoreDependencies: [
// CLI tools and global utilities
'gitleaks',
'husky',
'patch-package',
'postinstall-postinstall',
// Platform-specific dependencies (may not be detected)
'@react-native-community/cli',
'@react-native/gradle-plugin',
// Type-only dependencies
'@types/*',
// Build tools that may not show usage
'tsup',
'tsx',
'ts-node',
],
// Workspace-specific configurations
workspaces: {
'app': {
entry: [
'index.js',
'web/main.tsx'
],
ignore: [
// React Native config files
'declarations.d.ts',
'tamagui.config.ts',
// Test utilities
'src/mocks/**',
'src/utils/testingUtils.ts',
],
ignoreDependencies: [
// Platform-specific animations
'@tamagui/animations-css',
'@tamagui/animations-react-native',
// Web-specific dependencies
'react-native-web',
'react-native-svg-web',
// Development tools
'expo-modules-core',
'lottie-react',
],
},
'circuits': {
ignore: [
// Test files (circuits are tested but files may appear unused)
'tests/**',
],
ignoreDependencies: [
// Circom ecosystem (usage may not be detected)
'circom*',
'@zk-email/*',
'@zk-kit/*',
'snarkjs',
'circomlibjs',
],
},
'contracts': {
ignore: [
// Deployment and testing infrastructure
'ignition/**',
'scripts/**',
'test/**',
],
ignoreDependencies: [
// Hardhat ecosystem
'@nomiclabs/*',
'@nomicfoundation/*',
'hardhat*',
// Testing utilities
'mocha',
'chai*',
// Contract dependencies
'@openzeppelin/*',
'snarkjs',
],
},
'common': {
ignoreDependencies: [
// May be used in re-exported modules
'axios',
'buffer',
'elliptic',
'jsrsasign',
'node-forge',
],
},
'sdk/core': {
ignoreDependencies: [
// Core crypto libraries
'js-sha*',
'node-forge',
'poseidon-lite',
'uuid',
],
},
'sdk/qrcode': {
ignoreDependencies: [
// QR code crypto dependencies
'js-sha*',
'node-forge',
'poseidon-lite',
],
},
},
};
export default config;

View File

@@ -11,6 +11,7 @@
],
"scripts": {
"build": "yarn workspaces foreach --topological-dev --parallel --exclude @selfxyz/contracts -i --all run build",
"find:migration": "node scripts/find-migration.mjs",
"format": "yarn format:root && yarn format:github && yarn workspaces foreach --parallel -i --all --exclude self-workspace-root run format",
"format:github": "prettier --parser yaml --write .github/**/*.yml --single-quote false",
"format:root": "prettier --parser markdown --write *.md && prettier --parser yaml --write .*.{yml,yaml} --single-quote false",
@@ -20,14 +21,16 @@
"prepare": "husky",
"sort-package-jsons": "find . -name 'package.json' -not -path './node_modules/*' -not -path './*/node_modules/*' | xargs npx sort-package-json",
"test": "yarn workspaces foreach --parallel -i --all run test",
"types": "yarn workspaces foreach --topological-dev --parallel --exclude @selfxyz/contracts -i --all run types ",
"find:migration": "node scripts/find-migration.mjs"
"types": "yarn workspaces foreach --topological-dev --parallel --exclude @selfxyz/contracts -i --all run types "
},
"devDependencies": {
"@types/node": "^22.0.0",
"gitleaks": "1.0.0",
"husky": "9.1.7",
"knip": "^5.62.0",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0"
"postinstall-postinstall": "^2.1.0",
"typescript": "^5.9.2"
},
"packageManager": "yarn@4.6.0",
"engines": {

View File

@@ -64,7 +64,7 @@
"eslint-plugin-sort-exports": "^0.8.0",
"prettier": "^3.5.3",
"tsup": "^8.0.1",
"typescript": "^5.5.4",
"typescript": "^5.9.2",
"vitest": "^1.6.0"
},
"publishConfig": {

View File

@@ -1,27 +1,43 @@
// Prefer the global TextDecoder; fall back to Node's util.TextDecoder at runtime.
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore - TextDecoder may not exist on all globals
const getDecoder = (): TextDecoder => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore - globalThis may not include TextDecoder in typings
const TD =
(typeof globalThis !== 'undefined' && (globalThis as any).TextDecoder) ||
// eslint-disable-next-line @typescript-eslint/no-var-requires
(typeof require !== 'undefined'
? (() => {
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
return require('util').TextDecoder;
} catch {
return undefined;
}
})()
: undefined);
if (!TD) throw new Error('TextDecoder not available in this environment');
return new TD('utf-8', { fatal: true });
/**
* Safe TextDecoder factory that works across different JavaScript environments.
* Handles browser, Node.js, and React Native environments gracefully.
*/
const createTextDecoder = (): TextDecoder => {
// Browser environment - TextDecoder is available globally
if (typeof globalThis !== 'undefined' && 'TextDecoder' in globalThis) {
return new globalThis.TextDecoder('utf-8', { fatal: true });
}
// React Native environment - TextDecoder should be available on global
if (
typeof (globalThis as any).global !== 'undefined' &&
(globalThis as any).global &&
'TextDecoder' in (globalThis as any).global
) {
return new ((globalThis as any).global as any).TextDecoder('utf-8', { fatal: true });
}
// Node.js environment - try to import from util (only if we're in a Node.js context)
if (typeof (globalThis as any).process !== 'undefined' && (globalThis as any).process?.versions?.node) {
try {
// Use dynamic import for better compatibility
// eslint-disable-next-line @typescript-eslint/no-var-requires
const util = require('util');
if (util.TextDecoder) {
return new util.TextDecoder('utf-8', { fatal: true });
}
} catch {
// Fall through to error
}
}
throw new Error(
'TextDecoder not available in this environment. ' +
'This SDK requires TextDecoder support which is available in modern browsers, Node.js, and React Native.',
);
};
const DECODER = getDecoder();
const DECODER = createTextDecoder();
// Known LDS1 tag constants
const TAG_DG1 = 0x61;

View File

@@ -5,6 +5,7 @@
"moduleResolution": "Node",
"outDir": "./dist/cjs",
"declarationDir": "./dist/cjs",
"esModuleInterop": true
"esModuleInterop": true,
"types": ["node"]
}
}

View File

@@ -1,32 +0,0 @@
#!/usr/bin/env node
import { readdirSync } from 'fs';
import { join } from 'path';
function search(dir, target) {
const SKIP = new Set(['node_modules', '.git', 'dist', 'build', '.next', 'out']);
let entries;
try {
entries = readdirSync(dir, { withFileTypes: true });
} catch {
return null;
}
for (const dirent of entries) {
const name = dirent.name;
if (dirent.isDirectory()) {
if (SKIP.has(name) || dirent.isSymbolicLink()) continue;
const found = search(join(dir, name), target);
if (found) return found;
} else if (name === target) {
return join(dir, name);
}
}
return null;
}
const result = search(process.cwd(), 'mobile-sdk-migration.mdc');
if (result) {
console.log(result);
} else {
console.error('mobile-sdk-migration.mdc not found');
process.exit(1);
}

View File

@@ -47,7 +47,6 @@
},
"dependencies": {
"@selfxyz/common": "workspace:^",
"@types/uuid": "^10.0.0",
"ethers": "^6.13.5",
"js-sha1": "^0.7.0",
"js-sha256": "^0.11.0",
@@ -64,16 +63,17 @@
"@types/circomlibjs": "^0.1.6",
"@types/expect": "^24.3.0",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.19",
"@types/node": "^22.0.0",
"@types/node-forge": "^1.3.5",
"@types/snarkjs": "^0.7.8",
"@types/uuid": "^10.0.0",
"axios": "^1.7.2",
"prettier": "^3.3.3",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsup": "^8.5.0",
"typechain": "^8.3.2",
"typescript": "^5.4.5"
"typescript": "^5.9.2"
},
"engines": {
"node": ">=22 <23"

View File

@@ -10,7 +10,8 @@
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"moduleResolution": "node16",
"moduleResolution": "NodeNext",
"types": ["node"],
"baseUrl": "."
},
"include": ["index.ts", "src/**/*", "circuits/**/*", "circuits/**/*.json", "utils/utils.ts"],

View File

@@ -82,12 +82,11 @@
"qrcode.react": "^4.1.0",
"react-spinners": "^0.14.1",
"socket.io-client": "^4.8.1",
"tsup": "^8.5.0",
"uuid": "^10.0.0"
},
"devDependencies": {
"@size-limit/preset-big-lib": "^11.2.0",
"@types/node": "^20.11.19",
"@types/node": "^22.0.0",
"@types/node-forge": "^1",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
@@ -110,7 +109,7 @@
"ts-mocha": "^10.0.0",
"ts-node": "^10.9.2",
"tsup": "^8.5.0",
"typescript": "^5.4.5"
"typescript": "^5.9.2"
},
"peerDependencies": {
"lottie-react": "^2.4.0",

View File

@@ -4,6 +4,7 @@
"module": "CommonJS",
"outDir": "./dist/cjs",
"declaration": false,
"emitDeclarationOnly": false
"emitDeclarationOnly": false,
"types": ["node"]
}
}

352
yarn.lock
View File

@@ -1117,7 +1117,7 @@ __metadata:
languageName: node
linkType: hard
"@emnapi/core@npm:^1.4.3":
"@emnapi/core@npm:^1.4.3, @emnapi/core@npm:^1.4.5":
version: 1.4.5
resolution: "@emnapi/core@npm:1.4.5"
dependencies:
@@ -1127,7 +1127,7 @@ __metadata:
languageName: node
linkType: hard
"@emnapi/runtime@npm:^1.4.3":
"@emnapi/runtime@npm:^1.4.3, @emnapi/runtime@npm:^1.4.5":
version: 1.4.5
resolution: "@emnapi/runtime@npm:1.4.5"
dependencies:
@@ -2648,6 +2648,17 @@ __metadata:
languageName: node
linkType: hard
"@napi-rs/wasm-runtime@npm:^1.0.1":
version: 1.0.3
resolution: "@napi-rs/wasm-runtime@npm:1.0.3"
dependencies:
"@emnapi/core": "npm:^1.4.5"
"@emnapi/runtime": "npm:^1.4.5"
"@tybys/wasm-util": "npm:^0.10.0"
checksum: 10c0/7918d82477e75931b6e35bb003464382eb93e526362f81a98bf8610407a67b10f4d041931015ad48072c89db547deb7e471dfb91f4ab11ac63a24d8580297f75
languageName: node
linkType: hard
"@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1":
version: 5.1.1-v1
resolution: "@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1"
@@ -3178,6 +3189,141 @@ __metadata:
languageName: node
linkType: hard
"@oxc-resolver/binding-android-arm-eabi@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-android-arm-eabi@npm:11.6.1"
conditions: os=android & cpu=arm
languageName: node
linkType: hard
"@oxc-resolver/binding-android-arm64@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-android-arm64@npm:11.6.1"
conditions: os=android & cpu=arm64
languageName: node
linkType: hard
"@oxc-resolver/binding-darwin-arm64@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-darwin-arm64@npm:11.6.1"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
"@oxc-resolver/binding-darwin-x64@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-darwin-x64@npm:11.6.1"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
"@oxc-resolver/binding-freebsd-x64@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-freebsd-x64@npm:11.6.1"
conditions: os=freebsd & cpu=x64
languageName: node
linkType: hard
"@oxc-resolver/binding-linux-arm-gnueabihf@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-linux-arm-gnueabihf@npm:11.6.1"
conditions: os=linux & cpu=arm
languageName: node
linkType: hard
"@oxc-resolver/binding-linux-arm-musleabihf@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-linux-arm-musleabihf@npm:11.6.1"
conditions: os=linux & cpu=arm
languageName: node
linkType: hard
"@oxc-resolver/binding-linux-arm64-gnu@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-linux-arm64-gnu@npm:11.6.1"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
"@oxc-resolver/binding-linux-arm64-musl@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-linux-arm64-musl@npm:11.6.1"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
"@oxc-resolver/binding-linux-ppc64-gnu@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-linux-ppc64-gnu@npm:11.6.1"
conditions: os=linux & cpu=ppc64 & libc=glibc
languageName: node
linkType: hard
"@oxc-resolver/binding-linux-riscv64-gnu@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-linux-riscv64-gnu@npm:11.6.1"
conditions: os=linux & cpu=riscv64 & libc=glibc
languageName: node
linkType: hard
"@oxc-resolver/binding-linux-riscv64-musl@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-linux-riscv64-musl@npm:11.6.1"
conditions: os=linux & cpu=riscv64 & libc=musl
languageName: node
linkType: hard
"@oxc-resolver/binding-linux-s390x-gnu@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-linux-s390x-gnu@npm:11.6.1"
conditions: os=linux & cpu=s390x & libc=glibc
languageName: node
linkType: hard
"@oxc-resolver/binding-linux-x64-gnu@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-linux-x64-gnu@npm:11.6.1"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
"@oxc-resolver/binding-linux-x64-musl@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-linux-x64-musl@npm:11.6.1"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
"@oxc-resolver/binding-wasm32-wasi@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-wasm32-wasi@npm:11.6.1"
dependencies:
"@napi-rs/wasm-runtime": "npm:^1.0.1"
conditions: cpu=wasm32
languageName: node
linkType: hard
"@oxc-resolver/binding-win32-arm64-msvc@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-win32-arm64-msvc@npm:11.6.1"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
"@oxc-resolver/binding-win32-ia32-msvc@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-win32-ia32-msvc@npm:11.6.1"
conditions: os=win32 & cpu=ia32
languageName: node
linkType: hard
"@oxc-resolver/binding-win32-x64-msvc@npm:11.6.1":
version: 11.6.1
resolution: "@oxc-resolver/binding-win32-x64-msvc@npm:11.6.1"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
"@oxc-transform/binding-darwin-arm64@npm:0.47.1":
version: 0.47.1
resolution: "@oxc-transform/binding-darwin-arm64@npm:0.47.1"
@@ -4741,7 +4887,7 @@ __metadata:
"@types/chai-as-promised": "npm:^7.1.6"
"@types/circomlibjs": "npm:^0.1.6"
"@types/mocha": "npm:^10.0.10"
"@types/node": "npm:^20.11.19"
"@types/node": "npm:^22.0.0"
"@types/node-forge": "npm:^1.3.5"
"@yarnpkg/sdks": "npm:^3.2.0"
"@zk-email/circuits": "npm:^6.3.2"
@@ -4775,7 +4921,7 @@ __metadata:
tsconfig-paths: "npm:^4.2.0"
tsup: "npm:^8.5.0"
tsx: "npm:^4.20.3"
typescript: "npm:^5.3.3"
typescript: "npm:^5.9.2"
languageName: unknown
linkType: soft
@@ -4820,8 +4966,9 @@ __metadata:
prettier: "npm:^3.3.3"
snarkjs: "npm:^0.7.5"
ts-mocha: "npm:^10.0.0"
ts-node: "npm:^10.9.2"
tsup: "npm:^8.5.0"
typescript: "npm:^5.4.5"
typescript: "npm:^5.9.2"
typescript-parser: "npm:^2.6.1"
uuid: "npm:^11.0.5"
languageName: unknown
@@ -4877,7 +5024,7 @@ __metadata:
solidity-coverage: "npm:^0.8.14"
ts-node: "npm:^10.9.1"
typechain: "npm:^8.3.2"
typescript: "npm:^5.1.6"
typescript: "npm:^5.9.2"
languageName: unknown
linkType: soft
@@ -4892,7 +5039,7 @@ __metadata:
"@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": "npm:^22.0.0"
"@types/node-forge": "npm:^1.3.5"
"@types/snarkjs": "npm:^0.7.8"
"@types/uuid": "npm:^10.0.0"
@@ -4909,7 +5056,7 @@ __metadata:
ts-node: "npm:^10.9.2"
tsup: "npm:^8.5.0"
typechain: "npm:^8.3.2"
typescript: "npm:^5.4.5"
typescript: "npm:^5.9.2"
uuid: "npm:^11.1.0"
languageName: unknown
linkType: soft
@@ -5031,7 +5178,7 @@ __metadata:
tamagui: "npm:1.126.14"
ts-morph: "npm:^22.0.0"
ts-node: "npm:^10.9.1"
typescript: "npm:^5.8.3"
typescript: "npm:^5.9.2"
uuid: "npm:^11.0.5"
vite: "npm:^7.0.0"
vite-plugin-svgr: "npm:^4.3.0"
@@ -5055,7 +5202,7 @@ __metadata:
prettier: "npm:^3.5.3"
tslib: "npm:^2.6.2"
tsup: "npm:^8.0.1"
typescript: "npm:^5.5.4"
typescript: "npm:^5.9.2"
vitest: "npm:^1.6.0"
languageName: unknown
linkType: soft
@@ -5066,7 +5213,7 @@ __metadata:
dependencies:
"@selfxyz/common": "workspace:^"
"@size-limit/preset-big-lib": "npm:^11.2.0"
"@types/node": "npm:^20.11.19"
"@types/node": "npm:^22.0.0"
"@types/node-forge": "npm:^1"
"@types/react": "npm:^18.3.4"
"@types/react-dom": "npm:^18.3.0"
@@ -5098,7 +5245,7 @@ __metadata:
ts-mocha: "npm:^10.0.0"
ts-node: "npm:^10.9.2"
tsup: "npm:^8.5.0"
typescript: "npm:^5.4.5"
typescript: "npm:^5.9.2"
uuid: "npm:^10.0.0"
peerDependencies:
lottie-react: ^2.4.0
@@ -9673,12 +9820,12 @@ __metadata:
languageName: node
linkType: hard
"@types/node@npm:^20.11.19":
version: 20.19.1
resolution: "@types/node@npm:20.19.1"
"@types/node@npm:^22.0.0":
version: 22.17.1
resolution: "@types/node@npm:22.17.1"
dependencies:
undici-types: "npm:~6.21.0"
checksum: 10c0/4f1c3c8ec24c79af6802b376fa307904abf19accb9ac291de0bfc02220494c8b027d3ef733dbf64cc09b37594f22f679a15eabb30f3785bcfcc13bd9bbd8c0e2
checksum: 10c0/b04063bdabfc4146af05d14d4fd23ee68615194473d0ef971ddef549b80b791f52c8f93abdd8d1092ee0257f3dea862fa233519244fd051e79233cdce614de14
languageName: node
linkType: hard
@@ -15471,7 +15618,7 @@ __metadata:
languageName: node
linkType: hard
"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.2, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0, fast-glob@npm:^3.3.2":
"fast-glob@npm:^3.0.3, fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.2, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.0, fast-glob@npm:^3.3.2, fast-glob@npm:^3.3.3":
version: 3.3.3
resolution: "fast-glob@npm:3.3.3"
dependencies:
@@ -15570,6 +15717,15 @@ __metadata:
languageName: node
linkType: hard
"fd-package-json@npm:^2.0.0":
version: 2.0.0
resolution: "fd-package-json@npm:2.0.0"
dependencies:
walk-up-path: "npm:^4.0.0"
checksum: 10c0/a0a48745257bc09c939486608dad9f2ced238f0c64266222cc881618ed4c8f6aa0ccfe45a1e6d4f9ce828509e8d617cec60e2a114851bebb1ff4886dc5ed5112
languageName: node
linkType: hard
"fd-slicer@npm:~1.1.0":
version: 1.1.0
resolution: "fd-slicer@npm:1.1.0"
@@ -15945,6 +16101,17 @@ __metadata:
languageName: node
linkType: hard
"formatly@npm:^0.2.4":
version: 0.2.4
resolution: "formatly@npm:0.2.4"
dependencies:
fd-package-json: "npm:^2.0.0"
bin:
formatly: bin/index.mjs
checksum: 10c0/43c6272a12199bc6319e7ef7043f209e7005fc35bc1b15e96ef16ad46a12fddc2b7c179fe8ade174c728e8454e3ebdc8428867cee78b082d18a91dae72866336
languageName: node
linkType: hard
"fp-ts@npm:1.19.3":
version: 1.19.3
resolution: "fp-ts@npm:1.19.3"
@@ -18662,6 +18829,33 @@ __metadata:
languageName: node
linkType: hard
"knip@npm:^5.62.0":
version: 5.62.0
resolution: "knip@npm:5.62.0"
dependencies:
"@nodelib/fs.walk": "npm:^1.2.3"
fast-glob: "npm:^3.3.3"
formatly: "npm:^0.2.4"
jiti: "npm:^2.4.2"
js-yaml: "npm:^4.1.0"
minimist: "npm:^1.2.8"
oxc-resolver: "npm:^11.1.0"
picocolors: "npm:^1.1.1"
picomatch: "npm:^4.0.1"
smol-toml: "npm:^1.3.4"
strip-json-comments: "npm:5.0.2"
zod: "npm:^3.22.4"
zod-validation-error: "npm:^3.0.3"
peerDependencies:
"@types/node": ">=18"
typescript: ">=5.0.4"
bin:
knip: bin/knip.js
knip-bun: bin/knip-bun.js
checksum: 10c0/ffc6c123d132bb423936859c3ae5cb85154cfc862985f74637bc54a4920ef34c1f19d41020f7af25100ea8e7ae61f1f5279af8066043434444bcba82b8dc1611
languageName: node
linkType: hard
"launch-editor@npm:^2.9.1":
version: 2.11.0
resolution: "launch-editor@npm:2.11.0"
@@ -19861,7 +20055,7 @@ __metadata:
languageName: node
linkType: hard
"minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6":
"minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6, minimist@npm:^1.2.8":
version: 1.2.8
resolution: "minimist@npm:1.2.8"
checksum: 10c0/19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6
@@ -20804,6 +20998,73 @@ __metadata:
languageName: node
linkType: hard
"oxc-resolver@npm:^11.1.0":
version: 11.6.1
resolution: "oxc-resolver@npm:11.6.1"
dependencies:
"@oxc-resolver/binding-android-arm-eabi": "npm:11.6.1"
"@oxc-resolver/binding-android-arm64": "npm:11.6.1"
"@oxc-resolver/binding-darwin-arm64": "npm:11.6.1"
"@oxc-resolver/binding-darwin-x64": "npm:11.6.1"
"@oxc-resolver/binding-freebsd-x64": "npm:11.6.1"
"@oxc-resolver/binding-linux-arm-gnueabihf": "npm:11.6.1"
"@oxc-resolver/binding-linux-arm-musleabihf": "npm:11.6.1"
"@oxc-resolver/binding-linux-arm64-gnu": "npm:11.6.1"
"@oxc-resolver/binding-linux-arm64-musl": "npm:11.6.1"
"@oxc-resolver/binding-linux-ppc64-gnu": "npm:11.6.1"
"@oxc-resolver/binding-linux-riscv64-gnu": "npm:11.6.1"
"@oxc-resolver/binding-linux-riscv64-musl": "npm:11.6.1"
"@oxc-resolver/binding-linux-s390x-gnu": "npm:11.6.1"
"@oxc-resolver/binding-linux-x64-gnu": "npm:11.6.1"
"@oxc-resolver/binding-linux-x64-musl": "npm:11.6.1"
"@oxc-resolver/binding-wasm32-wasi": "npm:11.6.1"
"@oxc-resolver/binding-win32-arm64-msvc": "npm:11.6.1"
"@oxc-resolver/binding-win32-ia32-msvc": "npm:11.6.1"
"@oxc-resolver/binding-win32-x64-msvc": "npm:11.6.1"
napi-postinstall: "npm:^0.3.0"
dependenciesMeta:
"@oxc-resolver/binding-android-arm-eabi":
optional: true
"@oxc-resolver/binding-android-arm64":
optional: true
"@oxc-resolver/binding-darwin-arm64":
optional: true
"@oxc-resolver/binding-darwin-x64":
optional: true
"@oxc-resolver/binding-freebsd-x64":
optional: true
"@oxc-resolver/binding-linux-arm-gnueabihf":
optional: true
"@oxc-resolver/binding-linux-arm-musleabihf":
optional: true
"@oxc-resolver/binding-linux-arm64-gnu":
optional: true
"@oxc-resolver/binding-linux-arm64-musl":
optional: true
"@oxc-resolver/binding-linux-ppc64-gnu":
optional: true
"@oxc-resolver/binding-linux-riscv64-gnu":
optional: true
"@oxc-resolver/binding-linux-riscv64-musl":
optional: true
"@oxc-resolver/binding-linux-s390x-gnu":
optional: true
"@oxc-resolver/binding-linux-x64-gnu":
optional: true
"@oxc-resolver/binding-linux-x64-musl":
optional: true
"@oxc-resolver/binding-wasm32-wasi":
optional: true
"@oxc-resolver/binding-win32-arm64-msvc":
optional: true
"@oxc-resolver/binding-win32-ia32-msvc":
optional: true
"@oxc-resolver/binding-win32-x64-msvc":
optional: true
checksum: 10c0/f2745562c63f69fb043702d790475d3bcd50faba8ad14cbfe40844de4db53d3f2d1be3c86bb7d274031a3a390374a9858a1a36867adce46968209630e05c10c4
languageName: node
linkType: hard
"oxc-transform@npm:^0.47.1":
version: 0.47.1
resolution: "oxc-transform@npm:0.47.1"
@@ -21177,6 +21438,13 @@ __metadata:
languageName: node
linkType: hard
"picomatch@npm:^4.0.1":
version: 4.0.3
resolution: "picomatch@npm:4.0.3"
checksum: 10c0/9582c951e95eebee5434f59e426cddd228a7b97a0161a375aed4be244bd3fe8e3a31b846808ea14ef2c8a2527a6eeab7b3946a67d5979e81694654f939473ae2
languageName: node
linkType: hard
"picomatch@npm:^4.0.2":
version: 4.0.2
resolution: "picomatch@npm:4.0.2"
@@ -23149,10 +23417,13 @@ __metadata:
version: 0.0.0-use.local
resolution: "self-workspace-root@workspace:."
dependencies:
"@types/node": "npm:^22.0.0"
gitleaks: "npm:1.0.0"
husky: "npm:9.1.7"
knip: "npm:^5.62.0"
patch-package: "npm:^8.0.0"
postinstall-postinstall: "npm:^2.1.0"
typescript: "npm:^5.9.2"
languageName: unknown
linkType: soft
@@ -23558,6 +23829,13 @@ __metadata:
languageName: node
linkType: hard
"smol-toml@npm:^1.3.4":
version: 1.4.2
resolution: "smol-toml@npm:1.4.2"
checksum: 10c0/e01e5f249b1ad852d09aa22f338a6cb3896ac35c92bf0d35744ce1b1e2f4b67901d4a0e886027617a2a8aa9f1a6c67c919c41b544c4aec137b6ebe042ca10d36
languageName: node
linkType: hard
"snake-case@npm:^3.0.4":
version: 3.0.4
resolution: "snake-case@npm:3.0.4"
@@ -24224,6 +24502,13 @@ __metadata:
languageName: node
linkType: hard
"strip-json-comments@npm:5.0.2":
version: 5.0.2
resolution: "strip-json-comments@npm:5.0.2"
checksum: 10c0/e9841b8face78a01b0eb66f81e0a3419186a96f1d26817a5e1f5260b0631c10e0a7f711dddc5988edf599e5c079e4dd6e91defd21523e556636ba5679786f5ac
languageName: node
linkType: hard
"strip-json-comments@npm:^3.1.1":
version: 3.1.1
resolution: "strip-json-comments@npm:3.1.1"
@@ -25342,7 +25627,7 @@ __metadata:
languageName: node
linkType: hard
"typescript@npm:^5.1.6, typescript@npm:^5.3.3, typescript@npm:^5.4.5, typescript@npm:^5.8.2, typescript@npm:^5.8.3":
"typescript@npm:^5.8.2":
version: 5.8.3
resolution: "typescript@npm:5.8.3"
bin:
@@ -25352,7 +25637,7 @@ __metadata:
languageName: node
linkType: hard
"typescript@npm:^5.5.4":
"typescript@npm:^5.9.2":
version: 5.9.2
resolution: "typescript@npm:5.9.2"
bin:
@@ -25372,7 +25657,7 @@ __metadata:
languageName: node
linkType: hard
"typescript@patch:typescript@npm%3A^5.1.6#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.3.3#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.4.5#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.8.2#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.8.3#optional!builtin<compat/typescript>":
"typescript@patch:typescript@npm%3A^5.8.2#optional!builtin<compat/typescript>":
version: 5.8.3
resolution: "typescript@patch:typescript@npm%3A5.8.3#optional!builtin<compat/typescript>::version=5.8.3&hash=5786d5"
bin:
@@ -25382,7 +25667,7 @@ __metadata:
languageName: node
linkType: hard
"typescript@patch:typescript@npm%3A^5.5.4#optional!builtin<compat/typescript>":
"typescript@patch:typescript@npm%3A^5.9.2#optional!builtin<compat/typescript>":
version: 5.9.2
resolution: "typescript@patch:typescript@npm%3A5.9.2#optional!builtin<compat/typescript>::version=5.9.2&hash=5786d5"
bin:
@@ -26026,6 +26311,13 @@ __metadata:
languageName: node
linkType: hard
"walk-up-path@npm:^4.0.0":
version: 4.0.0
resolution: "walk-up-path@npm:4.0.0"
checksum: 10c0/fabe344f91387d1d41df230af962ef18bf703dd4178006d55cd6412caacd187b54440002d4d53a982d4f7f0455567dcffb6d3884533c8b2268928eca3ebd8a19
languageName: node
linkType: hard
"walker@npm:^1.0.7, walker@npm:^1.0.8":
version: 1.0.8
resolution: "walker@npm:1.0.8"
@@ -26692,6 +26984,15 @@ __metadata:
languageName: node
linkType: hard
"zod-validation-error@npm:^3.0.3":
version: 3.5.3
resolution: "zod-validation-error@npm:3.5.3"
peerDependencies:
zod: ^3.25.0 || ^4.0.0
checksum: 10c0/4a1054f49049a5414857a4a85ae7b853d59be83dedb89942d4966345a58bd26d939beb574f0f5592fe4cc9963b26ac306d5b0950f6905651569059ef3517c803
languageName: node
linkType: hard
"zod@npm:3.22.4":
version: 3.22.4
resolution: "zod@npm:3.22.4"
@@ -26699,6 +27000,13 @@ __metadata:
languageName: node
linkType: hard
"zod@npm:^3.22.4":
version: 3.25.76
resolution: "zod@npm:3.25.76"
checksum: 10c0/5718ec35e3c40b600316c5b4c5e4976f7fee68151bc8f8d90ec18a469be9571f072e1bbaace10f1e85cf8892ea12d90821b200e980ab46916a6166a4260a983c
languageName: node
linkType: hard
"zustand@npm:^4.5.2":
version: 4.5.7
resolution: "zustand@npm:4.5.7"