diff --git a/package-lock.json b/package-lock.json index 90fa78c..f90c245 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,12 +7,11 @@ "": { "name": "@tetherto/wdk-react-native-core", "version": "1.0.0-beta.2", - "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "@tanstack/react-query": "^5.0.0", "@tetherto/pear-wrk-wdk": "github:tetherto/pear-wrk-wdk#v2", - "@tetherto/wdk-react-native-secure-storage": "github:tetherto/wdk-react-native-secure-storage", + "@tetherto/wdk-react-native-secure-storage": "github:nampc1/wdk-react-native-secure-storage-fork#dev", "expo-crypto": "^15.0.8", "immer": "^11.1.3", "react-native-bare-kit": "^0.12.0", @@ -60,29 +59,29 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.6.tgz", - "integrity": "sha512-2lfu57JtzctfIrcGMz992hyLlByuzgIk58+hhGCxjKZ3rWI82NnVLjXcaTqkI2NvlcvOskZaiZ5kjUALo3Lpxg==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz", + "integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.6.tgz", - "integrity": "sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", + "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.28.6", - "@babel/generator": "^7.28.6", + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", "@babel/helper-compilation-targets": "^7.28.6", "@babel/helper-module-transforms": "^7.28.6", "@babel/helpers": "^7.28.6", - "@babel/parser": "^7.28.6", + "@babel/parser": "^7.29.0", "@babel/template": "^7.28.6", - "@babel/traverse": "^7.28.6", - "@babel/types": "^7.28.6", + "@babel/traverse": "^7.29.0", + "@babel/types": "^7.29.0", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -99,9 +98,9 @@ } }, "node_modules/@babel/core/node_modules/@babel/code-frame": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.28.6.tgz", - "integrity": "sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", @@ -122,13 +121,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.6.tgz", - "integrity": "sha512-lOoVRwADj8hjf7al89tvQ2a1lf53Z+7tiXMgpZJL3maQPDxh0DgLMN62B2MKUOFcoodBHLMbDM6WAbKgNy5Suw==", + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz", + "integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==", "license": "MIT", "dependencies": { - "@babel/parser": "^7.28.6", - "@babel/types": "^7.28.6", + "@babel/parser": "^7.29.0", + "@babel/types": "^7.29.0", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" @@ -236,17 +235,17 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.5.tgz", - "integrity": "sha512-uJnGFcPsWQK8fvjgGP5LZUZZsYGIoPeRjSF5PGwrelYgq7Q15/Ft9NGFp1zglwgIv//W0uG4BevRuSJRyylZPg==", + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.6.tgz", + "integrity": "sha512-mOAsxeeKkUKayvZR3HeTYD/fICpCPLJrU5ZjelT/PA6WHtNDBOE436YiaEUvHN454bRM3CebhDsIpieCc4texA==", "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-plugin-utils": "^7.27.1", - "debug": "^4.4.1", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "debug": "^4.4.3", "lodash.debounce": "^4.0.8", - "resolve": "^1.22.10" + "resolve": "^1.22.11" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" @@ -519,12 +518,12 @@ } }, "node_modules/@babel/parser": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.6.tgz", - "integrity": "sha512-TeR9zWR18BvbfPmGbLampPMW+uW1NZnJlRuuHso8i87QZNq2JRF9i6RgxRqtEq+wQGsS19NNTWr2duhnE49mfQ==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.0.tgz", + "integrity": "sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww==", "license": "MIT", "dependencies": { - "@babel/types": "^7.28.6" + "@babel/types": "^7.29.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -534,9 +533,9 @@ } }, "node_modules/@babel/plugin-proposal-decorators": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.28.6.tgz", - "integrity": "sha512-RVdFPPyY9fCRAX68haPmOk2iyKW8PKJFthmm8NeSI3paNxKWGZIn99+VbIf0FrtCpFnPgnpF/L48tadi617ULg==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.29.0.tgz", + "integrity": "sha512-CVBVv3VY/XRMxRYq5dwr2DS7/MvqPm23cOCjbwNnVrfOqcWlnefua1uUs0sjdKOGjvPUG633o07uWzJq4oI6dA==", "license": "MIT", "peer": true, "dependencies": { @@ -867,15 +866,15 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.28.6.tgz", - "integrity": "sha512-9knsChgsMzBV5Yh3kkhrZNxH3oCYAfMBkNNaVN4cP2RVlFPe8wYdwwcnOsAbkdDoV9UjFtOXWrWB52M8W4jNeA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.29.0.tgz", + "integrity": "sha512-va0VdWro4zlBr2JsXC+ofCPB2iG12wPtVGTWFx2WLDOM3nYQZZIGP82qku2eW/JR83sD+k2k+CsNtyEbUqhU6w==", "license": "MIT", "peer": true, "dependencies": { "@babel/helper-plugin-utils": "^7.28.6", "@babel/helper-remap-async-to-generator": "^7.27.1", - "@babel/traverse": "^7.28.6" + "@babel/traverse": "^7.29.0" }, "engines": { "node": ">=6.9.0" @@ -1125,14 +1124,14 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.27.1.tgz", - "integrity": "sha512-SstR5JYy8ddZvD6MhV0tM/j16Qds4mIpJTOd1Yu9J9pJjH93bxHECF7pgtc28XvkzTD6Pxcm/0Z73Hvk7kb3Ng==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.29.0.tgz", + "integrity": "sha512-1CZQA5KNAD6ZYQLPw7oi5ewtDNxH/2vuCh+6SmvgDfhumForvs8a1o9n0UrEoBD8HU4djO2yWngTQlXl1NDVEQ==", "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1379,9 +1378,9 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.28.6.tgz", - "integrity": "sha512-eZhoEZHYQLL5uc1gS5e9/oTknS0sSSAtd5TkKMUp3J+S/CaUjagc0kOUPsEbDmMeva0nC3WWl4SxVY6+OBuxfw==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.29.0.tgz", + "integrity": "sha512-FijqlqMA7DmRdg/aINBSs04y8XNTYw/lr1gJ2WsmBnnaNw1iS43EPkJW+zK7z65auG3AWRFXWj+NcTQwYptUog==", "license": "MIT", "peer": true, "dependencies": { @@ -1395,14 +1394,14 @@ } }, "node_modules/@babel/plugin-transform-runtime": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.28.5.tgz", - "integrity": "sha512-20NUVgOrinudkIBzQ2bNxP08YpKprUkRTiRSd2/Z5GOdPImJGkoN4Z7IQe1T5AdyKI1i5L6RBmluqdSzvaq9/w==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.29.0.tgz", + "integrity": "sha512-jlaRT5dJtMaMCV6fAuLbsQMSwz/QkvaHOHOSXRitGGwSpR1blCY4KUKoyP2tYO8vJcqYe8cEj96cqSztv3uF9w==", "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-module-imports": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", "babel-plugin-polyfill-corejs2": "^0.4.14", "babel-plugin-polyfill-corejs3": "^0.13.0", "babel-plugin-polyfill-regenerator": "^0.6.5", @@ -1576,9 +1575,9 @@ } }, "node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.28.6.tgz", - "integrity": "sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", @@ -1590,17 +1589,17 @@ } }, "node_modules/@babel/traverse": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.6.tgz", - "integrity": "sha512-fgWX62k02qtjqdSNTAGxmKYY/7FSL9WAS1o2Hu5+I5m9T0yxZzr4cnrfXQ/MX0rIifthCSs6FKTlzYbJcPtMNg==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.28.6", - "@babel/generator": "^7.28.6", + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.28.6", + "@babel/parser": "^7.29.0", "@babel/template": "^7.28.6", - "@babel/types": "^7.28.6", + "@babel/types": "^7.29.0", "debug": "^4.3.1" }, "engines": { @@ -1609,17 +1608,17 @@ }, "node_modules/@babel/traverse--for-generate-function-map": { "name": "@babel/traverse", - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.6.tgz", - "integrity": "sha512-fgWX62k02qtjqdSNTAGxmKYY/7FSL9WAS1o2Hu5+I5m9T0yxZzr4cnrfXQ/MX0rIifthCSs6FKTlzYbJcPtMNg==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz", + "integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==", "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.28.6", - "@babel/generator": "^7.28.6", + "@babel/code-frame": "^7.29.0", + "@babel/generator": "^7.29.0", "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.28.6", + "@babel/parser": "^7.29.0", "@babel/template": "^7.28.6", - "@babel/types": "^7.28.6", + "@babel/types": "^7.29.0", "debug": "^4.3.1" }, "engines": { @@ -1627,9 +1626,9 @@ } }, "node_modules/@babel/traverse--for-generate-function-map/node_modules/@babel/code-frame": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.28.6.tgz", - "integrity": "sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", @@ -1641,9 +1640,9 @@ } }, "node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.28.6.tgz", - "integrity": "sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", @@ -1655,9 +1654,9 @@ } }, "node_modules/@babel/types": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.6.tgz", - "integrity": "sha512-0ZrskXVEHSWIqZM/sQZ4EV3jZJXRkio/WCxaqKZP1g//CEWEPSfeZFcms4XeKBCHU0ZKnIkdJeU/kF+eRp5lBg==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz", + "integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==", "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.27.1", @@ -1675,9 +1674,9 @@ "license": "MIT" }, "node_modules/@expo/cli": { - "version": "54.0.22", - "resolved": "https://registry.npmjs.org/@expo/cli/-/cli-54.0.22.tgz", - "integrity": "sha512-BTH2FCczhJLfj1cpfcKrzhKnvRLTOztgW4bVloKDqH+G3ZSohWLRFNAIz56XtdjPxBbi2/qWhGBAkl7kBon/Jw==", + "version": "54.0.23", + "resolved": "https://registry.npmjs.org/@expo/cli/-/cli-54.0.23.tgz", + "integrity": "sha512-km0h72SFfQCmVycH/JtPFTVy69w6Lx1cHNDmfLfQqgKFYeeHTjx7LVDP4POHCtNxFP2UeRazrygJhlh4zz498g==", "license": "MIT", "peer": true, "dependencies": { @@ -1996,9 +1995,9 @@ } }, "node_modules/@expo/metro-config/node_modules/@babel/code-frame": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.28.6.tgz", - "integrity": "sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "license": "MIT", "peer": true, "dependencies": { @@ -2127,42 +2126,43 @@ "peer": true }, "node_modules/@expo/xcpretty": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/@expo/xcpretty/-/xcpretty-4.3.2.tgz", - "integrity": "sha512-ReZxZ8pdnoI3tP/dNnJdnmAk7uLT4FjsKDGW7YeDdvdOMz2XCQSmSCM9IWlrXuWtMF9zeSB6WJtEhCQ41gQOfw==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@expo/xcpretty/-/xcpretty-4.4.0.tgz", + "integrity": "sha512-o2qDlTqJ606h4xR36H2zWTywmZ3v3842K6TU8Ik2n1mfW0S580VHlt3eItVYdLYz+klaPp7CXqanja8eASZjRw==", "license": "BSD-3-Clause", "peer": true, "dependencies": { - "@babel/code-frame": "7.10.4", + "@babel/code-frame": "^7.20.0", "chalk": "^4.1.0", - "find-up": "^5.0.0", "js-yaml": "^4.1.0" }, "bin": { "excpretty": "build/cli.js" } }, - "node_modules/@isaacs/balanced-match": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", - "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "node_modules/@expo/xcpretty/node_modules/@babel/code-frame": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "license": "MIT", "peer": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.28.5", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, "engines": { - "node": "20 || >=22" + "node": ">=6.9.0" } }, - "node_modules/@isaacs/brace-expansion": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.1.tgz", - "integrity": "sha512-WMz71T1JS624nWj2n2fnYAuPovhv7EUhk69R6i9dsVyzxt5eM3bjwvgk9L+APE1TRscGysAVMANkB0jh0LQZrQ==", - "license": "MIT", + "node_modules/@isaacs/cliui": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-9.0.0.tgz", + "integrity": "sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg==", + "license": "BlueOak-1.0.0", "peer": true, - "dependencies": { - "@isaacs/balanced-match": "^4.0.1" - }, "engines": { - "node": "20 || >=22" + "node": ">=18" } }, "node_modules/@isaacs/fs-minipass": { @@ -2212,19 +2212,6 @@ "sprintf-js": "~1.0.2" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { "version": "3.14.2", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", @@ -2238,45 +2225,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -2498,7 +2446,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -2699,9 +2647,9 @@ } }, "node_modules/@react-native/assets-registry": { - "version": "0.83.1", - "resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.83.1.tgz", - "integrity": "sha512-AT7/T6UwQqO39bt/4UL5EXvidmrddXrt0yJa7ENXndAv+8yBzMsZn6fyiax6+ERMt9GLzAECikv3lj22cn2wJA==", + "version": "0.84.0", + "resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.84.0.tgz", + "integrity": "sha512-YiU9h1IN0pvvZsHbd03MaD7mE2q+ySaKMlE9tWK+3iiwtbEaMQOsMUuSJ1er2LU6ERMWfhfvCYgWpKRGOMeN8A==", "license": "MIT", "engines": { "node": ">= 20.19.4" @@ -2818,7 +2766,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "license": "ISC", "peer": true, "dependencies": { @@ -2850,12 +2798,12 @@ } }, "node_modules/@react-native/community-cli-plugin": { - "version": "0.83.1", - "resolved": "https://registry.npmjs.org/@react-native/community-cli-plugin/-/community-cli-plugin-0.83.1.tgz", - "integrity": "sha512-FqR1ftydr08PYlRbrDF06eRiiiGOK/hNmz5husv19sK6iN5nHj1SMaCIVjkH/a5vryxEddyFhU6PzO/uf4kOHg==", + "version": "0.84.0", + "resolved": "https://registry.npmjs.org/@react-native/community-cli-plugin/-/community-cli-plugin-0.84.0.tgz", + "integrity": "sha512-uYoLBHnAzod4E5dA5rPPQeny2A5RD0PiIJQ4r+2F7cvA+5bZ8+znxw4TdaSiEk8uhN+clffI4d2bl9V4+xEK+Q==", "license": "MIT", "dependencies": { - "@react-native/dev-middleware": "0.83.1", + "@react-native/dev-middleware": "0.84.0", "debug": "^4.4.0", "invariant": "^2.2.4", "metro": "^0.83.3", @@ -2880,23 +2828,23 @@ } }, "node_modules/@react-native/community-cli-plugin/node_modules/@react-native/debugger-frontend": { - "version": "0.83.1", - "resolved": "https://registry.npmjs.org/@react-native/debugger-frontend/-/debugger-frontend-0.83.1.tgz", - "integrity": "sha512-01Rn3goubFvPjHXONooLmsW0FLxJDKIUJNOlOS0cPtmmTIx9YIjxhe/DxwHXGk7OnULd7yl3aYy7WlBsEd5Xmg==", + "version": "0.84.0", + "resolved": "https://registry.npmjs.org/@react-native/debugger-frontend/-/debugger-frontend-0.84.0.tgz", + "integrity": "sha512-n7JKYVDCbA2aj8/5/OD1IK7nuiAYj5l/Z6yhGf7GG4EGaeQdthqdb0LZbseaRPyZK/7tLfdnLdqlqdTQC6/UTQ==", "license": "BSD-3-Clause", "engines": { "node": ">= 20.19.4" } }, "node_modules/@react-native/community-cli-plugin/node_modules/@react-native/dev-middleware": { - "version": "0.83.1", - "resolved": "https://registry.npmjs.org/@react-native/dev-middleware/-/dev-middleware-0.83.1.tgz", - "integrity": "sha512-QJaSfNRzj3Lp7MmlCRgSBlt1XZ38xaBNXypXAp/3H3OdFifnTZOeYOpFmcpjcXYnDqkxetuwZg8VL65SQhB8dg==", + "version": "0.84.0", + "resolved": "https://registry.npmjs.org/@react-native/dev-middleware/-/dev-middleware-0.84.0.tgz", + "integrity": "sha512-c0o7YW39AUI1FSLV/TFSszr87kQGmaePAQK0ygIRnwZ2fAGDnQ5Iu/tk3u9O5lVH6nTjfAwTKJ3El9YeEWDeEQ==", "license": "MIT", "dependencies": { "@isaacs/ttlcache": "^1.4.1", - "@react-native/debugger-frontend": "0.83.1", - "@react-native/debugger-shell": "0.83.1", + "@react-native/debugger-frontend": "0.84.0", + "@react-native/debugger-shell": "0.84.0", "chrome-launcher": "^0.15.2", "chromium-edge-launcher": "^0.2.0", "connect": "^3.6.5", @@ -2943,12 +2891,13 @@ } }, "node_modules/@react-native/debugger-shell": { - "version": "0.83.1", - "resolved": "https://registry.npmjs.org/@react-native/debugger-shell/-/debugger-shell-0.83.1.tgz", - "integrity": "sha512-d+0w446Hxth5OP/cBHSSxOEpbj13p2zToUy6e5e3tTERNJ8ueGlW7iGwGTrSymNDgXXFjErX+dY4P4/3WokPIQ==", + "version": "0.84.0", + "resolved": "https://registry.npmjs.org/@react-native/debugger-shell/-/debugger-shell-0.84.0.tgz", + "integrity": "sha512-5t/NvQLYk/d0kWlGOMNobkjfimqBc+/LYRmSOkgKm+pyOhxjygCLSnRjAUkeRALSZ8h6MKGTz1Wc4pbmJr7T0Q==", "license": "MIT", "dependencies": { "cross-spawn": "^7.0.6", + "debug": "^4.4.0", "fb-dotslash": "0.5.8" }, "engines": { @@ -2989,18 +2938,18 @@ } }, "node_modules/@react-native/gradle-plugin": { - "version": "0.83.1", - "resolved": "https://registry.npmjs.org/@react-native/gradle-plugin/-/gradle-plugin-0.83.1.tgz", - "integrity": "sha512-6ESDnwevp1CdvvxHNgXluil5OkqbjkJAkVy7SlpFsMGmVhrSxNAgD09SSRxMNdKsnLtzIvMsFCzyHLsU/S4PtQ==", + "version": "0.84.0", + "resolved": "https://registry.npmjs.org/@react-native/gradle-plugin/-/gradle-plugin-0.84.0.tgz", + "integrity": "sha512-j8g/I4Z+SAdh2NXOVng4rmfYgPoeJBZwAKoGPpSe/wB/9XDLh9IRGUTg8dGS5BWUy2471xBUoGZPwHb6QMJmVw==", "license": "MIT", "engines": { "node": ">= 20.19.4" } }, "node_modules/@react-native/js-polyfills": { - "version": "0.83.1", - "resolved": "https://registry.npmjs.org/@react-native/js-polyfills/-/js-polyfills-0.83.1.tgz", - "integrity": "sha512-qgPpdWn/c5laA+3WoJ6Fak8uOm7CG50nBsLlPsF8kbT7rUHIVB9WaP6+GPsoKV/H15koW7jKuLRoNVT7c3Ht3w==", + "version": "0.84.0", + "resolved": "https://registry.npmjs.org/@react-native/js-polyfills/-/js-polyfills-0.84.0.tgz", + "integrity": "sha512-xaxmzYWLgHH+2uAZQ0owEkDE58hOTWmuBKD/Gl+cDFD3mFfSK4lZpin/3hiXtE5LB4BwgqICsPN07zCAqx6Fpg==", "license": "MIT", "engines": { "node": ">= 20.19.4" @@ -3014,9 +2963,9 @@ "peer": true }, "node_modules/@react-native/virtualized-lists": { - "version": "0.83.1", - "resolved": "https://registry.npmjs.org/@react-native/virtualized-lists/-/virtualized-lists-0.83.1.tgz", - "integrity": "sha512-MdmoAbQUTOdicCocm5XAFDJWsswxk7hxa6ALnm6Y88p01HFML0W593hAn6qOt9q6IM1KbAcebtH6oOd4gcQy8w==", + "version": "0.84.0", + "resolved": "https://registry.npmjs.org/@react-native/virtualized-lists/-/virtualized-lists-0.84.0.tgz", + "integrity": "sha512-ugwSj0Gb4MYrcm8uQrQw8qHPx5RKGDLuZRAP/AuwneFizHx8YCLBEFbOYRGWgxHBRtkJ70D1o+jpIx3CK3p5lw==", "license": "MIT", "dependencies": { "invariant": "^2.2.4", @@ -3059,9 +3008,9 @@ } }, "node_modules/@sinclair/typebox": { - "version": "0.27.8", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", - "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "version": "0.27.10", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.10.tgz", + "integrity": "sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA==", "license": "MIT" }, "node_modules/@sinonjs/commons": { @@ -3083,9 +3032,9 @@ } }, "node_modules/@tanstack/query-core": { - "version": "5.90.19", - "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.90.19.tgz", - "integrity": "sha512-GLW5sjPVIvH491VV1ufddnfldyVB+teCnpPIvweEfkpRx7CfUmUGhoh9cdcUKBh/KwVxk22aNEDxeTsvmyB/WA==", + "version": "5.90.20", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.90.20.tgz", + "integrity": "sha512-OMD2HLpNouXEfZJWcKeVKUgQ5n+n3A2JFmBaScpNDUqSrQSjiveC7dKMe53uJUg1nDG16ttFPz2xfilz6i2uVg==", "license": "MIT", "funding": { "type": "github", @@ -3093,12 +3042,12 @@ } }, "node_modules/@tanstack/react-query": { - "version": "5.90.19", - "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.90.19.tgz", - "integrity": "sha512-qTZRZ4QyTzQc+M0IzrbKHxSeISUmRB3RPGmao5bT+sI6ayxSRhn0FXEnT5Hg3as8SBFcRosrXXRFB+yAcxVxJQ==", + "version": "5.90.21", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.90.21.tgz", + "integrity": "sha512-0Lu6y5t+tvlTJMTO7oh5NSpJfpg/5D41LlThfepTixPYkJ0sE2Jj0m0f6yYqujBwIXlId87e234+MxG3D3g7kg==", "license": "MIT", "dependencies": { - "@tanstack/query-core": "5.90.19" + "@tanstack/query-core": "5.90.20" }, "funding": { "type": "github", @@ -3162,9 +3111,8 @@ } }, "node_modules/@tetherto/wdk-react-native-secure-storage": { - "version": "1.0.0", - "resolved": "git+ssh://git@github.com/tetherto/wdk-react-native-secure-storage.git#5ca4bc1e9e7b93947f1d5e82ed1e38483d114092", - "hasInstallScript": true, + "version": "1.0.0-beta.1", + "resolved": "git+ssh://git@github.com/nampc1/wdk-react-native-secure-storage-fork.git#5dc81f62819f0e84ea7452a09d6fc461a749a2b9", "license": "Apache-2.0", "dependencies": { "expo-crypto": "^15.0.8", @@ -3261,18 +3209,18 @@ } }, "node_modules/@types/node": { - "version": "25.0.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.10.tgz", - "integrity": "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg==", + "version": "25.2.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.2.3.tgz", + "integrity": "sha512-m0jEgYlYz+mDJZ2+F4v8D1AyQb+QzsNqRuI7xg1VQX/KlKS0qT9r1Mo16yo5F/MtifXFgaofIFsdFMox2SxIbQ==", "license": "MIT", "dependencies": { "undici-types": "~7.16.0" } }, "node_modules/@types/react": { - "version": "19.2.9", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.9.tgz", - "integrity": "sha512-Lpo8kgb/igvMIPeNV2rsYKTgaORYdO1XGVZ4Qz3akwOj0ySGYMPlQWa8BaLn0G63D1aSaAQ5ldR06wCpChQCjA==", + "version": "19.2.14", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz", + "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==", "devOptional": true, "license": "MIT", "dependencies": { @@ -3504,9 +3452,9 @@ "peer": true }, "node_modules/b4a": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.7.3.tgz", - "integrity": "sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.7.4.tgz", + "integrity": "sha512-u20zJLDaSWpxaZ+zaAkEIB2dZZ1o+DF4T/MRbmsvGp9nletHOyiai19OzX1fF8xUBYsO1bPXxODvcd0978pnug==", "license": "Apache-2.0", "peerDependencies": { "react-native-b4a": "*" @@ -3595,14 +3543,14 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.14.tgz", - "integrity": "sha512-Co2Y9wX854ts6U8gAAPXfn0GmAyctHuK8n0Yhfjd6t30g7yvKjspvvOo9yG+z52PZRgFErt7Ka2pYnXCjLKEpg==", + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.15.tgz", + "integrity": "sha512-hR3GwrRwHUfYwGfrisXPIDP3JcYfBrW7wKE7+Au6wDYl7fm/ka1NEII6kORzxNU556JjfidZeBsO10kYvtV1aw==", "license": "MIT", "peer": true, "dependencies": { - "@babel/compat-data": "^7.27.7", - "@babel/helper-define-polyfill-provider": "^0.6.5", + "@babel/compat-data": "^7.28.6", + "@babel/helper-define-polyfill-provider": "^0.6.6", "semver": "^6.3.1" }, "peerDependencies": { @@ -3634,13 +3582,13 @@ } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.5.tgz", - "integrity": "sha512-ISqQ2frbiNU9vIJkzg7dlPpznPZ4jOiUQ1uSmB0fEHeowtN3COYRsXr/xexn64NpU13P06jc/L5TgiJXOgrbEg==", + "version": "0.6.6", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.6.tgz", + "integrity": "sha512-hYm+XLYRMvupxiQzrvXUj7YyvFFVfv5gI0R71AJzudg1g2AI2vyCPPIFEBjk162/wFzti3inBHo7isWFuEVS/A==", "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.5" + "@babel/helper-define-polyfill-provider": "^0.6.6" }, "peerDependencies": { "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" @@ -3776,9 +3724,9 @@ "license": "MIT" }, "node_modules/bare-addon-resolve": { - "version": "1.9.6", - "resolved": "https://registry.npmjs.org/bare-addon-resolve/-/bare-addon-resolve-1.9.6.tgz", - "integrity": "sha512-hvOQY1zDK6u0rSr27T6QlULoVLwi8J2k8HHHJlxSfT7XQdQ/7bsS+AnjYkHtu/TkL+gm3aMXAKucJkJAbrDG/g==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/bare-addon-resolve/-/bare-addon-resolve-1.10.0.tgz", + "integrity": "sha512-sSd0jieRJlDaODOzj0oe0RjFVC1QI0ZIjGIdPkbrTXsdVVtENg14c+lHHAhHwmWCZ2nQlMhy8jA3Y5LYPc/isA==", "license": "Apache-2.0", "dependencies": { "bare-module-resolve": "^1.10.0", @@ -3817,9 +3765,9 @@ } }, "node_modules/bare-fs": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.5.2.tgz", - "integrity": "sha512-veTnRzkb6aPHOvSKIOy60KzURfBdUflr5VReI+NSaPL6xf+XLdONQgZgpYvUuZLVQ8dCqxpBAudaOM1+KpAUxw==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.5.4.tgz", + "integrity": "sha512-POK4oplfA7P7gqvetNmCs4CNtm9fNsx+IAh7jH7GgU0OJdge2rso0R20TNWVq6VoWcCvsTdlNDaleLHGaKx8CA==", "license": "Apache-2.0", "dependencies": { "bare-events": "^2.5.4", @@ -3904,9 +3852,9 @@ } }, "node_modules/bare-pipe": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/bare-pipe/-/bare-pipe-4.1.2.tgz", - "integrity": "sha512-btXtZLlABEDRp50cfLj9iweISqAJSNMCjeq5v0v9tBY2a7zSSqmfa2ZoE1ki2qxAvubagLUqw6VDifpsuI/qmg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/bare-pipe/-/bare-pipe-4.1.3.tgz", + "integrity": "sha512-DqQsx93rAzre6yJ9T6l/Vgh+X+bntkVMB1X5ggtXjXtqtMmF2Y2RVlCzxxy/09R6yeR9FSWBEUIaMYJL1/5VDA==", "license": "Apache-2.0", "dependencies": { "bare-events": "^2.0.0", @@ -4017,9 +3965,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.9.17", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.17.tgz", - "integrity": "sha512-agD0MgJFUP/4nvjqzIB29zRPUuCF7Ge6mEv9s8dHrtYD7QWXRcx75rOADE/d5ah1NI+0vkDl0yorDd5U852IQQ==", + "version": "2.9.19", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.19.tgz", + "integrity": "sha512-ipDqC8FrAl/76p2SSWKSI+H9tFwm7vYqXQrItCuiVPt26Km0jS+NzSsBWAaBusvSbQcfJG+JitdMm+wZAgTYqg==", "license": "Apache-2.0", "bin": { "baseline-browser-mapping": "dist/cli.js" @@ -4227,9 +4175,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001765", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001765.tgz", - "integrity": "sha512-LWcNtSyZrakjECqmpP4qdg0MMGdN368D7X8XvvAqOcqMv0RxnlqVKZl2V6/mBR68oYMxOZPLw/gO7DuisMHUvQ==", + "version": "1.0.30001770", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001770.tgz", + "integrity": "sha512-x/2CLQ1jHENRbHg5PSId2sXq1CIO1CISvwWAj027ltMVG2UNgW+w9oH2+HzgEIRFembL8bUlXtfbBHR1fCg2xw==", "funding": [ { "type": "opencollective", @@ -4768,9 +4716,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.277", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.277.tgz", - "integrity": "sha512-wKXFZw4erWmmOz5N/grBoJ2XrNJGDFMu2+W5ACHza5rHtvsqrK4gb6rnLC7XxKB9WlJ+RmyQatuEXmtm86xbnw==", + "version": "1.5.286", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.286.tgz", + "integrity": "sha512-9tfDXhJ4RKFNerfjdCcZfufu49vg620741MNs26a9+bhLThdB+plgMeou98CAaHu/WATj2iHOOHTp1hWtABj2A==", "license": "ISC" }, "node_modules/emittery": { @@ -4955,14 +4903,14 @@ } }, "node_modules/expo": { - "version": "54.0.32", - "resolved": "https://registry.npmjs.org/expo/-/expo-54.0.32.tgz", - "integrity": "sha512-yL9eTxiQ/QKKggVDAWO5CLjUl6IS0lPYgEvC3QM4q4fxd6rs7ks3DnbXSGVU3KNFoY/7cRNYihvd0LKYP+MCXA==", + "version": "54.0.33", + "resolved": "https://registry.npmjs.org/expo/-/expo-54.0.33.tgz", + "integrity": "sha512-3yOEfAKqo+gqHcV8vKcnq0uA5zxlohnhA3fu4G43likN8ct5ZZ3LjAh9wDdKteEkoad3tFPvwxmXW711S5OHUw==", "license": "MIT", "peer": true, "dependencies": { "@babel/runtime": "^7.20.0", - "@expo/cli": "54.0.22", + "@expo/cli": "54.0.23", "@expo/config": "~12.0.13", "@expo/config-plugins": "~54.0.4", "@expo/devtools": "0.1.8", @@ -5184,7 +5132,6 @@ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "license": "MIT", - "peer": true, "engines": { "node": ">=12.0.0" }, @@ -5243,20 +5190,16 @@ "license": "MIT" }, "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "license": "MIT", - "peer": true, "dependencies": { - "locate-path": "^6.0.0", + "locate-path": "^5.0.0", "path-exists": "^4.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/flow-enums-runtime": { @@ -5386,13 +5329,13 @@ } }, "node_modules/glob": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.0.tgz", - "integrity": "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==", + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.3.tgz", + "integrity": "sha512-/g3B0mC+4x724v1TgtBlBtt2hPi/EWptsIAmXUx9Z2rvBYleQcsrmaOzd5LyL50jf/Soi83ZDJmw2+XqvH/EeA==", "license": "BlueOak-1.0.0", "peer": true, "dependencies": { - "minimatch": "^10.1.1", + "minimatch": "^10.2.0", "minipass": "^7.1.2", "path-scurry": "^2.0.0" }, @@ -5403,14 +5346,40 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob/node_modules/balanced-match": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.2.tgz", + "integrity": "sha512-x0K50QvKQ97fdEz2kPehIerj+YTeptKF9hyYkKf6egnwmMWAkADiO0QCzSp0R5xN8FTZgYaBfSaue46Ej62nMg==", + "license": "MIT", + "peer": true, + "dependencies": { + "jackspeak": "^4.2.3" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.2.tgz", + "integrity": "sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw==", + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, "node_modules/glob/node_modules/minimatch": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", - "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.0.tgz", + "integrity": "sha512-ugkC31VaVg9cF0DFVoADH12k6061zNZkZON+aX8AWsR9GhPcErkcMBceb6znR8wLERM2AkkOxy2nWRLpT9Jq5w==", "license": "BlueOak-1.0.0", "peer": true, "dependencies": { - "@isaacs/brace-expansion": "^5.0.0" + "brace-expansion": "^5.0.2" }, "engines": { "node": "20 || >=22" @@ -5482,9 +5451,9 @@ } }, "node_modules/hermes-compiler": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/hermes-compiler/-/hermes-compiler-0.14.0.tgz", - "integrity": "sha512-clxa193o+GYYwykWVFfpHduCATz8fR5jvU7ngXpfKHj+E9hr9vjLNtdLSEe8MUbObvVexV3wcyxQ00xTPIrB1Q==", + "version": "250829098.0.7", + "resolved": "https://registry.npmjs.org/hermes-compiler/-/hermes-compiler-250829098.0.7.tgz", + "integrity": "sha512-8QOmg1VjAWv8poFVslJDY8qkvjTy/UiO3R/hyGoC0IAchLzBdS9/TmAvI9cN1F3yLTEjimAIQQtUslpBMPXVVg==", "license": "MIT" }, "node_modules/hermes-estree": { @@ -5596,9 +5565,9 @@ } }, "node_modules/hyperschema": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/hyperschema/-/hyperschema-1.19.0.tgz", - "integrity": "sha512-gHbLxLygsDUmX9MVs8G1W4xC9NglSyrw+t28sfFFzdU40gCUUmIo3n2MkIRHpUOT7Jj+8iuvq2wSkpaG+3k/Xg==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/hyperschema/-/hyperschema-1.19.1.tgz", + "integrity": "sha512-w8oYEK8j+R418dLhDhhXX6yww5BUg7ye2l3VZ7wE7A5BTUjKHX2F4bzp8r9D1MCMkKa8BvqezpOHQIHhwLbiQw==", "license": "Apache-2.0", "dependencies": { "bare-fs": "^4.0.1", @@ -5654,9 +5623,9 @@ } }, "node_modules/immer": { - "version": "11.1.3", - "resolved": "https://registry.npmjs.org/immer/-/immer-11.1.3.tgz", - "integrity": "sha512-6jQTc5z0KJFtr1UgFpIL3N9XSC3saRaI9PwWtzM2pSqkNGtiNkYY2OSwkOGDK2XcTRcLb1pi/aNkKZz0nxVH4Q==", + "version": "11.1.4", + "resolved": "https://registry.npmjs.org/immer/-/immer-11.1.4.tgz", + "integrity": "sha512-XREFCPo6ksxVzP4E0ekD5aMdf8WMwmdNaz6vuvxgI40UaEiu6q3p8X52aU6GdyvLY3XXX/8R7JOTXStz/nBbRw==", "license": "MIT", "funding": { "type": "opencollective", @@ -5907,6 +5876,22 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.2.3.tgz", + "integrity": "sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==", + "license": "BlueOak-1.0.0", + "peer": true, + "dependencies": { + "@isaacs/cliui": "^9.0.0" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", @@ -6076,7 +6061,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -6255,9 +6240,9 @@ } }, "node_modules/jest-message-util/node_modules/@babel/code-frame": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.28.6.tgz", - "integrity": "sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", @@ -6437,7 +6422,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -6992,19 +6977,15 @@ "license": "MIT" }, "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "license": "MIT", - "peer": true, "dependencies": { - "p-locate": "^5.0.0" + "p-locate": "^4.1.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/lodash.debounce": { @@ -7492,9 +7473,9 @@ } }, "node_modules/metro/node_modules/@babel/code-frame": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.28.6.tgz", - "integrity": "sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", @@ -8057,16 +8038,27 @@ } }, "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "license": "MIT", - "peer": true, "dependencies": { - "p-limit": "^3.0.2" + "p-limit": "^2.2.0" }, "engines": { - "node": ">=10" + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -8179,9 +8171,9 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.2.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz", - "integrity": "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==", + "version": "11.2.6", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.6.tgz", + "integrity": "sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==", "license": "BlueOak-1.0.0", "peer": true, "engines": { @@ -8229,62 +8221,6 @@ "node": ">=8" } }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/plist": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz", @@ -8501,9 +8437,9 @@ } }, "node_modules/react": { - "version": "19.2.3", - "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz", - "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==", + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", + "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==", "license": "MIT", "peer": true, "engines": { @@ -8548,19 +8484,19 @@ "license": "MIT" }, "node_modules/react-native": { - "version": "0.83.1", - "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.83.1.tgz", - "integrity": "sha512-mL1q5HPq5cWseVhWRLl+Fwvi5z1UO+3vGOpjr+sHFwcUletPRZ5Kv+d0tUfqHmvi73/53NjlQqX1Pyn4GguUfA==", + "version": "0.84.0", + "resolved": "https://registry.npmjs.org/react-native/-/react-native-0.84.0.tgz", + "integrity": "sha512-CcBfucLDHz8MAjQx9kFXasYtpcn8zP1YapUgGtAy0psRZTLShwF9yeh5+ErSgEK2gXV1CCSz7hqCZqx1eMyBLA==", "license": "MIT", "dependencies": { "@jest/create-cache-key-function": "^29.7.0", - "@react-native/assets-registry": "0.83.1", - "@react-native/codegen": "0.83.1", - "@react-native/community-cli-plugin": "0.83.1", - "@react-native/gradle-plugin": "0.83.1", - "@react-native/js-polyfills": "0.83.1", - "@react-native/normalize-colors": "0.83.1", - "@react-native/virtualized-lists": "0.83.1", + "@react-native/assets-registry": "0.84.0", + "@react-native/codegen": "0.84.0", + "@react-native/community-cli-plugin": "0.84.0", + "@react-native/gradle-plugin": "0.84.0", + "@react-native/js-polyfills": "0.84.0", + "@react-native/normalize-colors": "0.84.0", + "@react-native/virtualized-lists": "0.84.0", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", @@ -8569,8 +8505,7 @@ "base64-js": "^1.5.1", "commander": "^12.0.0", "flow-enums-runtime": "^0.0.6", - "glob": "^7.1.1", - "hermes-compiler": "0.14.0", + "hermes-compiler": "250829098.0.7", "invariant": "^2.2.4", "jest-environment-node": "^29.7.0", "memoize-one": "^5.0.0", @@ -8585,6 +8520,7 @@ "scheduler": "0.27.0", "semver": "^7.1.3", "stacktrace-parser": "^0.1.10", + "tinyglobby": "^0.2.15", "whatwg-fetch": "^3.0.0", "ws": "^7.5.10", "yargs": "^17.6.2" @@ -8597,7 +8533,7 @@ }, "peerDependencies": { "@types/react": "^19.1.1", - "react": "^19.2.0" + "react": "^19.2.3" }, "peerDependenciesMeta": { "@types/react": { @@ -8606,9 +8542,9 @@ } }, "node_modules/react-native-bare-kit": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/react-native-bare-kit/-/react-native-bare-kit-0.12.0.tgz", - "integrity": "sha512-3r8NpPLMcsK0nwHHif8vWTjlAZ5WAwsgZRTedl0UKbVmXuR7SsfJCMapzo9JvVZUcwuFztOMlF0pL2QY2gO5IQ==", + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/react-native-bare-kit/-/react-native-bare-kit-0.12.2.tgz", + "integrity": "sha512-8Ot/8t2wOXXCzTDBpTyd4JAhz6EZevVvxfQ0YucoPuyZ24gxRaJtD6V+5cFn0NOZZlt1UHC+/g6rgy9EjEXmNQ==", "license": "Apache-2.0", "dependencies": { "bare-events": "^2.6.1", @@ -8634,9 +8570,9 @@ } }, "node_modules/react-native-mmkv": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/react-native-mmkv/-/react-native-mmkv-4.1.1.tgz", - "integrity": "sha512-nYFjM27l7zVhIiyAqWEFRagGASecb13JMIlzAuOeakRRz9GMJ49hCQntUBE2aeuZRE4u4ehSqTOomB0mTF56Ew==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/react-native-mmkv/-/react-native-mmkv-4.1.2.tgz", + "integrity": "sha512-6LHb2DQBXuo96Aues13EugmlWw/HAYuh3KoJoQNrC4JsBwn3J3KiRYAg2mCm5Je0VYq2YsmbgZG7XJwX/WFYZA==", "license": "MIT", "peerDependencies": { "react": "*", @@ -8645,9 +8581,9 @@ } }, "node_modules/react-native-nitro-modules": { - "version": "0.33.2", - "resolved": "https://registry.npmjs.org/react-native-nitro-modules/-/react-native-nitro-modules-0.33.2.tgz", - "integrity": "sha512-ZlfOe6abODeHv/eZf8PxeSkrxIUhEKha6jaAAA9oXy7I6VPr7Ff4dUsAq3cyF3kX0L6qt2Dh9nzD2NdSsDwGpA==", + "version": "0.33.9", + "resolved": "https://registry.npmjs.org/react-native-nitro-modules/-/react-native-nitro-modules-0.33.9.tgz", + "integrity": "sha512-BM9C5mCGYYjrc8CDWZZ0anLWU/knH2xaEuFzvzogKTOW6fzgS6mmsCdM3ty+AhImJNSYwK19DLrHaqwnrrwEzw==", "license": "MIT", "peer": true, "peerDependencies": { @@ -8656,17 +8592,17 @@ } }, "node_modules/react-native/node_modules/@react-native/codegen": { - "version": "0.83.1", - "resolved": "https://registry.npmjs.org/@react-native/codegen/-/codegen-0.83.1.tgz", - "integrity": "sha512-FpRxenonwH+c2a5X5DZMKUD7sCudHxB3eSQPgV9R+uxd28QWslyAWrpnJM/Az96AEksHnymDzEmzq2HLX5nb+g==", + "version": "0.84.0", + "resolved": "https://registry.npmjs.org/@react-native/codegen/-/codegen-0.84.0.tgz", + "integrity": "sha512-TcTAO58JigCw9onYTrbE2yK2js5YNgqbmnpYyq9oXz2mofbX7JcK53kIi7fhqyJhie8RkY+X85zSOTWNs6S3CA==", "license": "MIT", "dependencies": { "@babel/core": "^7.25.2", "@babel/parser": "^7.25.3", - "glob": "^7.1.1", "hermes-parser": "0.32.0", "invariant": "^2.2.4", "nullthrows": "^1.1.1", + "tinyglobby": "^0.2.15", "yargs": "^17.6.2" }, "engines": { @@ -8677,9 +8613,9 @@ } }, "node_modules/react-native/node_modules/@react-native/normalize-colors": { - "version": "0.83.1", - "resolved": "https://registry.npmjs.org/@react-native/normalize-colors/-/normalize-colors-0.83.1.tgz", - "integrity": "sha512-84feABbmeWo1kg81726UOlMKAhcQyFXYz2SjRKYkS78QmfhVDhJ2o/ps1VjhFfBz0i/scDwT1XNv9GwmRIghkg==", + "version": "0.84.0", + "resolved": "https://registry.npmjs.org/@react-native/normalize-colors/-/normalize-colors-0.84.0.tgz", + "integrity": "sha512-7JgZyWtQ9Sz4qZvCTsURUtuv8/niEZ/iCorp7eExc3GgpBWNazPumieiUoWPdgRKofU0Bqpr2/dJevEn2hrlwA==", "license": "MIT" }, "node_modules/react-native/node_modules/babel-plugin-syntax-hermes-parser": { @@ -8691,16 +8627,6 @@ "hermes-parser": "0.32.0" } }, - "node_modules/react-native/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/react-native/node_modules/commander": { "version": "12.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", @@ -8710,27 +8636,6 @@ "node": ">=18" } }, - "node_modules/react-native/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/react-native/node_modules/hermes-estree": { "version": "0.32.0", "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.32.0.tgz", @@ -8746,18 +8651,6 @@ "hermes-estree": "0.32.0" } }, - "node_modules/react-native/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/react-native/node_modules/ws": { "version": "7.5.10", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", @@ -8789,24 +8682,24 @@ } }, "node_modules/react-test-renderer": { - "version": "19.2.3", - "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-19.2.3.tgz", - "integrity": "sha512-TMR1LnSFiWZMJkCgNf5ATSvAheTT2NvKIwiVwdBPHxjBI7n/JbWd4gaZ16DVd9foAXdvDz+sB5yxZTwMjPRxpw==", + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-19.2.4.tgz", + "integrity": "sha512-Ttl5D7Rnmi6JGMUpri4UjB4BAN0FPs4yRDnu2XSsigCWOLm11o8GwRlVsh27ER+4WFqsGtrBuuv5zumUaRCmKw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "react-is": "^19.2.3", + "react-is": "^19.2.4", "scheduler": "^0.27.0" }, "peerDependencies": { - "react": "^19.2.3" + "react": "^19.2.4" } }, "node_modules/react-test-renderer/node_modules/react-is": { - "version": "19.2.3", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.3.tgz", - "integrity": "sha512-qJNJfu81ByyabuG7hPFEbXqNcWSU3+eVus+KJs+0ncpGfMyYdvSmxiJxbWR65lYi1I+/0HBcliO029gc4F+PnA==", + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.4.tgz", + "integrity": "sha512-W+EWGn2v0ApPKgKKCy/7s7WHXkboGcsrXE+2joLyVxkbyVQfO3MUEaUQDHoSmb8TFFrSKYa9mw64WZHNHSDzYA==", "dev": true, "license": "MIT", "peer": true @@ -9082,7 +8975,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -9155,9 +9048,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -9641,9 +9534,9 @@ } }, "node_modules/tar": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.7.tgz", - "integrity": "sha512-fov56fJiRuThVFXD6o6/Q354S7pnWMJIVlDBYijsTNx6jKSE4pvrDTs6lUnmGvNyfJwFQQwWy3owKz1ucIhveQ==", + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.9.tgz", + "integrity": "sha512-BTLcK0xsDh2+PUe9F6c2TlRp4zOOBMTkoQHQIWSIzI0R7KG46uEwq4OPk2W7bZcprBMsuaeFsqwYr7pjh6CuHg==", "license": "BlueOak-1.0.0", "peer": true, "dependencies": { @@ -9746,7 +9639,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -9776,9 +9669,9 @@ } }, "node_modules/text-decoder": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", - "integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.6.tgz", + "integrity": "sha512-27FeW5GQFDfw0FpwMQhMagB7BztOOlmjcSRi97t2oplhKVTZtp0DZbSegSaXS5IIC6mxMvBG4AR1Sgc6BX3CQg==", "license": "Apache-2.0", "dependencies": { "b4a": "^1.6.4" @@ -9818,7 +9711,6 @@ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "license": "MIT", - "peer": true, "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.3" @@ -9835,7 +9727,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -10428,9 +10319,9 @@ } }, "node_modules/zustand": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.10.tgz", - "integrity": "sha512-U1AiltS1O9hSy3rul+Ub82ut2fqIAefiSuwECWt6jlMVUGejvf+5omLcRBSzqbRagSM3hQZbtzdeRc6QVScXTg==", + "version": "5.0.11", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.11.tgz", + "integrity": "sha512-fdZY+dk7zn/vbWNCYmzZULHRrss0jx5pPFiOuMZ/5HJN6Yv3u+1Wswy/4MpZEkEGhtNH+pwxZB8OKgUBPzYAGg==", "license": "MIT", "engines": { "node": ">=12.20.0" diff --git a/package.json b/package.json index 31288ae..8cbf6b6 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "dist", "src", "README.md", - "LICENSE" + "LICENSE", + "tsconfig.json" ], "exports": { ".": { @@ -28,14 +29,14 @@ }, "homepage": "https://github.com/tetherto/wdk-react-native-core#readme", "scripts": { - "build": "tsc || true", + "build": "tsc", "build:strict": "tsc", "typecheck": "tsc --noEmit", "test": "jest", "test:watch": "jest --watch", "test:coverage": "jest --coverage", "prepack": "npm run build", - "postinstall": "npm run build" + "prepare": "npm run build" }, "keywords": [ "wallet", @@ -52,7 +53,7 @@ "registry": "https://registry.npmjs.org/" }, "dependencies": { - "@tetherto/wdk-react-native-secure-storage": "github:tetherto/wdk-react-native-secure-storage", + "@tetherto/wdk-react-native-secure-storage": "github:nampc1/wdk-react-native-secure-storage-fork#dev", "@tetherto/pear-wrk-wdk": "github:tetherto/pear-wrk-wdk#v2", "@tanstack/react-query": "^5.0.0", "expo-crypto": "^15.0.8", diff --git a/src/__mocks__/secureStorage.ts b/src/__mocks__/secureStorage.ts index 9d70d29..e67080c 100644 --- a/src/__mocks__/secureStorage.ts +++ b/src/__mocks__/secureStorage.ts @@ -82,6 +82,9 @@ export const mockSecureStorage = { _clearStorage: () => { Object.keys(storage).forEach(key => delete storage[key]) }, + isDeviceSecurityEnabled: jest.fn(() => { + return Promise.resolve(true) + }) } export default mockSecureStorage diff --git a/src/__tests__/services/accountService.test.ts b/src/__tests__/services/accountService.test.ts index 383f488..be50d35 100644 --- a/src/__tests__/services/accountService.test.ts +++ b/src/__tests__/services/accountService.test.ts @@ -96,7 +96,11 @@ describe('AccountService', () => { 'ethereum', 0, 'transfer', - mockArgs + { + recipient: '0x123', + amount: '1000', + token: '0x123' + } ) expect(result).toEqual(mockResult) @@ -258,7 +262,7 @@ describe('AccountService', () => { }) await expect( - AccountService.callAccountMethod('ethereum', 0, 'getBalance', null) + AccountService.callAccountMethod('ethereum', 0, 'getBalance') ).rejects.toThrow('Invalid balance format') }) @@ -270,8 +274,7 @@ describe('AccountService', () => { const result = await AccountService.callAccountMethod( 'ethereum', 0, - 'getBalance', - null + 'getBalance' ) expect(result).toBe('1000000000000000000') @@ -279,13 +282,13 @@ describe('AccountService', () => { it('should validate network name', async () => { await expect( - AccountService.callAccountMethod('', 0, 'getBalance', null) + AccountService.callAccountMethod('', 0, 'getBalance') ).rejects.toThrow(/network.*non-empty|Network name must contain only|String must contain at least 1 character/) }) it('should validate account index', async () => { await expect( - AccountService.callAccountMethod('ethereum', -1, 'getBalance', null) + AccountService.callAccountMethod('ethereum', -1, 'getBalance') ).rejects.toThrow(/accountIndex.*non-negative|Number must be greater than or equal to 0/) }) @@ -296,7 +299,7 @@ describe('AccountService', () => { })) await expect( - AccountService.callAccountMethod('ethereum', 0, 'getBalance', null) + AccountService.callAccountMethod('ethereum', 0, 'getBalance') ).rejects.toThrow('WDK not initialized') }) @@ -307,7 +310,7 @@ describe('AccountService', () => { })) await expect( - AccountService.callAccountMethod('ethereum', 0, 'getBalance', null) + AccountService.callAccountMethod('ethereum', 0, 'getBalance') ).rejects.toThrow('WDK not initialized') }) @@ -318,7 +321,7 @@ describe('AccountService', () => { }) await expect( - AccountService.callAccountMethod('ethereum', 0, 'getBalance', null) + AccountService.callAccountMethod('ethereum', 0, 'getBalance') ).rejects.toThrow(/Method getBalance returned no result|Expected string/) }) @@ -328,7 +331,7 @@ describe('AccountService', () => { }) await expect( - AccountService.callAccountMethod('ethereum', 0, 'getBalance', null) + AccountService.callAccountMethod('ethereum', 0, 'getBalance') ).rejects.toThrow('Parsed result is null or undefined') }) @@ -338,7 +341,7 @@ describe('AccountService', () => { }) await expect( - AccountService.callAccountMethod('ethereum', 0, 'getBalance', null) + AccountService.callAccountMethod('ethereum', 0, 'getBalance') ).rejects.toThrow('Parsed result is null or undefined') }) @@ -348,7 +351,7 @@ describe('AccountService', () => { }) await expect( - AccountService.callAccountMethod('ethereum', 0, 'getBalance', null) + AccountService.callAccountMethod('ethereum', 0, 'getBalance') ).rejects.toThrow('Failed to parse result from getBalance') }) @@ -356,7 +359,7 @@ describe('AccountService', () => { mockHRPC.callMethod.mockRejectedValue(new Error('Worklet error')) await expect( - AccountService.callAccountMethod('ethereum', 0, 'getBalance', null) + AccountService.callAccountMethod('ethereum', 0, 'getBalance') ).rejects.toThrow() }) }) diff --git a/src/hooks/useAccount.ts b/src/hooks/useAccount.ts new file mode 100644 index 0000000..cae04dc --- /dev/null +++ b/src/hooks/useAccount.ts @@ -0,0 +1,280 @@ +import { useCallback, useMemo } from 'react' +import { AccountService } from '../services/accountService' +import { getWalletStore } from '../store/walletStore' +import type { IAsset } from '../types' +import { BalanceFetchResult } from '../types' +import { useShallow } from 'zustand/react/shallow' +import { convertBalanceToString } from '../utils/balanceUtils' + +export type UseAccountParams = { + accountIndex: number + network: string +} + +export interface TransactionParams { + to: string + asset: IAsset + amount: string // Amount in smallest denomination (e.g., wei) +} + +export interface TransactionResult { + hash: string + fee: string +} + +export interface UseAccountReturn { + /** The derived public address for this account. */ + address: string + + /** The identifier object this hook instance is bound to. */ + account: { + accountIndex: number + network: string + walletId: string + } + + /** + * Fetches the balance for the given assets directly from the network. + * This method does not use any cached data and always returns fresh results. + */ + getBalance: (tokens: IAsset[]) => Promise + + /** + * Executes a transfer of any asset, from native coins to smart contract tokens. + */ + send: (params: TransactionParams) => Promise + + /** + * Signs a simple UTF-8 string message with the account's private key. + */ + sign: (message: string) => Promise + + /** + * Verifies a signature. + */ + verify: (message: string, signature: string) => Promise + + /** + * Query fee for a transaction. + */ + estimateFee: (params?: Partial) => Promise> + + /** + * Accesses chain-specific or other modular features not included in the core API. + * Returns a typed, proxied interface for the specified namespace. + * @example + * const btcAccount = useAccount({ network: 'btc', ... }); + * const btcApi = btcAccount.extension(); + * const utxos = await btcApi.getUtxos(); + */ + extension: () => T +} + +export function useAccount( + accountParams: UseAccountParams, +): UseAccountReturn | null { + const walletStore = getWalletStore() + + const activeWalletId = walletStore((state) => state.activeWalletId) + + if (!activeWalletId) { + return null + } + + const { address } = walletStore( + useShallow((state) => { + const address = state.addresses[activeWalletId]?.[accountParams.network]?.[accountParams.accountIndex] + + return { + address, + } + }), + ) + + const account = useMemo( + () => ({ + accountIndex: accountParams.accountIndex, + network: accountParams.network, + walletId: activeWalletId, + }), + [accountParams.accountIndex, accountParams.network, activeWalletId], + ) + + const getBalance = useCallback( + async (tokens: IAsset[]): Promise => { + + if (!tokens || tokens.length === 0) { + return [] + } + + const results = await Promise.all( + tokens.map(async (asset) => { + try { + let balanceResult: string + + if (asset.isNative()) { + balanceResult = await AccountService.callAccountMethod<'getBalance'>( + accountParams.network, + accountParams.accountIndex, + 'getBalance' + ) + } else { + const tokenAddress = asset.getContractAddress() + + if (!tokenAddress) { + throw new Error('Token address cannot be null') + } + + balanceResult = await AccountService.callAccountMethod<'getTokenBalance'>( + accountParams.network, + accountParams.accountIndex, + 'getTokenBalance', + tokenAddress + ) + } + + const balance = convertBalanceToString(balanceResult) + + return { + success: true, + network: accountParams.network, + accountIndex: accountParams.accountIndex, + assetId: asset.getId(), + balance, + } + } catch (error) { + return { + success: false, + network: accountParams.network, + accountIndex: accountParams.accountIndex, + assetId: asset.getId(), + balance: null, + error: error instanceof Error ? error.message : String(error), + } + } + }), + ) + + return results + }, + [accountParams.network, accountParams.accountIndex], + ) + + const send = useCallback( + async (params: TransactionParams): Promise => { + const { to, asset, amount } = params + + if (asset.isNative()) { + return await AccountService.callAccountMethod<'sendTransaction'>( + accountParams.network, + accountParams.accountIndex, + 'sendTransaction', + { + to, + value: amount + }, + ) + } else { + const tokenAddress = asset.getContractAddress() + + if (!tokenAddress) { + throw new Error('Token address cannot be null') + } + + return await AccountService.callAccountMethod<'transfer'>( + accountParams.network, + accountParams.accountIndex, + 'transfer', + { + recipient: to, + amount, + token: tokenAddress + }, + ) + } + }, + [accountParams.network, accountParams.accountIndex], + ) + + const sign = useCallback( + async (message: string): Promise => { + const signature = await AccountService.callAccountMethod<'sign'>( + accountParams.network, + accountParams.accountIndex, + 'sign', + message, + ) + + return signature + }, + [accountParams.network, accountParams.accountIndex], + ) + + const verify = useCallback( + async (message: string, signature: string): Promise => { + const isValid = await AccountService.callAccountMethod<'verify'>( + accountParams.network, + accountParams.accountIndex, + 'verify', + message, + signature, + ) + + return isValid + }, + [accountParams.network, accountParams.accountIndex], + ) + + const estimateFee = useCallback( + async (params?: Partial): Promise> => { + // call AccountService.callAccountMethod to invoke quoteTransaction method of WDK + // please define interface for quoteTransaction in DefaultAccountMethods + // refer to my implementation of verify, sign,... + // + return { fee: '100' } + }, + [] + ) + + const extension = useCallback((): T => { + return new Proxy({} as T, { + get: (_target, prop) => { + if (typeof prop === 'string') { + return async (...args: unknown[]) => { + return await AccountService.callAccountMethod( + accountParams.network, + accountParams.accountIndex, + prop, + ...args, + ) + } + } + } + }) + }, + [accountParams.network, accountParams.accountIndex], + ) + + return useMemo( + () => (address ? { + address, + account, + getBalance, + send, + sign, + verify, + estimateFee, + extension, + } : null), + [ + address, + account, + getBalance, + send, + sign, + verify, + estimateFee, + extension, + ], + ) +} diff --git a/src/hooks/useAddresses.ts b/src/hooks/useAddresses.ts new file mode 100644 index 0000000..5bfe389 --- /dev/null +++ b/src/hooks/useAddresses.ts @@ -0,0 +1,141 @@ +import { useCallback, useMemo } from 'react' +import { useShallow } from 'zustand/react/shallow' +import { getWalletStore } from '../store/walletStore' +import { AddressService } from '../services/addressService' +import { getWorkletStore } from '../store/workletStore' + +type AddressInfo = { + address: string + network: string + accountIndex: number +} + +export interface UseAddressesReturn { + /** A flattened, UI-ready array of all loaded addresses for the active wallet. */ + data: AddressInfo[] | undefined + /** A simple boolean that is true if ANY address is currently being loaded. */ + isLoading: boolean + /** + * Triggers a fetch for addresses for the given account indices. + * If the `networks` array is provided, it fetches only for those networks. + * Otherwise, it fetches for all configured networks. + */ + loadAddresses: ( + accountIndices: number[], + networks?: string[], + ) => Promise + /** + * A helper to get a filtered list of addresses for a single network. + * Example: `getAddressesForNetwork('eth')` + */ + getAddressesForNetwork: ( + network: string, + ) => Array<{ address: string; accountIndex: number }> + /** + * A helper to resolve an address string back to its full account information. + * Performs a case-insensitive search. + */ + getAccountInfoFromAddress: (address: string) => AddressInfo | undefined +} + +export function useAddresses(): UseAddressesReturn { + const { activeWalletId, allAddresses, allWalletLoading } = getWalletStore()( + useShallow((state) => ({ + activeWalletId: state.activeWalletId, + allAddresses: state.addresses, + allWalletLoading: state.walletLoading, + })), + ) + const wdkConfigs = getWorkletStore()((state) => state.wdkConfigs) + + const { activeAddresses, activeWalletLoading } = useMemo(() => { + if (!activeWalletId) + return { activeAddresses: undefined, activeWalletLoading: undefined } + + return { + activeAddresses: allAddresses[activeWalletId], + activeWalletLoading: allWalletLoading[activeWalletId], + } + }, [activeWalletId, allAddresses, allWalletLoading]) + + const data = useMemo(() => { + if (!activeAddresses) return undefined + + const flattened = Object.entries(activeAddresses).flatMap( + ([network, accounts]) => + Object.entries(accounts).map(([accountIndex, address]) => ({ + address, + network, + accountIndex: parseInt(accountIndex, 10), + })), + ) + + return flattened + }, [activeAddresses]) + + const isLoading = useMemo(() => { + if (!activeWalletLoading) return false + + return Object.values(activeWalletLoading).some((isLoading) => isLoading) + }, [activeWalletLoading]) + + const loadAddresses = useCallback( + async (accountIndices: number[], networks?: string[]) => { + if (!activeWalletId) { + throw new Error('No active wallet to load addresses for.') + } + + if (!wdkConfigs) { + throw new Error('WDK is not initialized.') + } + + const networksToLoad = + networks || Object.values(wdkConfigs.networks).map((n) => n.blockchain) + + const loadPromises = accountIndices.flatMap((accountIndex) => + networksToLoad.map((network) => + AddressService.getAddress(network, accountIndex, activeWalletId), + ), + ) + await Promise.all(loadPromises) + }, + [activeWalletId, wdkConfigs], + ) + + const getAddressesForNetwork = useCallback( + (network: string) => { + if (!data) return [] + return data + .filter((d) => d.network === network) + .map(({ address, accountIndex }) => ({ address, accountIndex })) + }, + [data], + ) + + const getAccountInfoFromAddress = useCallback( + (addressToFind: string) => { + if (!data) return undefined + return data.find( + (item) => item.address.toLowerCase() === addressToFind.toLowerCase(), + ) + }, + [data], + ) + + return useMemo( + () => ({ + data, + isLoading, + loadAddresses, + getAddressesForNetwork, + getAccountInfoFromAddress, + }), + [ + data, + isLoading, + loadAddresses, + getAddressesForNetwork, + getAccountInfoFromAddress, + ], + ) +} diff --git a/src/hooks/useBalance.ts b/src/hooks/useBalance.ts index 503896c..1054143 100644 --- a/src/hooks/useBalance.ts +++ b/src/hooks/useBalance.ts @@ -69,8 +69,6 @@ export interface BalanceQueryOptions { refetchInterval?: number | false /** Stale time in milliseconds */ staleTime?: number - /** Wallet identifier (defaults to activeWalletId) */ - walletId?: string } /** @@ -201,21 +199,31 @@ async function fetchBalance( } try { - const isNative = asset.isNative() - const methodName = isNative ? ACCOUNT_METHOD_GET_BALANCE : ACCOUNT_METHOD_GET_TOKEN_BALANCE - const methodArg = asset.getContractAddress() // null for native + let balanceResult: string - const balanceResult = await AccountService.callAccountMethod( - network, - accountIndex, - methodName, - methodArg - ) as string + if (asset.isNative()) { + balanceResult = await AccountService.callAccountMethod<'getBalance'>( + network, + accountIndex, + 'getBalance', + ) + } else { + const tokenAddress = asset.getContractAddress() + + if (!tokenAddress) { + throw new Error('Token address cannot be null') + } + + balanceResult = await AccountService.callAccountMethod<'getTokenBalance'>( + network, + accountIndex, + 'getTokenBalance', + tokenAddress, + ) + } - // Convert to string (handles BigInt values) const balance = convertBalanceToString(balanceResult) - // Update Zustand store (single source of truth) const targetWalletId = resolveWalletId(walletId) BalanceService.updateBalance(accountIndex, network, assetId, balance, targetWalletId) BalanceService.updateLastBalanceUpdate(network, accountIndex, targetWalletId) @@ -275,19 +283,15 @@ export function useBalance( const workletStore = getWorkletStore() const walletStore = getWalletStore() - // Check if wallet is initialized const isInitialized = workletStore.getState().isInitialized + const walletId = walletStore.getState().activeWalletId - // Get walletId from options or activeWalletId - const activeWalletId = walletStore.getState().activeWalletId - const walletId = options?.walletId || activeWalletId || '__temporary__' + if (!walletId) { + throw new Error('WalletId cannot be null') + } - // Get properties from asset const assetId = asset.getId() - // Get initial data from Zustand (single source of truth) - // This ensures balances are available immediately on app restart before refetch - // We use assetId as the key in the store now const initialBalance = BalanceService.getBalance(accountIndex, network, assetId, walletId) const initialData: BalanceFetchResult | undefined = initialBalance !== null ? { @@ -306,7 +310,6 @@ export function useBalance( refetchInterval: options?.refetchInterval, staleTime: options?.staleTime ?? DEFAULT_QUERY_STALE_TIME_MS, gcTime: DEFAULT_QUERY_GC_TIME_MS, - // Use Zustand as initial data source (single source of truth) initialData, }) } @@ -336,13 +339,16 @@ export function useBalancesForWallet( assetConfigs: IAsset[], options?: BalanceQueryOptions ) { + const walletStore = getWalletStore() const workletStore = getWorkletStore() const isInitialized = workletStore.getState().isInitialized - // Resolve walletId from options or store - const walletId = resolveWalletId(options?.walletId) + const walletId = walletStore.getState().activeWalletId + + if (!walletId) { + throw new Error('WalletId cannot be null') + } - // Get initial data from Zustand (single source of truth) const initialData: BalanceFetchResult[] | undefined = (() => { const initialBalances: BalanceFetchResult[] = [] let hasAnyInitialData = false @@ -360,7 +366,6 @@ export function useBalancesForWallet( balance, }) } else { - // Include placeholder for missing balances initialBalances.push({ success: false, network: asset.getNetwork(), @@ -382,7 +387,6 @@ export function useBalancesForWallet( refetchInterval: options?.refetchInterval, staleTime: options?.staleTime ?? DEFAULT_QUERY_STALE_TIME_MS, gcTime: DEFAULT_QUERY_GC_TIME_MS, - // Use Zustand as initial data source initialData, }) } @@ -509,13 +513,9 @@ export function useRefreshBalance() { return useMutation({ mutationFn: async (params: RefreshBalanceParams) => { - // Resolve walletId from params or store const walletId = resolveWalletId(params.walletId) - // Invalidate queries based on type await invalidateBalanceQueries(queryClient, params, walletId) - - // Refetch the invalidated queries await queryClient.refetchQueries() }, }) diff --git a/src/hooks/useWallet.ts b/src/hooks/useWallet.ts index aa62398..ee3627e 100644 --- a/src/hooks/useWallet.ts +++ b/src/hooks/useWallet.ts @@ -10,7 +10,7 @@ import { isOperationInProgress } from '../utils/operationMutex' import { log, logError } from '../utils/logger' import type { WalletStore } from '../store/walletStore' import type { WorkletStore } from '../store/workletStore' -import type { MethodMap, LooseMethods } from '../types/accountMethods' +import type { MethodMap, DefaultAccountMethods } from '../types/accountMethods' // Stable empty objects to prevent creating new objects on every render const EMPTY_ADDRESSES = {} as Record> @@ -64,7 +64,7 @@ function normalizeErrorToError(error: unknown): Error { * This hook provides access to wallet addresses and account methods. * * @template TMethods - Optional map of method names to definitions (args/result) for strict typing. - * Defaults to LooseMethods (any string, any args). + * Defaults to DefaultAccountMethods (any string, any args). * * @example * ```tsx @@ -78,7 +78,7 @@ function normalizeErrorToError(error: unknown): Error { * await callAccountMethod('eth', 0, 'signTransaction', { ... }) // Strictly typed! * ``` */ -export interface UseWalletResult { +export interface UseWalletResult { // State (reactive) addresses: Record> // network -> accountIndex -> address (for current wallet) walletLoading: Record // loading states for current wallet @@ -108,11 +108,11 @@ export interface UseWalletResult { network: string, accountIndex: number, methodName: K, - args?: TMethods[K]['args'] | unknown[] + ...args: TMethods[K]['params'] ) => Promise } -export function useWallet(options?: { +export function useWallet(options?: { walletId?: string /** Account indices to automatically load addresses for */ autoLoadAccountIndices?: number[] @@ -373,13 +373,13 @@ export function useWallet(options?: { network: string, accountIndex: number, methodName: K, - args?: TMethods[K]['args'] | unknown[] + ...args: TMethods[K]['params'] ): Promise => { - return AccountService.callAccountMethod( + return AccountService.callAccountMethod( network, accountIndex, - methodName, - args + methodName as string, + ...args ) }, [targetWalletId]) diff --git a/src/hooks/useWalletManagerV2.ts b/src/hooks/useWalletManagerV2.ts index 96ef31e..f1ed42e 100644 --- a/src/hooks/useWalletManagerV2.ts +++ b/src/hooks/useWalletManagerV2.ts @@ -2,7 +2,6 @@ import { produce } from 'immer' import { useMemo, useCallback } from 'react' import { WalletSetupService } from '../services/walletSetupService' import { WorkletLifecycleService } from '../services/workletLifecycleService' -import { AddressService } from '../services/addressService' import { getWalletStore, updateWalletLoadingState, diff --git a/src/index.ts b/src/index.ts index 67f5b61..1e7c665 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,7 +8,6 @@ export type { WdkConfigs, AssetConfig, - Wallet, BalanceFetchResult, IAsset, // Bundle and HRPC types @@ -21,16 +20,18 @@ export { WdkAppProvider } from './provider/WdkAppProvider' export type { WdkAppProviderProps, WdkAppContextValue } from './provider/WdkAppProvider' // Hooks (The Public API) -export { useWallet } from './hooks/useWallet' export { useWdkApp } from './hooks/useWdkApp' +export { useAddresses } from './hooks/useAddresses' +export type { UseAddressesReturn } from './hooks/useAddresses' + +export { useAccount } from './hooks/useAccount' +export type { UseAccountParams, UseAccountReturn } from './hooks/useAccount' -// export { useWalletManager } from './hooks/useWalletManager' export { useWalletManager } from './hooks/useWalletManagerV2' export type { UseWalletManagerResult, WalletInfo } from './hooks/useWalletManagerV2' export { useBalance, useBalancesForWallet, - useBalancesForWallets, useRefreshBalance, balanceQueryKeys, } from './hooks/useBalance' diff --git a/src/services/accountService.ts b/src/services/accountService.ts index e9aadd4..e82f156 100644 --- a/src/services/accountService.ts +++ b/src/services/accountService.ts @@ -1,86 +1,49 @@ /** * Account Service - * + * * Handles account method calls through the worklet. * This service provides a generic interface for calling account methods * like getBalance, getTokenBalance, signMessage, signTransaction, etc. */ -import type { LooseMethods, MethodMap } from '../types/accountMethods' -import { convertBigIntToString } from '../utils/balanceUtils' +import { validateAccountIndex, validateNetworkName } from '../utils/validation' +import { DefaultAccountMethods } from '../types/accountMethods' import { handleServiceError } from '../utils/errorHandling' +import { requireInitialized } from '../utils/storeHelpers' import { safeStringify } from '../utils/jsonUtils' import { workletResponseSchema } from '../utils/schemas' -import { requireInitialized } from '../utils/storeHelpers' -import { validateAccountIndex, validateNetworkName } from '../utils/validation' +import { convertBigIntToString } from '../utils/balanceUtils' /** * Account Service - * + * * Provides methods for calling account operations through the worklet. */ export class AccountService { - /** - * Call a method on a wallet account - * Generic method for calling any account method through the worklet - * - * The worklet should already have the correct wallet loaded via `initializeWDK`. - * Wallet switching is handled at the hook level before calling this service. - * - * @template TMethods - Map of method names to definitions (args/result) - * @template K - Method name (key of TMethods) - * - * @param network - Network name - * @param accountIndex - Account index - * @param methodName - Method name - * @param args - Method arguments (typed based on methodName) - * @param walletId - Optional wallet identifier (for consistency, worklet should already have correct wallet loaded) - * @returns Promise with the method result - * @throws Error if validation fails - * - * @example - * ```typescript - * // Define types - * interface MyMethods { - * getBalance: { args: undefined; result: string }; - * transfer: { args: { to: string }; result: string }; - * } - * - * // Strict usage - single argument - * await AccountService.callAccountMethod('eth', 0, 'transfer', { to: '0x...' }) - * - * // Multiple arguments via array (spread as positional args) - * await AccountService.callAccountMethod('eth', 0, 'transfer', [ - * { to: '0x...', amount: '1000' }, // 1st arg: options - * { paymasterToken: '...' } // 2nd arg: config - * ]) - * ``` - */ - static async callAccountMethod< - TMethods extends MethodMap = LooseMethods, - K extends keyof TMethods = keyof TMethods - >( + static async callAccountMethod( + network: string, + accountIndex: number, + methodName: M, + ...args: DefaultAccountMethods[M]['params'] + ): Promise + + static async callAccountMethod( network: string, accountIndex: number, - methodName: K, - args?: TMethods[K]['args'] | unknown[] - ): Promise { - // Validate methodName parameter + methodName: string, + ...args: any[] + ): Promise { if (typeof methodName !== 'string' || methodName.trim().length === 0) { throw new Error('methodName must be a non-empty string') } - // Validate inputs validateNetworkName(network) validateAccountIndex(accountIndex) - // Require initialized worklet const hrpc = requireInitialized() - // Validate and sanitize args before stringification let argsString: string | undefined = undefined if (args !== undefined && args !== null) { - // Validate structure and stringify safely argsString = safeStringify(args) } @@ -99,38 +62,44 @@ export class AccountService { throw new Error(`Method ${methodName} returned no result`) } - // Parse the result and handle BigInt values - let parsed: TMethods[K]['result'] + let parsed + try { - parsed = JSON.parse(validatedResponse.result) as TMethods[K]['result'] - // Basic validation: ensure parsed is not null/undefined + parsed = JSON.parse(validatedResponse.result) + if (parsed === null || parsed === undefined) { throw new Error('Parsed result is null or undefined') } } catch (error) { - if (error instanceof Error && error.message.includes('Parsed result is null')) { + if ( + error instanceof Error && + error.message.includes('Parsed result is null') + ) { throw error } - throw new Error(`Failed to parse result from ${methodName}: ${error instanceof Error ? error.message : String(error)}`) + throw new Error( + `Failed to parse result from ${methodName}: ${error instanceof Error ? error.message : String(error)}`, + ) } - - // Runtime type validation based on method type + if (methodName === 'getBalance' || methodName === 'getTokenBalance') { - // Validate balance format if (typeof parsed !== 'string' || !/^\d+$/.test(parsed)) { throw new Error(`Invalid balance format: ${parsed}`) } } - - // Recursively convert BigInt values to strings to prevent serialization errors - return convertBigIntToString(parsed) as TMethods[K]['result'] + + return convertBigIntToString(parsed) } catch (error) { - handleServiceError(error, 'AccountService', `callAccountMethod:${String(methodName)}`, { - network, - accountIndex, - methodName, - }) + handleServiceError( + error, + 'AccountService', + `callAccountMethod:${String(methodName)}`, + { + network, + accountIndex, + methodName, + }, + ) } } } - diff --git a/src/store/walletStore.ts b/src/store/walletStore.ts index 68623c0..795ddd4 100644 --- a/src/store/walletStore.ts +++ b/src/store/walletStore.ts @@ -45,12 +45,10 @@ * - All operations are handled by focused services (AddressService, BalanceService), not the store itself */ -// External packages import { create } from 'zustand' import { persist, createJSONStorage, devtools } from 'zustand/middleware' import { produce } from 'immer' -// Local imports import type { WalletAddressesByWallet, WalletBalancesByWallet, diff --git a/src/types.ts b/src/types.ts index 0df78be..d09a7b7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -40,24 +40,6 @@ export interface WdkConfigs, TProtocol = Reco } } -/** - * Wallet - * - * Represents a wallet instance with metadata. - */ -export interface Wallet { - /** Account index (0-based) */ - accountIndex: number - /** Unique wallet identifier */ - identifier: string - /** Wallet display name */ - name: string - /** Timestamp when wallet was created */ - createdAt: number - /** Timestamp when wallet was last updated */ - updatedAt: number -} - /** * Wallet Addresses * diff --git a/src/types/accountMethods.ts b/src/types/accountMethods.ts index d645d9b..7c16ec7 100644 --- a/src/types/accountMethods.ts +++ b/src/types/accountMethods.ts @@ -1,35 +1,57 @@ /** * Account Methods Type Definitions - * - * Defines the structure for account methods used in the generic AccountService. - * App developers can define their own method maps to provide strict typing - * for the generic callAccountMethod function. + * + * This file is self-contained and defines the API contract for the AccountService. */ /** * Structure of a single method definition */ export interface MethodDef { - args: any + params: any[] result: any } /** * Map of method names to their definitions. - * Use this type as a constraint or base for your specific method maps. - * - * @example - * ```typescript - * interface MyMethods extends MethodMap { - * getBalance: { args: undefined; result: string }; - * transfer: { args: { to: string; amount: string }; result: string }; - * } - * ``` */ export type MethodMap = Record /** - * Default loose typing (fallback) - * Allows any string method name and any arguments + * A generic transaction result type used by multiple methods. */ -export type LooseMethods = Record +export type TxResult = { + hash: string + fee: string +} + +/** + * DefaultAccountMethods provides a "master contract" for the core methods + * that the WDK exposes over HRPC. + */ +export interface DefaultAccountMethods extends MethodMap { + getBalance: { + params: [] + result: string + } + getTokenBalance: { + params: [tokenAddress: string] + result: string + } + verify: { + params: [message: string, signature: string] + result: boolean + } + sendTransaction: { + params: [tx: { to: string; value: string }] + result: TxResult + } + transfer: { + params: [tx: { recipient: string; amount: string; token: string }] + result: TxResult + } + sign: { + params: [message: string] + result: string + } +} diff --git a/src/utils/jsonUtils.ts b/src/utils/jsonUtils.ts index 4aece14..bbcba5d 100644 --- a/src/utils/jsonUtils.ts +++ b/src/utils/jsonUtils.ts @@ -49,9 +49,19 @@ export function validateJSONStructure(value: unknown): boolean { } /** - * Safe JSON stringify with validation - * Validates structure before stringifying to prevent security issues - * + * Custom replacer function for JSON.stringify that converts BigInt to string. + */ +const replacer = (_key: string, value: unknown) => { + if (typeof value === 'bigint') { + return value.toString() + } + return value +} + +/** + * Safe JSON stringify with validation and BigInt support. + * Validates structure before stringifying and correctly handles BigInts. + * * @param value - Value to stringify * @param space - Optional spacing for pretty printing * @returns JSON string @@ -60,11 +70,13 @@ export function validateJSONStructure(value: unknown): boolean { export function safeStringify(value: unknown, space?: number): string { // Validate structure first if (!validateJSONStructure(value)) { - throw new Error('Value contains circular references or unsafe prototype properties') + throw new Error( + 'Value contains circular references or unsafe prototype properties', + ) } - + try { - return JSON.stringify(value, null, space) + return JSON.stringify(value, replacer, space) } catch (error) { if (error instanceof Error) { throw new Error(`Failed to stringify value: ${error.message}`)