@ellipticltd/aml-utils 0.15.5 → 0.15.7

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.
Files changed (42) hide show
  1. package/.circleci/config.yml +6 -1
  2. package/.nyc_output/c9b6c4ce-fddf-403b-aa2e-aac05145213c.json +1 -0
  3. package/.nyc_output/d9967655-96b8-471a-9686-a4585437f85a.json +1 -0
  4. package/.nyc_output/processinfo/6b68ea83-db7a-45cb-b572-16338a5cea4b.json +1 -0
  5. package/.nyc_output/processinfo/a74c6648-3619-4b08-bc8c-ac8cb4959f43.json +1 -0
  6. package/.nyc_output/processinfo/{f8c694f5-2b17-4e37-9079-32079e715296.json → c9b6c4ce-fddf-403b-aa2e-aac05145213c.json} +1 -1
  7. package/.nyc_output/processinfo/{43e358d0-76a0-402c-b32e-26a347513bb4.json → d9967655-96b8-471a-9686-a4585437f85a.json} +1 -1
  8. package/.nyc_output/processinfo/index.json +1 -1
  9. package/.snyk +12 -0
  10. package/coverage/errors/errors.js.html +1 -1
  11. package/coverage/errors/errors.spec.js.html +1 -1
  12. package/coverage/errors/index.html +1 -1
  13. package/coverage/file-parser/__tests/file-parser.spec.js.html +1 -1
  14. package/coverage/file-parser/__tests/index.html +1 -1
  15. package/coverage/file-parser/__tests/parse-row.spec.js.html +1 -1
  16. package/coverage/file-parser/__tests/sanitize-rows.spec.js.html +1 -1
  17. package/coverage/formatting/formatting.js.html +1 -1
  18. package/coverage/formatting/formatting.spec.js.html +1 -1
  19. package/coverage/formatting/index.html +1 -1
  20. package/coverage/index.html +18 -18
  21. package/coverage/middleware/index.html +1 -1
  22. package/coverage/middleware/middleware.js.html +1 -1
  23. package/coverage/orm-helpers/index.html +1 -1
  24. package/coverage/orm-helpers/ormHelpers.js.html +1 -1
  25. package/coverage/orm-helpers/ormHelpers.spec.js.html +1 -1
  26. package/coverage/types/index.html +1 -1
  27. package/coverage/types/types.js.html +1 -1
  28. package/coverage/validations/index.html +24 -24
  29. package/coverage/validations/validations.js.html +136 -16
  30. package/coverage/validations/validations.spec.js.html +271 -7
  31. package/dist/validations/validations.d.ts +6 -0
  32. package/dist/validations/validations.js +8 -0
  33. package/dist/validations/validations.spec.js +12 -0
  34. package/lib/validations/validations.js +8 -0
  35. package/lib/validations/validations.spec.js +14 -0
  36. package/package.json +11 -7
  37. package/.nyc_output/43e358d0-76a0-402c-b32e-26a347513bb4.json +0 -1
  38. package/.nyc_output/f8c694f5-2b17-4e37-9079-32079e715296.json +0 -1
  39. package/.nyc_output/processinfo/14c71e42-4ce7-487c-be9f-95228038c7ec.json +0 -1
  40. package/.nyc_output/processinfo/470a2eff-bd46-45ef-bfd6-70c01fe4c9b3.json +0 -1
  41. /package/.nyc_output/{14c71e42-4ce7-487c-be9f-95228038c7ec.json → 6b68ea83-db7a-45cb-b572-16338a5cea4b.json} +0 -0
  42. /package/.nyc_output/{470a2eff-bd46-45ef-bfd6-70c01fe4c9b3.json → a74c6648-3619-4b08-bc8c-ac8cb4959f43.json} +0 -0
@@ -560,4 +560,18 @@ describe('Validations', () => {
560
560
  it('should correctly validate an invalid Tron hash', () => validations.tron.isTxHash('2f63fad2b3f8ccce75490545c8a0dacbb0730ebd7d551a89b015d8ca4ab458f21').should.be.false);
561
561
  });
562
562
  });
563
+
564
+ describe('Fantom', () => {
565
+ describe('isAddress', () => {
566
+ describe('isAddress', () => {
567
+ it('should return true if the address evaluates as a web3 address', () => validations.fantom.isAddress('0xa6Bc4b3fe7F2756124d30D896Fe4457711e9d214').should.be.true);
568
+ it('should return false if the address does not evaluate to a web3 address', () => validations.fantom.isAddress('Bc4b3fe7F2756124d30D896Fe4457711e9d214').should.be.false);
569
+ });
570
+ describe('isTxHash', () => {
571
+ it('should correctly validate a valid Fantom hash', () => validations.fantom.isTxHash('0xec6491abd46a1a9a71b78f4b84d96fd49525aa4f66c8d8c3588c489f2f88eb0e').should.be.true);
572
+
573
+ it('should correctly validate an incorrect Fantom hash', () => validations.fantom.isTxHash('0xec6491abd46a1a9a71b7896fd49525aa4f66c8d8c3588c489f2f88eb0e').should.be.false);
574
+ });
575
+ });
576
+ });
563
577
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ellipticltd/aml-utils",
3
- "version": "0.15.5",
3
+ "version": "0.15.7",
4
4
  "description": "Utilities, helpers, validations, type-checking, etc",
5
5
  "engines": {
6
6
  "node": "10.1.0",
@@ -19,20 +19,23 @@
19
19
  "prepublishOnly": "npm run build",
20
20
  "lint": "./node_modules/.bin/eslint --color 'lib/**/*.{js,ts}' 'test/**/*.js' ",
21
21
  "test": "nyc npm run test:unit && nyc report --reporter=html",
22
- "coverage": "nyc npm run test:unit && nyc report --reporter=lcov --reporter=text-lcov | codecov --pipe"
22
+ "coverage": "nyc npm run test:unit && nyc report --reporter=lcov --reporter=text-lcov | codecov --pipe",
23
+ "prepare": "npm run snyk-protect",
24
+ "snyk-protect": "snyk-protect"
23
25
  },
24
26
  "author": "Adam Joyce <adam@ellipitc.co>",
25
27
  "license": "MIT",
26
28
  "dependencies": {
27
29
  "@zilliqa-js/util": "^0.8.8",
28
- "bitcore-lib": "^8.10.1",
30
+ "bitcore-lib": "^8.22.2",
29
31
  "create-error": "0.3.1",
30
- "lodash": "^4.17.15",
32
+ "lodash": "^4.17.20",
31
33
  "multicoin-address-validator": "^0.5.2",
32
34
  "stellar-sdk": "4.0.2",
33
35
  "type-check": "0.3.2",
34
36
  "validator": "10.10.0",
35
- "web3-utils": "1.0.0"
37
+ "web3-utils": "1.0.0",
38
+ "@snyk/protect": "latest"
36
39
  },
37
40
  "devDependencies": {
38
41
  "@commitlint/cli": "^11.0.0",
@@ -62,5 +65,6 @@
62
65
  "ts-mocha": "^8.0.0",
63
66
  "ts-node": "^9.0.0",
64
67
  "typescript": "^4.0.5"
65
- }
66
- }
68
+ },
69
+ "snyk": true
70
+ }