diff --git a/package-lock.json b/package-lock.json index 5c8d88f6..18de4bfb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,8 @@ "dependencies": { "json-colorizer": "^3.0.1", "string-template": "^1.0.0", + "tweetnacl": "^1.0.3", + "tweetnacl-util": "^0.15.1", "uuid": "^9.0.1" }, "devDependencies": { @@ -4687,6 +4689,11 @@ "tweetnacl": "^0.14.3" } }, + "node_modules/bcrypt-pbkdf/node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + }, "node_modules/better-sqlite3": { "version": "9.5.0", "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-9.5.0.tgz", @@ -11290,9 +11297,14 @@ } }, "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" + }, + "node_modules/tweetnacl-util": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==" }, "node_modules/type-check": { "version": "0.4.0", diff --git a/package.json b/package.json index 16474695..74c74cd7 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,8 @@ "dependencies": { "json-colorizer": "^3.0.1", "string-template": "^1.0.0", + "tweetnacl": "^1.0.3", + "tweetnacl-util": "^0.15.1", "uuid": "^9.0.1" } } diff --git a/packages/backend/src/services/PrivateSocketService.js b/packages/backend/src/services/PrivateSocketService.js new file mode 100644 index 00000000..c1859bf8 --- /dev/null +++ b/packages/backend/src/services/PrivateSocketService.js @@ -0,0 +1,12 @@ +const BaseService = require("./BaseService"); + +class PrivateSocketService extends BaseService { + static MODULES = { + nacl: require('tweetnacl'), + naclutil: require('tweetnacl-util'), + } +} + +module.exports = { + PrivateSocketService, +};