trac-peer 0.1.98 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/check.js +13 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trac-peer",
|
|
3
3
|
"main": "src/index.js",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"assert": "npm:bare-node-assert",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"bare-readline": "1.0.7",
|
|
25
25
|
"bare-repl": "4.0.0",
|
|
26
26
|
"bare-stream": "2.6.5",
|
|
27
|
-
"bare-subprocess": "5.0.
|
|
27
|
+
"bare-subprocess": "5.0.4",
|
|
28
28
|
"bare-timers": "3.0.1",
|
|
29
29
|
"bare-tls": "2.0.4",
|
|
30
30
|
"bare-tty": "5.0.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"child_process": "npm:bare-node-child-process",
|
|
38
38
|
"compact-encoding": "2.16.1",
|
|
39
39
|
"console": "npm:bare-node-console",
|
|
40
|
-
"corestore": "7.4.
|
|
40
|
+
"corestore": "7.4.4",
|
|
41
41
|
"crypto": "npm:bare-node-crypto",
|
|
42
42
|
"debounceify": "1.1.0",
|
|
43
43
|
"events": "npm:bare-node-events",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"http": "npm:bare-node-http",
|
|
48
48
|
"https": "npm:bare-node-https",
|
|
49
49
|
"hyperbee": "^2.24.2",
|
|
50
|
-
"hypercore": "11.
|
|
50
|
+
"hypercore": "11.8.3",
|
|
51
51
|
"hypercore-crypto": "^3.4.0",
|
|
52
52
|
"hyperdht": "^6.20.5",
|
|
53
53
|
"hyperswarm": "^4.11.5",
|
package/src/check.js
CHANGED
|
@@ -15,10 +15,22 @@ class Check {
|
|
|
15
15
|
customFunctions : {
|
|
16
16
|
bitcoinAddress : (value, errors)=>{
|
|
17
17
|
let result = false
|
|
18
|
+
let result2 = false
|
|
19
|
+
let result3 = false
|
|
20
|
+
let result4 = false
|
|
18
21
|
try{
|
|
19
22
|
result = WAValidator.validate(value, 'Bitcoin', { networkType : 'both' });
|
|
23
|
+
if(false === result){
|
|
24
|
+
result2 = WAValidator.validate(value, 'Solana', { networkType : 'both' });
|
|
25
|
+
if(false === result2){
|
|
26
|
+
result3 = WAValidator.validate(value, 'DogeCoin', { networkType : 'both' });
|
|
27
|
+
if(false === result3){
|
|
28
|
+
result4 = WAValidator.validate(value, 'BinanceSmartChain', { networkType : 'both' });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
20
32
|
} catch (e) {}
|
|
21
|
-
return result;
|
|
33
|
+
return result || result2 || result3 || result4;
|
|
22
34
|
},
|
|
23
35
|
hexCheck : (value, errors) => {
|
|
24
36
|
let buf = null
|