Skip to content

Commit cc36c97

Browse files
committed
Fix crypto ts
1 parent 4bdc14d commit cc36c97

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

ican.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@
181181

182182
/**
183183
* Convert the passed BCAN to an ICAN for this country specification.
184-
* This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_ICAN_check_digits
185184
*
186185
* @param bcan the BCAN to convert to ICAN
187186
* @returns {string} the ICAN
@@ -199,7 +198,7 @@
199198

200199
/**
201200
* Check of the passed BCAN is valid.
202-
* This function only checks the format of the BCAN (length and matching the letetr/number specs) but does not
201+
* This function only checks the format of the BCAN (length and matching the leter/number specs) but does not
203202
* verify the check digit.
204203
*
205204
* @param bcan the BCAN to validate
@@ -398,7 +397,6 @@
398397

399398
/**
400399
* Convert the passed BCAN to an ICAN for this country specification.
401-
* This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_ICAN_check_digits
402400
*
403401
* @param countryCode the country of the BCAN
404402
* @param bcan the BCAN to convert to ICAN

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@blockchainhub/ican",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"description": "A JavaScript library to validate, format, and convert International Crypto Account Numbers (ICAN) and Basic Crypto Account Numbers (BCAN).",
55
"keywords": [
66
"ican",

src/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ interface ICANStatic {
2525
* @param onlyCrypto Check only crypto definitions.
2626
* @returns True if valid, false otherwise.
2727
*/
28-
isValid(ican: string, onlyCrypto: boolean): boolean;
28+
isValid(ican: string, onlyCrypto?: boolean): boolean;
2929

3030
/**
3131
* @summary Check of the passed BCAN is valid.
3232
* @param countryCode The country of the BCAN.
3333
* @param bcan The BCAN to validate.
3434
* @returns True if valid, false otherwise.
3535
*/
36-
isValidBCAN(countryCode: string, bcan: string, onlyCrypto: boolean): boolean;
36+
isValidBCAN(countryCode: string, bcan: string, onlyCrypto?: boolean): boolean;
3737

3838
/**
3939
* @summary Returns the ICAN in a print format.
@@ -75,7 +75,7 @@ declare namespace ICAN {
7575
/** an example valid ICAN */
7676
readonly example: string;
7777
/** Check if the passed ican is valid according to this specification. */
78-
isValid(ican: string, onlyCrypto: boolean): boolean;
78+
isValid(ican: string, onlyCrypto?: boolean): boolean;
7979
/**
8080
* Convert the passed ICAN to a country-specific BCAN.
8181
*/
@@ -91,7 +91,7 @@ declare namespace ICAN {
9191
* This function only checks the format of the BCAN (length and matching the letetr/number specs) but does not
9292
* verify the check digit.
9393
*/
94-
isValidBCAN(bcan: string, onlyCrypto: boolean): boolean;
94+
isValidBCAN(bcan: string, onlyCrypto?: boolean): boolean;
9595
}
9696
}
9797

src/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@
181181

182182
/**
183183
* Convert the passed BCAN to an ICAN for this country specification.
184-
* This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_ICAN_check_digits
185184
*
186185
* @param bcan the BCAN to convert to ICAN
187186
* @returns {string} the ICAN
@@ -199,7 +198,7 @@
199198

200199
/**
201200
* Check of the passed BCAN is valid.
202-
* This function only checks the format of the BCAN (length and matching the letetr/number specs) but does not
201+
* This function only checks the format of the BCAN (length and matching the leter/number specs) but does not
203202
* verify the check digit.
204203
*
205204
* @param bcan the BCAN to validate
@@ -398,7 +397,6 @@
398397

399398
/**
400399
* Convert the passed BCAN to an ICAN for this country specification.
401-
* This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_ICAN_check_digits
402400
*
403401
* @param countryCode the country of the BCAN
404402
* @param bcan the BCAN to convert to ICAN

0 commit comments

Comments
 (0)