@ellipticltd/aml-utils 0.13.0 → 0.13.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.
|
@@ -34,7 +34,7 @@ export function isCustomerReference(x: any): boolean;
|
|
|
34
34
|
export function isCustomerReference(x: any): boolean;
|
|
35
35
|
export function isCustomerLabelName(x: any): boolean;
|
|
36
36
|
export function isCustomerLabelName(x: any): boolean;
|
|
37
|
-
export namespace
|
|
37
|
+
export namespace binanceChain {
|
|
38
38
|
function isAddress(str: any): boolean;
|
|
39
39
|
function isAddress(str: any): boolean;
|
|
40
40
|
function isTxHash(str: any): boolean;
|
|
@@ -138,13 +138,13 @@ describe('Validations', () => {
|
|
|
138
138
|
});
|
|
139
139
|
describe('BNB', () => {
|
|
140
140
|
describe('isAddress', () => {
|
|
141
|
-
it('should correctly validate valid BNB addresses', () => validations_1.default.
|
|
142
|
-
it('should correctly validate an incorrect BNB address', () => validations_1.default.
|
|
141
|
+
it('should correctly validate valid BNB addresses', () => validations_1.default.binanceChain.isAddress('bnb1z35wusfv8twfele77vddclka9z84ugywug48gn').should.be.true);
|
|
142
|
+
it('should correctly validate an incorrect BNB address', () => validations_1.default.binanceChain.isAddress('bnb1z35wusfv8twfele77vddclka9z84ugywug48gn1').should.be.false);
|
|
143
143
|
});
|
|
144
144
|
describe('isTxHash', () => {
|
|
145
|
-
it('should correctly validate a valid BNB hash', () => validations_1.default.
|
|
146
|
-
it('should correctly validate an incorrect BNB hash', () => validations_1.default.
|
|
147
|
-
it('should return false when passed a non-hex string', () => validations_1.default.
|
|
145
|
+
it('should correctly validate a valid BNB hash', () => validations_1.default.binanceChain.isTxHash('E68C2D178F989DE296FA1B513D1AA138B234C436B52E0D755C6664A70F7EEF7B').should.be.true);
|
|
146
|
+
it('should correctly validate an incorrect BNB hash', () => validations_1.default.binanceChain.isTxHash('E68C2D178F989DE296FA1B513D1AA138B234C436B52E0D755C6664A70F7EEF7B1').should.be.false);
|
|
147
|
+
it('should return false when passed a non-hex string', () => validations_1.default.binanceChain.isTxHash('Not a hex string!').should.be.false);
|
|
148
148
|
});
|
|
149
149
|
});
|
|
150
150
|
describe('BTC', () => {
|
|
@@ -166,17 +166,17 @@ describe('Validations', () => {
|
|
|
166
166
|
|
|
167
167
|
describe('BNB', () => {
|
|
168
168
|
describe('isAddress', () => {
|
|
169
|
-
it('should correctly validate valid BNB addresses', () => validations.
|
|
169
|
+
it('should correctly validate valid BNB addresses', () => validations.binanceChain.isAddress('bnb1z35wusfv8twfele77vddclka9z84ugywug48gn').should.be.true);
|
|
170
170
|
|
|
171
|
-
it('should correctly validate an incorrect BNB address', () => validations.
|
|
171
|
+
it('should correctly validate an incorrect BNB address', () => validations.binanceChain.isAddress('bnb1z35wusfv8twfele77vddclka9z84ugywug48gn1').should.be.false);
|
|
172
172
|
});
|
|
173
173
|
|
|
174
174
|
describe('isTxHash', () => {
|
|
175
|
-
it('should correctly validate a valid BNB hash', () => validations.
|
|
175
|
+
it('should correctly validate a valid BNB hash', () => validations.binanceChain.isTxHash('E68C2D178F989DE296FA1B513D1AA138B234C436B52E0D755C6664A70F7EEF7B').should.be.true);
|
|
176
176
|
|
|
177
|
-
it('should correctly validate an incorrect BNB hash', () => validations.
|
|
177
|
+
it('should correctly validate an incorrect BNB hash', () => validations.binanceChain.isTxHash('E68C2D178F989DE296FA1B513D1AA138B234C436B52E0D755C6664A70F7EEF7B1').should.be.false);
|
|
178
178
|
|
|
179
|
-
it('should return false when passed a non-hex string', () => validations.
|
|
179
|
+
it('should return false when passed a non-hex string', () => validations.binanceChain.isTxHash('Not a hex string!').should.be.false);
|
|
180
180
|
});
|
|
181
181
|
});
|
|
182
182
|
|