@ellipticltd/aml-utils 0.15.6 → 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.
- package/.circleci/config.yml +6 -1
- package/.nyc_output/6b68ea83-db7a-45cb-b572-16338a5cea4b.json +1 -0
- package/.nyc_output/a74c6648-3619-4b08-bc8c-ac8cb4959f43.json +1 -0
- package/.nyc_output/c9b6c4ce-fddf-403b-aa2e-aac05145213c.json +1 -0
- package/.nyc_output/d9967655-96b8-471a-9686-a4585437f85a.json +1 -0
- package/.nyc_output/processinfo/6b68ea83-db7a-45cb-b572-16338a5cea4b.json +1 -0
- package/.nyc_output/processinfo/a74c6648-3619-4b08-bc8c-ac8cb4959f43.json +1 -0
- package/.nyc_output/processinfo/c9b6c4ce-fddf-403b-aa2e-aac05145213c.json +1 -0
- package/.nyc_output/processinfo/d9967655-96b8-471a-9686-a4585437f85a.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/errors.js.html +228 -0
- package/coverage/errors/errors.spec.js.html +180 -0
- package/coverage/errors/index.html +110 -0
- package/coverage/file-parser/__tests/file-parser.spec.js.html +390 -0
- package/coverage/file-parser/__tests/index.html +123 -0
- package/coverage/file-parser/__tests/parse-row.spec.js.html +174 -0
- package/coverage/file-parser/__tests/sanitize-rows.spec.js.html +333 -0
- package/coverage/formatting/formatting.js.html +123 -0
- package/coverage/formatting/formatting.spec.js.html +204 -0
- package/coverage/formatting/index.html +110 -0
- package/coverage/index.html +175 -0
- package/coverage/middleware/index.html +97 -0
- package/coverage/middleware/middleware.js.html +144 -0
- package/coverage/orm-helpers/index.html +110 -0
- package/coverage/orm-helpers/ormHelpers.js.html +123 -0
- package/coverage/orm-helpers/ormHelpers.spec.js.html +192 -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/types/index.html +97 -0
- package/coverage/types/types.js.html +708 -0
- package/coverage/validations/index.html +110 -0
- package/coverage/validations/validations.js.html +1419 -0
- package/coverage/validations/validations.spec.js.html +1800 -0
- package/dist/validations/validations.d.ts +6 -0
- package/dist/validations/validations.js +8 -0
- package/dist/validations/validations.spec.js +12 -0
- package/lib/validations/validations.js +8 -0
- package/lib/validations/validations.spec.js +14 -0
- package/package.json +1 -1
|
@@ -212,3 +212,9 @@ export namespace tron {
|
|
|
212
212
|
function isTxHash(str: any): any;
|
|
213
213
|
function isTxHash(str: any): any;
|
|
214
214
|
}
|
|
215
|
+
export namespace fantom {
|
|
216
|
+
function isAddress(str: any): any;
|
|
217
|
+
function isAddress(str: any): any;
|
|
218
|
+
function isTxHash(str: any): any;
|
|
219
|
+
function isTxHash(str: any): any;
|
|
220
|
+
}
|
|
@@ -426,6 +426,14 @@ const validations = {
|
|
|
426
426
|
return str.length === 64 && web3.isHex(str);
|
|
427
427
|
},
|
|
428
428
|
},
|
|
429
|
+
fantom: {
|
|
430
|
+
isAddress(str) {
|
|
431
|
+
return web3.isAddress(str);
|
|
432
|
+
},
|
|
433
|
+
isTxHash(str) {
|
|
434
|
+
return str.length === 66 && web3.isHexStrict(str);
|
|
435
|
+
},
|
|
436
|
+
},
|
|
429
437
|
};
|
|
430
438
|
Object.keys(V).forEach((k) => {
|
|
431
439
|
const v = V[k];
|
|
@@ -428,4 +428,16 @@ describe('Validations', () => {
|
|
|
428
428
|
it('should correctly validate an invalid Tron hash', () => validations_1.default.tron.isTxHash('2f63fad2b3f8ccce75490545c8a0dacbb0730ebd7d551a89b015d8ca4ab458f21').should.be.false);
|
|
429
429
|
});
|
|
430
430
|
});
|
|
431
|
+
describe('Fantom', () => {
|
|
432
|
+
describe('isAddress', () => {
|
|
433
|
+
describe('isAddress', () => {
|
|
434
|
+
it('should return true if the address evaluates as a web3 address', () => validations_1.default.fantom.isAddress('0xa6Bc4b3fe7F2756124d30D896Fe4457711e9d214').should.be.true);
|
|
435
|
+
it('should return false if the address does not evaluate to a web3 address', () => validations_1.default.fantom.isAddress('Bc4b3fe7F2756124d30D896Fe4457711e9d214').should.be.false);
|
|
436
|
+
});
|
|
437
|
+
describe('isTxHash', () => {
|
|
438
|
+
it('should correctly validate a valid Fantom hash', () => validations_1.default.fantom.isTxHash('0xec6491abd46a1a9a71b78f4b84d96fd49525aa4f66c8d8c3588c489f2f88eb0e').should.be.true);
|
|
439
|
+
it('should correctly validate an incorrect Fantom hash', () => validations_1.default.fantom.isTxHash('0xec6491abd46a1a9a71b7896fd49525aa4f66c8d8c3588c489f2f88eb0e').should.be.false);
|
|
440
|
+
});
|
|
441
|
+
});
|
|
442
|
+
});
|
|
431
443
|
});
|
|
@@ -431,6 +431,14 @@ const validations = {
|
|
|
431
431
|
return str.length === 64 && web3.isHex(str);
|
|
432
432
|
},
|
|
433
433
|
},
|
|
434
|
+
fantom: {
|
|
435
|
+
isAddress(str) {
|
|
436
|
+
return web3.isAddress(str);
|
|
437
|
+
},
|
|
438
|
+
isTxHash(str) {
|
|
439
|
+
return str.length === 66 && web3.isHexStrict(str);
|
|
440
|
+
},
|
|
441
|
+
},
|
|
434
442
|
};
|
|
435
443
|
|
|
436
444
|
Object.keys(V).forEach((k) => {
|
|
@@ -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
|
});
|