Skip to content

Commit

Permalink
Merge pull request #10 from bchainhub/update/fix-01
Browse files Browse the repository at this point in the history
Fix crypto ts
  • Loading branch information
rastislavcore authored Aug 1, 2024
2 parents 4bdc14d + cc36c97 commit 3153492
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
4 changes: 1 addition & 3 deletions ican.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@

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

/**
* Check of the passed BCAN is valid.
* This function only checks the format of the BCAN (length and matching the letetr/number specs) but does not
* This function only checks the format of the BCAN (length and matching the leter/number specs) but does not
* verify the check digit.
*
* @param bcan the BCAN to validate
Expand Down Expand Up @@ -398,7 +397,6 @@

/**
* Convert the passed BCAN to an ICAN for this country specification.
* This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_ICAN_check_digits
*
* @param countryCode the country of the BCAN
* @param bcan the BCAN to convert to ICAN
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@blockchainhub/ican",
"version": "0.4.0",
"version": "0.4.1",
"description": "A JavaScript library to validate, format, and convert International Crypto Account Numbers (ICAN) and Basic Crypto Account Numbers (BCAN).",
"keywords": [
"ican",
Expand Down
8 changes: 4 additions & 4 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ interface ICANStatic {
* @param onlyCrypto Check only crypto definitions.
* @returns True if valid, false otherwise.
*/
isValid(ican: string, onlyCrypto: boolean): boolean;
isValid(ican: string, onlyCrypto?: boolean): boolean;

/**
* @summary Check of the passed BCAN is valid.
* @param countryCode The country of the BCAN.
* @param bcan The BCAN to validate.
* @returns True if valid, false otherwise.
*/
isValidBCAN(countryCode: string, bcan: string, onlyCrypto: boolean): boolean;
isValidBCAN(countryCode: string, bcan: string, onlyCrypto?: boolean): boolean;

/**
* @summary Returns the ICAN in a print format.
Expand Down Expand Up @@ -75,7 +75,7 @@ declare namespace ICAN {
/** an example valid ICAN */
readonly example: string;
/** Check if the passed ican is valid according to this specification. */
isValid(ican: string, onlyCrypto: boolean): boolean;
isValid(ican: string, onlyCrypto?: boolean): boolean;
/**
* Convert the passed ICAN to a country-specific BCAN.
*/
Expand All @@ -91,7 +91,7 @@ declare namespace ICAN {
* This function only checks the format of the BCAN (length and matching the letetr/number specs) but does not
* verify the check digit.
*/
isValidBCAN(bcan: string, onlyCrypto: boolean): boolean;
isValidBCAN(bcan: string, onlyCrypto?: boolean): boolean;
}
}

Expand Down
4 changes: 1 addition & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@

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

/**
* Check of the passed BCAN is valid.
* This function only checks the format of the BCAN (length and matching the letetr/number specs) but does not
* This function only checks the format of the BCAN (length and matching the leter/number specs) but does not
* verify the check digit.
*
* @param bcan the BCAN to validate
Expand Down Expand Up @@ -398,7 +397,6 @@

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

0 comments on commit 3153492

Please sign in to comment.