@ellipticltd/aml-utils 0.14.2-SCR-638 → 0.14.2-SCR-638-1

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.
@@ -158,7 +158,7 @@ export namespace doge {
158
158
  function isTxHash(str: any): boolean;
159
159
  function isTxHash(str: any): boolean;
160
160
  }
161
- export namespace atom {
161
+ export namespace cosmos {
162
162
  function isAddress(str: any): boolean;
163
163
  function isAddress(str: any): boolean;
164
164
  function isTxHash(str: any): any;
@@ -354,7 +354,7 @@ const validations = {
354
354
  return str.length === 64;
355
355
  },
356
356
  },
357
- atom: {
357
+ cosmos: {
358
358
  isAddress(str) {
359
359
  return /^cosmos{1}[a-zA-Z\d]{39}$/.test(str);
360
360
  },
@@ -310,14 +310,14 @@ describe('Validations', () => {
310
310
  });
311
311
  describe('ATOM', () => {
312
312
  describe('isAddress', () => {
313
- it('should correctly validate valid ATOM addresses', () => validations_1.default.atom.isAddress('cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5').should.be.true);
314
- it('should correctly validate an incorrect ATOM address', () => validations_1.default.atom.isAddress('kosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5').should.be.false);
315
- it('should correctly validate an incorrect (too long) ATOM address', () => validations_1.default.atom.isAddress('cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x50').should.be.false);
313
+ it('should correctly validate valid ATOM addresses', () => validations_1.default.cosmos.isAddress('cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5').should.be.true);
314
+ it('should correctly validate an incorrect ATOM address', () => validations_1.default.cosmos.isAddress('kosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5').should.be.false);
315
+ it('should correctly validate an incorrect (too long) ATOM address', () => validations_1.default.cosmos.isAddress('cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x50').should.be.false);
316
316
  });
317
317
  describe('isTxHash', () => {
318
- it('should correctly validate a valid ATOM hash', () => validations_1.default.atom.isTxHash('BFA0252193CCAA0592AF2A27541473E7F6422A9AD85CFC9525CF67FA2AA2CD6F').should.be.true);
319
- it('should correctly validate an incorrect ATOM hash', () => validations_1.default.atom.isTxHash('BFA0252193CCAA0592AF2A27541473E7').should.be.false);
320
- it('should return false when passed a non-hex string', () => validations_1.default.atom.isTxHash('ZZA0252193CCAA0592AF2A27541473E7F6422A9AD85CFC9525CF67FA2AA2CD6F').should.be.false);
318
+ it('should correctly validate a valid ATOM hash', () => validations_1.default.cosmos.isTxHash('BFA0252193CCAA0592AF2A27541473E7F6422A9AD85CFC9525CF67FA2AA2CD6F').should.be.true);
319
+ it('should correctly validate an incorrect ATOM hash', () => validations_1.default.cosmos.isTxHash('BFA0252193CCAA0592AF2A27541473E7').should.be.false);
320
+ it('should return false when passed a non-hex string', () => validations_1.default.cosmos.isTxHash('ZZA0252193CCAA0592AF2A27541473E7F6422A9AD85CFC9525CF67FA2AA2CD6F').should.be.false);
321
321
  });
322
322
  });
323
323
  });
@@ -359,7 +359,7 @@ const validations = {
359
359
  return str.length === 64;
360
360
  },
361
361
  },
362
- atom: {
362
+ cosmos: {
363
363
  isAddress(str) {
364
364
  return /^cosmos{1}[a-zA-Z\d]{39}$/.test(str);
365
365
  },
@@ -401,19 +401,19 @@ describe('Validations', () => {
401
401
 
402
402
  describe('ATOM', () => {
403
403
  describe('isAddress', () => {
404
- it('should correctly validate valid ATOM addresses', () => validations.atom.isAddress('cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5').should.be.true);
404
+ it('should correctly validate valid ATOM addresses', () => validations.cosmos.isAddress('cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5').should.be.true);
405
405
 
406
- it('should correctly validate an incorrect ATOM address', () => validations.atom.isAddress('kosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5').should.be.false);
406
+ it('should correctly validate an incorrect ATOM address', () => validations.cosmos.isAddress('kosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5').should.be.false);
407
407
 
408
- it('should correctly validate an incorrect (too long) ATOM address', () => validations.atom.isAddress('cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x50').should.be.false);
408
+ it('should correctly validate an incorrect (too long) ATOM address', () => validations.cosmos.isAddress('cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x50').should.be.false);
409
409
  });
410
410
 
411
411
  describe('isTxHash', () => {
412
- it('should correctly validate a valid ATOM hash', () => validations.atom.isTxHash('BFA0252193CCAA0592AF2A27541473E7F6422A9AD85CFC9525CF67FA2AA2CD6F').should.be.true);
412
+ it('should correctly validate a valid ATOM hash', () => validations.cosmos.isTxHash('BFA0252193CCAA0592AF2A27541473E7F6422A9AD85CFC9525CF67FA2AA2CD6F').should.be.true);
413
413
 
414
- it('should correctly validate an incorrect ATOM hash', () => validations.atom.isTxHash('BFA0252193CCAA0592AF2A27541473E7').should.be.false);
414
+ it('should correctly validate an incorrect ATOM hash', () => validations.cosmos.isTxHash('BFA0252193CCAA0592AF2A27541473E7').should.be.false);
415
415
 
416
- it('should return false when passed a non-hex string', () => validations.atom.isTxHash('ZZA0252193CCAA0592AF2A27541473E7F6422A9AD85CFC9525CF67FA2AA2CD6F').should.be.false);
416
+ it('should return false when passed a non-hex string', () => validations.cosmos.isTxHash('ZZA0252193CCAA0592AF2A27541473E7F6422A9AD85CFC9525CF67FA2AA2CD6F').should.be.false);
417
417
  });
418
418
  });
419
419
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ellipticltd/aml-utils",
3
- "version": "0.14.2-SCR-638",
3
+ "version": "0.14.2-SCR-638-1",
4
4
  "description": "Utilities, helpers, validations, type-checking, etc",
5
5
  "engines": {
6
6
  "node": "10.1.0",