From 2f6152a73f69b64a9cdd24e5e42e0212a47e6891 Mon Sep 17 00:00:00 2001 From: guru-web3 <105355858+guru-web3@users.noreply.github.com> Date: Mon, 3 Jul 2023 09:50:46 +0530 Subject: [PATCH] feat: torus packages version upgrade --- package-lock.json | 537 +++------------------- package.json | 14 +- src/controllers/TorusController.ts | 6 +- tests/controller/controllerModule.test.ts | 6 +- 4 files changed, 66 insertions(+), 497 deletions(-) diff --git a/package-lock.json b/package-lock.json index a3581718..f4692db0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,16 +22,16 @@ "@solana/spl-token": "0.2.0", "@solana/web3.js": "^1.63.1", "@toruslabs/base-controllers": "^3.0.3", - "@toruslabs/broadcast-channel": "^5.0.2", - "@toruslabs/eccrypto": "^1.1.8", - "@toruslabs/http-helpers": "^3.0.0", - "@toruslabs/loglevel-sentry": "^4.0.0", + "@toruslabs/broadcast-channel": "^7.0.0", + "@toruslabs/eccrypto": "^3.0.0", + "@toruslabs/http-helpers": "^4.0.0", + "@toruslabs/loglevel-sentry": "^5.0.0", "@toruslabs/metadata-helpers": "^4.0.0", - "@toruslabs/openlogin": "^4.5.4", + "@toruslabs/openlogin": "^4.7.0", "@toruslabs/openlogin-ed25519": "^2.0.0", - "@toruslabs/openlogin-jrpc": "^4.6.0", + "@toruslabs/openlogin-jrpc": "^4.7.0", "@toruslabs/openlogin-subkey": "^4.2.0", - "@toruslabs/openlogin-utils": "^4.5.1", + "@toruslabs/openlogin-utils": "^4.7.0", "@toruslabs/solana-controllers": "^3.0.3", "@toruslabs/tweetnacl-js": "^1.0.3", "@toruslabs/vue-components": "^2.0.1", @@ -3567,55 +3567,6 @@ "@babel/runtime": "7.x" } }, - "node_modules/@toruslabs/base-controllers/node_modules/@toruslabs/broadcast-channel": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/broadcast-channel/-/broadcast-channel-7.0.0.tgz", - "integrity": "sha512-lyt2Els735qUXczPk743aHbIXZn+TeK/7YqKpUrY+xTyvXs9JyE6RahW+EY4yU90KAJx8+N9ZXZlcJP617T4bg==", - "dependencies": { - "@babel/runtime": "^7.21.5", - "@toruslabs/eccrypto": "^3.0.0", - "@toruslabs/metadata-helpers": "^4.0.0", - "bowser": "^2.11.0", - "loglevel": "^1.8.1", - "oblivious-set": "1.1.1", - "socket.io-client": "^4.6.1", - "unload": "^2.4.1" - } - }, - "node_modules/@toruslabs/base-controllers/node_modules/@toruslabs/eccrypto": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/eccrypto/-/eccrypto-3.0.0.tgz", - "integrity": "sha512-+lFjV+0FZ3S4zH5T/Gnc795HoqpzLLDW28fSkibZRlx1Nx8uwbl3pyJSfya0C0bRHH1/+NTeBogUDijaRJ1NCw==", - "dependencies": { - "elliptic": "^6.5.4" - }, - "engines": { - "node": ">=16.18.1", - "npm": ">=8.x" - } - }, - "node_modules/@toruslabs/base-controllers/node_modules/@toruslabs/http-helpers": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/http-helpers/-/http-helpers-4.0.0.tgz", - "integrity": "sha512-ef/Svevk54JANOn3Kf6UPf8X/vZlYHrusNFt8VV/LLahhVNXCXEcO8goC1bHkecu/u20CUyo9HJa0pn8fHh1sg==", - "dependencies": { - "lodash.merge": "^4.6.2", - "loglevel": "^1.8.1" - }, - "engines": { - "node": ">=16.18.1", - "npm": ">=8.x" - }, - "peerDependencies": { - "@babel/runtime": "^7.x", - "@sentry/types": "^7.x" - }, - "peerDependenciesMeta": { - "@sentry/types": { - "optional": true - } - } - }, "node_modules/@toruslabs/base-controllers/node_modules/async-mutex": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.4.0.tgz", @@ -3639,117 +3590,31 @@ "@babel/runtime": "7.x" } }, - "node_modules/@toruslabs/base-session-manager/node_modules/@toruslabs/http-helpers": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/http-helpers/-/http-helpers-4.0.0.tgz", - "integrity": "sha512-ef/Svevk54JANOn3Kf6UPf8X/vZlYHrusNFt8VV/LLahhVNXCXEcO8goC1bHkecu/u20CUyo9HJa0pn8fHh1sg==", - "dependencies": { - "lodash.merge": "^4.6.2", - "loglevel": "^1.8.1" - }, - "engines": { - "node": ">=16.18.1", - "npm": ">=8.x" - }, - "peerDependencies": { - "@babel/runtime": "^7.x", - "@sentry/types": "^7.x" - }, - "peerDependenciesMeta": { - "@sentry/types": { - "optional": true - } - } - }, "node_modules/@toruslabs/broadcast-channel": { - "version": "5.0.2", - "license": "MIT", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@toruslabs/broadcast-channel/-/broadcast-channel-7.0.0.tgz", + "integrity": "sha512-lyt2Els735qUXczPk743aHbIXZn+TeK/7YqKpUrY+xTyvXs9JyE6RahW+EY4yU90KAJx8+N9ZXZlcJP617T4bg==", "dependencies": { - "@babel/runtime": "^7.17.9", - "@toruslabs/eccrypto": "^1.1.8", - "@toruslabs/metadata-helpers": "^3.0.0", + "@babel/runtime": "^7.21.5", + "@toruslabs/eccrypto": "^3.0.0", + "@toruslabs/metadata-helpers": "^4.0.0", "bowser": "^2.11.0", - "keccak": "^3.0.2", - "loglevel": "^1.8.0", + "loglevel": "^1.8.1", "oblivious-set": "1.1.1", - "socket.io-client": "^4.5.1", - "unload": "^2.3.1" - } - }, - "node_modules/@toruslabs/broadcast-channel/node_modules/@toruslabs/metadata-helpers": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@toruslabs/metadata-helpers/-/metadata-helpers-3.2.0.tgz", - "integrity": "sha512-2bCc6PNKd9y+aWfZQ1FXd47QmfyT4NmmqPGfsqk+sQS2o+MlxIyLuh9uh7deMgXo4b4qBDX+RQGbIKM1zVk56w==", - "dependencies": { - "@toruslabs/eccrypto": "^2.1.1", - "@toruslabs/http-helpers": "^3.4.0", - "elliptic": "^6.5.4", - "ethereum-cryptography": "^2.0.0", - "json-stable-stringify": "^1.0.2" - }, - "engines": { - "node": ">=14.17.0", - "npm": ">=6.x" - }, - "peerDependencies": { - "@babel/runtime": "7.x" - } - }, - "node_modules/@toruslabs/broadcast-channel/node_modules/@toruslabs/metadata-helpers/node_modules/@toruslabs/eccrypto": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@toruslabs/eccrypto/-/eccrypto-2.2.1.tgz", - "integrity": "sha512-7sviL0wLYsfA5ogEAOIdb0tu/QAOFXfHc9B8ONYtF04x4Mg3Nr89LL35FhjaEm055q8Ru7cUQhEFSiqJqm9GCw==", - "dependencies": { - "elliptic": "^6.5.4" - } - }, - "node_modules/@toruslabs/broadcast-channel/node_modules/ethereum-cryptography": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz", - "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==", - "dependencies": { - "@noble/curves": "1.0.0", - "@noble/hashes": "1.3.0", - "@scure/bip32": "1.3.0", - "@scure/bip39": "1.2.0" + "socket.io-client": "^4.6.1", + "unload": "^2.4.1" } }, "node_modules/@toruslabs/eccrypto": { - "version": "1.1.8", - "hasInstallScript": true, - "license": "CC0-1.0", - "dependencies": { - "acorn": "^8.4.1", - "elliptic": "^6.5.4", - "es6-promise": "^4.2.8", - "nan": "^2.14.2" - }, - "optionalDependencies": { - "secp256k1": "^3.8.0" - } - }, - "node_modules/@toruslabs/eccrypto/node_modules/bn.js": { - "version": "4.12.0", - "license": "MIT", - "optional": true - }, - "node_modules/@toruslabs/eccrypto/node_modules/secp256k1": { - "version": "3.8.0", - "hasInstallScript": true, - "license": "MIT", - "optional": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@toruslabs/eccrypto/-/eccrypto-3.0.0.tgz", + "integrity": "sha512-+lFjV+0FZ3S4zH5T/Gnc795HoqpzLLDW28fSkibZRlx1Nx8uwbl3pyJSfya0C0bRHH1/+NTeBogUDijaRJ1NCw==", "dependencies": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", - "elliptic": "^6.5.2", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" + "elliptic": "^6.5.4" }, "engines": { - "node": ">=4.0.0" + "node": ">=16.18.1", + "npm": ">=8.x" } }, "node_modules/@toruslabs/eslint-config-vue": { @@ -3793,16 +3658,16 @@ } }, "node_modules/@toruslabs/http-helpers": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@toruslabs/http-helpers/-/http-helpers-3.4.0.tgz", - "integrity": "sha512-CoeJSL32mpp0gmYjxv48odu6pfjHk/rbJHDwCtYPcMHAl+qUQ/DTpVOOn9U0fGkD+fYZrQmZbRkXFgLhiT0ajQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@toruslabs/http-helpers/-/http-helpers-4.0.0.tgz", + "integrity": "sha512-ef/Svevk54JANOn3Kf6UPf8X/vZlYHrusNFt8VV/LLahhVNXCXEcO8goC1bHkecu/u20CUyo9HJa0pn8fHh1sg==", "dependencies": { "lodash.merge": "^4.6.2", "loglevel": "^1.8.1" }, "engines": { - "node": ">=14.17.0", - "npm": ">=6.x" + "node": ">=16.18.1", + "npm": ">=8.x" }, "peerDependencies": { "@babel/runtime": "^7.x", @@ -3815,14 +3680,15 @@ } }, "node_modules/@toruslabs/loglevel-sentry": { - "version": "4.0.0", - "license": "MIT", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@toruslabs/loglevel-sentry/-/loglevel-sentry-5.0.0.tgz", + "integrity": "sha512-BpI9E9YbYdvLr7DkGULj/6Oh1RzcAc1DDaUVJmuWmodV5eKu2Mj6ZlPRSKk6OLMn0bcF67/i8E2GftiwFypKcA==", "dependencies": { - "loglevel": "^1.8.0" + "loglevel": "^1.8.1" }, "engines": { - "node": ">=14.17.0", - "npm": ">=6.x" + "node": ">=16.18.1", + "npm": ">=8.x" }, "peerDependencies": { "@babel/runtime": "7.x", @@ -3849,40 +3715,6 @@ "@babel/runtime": "7.x" } }, - "node_modules/@toruslabs/metadata-helpers/node_modules/@toruslabs/eccrypto": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/eccrypto/-/eccrypto-3.0.0.tgz", - "integrity": "sha512-+lFjV+0FZ3S4zH5T/Gnc795HoqpzLLDW28fSkibZRlx1Nx8uwbl3pyJSfya0C0bRHH1/+NTeBogUDijaRJ1NCw==", - "dependencies": { - "elliptic": "^6.5.4" - }, - "engines": { - "node": ">=16.18.1", - "npm": ">=8.x" - } - }, - "node_modules/@toruslabs/metadata-helpers/node_modules/@toruslabs/http-helpers": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/http-helpers/-/http-helpers-4.0.0.tgz", - "integrity": "sha512-ef/Svevk54JANOn3Kf6UPf8X/vZlYHrusNFt8VV/LLahhVNXCXEcO8goC1bHkecu/u20CUyo9HJa0pn8fHh1sg==", - "dependencies": { - "lodash.merge": "^4.6.2", - "loglevel": "^1.8.1" - }, - "engines": { - "node": ">=16.18.1", - "npm": ">=8.x" - }, - "peerDependencies": { - "@babel/runtime": "^7.x", - "@sentry/types": "^7.x" - }, - "peerDependenciesMeta": { - "@sentry/types": { - "optional": true - } - } - }, "node_modules/@toruslabs/metadata-helpers/node_modules/ethereum-cryptography": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz", @@ -3979,18 +3811,6 @@ "@babel/runtime": "7.x" } }, - "node_modules/@toruslabs/openlogin-session-manager/node_modules/@toruslabs/eccrypto": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/eccrypto/-/eccrypto-3.0.0.tgz", - "integrity": "sha512-+lFjV+0FZ3S4zH5T/Gnc795HoqpzLLDW28fSkibZRlx1Nx8uwbl3pyJSfya0C0bRHH1/+NTeBogUDijaRJ1NCw==", - "dependencies": { - "elliptic": "^6.5.4" - }, - "engines": { - "node": ">=16.18.1", - "npm": ">=8.x" - } - }, "node_modules/@toruslabs/openlogin-subkey": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@toruslabs/openlogin-subkey/-/openlogin-subkey-4.2.0.tgz", @@ -4024,33 +3844,6 @@ "@babel/runtime": "7.x" } }, - "node_modules/@toruslabs/openlogin/node_modules/@toruslabs/broadcast-channel": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/broadcast-channel/-/broadcast-channel-7.0.0.tgz", - "integrity": "sha512-lyt2Els735qUXczPk743aHbIXZn+TeK/7YqKpUrY+xTyvXs9JyE6RahW+EY4yU90KAJx8+N9ZXZlcJP617T4bg==", - "dependencies": { - "@babel/runtime": "^7.21.5", - "@toruslabs/eccrypto": "^3.0.0", - "@toruslabs/metadata-helpers": "^4.0.0", - "bowser": "^2.11.0", - "loglevel": "^1.8.1", - "oblivious-set": "1.1.1", - "socket.io-client": "^4.6.1", - "unload": "^2.4.1" - } - }, - "node_modules/@toruslabs/openlogin/node_modules/@toruslabs/eccrypto": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/eccrypto/-/eccrypto-3.0.0.tgz", - "integrity": "sha512-+lFjV+0FZ3S4zH5T/Gnc795HoqpzLLDW28fSkibZRlx1Nx8uwbl3pyJSfya0C0bRHH1/+NTeBogUDijaRJ1NCw==", - "dependencies": { - "elliptic": "^6.5.4" - }, - "engines": { - "node": ">=16.18.1", - "npm": ">=8.x" - } - }, "node_modules/@toruslabs/solana-controllers": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@toruslabs/solana-controllers/-/solana-controllers-3.1.0.tgz", @@ -4110,28 +3903,6 @@ "@solana/web3.js": "^1.47.4" } }, - "node_modules/@toruslabs/solana-controllers/node_modules/@toruslabs/http-helpers": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/http-helpers/-/http-helpers-4.0.0.tgz", - "integrity": "sha512-ef/Svevk54JANOn3Kf6UPf8X/vZlYHrusNFt8VV/LLahhVNXCXEcO8goC1bHkecu/u20CUyo9HJa0pn8fHh1sg==", - "dependencies": { - "lodash.merge": "^4.6.2", - "loglevel": "^1.8.1" - }, - "engines": { - "node": ">=16.18.1", - "npm": ">=8.x" - }, - "peerDependencies": { - "@babel/runtime": "^7.x", - "@sentry/types": "^7.x" - }, - "peerDependenciesMeta": { - "@sentry/types": { - "optional": true - } - } - }, "node_modules/@toruslabs/solana-controllers/node_modules/@toruslabs/openlogin-ed25519": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@toruslabs/openlogin-ed25519/-/openlogin-ed25519-4.2.0.tgz", @@ -7358,14 +7129,6 @@ "file-uri-to-path": "1.0.0" } }, - "node_modules/bip66": { - "version": "1.1.5", - "license": "MIT", - "optional": true, - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, "node_modules/bl": { "version": "4.1.0", "dev": true, @@ -9565,19 +9328,6 @@ "dev": true, "license": "BSD-2-Clause" }, - "node_modules/drbg.js": { - "version": "1.0.1", - "license": "MIT", - "optional": true, - "dependencies": { - "browserify-aes": "^1.0.6", - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/duplexer": { "version": "0.1.2", "license": "MIT" @@ -14787,10 +14537,6 @@ "thenify-all": "^1.0.0" } }, - "node_modules/nan": { - "version": "2.15.0", - "license": "MIT" - }, "node_modules/nanoid": { "version": "3.3.3", "dev": true, @@ -22507,38 +22253,6 @@ "loglevel": "^1.8.1" }, "dependencies": { - "@toruslabs/broadcast-channel": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/broadcast-channel/-/broadcast-channel-7.0.0.tgz", - "integrity": "sha512-lyt2Els735qUXczPk743aHbIXZn+TeK/7YqKpUrY+xTyvXs9JyE6RahW+EY4yU90KAJx8+N9ZXZlcJP617T4bg==", - "requires": { - "@babel/runtime": "^7.21.5", - "@toruslabs/eccrypto": "^3.0.0", - "@toruslabs/metadata-helpers": "^4.0.0", - "bowser": "^2.11.0", - "loglevel": "^1.8.1", - "oblivious-set": "1.1.1", - "socket.io-client": "^4.6.1", - "unload": "^2.4.1" - } - }, - "@toruslabs/eccrypto": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/eccrypto/-/eccrypto-3.0.0.tgz", - "integrity": "sha512-+lFjV+0FZ3S4zH5T/Gnc795HoqpzLLDW28fSkibZRlx1Nx8uwbl3pyJSfya0C0bRHH1/+NTeBogUDijaRJ1NCw==", - "requires": { - "elliptic": "^6.5.4" - } - }, - "@toruslabs/http-helpers": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/http-helpers/-/http-helpers-4.0.0.tgz", - "integrity": "sha512-ef/Svevk54JANOn3Kf6UPf8X/vZlYHrusNFt8VV/LLahhVNXCXEcO8goC1bHkecu/u20CUyo9HJa0pn8fHh1sg==", - "requires": { - "lodash.merge": "^4.6.2", - "loglevel": "^1.8.1" - } - }, "async-mutex": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.4.0.tgz", @@ -22555,96 +22269,29 @@ "integrity": "sha512-CcP8/4U7fq4jrHit8iTbCCWWXSP8rK3x9Pyk2qVXyMsrdzsWV6w5oTTbmggG9Cg8dBgYHrW5M8ITJr9oiiSqmg==", "requires": { "@toruslabs/http-helpers": "^4.0.0" - }, - "dependencies": { - "@toruslabs/http-helpers": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/http-helpers/-/http-helpers-4.0.0.tgz", - "integrity": "sha512-ef/Svevk54JANOn3Kf6UPf8X/vZlYHrusNFt8VV/LLahhVNXCXEcO8goC1bHkecu/u20CUyo9HJa0pn8fHh1sg==", - "requires": { - "lodash.merge": "^4.6.2", - "loglevel": "^1.8.1" - } - } } }, "@toruslabs/broadcast-channel": { - "version": "5.0.2", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@toruslabs/broadcast-channel/-/broadcast-channel-7.0.0.tgz", + "integrity": "sha512-lyt2Els735qUXczPk743aHbIXZn+TeK/7YqKpUrY+xTyvXs9JyE6RahW+EY4yU90KAJx8+N9ZXZlcJP617T4bg==", "requires": { - "@babel/runtime": "^7.17.9", - "@toruslabs/eccrypto": "^1.1.8", - "@toruslabs/metadata-helpers": "^3.0.0", + "@babel/runtime": "^7.21.5", + "@toruslabs/eccrypto": "^3.0.0", + "@toruslabs/metadata-helpers": "^4.0.0", "bowser": "^2.11.0", - "keccak": "^3.0.2", - "loglevel": "^1.8.0", + "loglevel": "^1.8.1", "oblivious-set": "1.1.1", - "socket.io-client": "^4.5.1", - "unload": "^2.3.1" - }, - "dependencies": { - "@toruslabs/metadata-helpers": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@toruslabs/metadata-helpers/-/metadata-helpers-3.2.0.tgz", - "integrity": "sha512-2bCc6PNKd9y+aWfZQ1FXd47QmfyT4NmmqPGfsqk+sQS2o+MlxIyLuh9uh7deMgXo4b4qBDX+RQGbIKM1zVk56w==", - "requires": { - "@toruslabs/eccrypto": "^2.1.1", - "@toruslabs/http-helpers": "^3.4.0", - "elliptic": "^6.5.4", - "ethereum-cryptography": "^2.0.0", - "json-stable-stringify": "^1.0.2" - }, - "dependencies": { - "@toruslabs/eccrypto": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@toruslabs/eccrypto/-/eccrypto-2.2.1.tgz", - "integrity": "sha512-7sviL0wLYsfA5ogEAOIdb0tu/QAOFXfHc9B8ONYtF04x4Mg3Nr89LL35FhjaEm055q8Ru7cUQhEFSiqJqm9GCw==", - "requires": { - "elliptic": "^6.5.4" - } - } - } - }, - "ethereum-cryptography": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz", - "integrity": "sha512-g25m4EtfQGjstWgVE1aIz7XYYjf3kH5kG17ULWVB5dH6uLahsoltOhACzSxyDV+fhn4gbR4xRrOXGe6r2uh4Bg==", - "requires": { - "@noble/curves": "1.0.0", - "@noble/hashes": "1.3.0", - "@scure/bip32": "1.3.0", - "@scure/bip39": "1.2.0" - } - } + "socket.io-client": "^4.6.1", + "unload": "^2.4.1" } }, "@toruslabs/eccrypto": { - "version": "1.1.8", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@toruslabs/eccrypto/-/eccrypto-3.0.0.tgz", + "integrity": "sha512-+lFjV+0FZ3S4zH5T/Gnc795HoqpzLLDW28fSkibZRlx1Nx8uwbl3pyJSfya0C0bRHH1/+NTeBogUDijaRJ1NCw==", "requires": { - "acorn": "^8.4.1", - "elliptic": "^6.5.4", - "es6-promise": "^4.2.8", - "nan": "^2.14.2", - "secp256k1": "^3.8.0" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "optional": true - }, - "secp256k1": { - "version": "3.8.0", - "optional": true, - "requires": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", - "elliptic": "^6.5.2", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" - } - } + "elliptic": "^6.5.4" } }, "@toruslabs/eslint-config-vue": { @@ -22665,18 +22312,20 @@ "integrity": "sha512-oOwRG1ZjOmCxmg8kz1HnLML3RB4fNbSaxKuTjFC3Mtg11mXIDhsAoYzBdZW6WOcoKpr4JkV6i9Qv+YPuNIo+Ag==" }, "@toruslabs/http-helpers": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@toruslabs/http-helpers/-/http-helpers-3.4.0.tgz", - "integrity": "sha512-CoeJSL32mpp0gmYjxv48odu6pfjHk/rbJHDwCtYPcMHAl+qUQ/DTpVOOn9U0fGkD+fYZrQmZbRkXFgLhiT0ajQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@toruslabs/http-helpers/-/http-helpers-4.0.0.tgz", + "integrity": "sha512-ef/Svevk54JANOn3Kf6UPf8X/vZlYHrusNFt8VV/LLahhVNXCXEcO8goC1bHkecu/u20CUyo9HJa0pn8fHh1sg==", "requires": { "lodash.merge": "^4.6.2", "loglevel": "^1.8.1" } }, "@toruslabs/loglevel-sentry": { - "version": "4.0.0", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@toruslabs/loglevel-sentry/-/loglevel-sentry-5.0.0.tgz", + "integrity": "sha512-BpI9E9YbYdvLr7DkGULj/6Oh1RzcAc1DDaUVJmuWmodV5eKu2Mj6ZlPRSKk6OLMn0bcF67/i8E2GftiwFypKcA==", "requires": { - "loglevel": "^1.8.0" + "loglevel": "^1.8.1" } }, "@toruslabs/metadata-helpers": { @@ -22691,23 +22340,6 @@ "json-stable-stringify": "^1.0.2" }, "dependencies": { - "@toruslabs/eccrypto": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/eccrypto/-/eccrypto-3.0.0.tgz", - "integrity": "sha512-+lFjV+0FZ3S4zH5T/Gnc795HoqpzLLDW28fSkibZRlx1Nx8uwbl3pyJSfya0C0bRHH1/+NTeBogUDijaRJ1NCw==", - "requires": { - "elliptic": "^6.5.4" - } - }, - "@toruslabs/http-helpers": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/http-helpers/-/http-helpers-4.0.0.tgz", - "integrity": "sha512-ef/Svevk54JANOn3Kf6UPf8X/vZlYHrusNFt8VV/LLahhVNXCXEcO8goC1bHkecu/u20CUyo9HJa0pn8fHh1sg==", - "requires": { - "lodash.merge": "^4.6.2", - "loglevel": "^1.8.1" - } - }, "ethereum-cryptography": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.0.0.tgz", @@ -22734,31 +22366,6 @@ "events": "^3.3.0", "loglevel": "^1.8.1", "ts-custom-error": "^3.3.1" - }, - "dependencies": { - "@toruslabs/broadcast-channel": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/broadcast-channel/-/broadcast-channel-7.0.0.tgz", - "integrity": "sha512-lyt2Els735qUXczPk743aHbIXZn+TeK/7YqKpUrY+xTyvXs9JyE6RahW+EY4yU90KAJx8+N9ZXZlcJP617T4bg==", - "requires": { - "@babel/runtime": "^7.21.5", - "@toruslabs/eccrypto": "^3.0.0", - "@toruslabs/metadata-helpers": "^4.0.0", - "bowser": "^2.11.0", - "loglevel": "^1.8.1", - "oblivious-set": "1.1.1", - "socket.io-client": "^4.6.1", - "unload": "^2.4.1" - } - }, - "@toruslabs/eccrypto": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/eccrypto/-/eccrypto-3.0.0.tgz", - "integrity": "sha512-+lFjV+0FZ3S4zH5T/Gnc795HoqpzLLDW28fSkibZRlx1Nx8uwbl3pyJSfya0C0bRHH1/+NTeBogUDijaRJ1NCw==", - "requires": { - "elliptic": "^6.5.4" - } - } } }, "@toruslabs/openlogin-ed25519": { @@ -22803,16 +22410,6 @@ "@toruslabs/base-session-manager": "^1.1.0", "@toruslabs/eccrypto": "^3.0.0", "@toruslabs/metadata-helpers": "4.0.0" - }, - "dependencies": { - "@toruslabs/eccrypto": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/eccrypto/-/eccrypto-3.0.0.tgz", - "integrity": "sha512-+lFjV+0FZ3S4zH5T/Gnc795HoqpzLLDW28fSkibZRlx1Nx8uwbl3pyJSfya0C0bRHH1/+NTeBogUDijaRJ1NCw==", - "requires": { - "elliptic": "^6.5.4" - } - } } }, "@toruslabs/openlogin-subkey": { @@ -22879,15 +22476,6 @@ "buffer": "^6.0.3" } }, - "@toruslabs/http-helpers": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@toruslabs/http-helpers/-/http-helpers-4.0.0.tgz", - "integrity": "sha512-ef/Svevk54JANOn3Kf6UPf8X/vZlYHrusNFt8VV/LLahhVNXCXEcO8goC1bHkecu/u20CUyo9HJa0pn8fHh1sg==", - "requires": { - "lodash.merge": "^4.6.2", - "loglevel": "^1.8.1" - } - }, "@toruslabs/openlogin-ed25519": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@toruslabs/openlogin-ed25519/-/openlogin-ed25519-4.2.0.tgz", @@ -24977,13 +24565,6 @@ "file-uri-to-path": "1.0.0" } }, - "bip66": { - "version": "1.1.5", - "optional": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, "bl": { "version": "4.1.0", "dev": true, @@ -26437,15 +26018,6 @@ "version": "5.1.0", "dev": true }, - "drbg.js": { - "version": "1.0.1", - "optional": true, - "requires": { - "browserify-aes": "^1.0.6", - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4" - } - }, "duplexer": { "version": "0.1.2" }, @@ -29703,9 +29275,6 @@ "thenify-all": "^1.0.0" } }, - "nan": { - "version": "2.15.0" - }, "nanoid": { "version": "3.3.3", "dev": true diff --git a/package.json b/package.json index 7ec45c7d..8f515846 100644 --- a/package.json +++ b/package.json @@ -33,16 +33,16 @@ "@solana/spl-token": "0.2.0", "@solana/web3.js": "^1.63.1", "@toruslabs/base-controllers": "^3.0.3", - "@toruslabs/broadcast-channel": "^5.0.2", - "@toruslabs/eccrypto": "^1.1.8", - "@toruslabs/http-helpers": "^3.0.0", - "@toruslabs/loglevel-sentry": "^4.0.0", + "@toruslabs/broadcast-channel": "^7.0.0", + "@toruslabs/eccrypto": "^3.0.0", + "@toruslabs/http-helpers": "^4.0.0", + "@toruslabs/loglevel-sentry": "^5.0.0", "@toruslabs/metadata-helpers": "^4.0.0", - "@toruslabs/openlogin": "^4.5.4", + "@toruslabs/openlogin": "^4.7.0", "@toruslabs/openlogin-ed25519": "^2.0.0", - "@toruslabs/openlogin-jrpc": "^4.6.0", + "@toruslabs/openlogin-jrpc": "^4.7.0", + "@toruslabs/openlogin-utils": "^4.7.0", "@toruslabs/openlogin-subkey": "^4.2.0", - "@toruslabs/openlogin-utils": "^4.5.1", "@toruslabs/solana-controllers": "^3.0.3", "@toruslabs/tweetnacl-js": "^1.0.3", "@toruslabs/vue-components": "^2.0.1", diff --git a/src/controllers/TorusController.ts b/src/controllers/TorusController.ts index 69cf0734..0f744cfc 100644 --- a/src/controllers/TorusController.ts +++ b/src/controllers/TorusController.ts @@ -37,7 +37,7 @@ import { TX_EVENTS, UserInfo, } from "@toruslabs/base-controllers"; -import eccrypto from "@toruslabs/eccrypto"; +import { generatePrivate, getPublic } from "@toruslabs/eccrypto"; import { createEngineStream, JRPCEngine, @@ -1346,8 +1346,8 @@ export default class TorusController extends BaseController { it("saveToOpenloginBackend", async () => { const setMetaDataSpy = sandbox.spy(TorusStorageLayer.prototype, "setMetadata"); const { publicKey, secretKey } = sKeyPair[0]; - const ecc_privateKey = eccrypto.generatePrivate(); - const ecc_publicKey = eccrypto.getPublic(ecc_privateKey); + const ecc_privateKey = generatePrivate(); + const ecc_publicKey = getPublic(ecc_privateKey); const keyState: KeyState = { priv_key: ecc_privateKey.toString("hex"),