@ellipticltd/aml-utils 0.4.0 → 0.6.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/.idea/workspace.xml +121 -9
- package/.nyc_output/289fd8a8-c7ff-4d56-9d7d-367d28897275.json +1 -0
- package/.nyc_output/38d47d73-eff7-44eb-98d0-8bda76beab07.json +1 -0
- package/.nyc_output/4df0fe8b-2046-42cf-b6cb-abf309301153.json +1 -0
- package/.nyc_output/af26e308-b97b-4698-ab08-9f89ecba18c4.json +1 -0
- package/.nyc_output/processinfo/289fd8a8-c7ff-4d56-9d7d-367d28897275.json +1 -0
- package/.nyc_output/processinfo/38d47d73-eff7-44eb-98d0-8bda76beab07.json +1 -0
- package/.nyc_output/processinfo/4df0fe8b-2046-42cf-b6cb-abf309301153.json +1 -0
- package/.nyc_output/processinfo/af26e308-b97b-4698-ab08-9f89ecba18c4.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +79 -0
- package/coverage/errors.js.html +228 -0
- package/coverage/formatting.js.html +123 -0
- package/coverage/index.html +136 -0
- package/coverage/ormHelpers.js.html +123 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +170 -0
- package/coverage/validations.js.html +843 -0
- package/lib/validations.js +9 -0
- package/package.json +3 -2
package/lib/validations.js
CHANGED
|
@@ -9,6 +9,7 @@ const {
|
|
|
9
9
|
Transaction,
|
|
10
10
|
} = require('bitcore-lib');
|
|
11
11
|
const addressValidator = require('wallet-address-validator');
|
|
12
|
+
const zilUtils = require('@zilliqa-js/util');
|
|
12
13
|
const web3 = require('web3-utils');
|
|
13
14
|
const E = require('./errors');
|
|
14
15
|
|
|
@@ -238,6 +239,14 @@ const validations = {
|
|
|
238
239
|
return str.length === 64;
|
|
239
240
|
},
|
|
240
241
|
},
|
|
242
|
+
zilliqa: {
|
|
243
|
+
isAddress(str) {
|
|
244
|
+
return zilUtils.validation.isBech32(str);
|
|
245
|
+
},
|
|
246
|
+
isTxHash(str) {
|
|
247
|
+
return str.length === 66 && web3.isHexStrict(str);
|
|
248
|
+
},
|
|
249
|
+
},
|
|
241
250
|
};
|
|
242
251
|
|
|
243
252
|
Object.keys(V).forEach((k) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ellipticltd/aml-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Utilities, helpers, validations, type-checking, etc",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "10.1.0",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"author": "Adam Joyce <adam@ellipitc.co>",
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
+
"@zilliqa-js/util": "^0.8.8",
|
|
26
27
|
"bitcore-lib": "^8.10.1",
|
|
27
28
|
"create-error": "0.3.1",
|
|
28
29
|
"lodash": "^4.17.15",
|
|
@@ -46,4 +47,4 @@
|
|
|
46
47
|
"mocha-lcov-reporter": "^1.3.0",
|
|
47
48
|
"nyc": "^14.1.1"
|
|
48
49
|
}
|
|
49
|
-
}
|
|
50
|
+
}
|