@ellipticltd/aml-utils 0.14.0 → 0.14.1-SCR-575

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 (39) hide show
  1. package/.nyc_output/93065070-39ad-40ac-be60-eda0553e5729.json +1 -0
  2. package/.nyc_output/b2611da5-5e21-4081-a132-674726efaad6.json +1 -0
  3. package/.nyc_output/processinfo/2bbc4bae-048c-48ad-a7d1-d51b8f440216.json +1 -0
  4. package/.nyc_output/processinfo/83b0845a-d0d2-4599-8398-957100225628.json +1 -0
  5. package/.nyc_output/processinfo/{6c9af0f1-e7f5-4521-8926-50f6385c07cf.json → 93065070-39ad-40ac-be60-eda0553e5729.json} +1 -1
  6. package/.nyc_output/processinfo/{a2931b0e-a917-4a52-a94d-88a1afc66ea7.json → b2611da5-5e21-4081-a132-674726efaad6.json} +1 -1
  7. package/.nyc_output/processinfo/index.json +1 -1
  8. package/coverage/errors/errors.js.html +1 -1
  9. package/coverage/errors/errors.spec.js.html +1 -1
  10. package/coverage/errors/index.html +1 -1
  11. package/coverage/file-parser/__tests/file-parser.spec.js.html +1 -1
  12. package/coverage/file-parser/__tests/index.html +1 -1
  13. package/coverage/file-parser/__tests/parse-row.spec.js.html +1 -1
  14. package/coverage/file-parser/__tests/sanitize-rows.spec.js.html +1 -1
  15. package/coverage/formatting/formatting.js.html +1 -1
  16. package/coverage/formatting/formatting.spec.js.html +1 -1
  17. package/coverage/formatting/index.html +1 -1
  18. package/coverage/index.html +18 -18
  19. package/coverage/middleware/index.html +1 -1
  20. package/coverage/middleware/middleware.js.html +1 -1
  21. package/coverage/orm-helpers/index.html +1 -1
  22. package/coverage/orm-helpers/ormHelpers.js.html +1 -1
  23. package/coverage/orm-helpers/ormHelpers.spec.js.html +1 -1
  24. package/coverage/types/index.html +1 -1
  25. package/coverage/types/types.js.html +1 -1
  26. package/coverage/validations/index.html +18 -18
  27. package/coverage/validations/validations.js.html +14 -8
  28. package/coverage/validations/validations.spec.js.html +26 -14
  29. package/dist/validations/validations.js +1 -1
  30. package/dist/validations/validations.spec.js +1 -0
  31. package/lib/validations/validations.js +1 -1
  32. package/lib/validations/validations.spec.js +2 -0
  33. package/package.json +2 -2
  34. package/.nyc_output/6c9af0f1-e7f5-4521-8926-50f6385c07cf.json +0 -1
  35. package/.nyc_output/a2931b0e-a917-4a52-a94d-88a1afc66ea7.json +0 -1
  36. package/.nyc_output/processinfo/011c99ee-70e2-4785-ba07-3b5e1591b03b.json +0 -1
  37. package/.nyc_output/processinfo/5c634f75-5165-4488-a978-0129fbe23567.json +0 -1
  38. /package/.nyc_output/{011c99ee-70e2-4785-ba07-3b5e1591b03b.json → 2bbc4bae-048c-48ad-a7d1-d51b8f440216.json} +0 -0
  39. /package/.nyc_output/{5c634f75-5165-4488-a978-0129fbe23567.json → 83b0845a-d0d2-4599-8398-957100225628.json} +0 -0
@@ -241,7 +241,7 @@ const validations = {
241
241
  },
242
242
  litecoin: {
243
243
  isAddress(str) {
244
- return /^[3LM][a-km-zA-HJ-NP-Z1-9]{24,33}$|^ltc1[ac-hj-np-z02-9]{6,86}$|^LTC1[AC-HJ-NP-Z02-9]{6,86}$/.test(str);
244
+ return /^[3LM][a-km-zA-HJ-NP-Z1-9]{24,33}$|^ltc1[ac-hj-np-z02-9]{6,86}$|^LTC1[AC-HJ-NP-Z02-9]{6,86}$|^ltcmweb[a-zA-Z0-9]{114}$/.test(str);
245
245
  },
246
246
  isTxHash(str) {
247
247
  if (!V.isHexadecimal(str)) {
@@ -222,6 +222,7 @@ describe('Validations', () => {
222
222
  describe('LTC', () => {
223
223
  describe('isAddress', () => {
224
224
  it('should correctly validate valid LTC addresses', () => validations_1.default.litecoin.isAddress('LMR7przNNMS3GpaD6Ygq64NxbsJsZAqGgM').should.be.true);
225
+ it('should correctly validate valid LTC MimbleWimble addresses', () => validations_1.default.litecoin.isAddress('ltcmweb1qq2aejfd7svtnqk0uq0cfkd9mr9sszypmx2phdu5qwfhlujazv2nxjqstgy3r5gkxesu5vv2v0tmlwdwhat3se36pwzwtlqm8ypxq3d2fggc8d7nq').should.be.true);
225
226
  it('should correctly validate an incorrect LTC address', () => validations_1.default.litecoin.isAddress('t1t8BzkNb8d98o8kpbwrjtUjMX3GMF').should.be.false);
226
227
  });
227
228
  describe('isTxHash', () => {
@@ -246,7 +246,7 @@ const validations = {
246
246
  },
247
247
  litecoin: {
248
248
  isAddress(str) {
249
- return /^[3LM][a-km-zA-HJ-NP-Z1-9]{24,33}$|^ltc1[ac-hj-np-z02-9]{6,86}$|^LTC1[AC-HJ-NP-Z02-9]{6,86}$/.test(str);
249
+ return /^[3LM][a-km-zA-HJ-NP-Z1-9]{24,33}$|^ltc1[ac-hj-np-z02-9]{6,86}$|^LTC1[AC-HJ-NP-Z02-9]{6,86}$|^ltcmweb[a-zA-Z0-9]{114}$/.test(str);
250
250
  },
251
251
  isTxHash(str) {
252
252
  if (!V.isHexadecimal(str)) {
@@ -273,6 +273,8 @@ describe('Validations', () => {
273
273
  describe('isAddress', () => {
274
274
  it('should correctly validate valid LTC addresses', () => validations.litecoin.isAddress('LMR7przNNMS3GpaD6Ygq64NxbsJsZAqGgM').should.be.true);
275
275
 
276
+ it('should correctly validate valid LTC MimbleWimble addresses', () => validations.litecoin.isAddress('ltcmweb1qq2aejfd7svtnqk0uq0cfkd9mr9sszypmx2phdu5qwfhlujazv2nxjqstgy3r5gkxesu5vv2v0tmlwdwhat3se36pwzwtlqm8ypxq3d2fggc8d7nq').should.be.true);
277
+
276
278
  it('should correctly validate an incorrect LTC address', () => validations.litecoin.isAddress('t1t8BzkNb8d98o8kpbwrjtUjMX3GMF').should.be.false);
277
279
  });
278
280
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ellipticltd/aml-utils",
3
- "version": "0.14.0",
3
+ "version": "0.14.1-SCR-575",
4
4
  "description": "Utilities, helpers, validations, type-checking, etc",
5
5
  "engines": {
6
6
  "node": "10.1.0",
@@ -63,4 +63,4 @@
63
63
  "ts-node": "^9.0.0",
64
64
  "typescript": "^4.0.5"
65
65
  }
66
- }
66
+ }