@toruslabs/torus.js
Advanced tools
Comparing version 2.1.5 to 2.1.6
{ | ||
"name": "@toruslabs/torus.js", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"description": "Handle communication with torus nodes", | ||
@@ -54,2 +54,3 @@ "main": "dist/torusUtils.cjs.js", | ||
"lint-staged": "^10.2.9", | ||
"node-fetch": "^2.6.0", | ||
"parallel-webpack": "^2.6.0", | ||
@@ -56,0 +57,0 @@ "prettier": "^2.0.5", |
@@ -31,3 +31,3 @@ # Torus.js | ||
This module is distributed in 3 formats | ||
This module is distributed in 4 formats | ||
@@ -37,5 +37,6 @@ - `commonjs` build `dist/torusUtils.cjs.js` in es5 format | ||
- `umd` build `dist/torusUtils.polyfill.umd.min.js` in es5 format with polyfilling corejs minified | ||
- `nodejs` build `dist/torusUtils-node.js` in es5 format | ||
By default, the appropriate format is used for your specified usecase | ||
You can use a different format (if you know what you're doing) by referencing the correct file | ||
You can use a different format (if you know what you're doing eg. node) by referencing the correct file | ||
@@ -108,2 +109,19 @@ The cjs build is not polyfilled with core-js. | ||
```js | ||
// For Node.js | ||
const FetchNodeDetails = require("@toruslabs/fetch-node-details/dist/fetchNodeDetails-node.js"); | ||
const TorusUtils = require('@toruslabs/torus.js/dist/torusUtils-node.js') | ||
const fetchNodeDetails = new FetchNodeDetails() | ||
const torus = new TorusUtils() | ||
const verifier = 'google' // any verifier | ||
const verifierId = 'hello@tor.us' // any verifier id | ||
fetchNodeDetails | ||
.getNodeDetails() | ||
.then(({ torusNodeEndpoints, torusNodePub }) => torus.getPublicAddress(torusNodeEndpoints, torusNodePub, { verifier, verifierId })) | ||
.then((publicAddress) => console.log(publicAddress)) | ||
``` | ||
## Requirements | ||
@@ -110,0 +128,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
2230297
8
26580
128
29
14
21